Index: src/ia32/lithium-ia32.h |
diff --git a/src/ia32/lithium-ia32.h b/src/ia32/lithium-ia32.h |
index e05a936291760a49fffaaaf5402c0bd68f2ab67b..ee9bf79601da0a1f1bd9b97ed9fb33b172d89e6f 100644 |
--- a/src/ia32/lithium-ia32.h |
+++ b/src/ia32/lithium-ia32.h |
@@ -872,6 +872,7 @@ class LBoundsCheck: public LTemplateInstruction<0, 2, 0> { |
LOperand* length() { return inputs_[1]; } |
DECLARE_CONCRETE_INSTRUCTION(BoundsCheck, "bounds-check") |
+ DECLARE_HYDROGEN_ACCESSOR(BoundsCheck) |
}; |
@@ -1277,6 +1278,19 @@ class LLoadKeyedFastDoubleElement: public LTemplateInstruction<1, 2, 0> { |
}; |
+inline static bool ExternalArrayOpRequiresTemp( |
+ Representation key_representation, |
+ ElementsKind elements_kind) { |
+ // Operations that require the key to be divided by two to be converted into |
+ // an index cannot fold the scale operation into a load and need an extra |
+ // temp register to do the work. |
+ return key_representation.IsTagged() && |
+ (elements_kind == EXTERNAL_BYTE_ELEMENTS || |
+ elements_kind == EXTERNAL_UNSIGNED_BYTE_ELEMENTS || |
+ elements_kind == EXTERNAL_PIXEL_ELEMENTS); |
+} |
+ |
+ |
class LLoadKeyedSpecializedArrayElement: public LTemplateInstruction<1, 2, 0> { |
public: |
LLoadKeyedSpecializedArrayElement(LOperand* external_pointer, LOperand* key) { |