PPC: Introduce LiteralsArray to hide it's implementation.

Port d8cdd6956a

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}
This commit is contained in:
mbrandy 2015-09-30 14:10:23 -07:00 committed by Commit bot
parent 96d6fcffa5
commit aeefe1013d
2 changed files with 2 additions and 3 deletions

View File

@ -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);

View File

@ -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);