Index: src/full-codegen/arm64/full-codegen-arm64.cc |
diff --git a/src/full-codegen/arm64/full-codegen-arm64.cc b/src/full-codegen/arm64/full-codegen-arm64.cc |
index 43e2b9f55b5a27c5d2df93b559a46bb3e0e1cc93..b53e8ee6cde133fdefe74dde81723ddaea3cd45c 100644 |
--- a/src/full-codegen/arm64/full-codegen-arm64.cc |
+++ b/src/full-codegen/arm64/full-codegen-arm64.cc |
@@ -1487,8 +1487,7 @@ void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) { |
// x0 = RegExp literal clone |
__ Ldr(x10, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
__ Ldr(x4, FieldMemOperand(x10, JSFunction::kLiteralsOffset)); |
- int literal_offset = |
- FixedArray::kHeaderSize + expr->literal_index() * kPointerSize; |
+ int literal_offset = LiteralsArray::OffsetOfLiteralAt(expr->literal_index()); |
__ Ldr(x5, FieldMemOperand(x4, literal_offset)); |
__ JumpIfNotRoot(x5, Heap::kUndefinedValueRootIndex, &materialized); |