OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #if V8_TARGET_ARCH_PPC | 5 #if V8_TARGET_ARCH_PPC |
6 | 6 |
7 #include "src/full-codegen/full-codegen.h" | 7 #include "src/full-codegen/full-codegen.h" |
8 #include "src/ast/compile-time-value.h" | 8 #include "src/ast/compile-time-value.h" |
9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 1526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1537 __ LoadP(r6, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 1537 __ LoadP(r6, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
1538 __ LoadSmiLiteral(r5, Smi::FromInt(expr->literal_index())); | 1538 __ LoadSmiLiteral(r5, Smi::FromInt(expr->literal_index())); |
1539 __ mov(r4, Operand(constant_elements)); | 1539 __ mov(r4, Operand(constant_elements)); |
1540 if (MustCreateArrayLiteralWithRuntime(expr)) { | 1540 if (MustCreateArrayLiteralWithRuntime(expr)) { |
1541 __ LoadSmiLiteral(r3, Smi::FromInt(expr->ComputeFlags())); | 1541 __ LoadSmiLiteral(r3, Smi::FromInt(expr->ComputeFlags())); |
1542 __ Push(r6, r5, r4, r3); | 1542 __ Push(r6, r5, r4, r3); |
1543 __ CallRuntime(Runtime::kCreateArrayLiteral); | 1543 __ CallRuntime(Runtime::kCreateArrayLiteral); |
1544 } else { | 1544 } else { |
1545 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); | 1545 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); |
1546 __ CallStub(&stub); | 1546 __ CallStub(&stub); |
| 1547 RestoreContext(); |
1547 } | 1548 } |
1548 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); | 1549 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); |
1549 | 1550 |
1550 bool result_saved = false; // Is the result saved to the stack? | 1551 bool result_saved = false; // Is the result saved to the stack? |
1551 ZoneList<Expression*>* subexprs = expr->values(); | 1552 ZoneList<Expression*>* subexprs = expr->values(); |
1552 int length = subexprs->length(); | 1553 int length = subexprs->length(); |
1553 | 1554 |
1554 // Emit code to evaluate all the non-constant subexpressions and to store | 1555 // Emit code to evaluate all the non-constant subexpressions and to store |
1555 // them into the newly cloned array. | 1556 // them into the newly cloned array. |
1556 for (int array_index = 0; array_index < length; array_index++) { | 1557 for (int array_index = 0; array_index < length; array_index++) { |
(...skipping 2140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3697 | 3698 |
3698 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); | 3699 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); |
3699 | 3700 |
3700 DCHECK(interrupt_address == | 3701 DCHECK(interrupt_address == |
3701 isolate->builtins()->OnStackReplacement()->entry()); | 3702 isolate->builtins()->OnStackReplacement()->entry()); |
3702 return ON_STACK_REPLACEMENT; | 3703 return ON_STACK_REPLACEMENT; |
3703 } | 3704 } |
3704 } // namespace internal | 3705 } // namespace internal |
3705 } // namespace v8 | 3706 } // namespace v8 |
3706 #endif // V8_TARGET_ARCH_PPC | 3707 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |