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_X87 | 5 #if V8_TARGET_ARCH_X87 |
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 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1485 __ push(Immediate(Smi::FromInt(expr->literal_index()))); | 1485 __ push(Immediate(Smi::FromInt(expr->literal_index()))); |
1486 __ push(Immediate(constant_elements)); | 1486 __ push(Immediate(constant_elements)); |
1487 __ push(Immediate(Smi::FromInt(expr->ComputeFlags()))); | 1487 __ push(Immediate(Smi::FromInt(expr->ComputeFlags()))); |
1488 __ CallRuntime(Runtime::kCreateArrayLiteral); | 1488 __ CallRuntime(Runtime::kCreateArrayLiteral); |
1489 } else { | 1489 } else { |
1490 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); | 1490 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); |
1491 __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index()))); | 1491 __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index()))); |
1492 __ mov(ecx, Immediate(constant_elements)); | 1492 __ mov(ecx, Immediate(constant_elements)); |
1493 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); | 1493 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); |
1494 __ CallStub(&stub); | 1494 __ CallStub(&stub); |
| 1495 RestoreContext(); |
1495 } | 1496 } |
1496 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); | 1497 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); |
1497 | 1498 |
1498 bool result_saved = false; // Is the result saved to the stack? | 1499 bool result_saved = false; // Is the result saved to the stack? |
1499 ZoneList<Expression*>* subexprs = expr->values(); | 1500 ZoneList<Expression*>* subexprs = expr->values(); |
1500 int length = subexprs->length(); | 1501 int length = subexprs->length(); |
1501 | 1502 |
1502 // Emit code to evaluate all the non-constant subexpressions and to store | 1503 // Emit code to evaluate all the non-constant subexpressions and to store |
1503 // them into the newly cloned array. | 1504 // them into the newly cloned array. |
1504 for (int array_index = 0; array_index < length; array_index++) { | 1505 for (int array_index = 0; array_index < length; array_index++) { |
(...skipping 2092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3597 isolate->builtins()->OnStackReplacement()->entry(), | 3598 isolate->builtins()->OnStackReplacement()->entry(), |
3598 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3599 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3599 return ON_STACK_REPLACEMENT; | 3600 return ON_STACK_REPLACEMENT; |
3600 } | 3601 } |
3601 | 3602 |
3602 | 3603 |
3603 } // namespace internal | 3604 } // namespace internal |
3604 } // namespace v8 | 3605 } // namespace v8 |
3605 | 3606 |
3606 #endif // V8_TARGET_ARCH_X87 | 3607 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |