Index: src/ia32/macro-assembler-ia32.h |
diff --git a/src/ia32/macro-assembler-ia32.h b/src/ia32/macro-assembler-ia32.h |
index 946022adb402716e3568b2e13569bf72b3610778..e1958099e34afb8d3b9ad2637a8960209cf018c6 100644 |
--- a/src/ia32/macro-assembler-ia32.h |
+++ b/src/ia32/macro-assembler-ia32.h |
@@ -766,6 +766,15 @@ static inline Operand FieldOperand(Register object, |
} |
+// Return a position of the element at |index_as_smi| + |additional_offset| |
+// in FixedArray pointer to which is held in |array|. |index_as_smi| is Smi. |
+static inline Operand FixedArrayElementOperand(Register array, |
+ Register index_as_smi, |
+ int additional_offset = 0) { |
+ int offset = FixedArray::kHeaderSize + additional_offset * kPointerSize; |
+ return FieldOperand(array, index_as_smi, times_half_pointer_size, offset); |
+} |
+ |
static inline Operand ContextOperand(Register context, int index) { |
return Operand(context, Context::SlotOffset(index)); |
} |