| 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/compile-time-value.h" | 7 #include "src/ast/compile-time-value.h" |
| 8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
| 9 #include "src/builtins/builtins-constructor.h" | 9 #include "src/builtins/builtins-constructor.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1163 int offset = property->kind() == ObjectLiteral::Property::GETTER ? 2 : 3; | 1163 int offset = property->kind() == ObjectLiteral::Property::GETTER ? 2 : 3; |
| 1164 EmitSetHomeObject(expression, offset, property->GetSlot()); | 1164 EmitSetHomeObject(expression, offset, property->GetSlot()); |
| 1165 } | 1165 } |
| 1166 } | 1166 } |
| 1167 } | 1167 } |
| 1168 | 1168 |
| 1169 | 1169 |
| 1170 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { | 1170 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
| 1171 Comment cmnt(masm_, "[ ObjectLiteral"); | 1171 Comment cmnt(masm_, "[ ObjectLiteral"); |
| 1172 | 1172 |
| 1173 Handle<FixedArray> constant_properties = | 1173 Handle<BoilerplateDescription> constant_properties = |
| 1174 expr->GetOrBuildConstantProperties(isolate()); | 1174 expr->GetOrBuildConstantProperties(isolate()); |
| 1175 int flags = expr->ComputeFlags(); | 1175 int flags = expr->ComputeFlags(); |
| 1176 if (MustCreateObjectLiteralWithRuntime(expr)) { | 1176 if (MustCreateObjectLiteralWithRuntime(expr)) { |
| 1177 __ Push(Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); | 1177 __ Push(Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
| 1178 __ Push(Smi::FromInt(expr->literal_index())); | 1178 __ Push(Smi::FromInt(expr->literal_index())); |
| 1179 __ Push(constant_properties); | 1179 __ Push(constant_properties); |
| 1180 __ Push(Smi::FromInt(flags)); | 1180 __ Push(Smi::FromInt(flags)); |
| 1181 __ CallRuntime(Runtime::kCreateObjectLiteral); | 1181 __ CallRuntime(Runtime::kCreateObjectLiteral); |
| 1182 } else { | 1182 } else { |
| 1183 __ movp(rax, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); | 1183 __ movp(rax, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
| (...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2762 DCHECK_EQ( | 2762 DCHECK_EQ( |
| 2763 isolate->builtins()->OnStackReplacement()->entry(), | 2763 isolate->builtins()->OnStackReplacement()->entry(), |
| 2764 Assembler::target_address_at(call_target_address, unoptimized_code)); | 2764 Assembler::target_address_at(call_target_address, unoptimized_code)); |
| 2765 return ON_STACK_REPLACEMENT; | 2765 return ON_STACK_REPLACEMENT; |
| 2766 } | 2766 } |
| 2767 | 2767 |
| 2768 } // namespace internal | 2768 } // namespace internal |
| 2769 } // namespace v8 | 2769 } // namespace v8 |
| 2770 | 2770 |
| 2771 #endif // V8_TARGET_ARCH_X64 | 2771 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |