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/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 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1306 EmitPropertyKey(property, expr->GetIdForPropertyName(property_index)); | 1306 EmitPropertyKey(property, expr->GetIdForPropertyName(property_index)); |
1307 VisitForStackValue(value); | 1307 VisitForStackValue(value); |
1308 if (NeedsHomeObject(value)) { | 1308 if (NeedsHomeObject(value)) { |
1309 EmitSetHomeObject(value, 2, property->GetSlot()); | 1309 EmitSetHomeObject(value, 2, property->GetSlot()); |
1310 } | 1310 } |
1311 | 1311 |
1312 switch (property->kind()) { | 1312 switch (property->kind()) { |
1313 case ObjectLiteral::Property::CONSTANT: | 1313 case ObjectLiteral::Property::CONSTANT: |
1314 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 1314 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
1315 case ObjectLiteral::Property::COMPUTED: | 1315 case ObjectLiteral::Property::COMPUTED: |
1316 if (property->emit_store()) { | |
1317 PushOperand(Smi::FromInt(NONE)); | |
1318 PushOperand(Smi::FromInt(property->NeedsSetFunctionName())); | |
1319 CallRuntimeWithOperands(Runtime::kDefineDataPropertyInLiteral); | |
1320 PrepareForBailoutForId(expr->GetIdForPropertySet(property_index), | |
1321 BailoutState::NO_REGISTERS); | |
1322 } else { | |
1323 DropOperands(3); | |
1324 } | |
1325 break; | |
1326 | |
1327 case ObjectLiteral::Property::PROTOTYPE: | 1316 case ObjectLiteral::Property::PROTOTYPE: |
1328 UNREACHABLE(); | 1317 UNREACHABLE(); |
1329 break; | 1318 break; |
1330 | 1319 |
1331 case ObjectLiteral::Property::GETTER: | 1320 case ObjectLiteral::Property::GETTER: |
1332 PushOperand(Smi::FromInt(NONE)); | 1321 PushOperand(Smi::FromInt(NONE)); |
1333 CallRuntimeWithOperands(Runtime::kDefineGetterPropertyUnchecked); | 1322 CallRuntimeWithOperands(Runtime::kDefineGetterPropertyUnchecked); |
1334 break; | 1323 break; |
1335 | 1324 |
1336 case ObjectLiteral::Property::SETTER: | 1325 case ObjectLiteral::Property::SETTER: |
(...skipping 1710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3047 DCHECK_EQ( | 3036 DCHECK_EQ( |
3048 isolate->builtins()->OnStackReplacement()->entry(), | 3037 isolate->builtins()->OnStackReplacement()->entry(), |
3049 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3038 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3050 return ON_STACK_REPLACEMENT; | 3039 return ON_STACK_REPLACEMENT; |
3051 } | 3040 } |
3052 | 3041 |
3053 } // namespace internal | 3042 } // namespace internal |
3054 } // namespace v8 | 3043 } // namespace v8 |
3055 | 3044 |
3056 #endif // V8_TARGET_ARCH_X64 | 3045 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |