OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_ARM | 5 #if V8_TARGET_ARCH_ARM |
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 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1576 __ ldr(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 1576 __ ldr(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
1577 __ mov(r2, Operand(Smi::FromInt(expr->literal_index()))); | 1577 __ mov(r2, Operand(Smi::FromInt(expr->literal_index()))); |
1578 __ mov(r1, Operand(constant_elements)); | 1578 __ mov(r1, Operand(constant_elements)); |
1579 if (MustCreateArrayLiteralWithRuntime(expr)) { | 1579 if (MustCreateArrayLiteralWithRuntime(expr)) { |
1580 __ mov(r0, Operand(Smi::FromInt(expr->ComputeFlags()))); | 1580 __ mov(r0, Operand(Smi::FromInt(expr->ComputeFlags()))); |
1581 __ Push(r3, r2, r1, r0); | 1581 __ Push(r3, r2, r1, r0); |
1582 __ CallRuntime(Runtime::kCreateArrayLiteral); | 1582 __ CallRuntime(Runtime::kCreateArrayLiteral); |
1583 } else { | 1583 } else { |
1584 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); | 1584 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); |
1585 __ CallStub(&stub); | 1585 __ CallStub(&stub); |
| 1586 RestoreContext(); |
1586 } | 1587 } |
1587 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); | 1588 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); |
1588 | 1589 |
1589 bool result_saved = false; // Is the result saved to the stack? | 1590 bool result_saved = false; // Is the result saved to the stack? |
1590 ZoneList<Expression*>* subexprs = expr->values(); | 1591 ZoneList<Expression*>* subexprs = expr->values(); |
1591 int length = subexprs->length(); | 1592 int length = subexprs->length(); |
1592 | 1593 |
1593 // Emit code to evaluate all the non-constant subexpressions and to store | 1594 // Emit code to evaluate all the non-constant subexpressions and to store |
1594 // them into the newly cloned array. | 1595 // them into the newly cloned array. |
1595 for (int array_index = 0; array_index < length; array_index++) { | 1596 for (int array_index = 0; array_index < length; array_index++) { |
(...skipping 2179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3775 DCHECK(interrupt_address == | 3776 DCHECK(interrupt_address == |
3776 isolate->builtins()->OnStackReplacement()->entry()); | 3777 isolate->builtins()->OnStackReplacement()->entry()); |
3777 return ON_STACK_REPLACEMENT; | 3778 return ON_STACK_REPLACEMENT; |
3778 } | 3779 } |
3779 | 3780 |
3780 | 3781 |
3781 } // namespace internal | 3782 } // namespace internal |
3782 } // namespace v8 | 3783 } // namespace v8 |
3783 | 3784 |
3784 #endif // V8_TARGET_ARCH_ARM | 3785 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |