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/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 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1375 __ Push(constant_properties); | 1375 __ Push(constant_properties); |
1376 __ Push(Smi::FromInt(flags)); | 1376 __ Push(Smi::FromInt(flags)); |
1377 __ CallRuntime(Runtime::kCreateObjectLiteral); | 1377 __ CallRuntime(Runtime::kCreateObjectLiteral); |
1378 } else { | 1378 } else { |
1379 __ movp(rax, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); | 1379 __ movp(rax, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
1380 __ Move(rbx, Smi::FromInt(expr->literal_index())); | 1380 __ Move(rbx, Smi::FromInt(expr->literal_index())); |
1381 __ Move(rcx, constant_properties); | 1381 __ Move(rcx, constant_properties); |
1382 __ Move(rdx, Smi::FromInt(flags)); | 1382 __ Move(rdx, Smi::FromInt(flags)); |
1383 FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); | 1383 FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); |
1384 __ CallStub(&stub); | 1384 __ CallStub(&stub); |
1385 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | |
1386 } | 1385 } |
1387 PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); | 1386 PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); |
1388 | 1387 |
1389 // If result_saved is true the result is on top of the stack. If | 1388 // If result_saved is true the result is on top of the stack. If |
1390 // result_saved is false the result is in rax. | 1389 // result_saved is false the result is in rax. |
1391 bool result_saved = false; | 1390 bool result_saved = false; |
1392 | 1391 |
1393 AccessorTable accessor_table(zone()); | 1392 AccessorTable accessor_table(zone()); |
1394 int property_index = 0; | 1393 int property_index = 0; |
1395 for (; property_index < expr->properties()->length(); property_index++) { | 1394 for (; property_index < expr->properties()->length(); property_index++) { |
(...skipping 2575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3971 DCHECK_EQ( | 3970 DCHECK_EQ( |
3972 isolate->builtins()->OnStackReplacement()->entry(), | 3971 isolate->builtins()->OnStackReplacement()->entry(), |
3973 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3972 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3974 return ON_STACK_REPLACEMENT; | 3973 return ON_STACK_REPLACEMENT; |
3975 } | 3974 } |
3976 | 3975 |
3977 } // namespace internal | 3976 } // namespace internal |
3978 } // namespace v8 | 3977 } // namespace v8 |
3979 | 3978 |
3980 #endif // V8_TARGET_ARCH_X64 | 3979 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |