From: chunyang.dai Date: Wed, 30 Sep 2015 05:37:28 +0000 (-0700) Subject: X87: Introduce LiteralsArray to hide it's implementation. X-Git-Tag: upstream/4.7.83~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=377d860d99c04e3485cf67ee9ea8c646547114c2;p=platform%2Fupstream%2Fv8.git X87: Introduce LiteralsArray to hide it's implementation. port d8cdd6956a04cfcf03159ef7802c44838eee3146 (r31000). original commit message: The LiteralsArray will soon hold a type feedback vector. Code treats it as an ordinary fixed array, and needs to stop that. BUG= Review URL: https://codereview.chromium.org/1378793003 Cr-Commit-Position: refs/heads/master@{#31015} --- diff --git a/src/full-codegen/x87/full-codegen-x87.cc b/src/full-codegen/x87/full-codegen-x87.cc index fe0053d36..a85152d7a 100644 --- a/src/full-codegen/x87/full-codegen-x87.cc +++ b/src/full-codegen/x87/full-codegen-x87.cc @@ -1415,8 +1415,7 @@ void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) { // eax = regexp literal clone. __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); __ mov(ecx, FieldOperand(edi, JSFunction::kLiteralsOffset)); - int literal_offset = - FixedArray::kHeaderSize + expr->literal_index() * kPointerSize; + int literal_offset = LiteralsArray::OffsetOfLiteralAt(expr->literal_index()); __ mov(ebx, FieldOperand(ecx, literal_offset)); __ cmp(ebx, isolate()->factory()->undefined_value()); __ j(not_equal, &materialized, Label::kNear); diff --git a/src/x87/lithium-codegen-x87.cc b/src/x87/lithium-codegen-x87.cc index 3338ea59a..921259e96 100644 --- a/src/x87/lithium-codegen-x87.cc +++ b/src/x87/lithium-codegen-x87.cc @@ -5893,7 +5893,7 @@ void LCodeGen::DoRegExpLiteral(LRegExpLiteral* instr) { // eax = regexp literal clone. // esi = context. int literal_offset = - FixedArray::OffsetOfElementAt(instr->hydrogen()->literal_index()); + LiteralsArray::OffsetOfLiteralAt(instr->hydrogen()->literal_index()); __ LoadHeapObject(ecx, instr->hydrogen()->literals()); __ mov(ebx, FieldOperand(ecx, literal_offset)); __ cmp(ebx, factory()->undefined_value());