| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
| 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 1548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1559 __ Ldr(x3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 1559 __ Ldr(x3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
| 1560 __ Mov(x2, Smi::FromInt(expr->literal_index())); | 1560 __ Mov(x2, Smi::FromInt(expr->literal_index())); |
| 1561 __ Mov(x1, Operand(constant_elements)); | 1561 __ Mov(x1, Operand(constant_elements)); |
| 1562 if (MustCreateArrayLiteralWithRuntime(expr)) { | 1562 if (MustCreateArrayLiteralWithRuntime(expr)) { |
| 1563 __ Mov(x0, Smi::FromInt(expr->ComputeFlags())); | 1563 __ Mov(x0, Smi::FromInt(expr->ComputeFlags())); |
| 1564 __ Push(x3, x2, x1, x0); | 1564 __ Push(x3, x2, x1, x0); |
| 1565 __ CallRuntime(Runtime::kCreateArrayLiteral); | 1565 __ CallRuntime(Runtime::kCreateArrayLiteral); |
| 1566 } else { | 1566 } else { |
| 1567 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); | 1567 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); |
| 1568 __ CallStub(&stub); | 1568 __ CallStub(&stub); |
| 1569 RestoreContext(); |
| 1569 } | 1570 } |
| 1570 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); | 1571 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); |
| 1571 | 1572 |
| 1572 bool result_saved = false; // Is the result saved to the stack? | 1573 bool result_saved = false; // Is the result saved to the stack? |
| 1573 ZoneList<Expression*>* subexprs = expr->values(); | 1574 ZoneList<Expression*>* subexprs = expr->values(); |
| 1574 int length = subexprs->length(); | 1575 int length = subexprs->length(); |
| 1575 | 1576 |
| 1576 // Emit code to evaluate all the non-constant subexpressions and to store | 1577 // Emit code to evaluate all the non-constant subexpressions and to store |
| 1577 // them into the newly cloned array. | 1578 // them into the newly cloned array. |
| 1578 for (int array_index = 0; array_index < length; array_index++) { | 1579 for (int array_index = 0; array_index < length; array_index++) { |
| (...skipping 2206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3785 } | 3786 } |
| 3786 | 3787 |
| 3787 return INTERRUPT; | 3788 return INTERRUPT; |
| 3788 } | 3789 } |
| 3789 | 3790 |
| 3790 | 3791 |
| 3791 } // namespace internal | 3792 } // namespace internal |
| 3792 } // namespace v8 | 3793 } // namespace v8 |
| 3793 | 3794 |
| 3794 #endif // V8_TARGET_ARCH_ARM64 | 3795 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |