From aeefe1013d268a1c8df7ac17e8b09fbbca90cc6e Mon Sep 17 00:00:00 2001 From: mbrandy Date: Wed, 30 Sep 2015 14:10:23 -0700 Subject: [PATCH] PPC: Introduce LiteralsArray to hide it's implementation. Port d8cdd6956a04cfcf03159ef7802c44838eee3146 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. R=mvstanton@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com BUG= Review URL: https://codereview.chromium.org/1373823003 Cr-Commit-Position: refs/heads/master@{#31035} --- src/full-codegen/ppc/full-codegen-ppc.cc | 3 +-- src/ppc/lithium-codegen-ppc.cc | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/full-codegen/ppc/full-codegen-ppc.cc b/src/full-codegen/ppc/full-codegen-ppc.cc index d8c2e49fdc..0dbe9c6ad9 100644 --- a/src/full-codegen/ppc/full-codegen-ppc.cc +++ b/src/full-codegen/ppc/full-codegen-ppc.cc @@ -1464,8 +1464,7 @@ void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) { // r3 = RegExp literal clone __ LoadP(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); __ LoadP(r7, FieldMemOperand(r3, JSFunction::kLiteralsOffset)); - int literal_offset = - FixedArray::kHeaderSize + expr->literal_index() * kPointerSize; + int literal_offset = LiteralsArray::OffsetOfLiteralAt(expr->literal_index()); __ LoadP(r8, FieldMemOperand(r7, literal_offset), r0); __ LoadRoot(ip, Heap::kUndefinedValueRootIndex); __ cmp(r8, ip); diff --git a/src/ppc/lithium-codegen-ppc.cc b/src/ppc/lithium-codegen-ppc.cc index bc50754ae3..ad6d8db13d 100644 --- a/src/ppc/lithium-codegen-ppc.cc +++ b/src/ppc/lithium-codegen-ppc.cc @@ -5695,7 +5695,7 @@ void LCodeGen::DoRegExpLiteral(LRegExpLiteral* instr) { // r3 = regexp literal clone. // r5 and r7-r9 are used as temporaries. int literal_offset = - FixedArray::OffsetOfElementAt(instr->hydrogen()->literal_index()); + LiteralsArray::OffsetOfLiteralAt(instr->hydrogen()->literal_index()); __ Move(r10, instr->hydrogen()->literals()); __ LoadP(r4, FieldMemOperand(r10, literal_offset)); __ LoadRoot(ip, Heap::kUndefinedValueRootIndex);