Index: src/full-codegen/mips/full-codegen-mips.cc |
diff --git a/src/full-codegen/mips/full-codegen-mips.cc b/src/full-codegen/mips/full-codegen-mips.cc |
index dd5ab55b253e1915eb8a182e9f7aa5b54dacf17f..f38c01bbeaa0cc36275a9bf83c31c97d8388da1d 100644 |
--- a/src/full-codegen/mips/full-codegen-mips.cc |
+++ b/src/full-codegen/mips/full-codegen-mips.cc |
@@ -1497,8 +1497,7 @@ void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) { |
// a0 = RegExp literal clone |
__ lw(a0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
__ lw(t0, FieldMemOperand(a0, JSFunction::kLiteralsOffset)); |
- int literal_offset = |
- FixedArray::kHeaderSize + expr->literal_index() * kPointerSize; |
+ int literal_offset = LiteralsArray::OffsetOfLiteralAt(expr->literal_index()); |
__ lw(t1, FieldMemOperand(t0, literal_offset)); |
__ LoadRoot(at, Heap::kUndefinedValueRootIndex); |
__ Branch(&materialized, ne, t1, Operand(at)); |