Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index e27a32628ea69ed015cb984d276b056847dfb9af..9cc67a308af2584cdce9d649b8fb02294f68b829 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -4930,15 +4930,13 @@ void LCodeGen::DoRegExpLiteral(LRegExpLiteral* instr) { |
ASSERT(ToRegister(instr->context()).is(esi)); |
Label materialized; |
// Registers will be used as follows: |
- // edi = JS function. |
// ecx = literals array. |
// ebx = regexp literal. |
// eax = regexp literal clone. |
// esi = context. |
- __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); |
- __ mov(ecx, FieldOperand(edi, JSFunction::kLiteralsOffset)); |
- int literal_offset = FixedArray::kHeaderSize + |
- instr->hydrogen()->literal_index() * kPointerSize; |
+ int literal_offset = |
+ FixedArray::OffsetOfElementAt(instr->hydrogen()->literal_index()); |
+ __ LoadHeapObject(ecx, instr->hydrogen()->literals()); |
__ mov(ebx, FieldOperand(ecx, literal_offset)); |
__ cmp(ebx, factory()->undefined_value()); |
__ j(not_equal, &materialized, Label::kNear); |