| 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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
| 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 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1493 __ push(Immediate(Smi::FromInt(expr->literal_index()))); | 1493 __ push(Immediate(Smi::FromInt(expr->literal_index()))); |
| 1494 __ push(Immediate(constant_elements)); | 1494 __ push(Immediate(constant_elements)); |
| 1495 __ push(Immediate(Smi::FromInt(expr->ComputeFlags()))); | 1495 __ push(Immediate(Smi::FromInt(expr->ComputeFlags()))); |
| 1496 __ CallRuntime(Runtime::kCreateArrayLiteral); | 1496 __ CallRuntime(Runtime::kCreateArrayLiteral); |
| 1497 } else { | 1497 } else { |
| 1498 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); | 1498 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); |
| 1499 __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index()))); | 1499 __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index()))); |
| 1500 __ mov(ecx, Immediate(constant_elements)); | 1500 __ mov(ecx, Immediate(constant_elements)); |
| 1501 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); | 1501 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); |
| 1502 __ CallStub(&stub); | 1502 __ CallStub(&stub); |
| 1503 RestoreContext(); |
| 1503 } | 1504 } |
| 1504 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); | 1505 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); |
| 1505 | 1506 |
| 1506 bool result_saved = false; // Is the result saved to the stack? | 1507 bool result_saved = false; // Is the result saved to the stack? |
| 1507 ZoneList<Expression*>* subexprs = expr->values(); | 1508 ZoneList<Expression*>* subexprs = expr->values(); |
| 1508 int length = subexprs->length(); | 1509 int length = subexprs->length(); |
| 1509 | 1510 |
| 1510 // Emit code to evaluate all the non-constant subexpressions and to store | 1511 // Emit code to evaluate all the non-constant subexpressions and to store |
| 1511 // them into the newly cloned array. | 1512 // them into the newly cloned array. |
| 1512 for (int array_index = 0; array_index < length; array_index++) { | 1513 for (int array_index = 0; array_index < length; array_index++) { |
| (...skipping 2092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3605 isolate->builtins()->OnStackReplacement()->entry(), | 3606 isolate->builtins()->OnStackReplacement()->entry(), |
| 3606 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3607 Assembler::target_address_at(call_target_address, unoptimized_code)); |
| 3607 return ON_STACK_REPLACEMENT; | 3608 return ON_STACK_REPLACEMENT; |
| 3608 } | 3609 } |
| 3609 | 3610 |
| 3610 | 3611 |
| 3611 } // namespace internal | 3612 } // namespace internal |
| 3612 } // namespace v8 | 3613 } // namespace v8 |
| 3613 | 3614 |
| 3614 #endif // V8_TARGET_ARCH_IA32 | 3615 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |