Index: src/full-codegen/x64/full-codegen-x64.cc |
diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc |
index 7662dca268abb9addd8be8d0635341ed3b082c9a..0133c09d6e7d78b618b095073c09f9e05d52cb42 100644 |
--- a/src/full-codegen/x64/full-codegen-x64.cc |
+++ b/src/full-codegen/x64/full-codegen-x64.cc |
@@ -1453,8 +1453,7 @@ void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) { |
// rax = regexp literal clone. |
__ movp(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
__ movp(rcx, FieldOperand(rdi, JSFunction::kLiteralsOffset)); |
- int literal_offset = |
- FixedArray::kHeaderSize + expr->literal_index() * kPointerSize; |
+ int literal_offset = LiteralsArray::OffsetOfLiteralAt(expr->literal_index()); |
__ movp(rbx, FieldOperand(rcx, literal_offset)); |
__ CompareRoot(rbx, Heap::kUndefinedValueRootIndex); |
__ j(not_equal, &materialized, Label::kNear); |