| 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_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 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 1521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1532 __ Push(Smi::FromInt(expr->literal_index())); | 1532 __ Push(Smi::FromInt(expr->literal_index())); |
| 1533 __ Push(constant_elements); | 1533 __ Push(constant_elements); |
| 1534 __ Push(Smi::FromInt(expr->ComputeFlags())); | 1534 __ Push(Smi::FromInt(expr->ComputeFlags())); |
| 1535 __ CallRuntime(Runtime::kCreateArrayLiteral); | 1535 __ CallRuntime(Runtime::kCreateArrayLiteral); |
| 1536 } else { | 1536 } else { |
| 1537 __ movp(rax, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); | 1537 __ movp(rax, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
| 1538 __ Move(rbx, Smi::FromInt(expr->literal_index())); | 1538 __ Move(rbx, Smi::FromInt(expr->literal_index())); |
| 1539 __ Move(rcx, constant_elements); | 1539 __ Move(rcx, constant_elements); |
| 1540 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); | 1540 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); |
| 1541 __ CallStub(&stub); | 1541 __ CallStub(&stub); |
| 1542 RestoreContext(); |
| 1542 } | 1543 } |
| 1543 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); | 1544 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); |
| 1544 | 1545 |
| 1545 bool result_saved = false; // Is the result saved to the stack? | 1546 bool result_saved = false; // Is the result saved to the stack? |
| 1546 ZoneList<Expression*>* subexprs = expr->values(); | 1547 ZoneList<Expression*>* subexprs = expr->values(); |
| 1547 int length = subexprs->length(); | 1548 int length = subexprs->length(); |
| 1548 | 1549 |
| 1549 // Emit code to evaluate all the non-constant subexpressions and to store | 1550 // Emit code to evaluate all the non-constant subexpressions and to store |
| 1550 // them into the newly cloned array. | 1551 // them into the newly cloned array. |
| 1551 for (int array_index = 0; array_index < length; array_index++) { | 1552 for (int array_index = 0; array_index < length; array_index++) { |
| (...skipping 2056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3608 DCHECK_EQ( | 3609 DCHECK_EQ( |
| 3609 isolate->builtins()->OnStackReplacement()->entry(), | 3610 isolate->builtins()->OnStackReplacement()->entry(), |
| 3610 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3611 Assembler::target_address_at(call_target_address, unoptimized_code)); |
| 3611 return ON_STACK_REPLACEMENT; | 3612 return ON_STACK_REPLACEMENT; |
| 3612 } | 3613 } |
| 3613 | 3614 |
| 3614 } // namespace internal | 3615 } // namespace internal |
| 3615 } // namespace v8 | 3616 } // namespace v8 |
| 3616 | 3617 |
| 3617 #endif // V8_TARGET_ARCH_X64 | 3618 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |