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/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1339 __ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); | 1339 __ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); |
1340 __ push(Immediate(Smi::FromInt(expr->literal_index()))); | 1340 __ push(Immediate(Smi::FromInt(expr->literal_index()))); |
1341 __ push(Immediate(constant_properties)); | 1341 __ push(Immediate(constant_properties)); |
1342 __ push(Immediate(Smi::FromInt(flags))); | 1342 __ push(Immediate(Smi::FromInt(flags))); |
1343 __ CallRuntime(Runtime::kCreateObjectLiteral); | 1343 __ CallRuntime(Runtime::kCreateObjectLiteral); |
1344 } else { | 1344 } else { |
1345 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); | 1345 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); |
1346 __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index()))); | 1346 __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index()))); |
1347 __ mov(ecx, Immediate(constant_properties)); | 1347 __ mov(ecx, Immediate(constant_properties)); |
1348 __ mov(edx, Immediate(Smi::FromInt(flags))); | 1348 __ mov(edx, Immediate(Smi::FromInt(flags))); |
| 1349 __ push(esi); |
1349 FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); | 1350 FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); |
1350 __ CallStub(&stub); | 1351 __ CallStub(&stub); |
| 1352 __ pop(esi); |
1351 } | 1353 } |
1352 PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); | 1354 PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); |
1353 | 1355 |
1354 // If result_saved is true the result is on top of the stack. If | 1356 // If result_saved is true the result is on top of the stack. If |
1355 // result_saved is false the result is in eax. | 1357 // result_saved is false the result is in eax. |
1356 bool result_saved = false; | 1358 bool result_saved = false; |
1357 | 1359 |
1358 AccessorTable accessor_table(zone()); | 1360 AccessorTable accessor_table(zone()); |
1359 int property_index = 0; | 1361 int property_index = 0; |
1360 for (; property_index < expr->properties()->length(); property_index++) { | 1362 for (; property_index < expr->properties()->length(); property_index++) { |
(...skipping 2616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3977 isolate->builtins()->OnStackReplacement()->entry(), | 3979 isolate->builtins()->OnStackReplacement()->entry(), |
3978 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3980 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3979 return ON_STACK_REPLACEMENT; | 3981 return ON_STACK_REPLACEMENT; |
3980 } | 3982 } |
3981 | 3983 |
3982 | 3984 |
3983 } // namespace internal | 3985 } // namespace internal |
3984 } // namespace v8 | 3986 } // namespace v8 |
3985 | 3987 |
3986 #endif // V8_TARGET_ARCH_X87 | 3988 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |