| 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 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1553 if (NeedsHomeObject(value)) { | 1553 if (NeedsHomeObject(value)) { |
| 1554 EmitSetHomeObject(value, 2, property->GetSlot()); | 1554 EmitSetHomeObject(value, 2, property->GetSlot()); |
| 1555 } | 1555 } |
| 1556 | 1556 |
| 1557 switch (property->kind()) { | 1557 switch (property->kind()) { |
| 1558 case ObjectLiteral::Property::CONSTANT: | 1558 case ObjectLiteral::Property::CONSTANT: |
| 1559 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 1559 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
| 1560 case ObjectLiteral::Property::COMPUTED: | 1560 case ObjectLiteral::Property::COMPUTED: |
| 1561 if (property->emit_store()) { | 1561 if (property->emit_store()) { |
| 1562 __ push(Immediate(Smi::FromInt(NONE))); | 1562 __ push(Immediate(Smi::FromInt(NONE))); |
| 1563 __ CallRuntime(Runtime::kDefineDataPropertyUnchecked); | 1563 __ Push(Smi::FromInt(property->NeedsSetFunctionName())); |
| 1564 __ CallRuntime(Runtime::kDefineDataPropertyInLiteral); |
| 1564 } else { | 1565 } else { |
| 1565 __ Drop(3); | 1566 __ Drop(3); |
| 1566 } | 1567 } |
| 1567 break; | 1568 break; |
| 1568 | 1569 |
| 1569 case ObjectLiteral::Property::PROTOTYPE: | 1570 case ObjectLiteral::Property::PROTOTYPE: |
| 1570 UNREACHABLE(); | 1571 UNREACHABLE(); |
| 1571 break; | 1572 break; |
| 1572 | 1573 |
| 1573 case ObjectLiteral::Property::GETTER: | 1574 case ObjectLiteral::Property::GETTER: |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2278 if (NeedsHomeObject(value)) { | 2279 if (NeedsHomeObject(value)) { |
| 2279 EmitSetHomeObject(value, 2, property->GetSlot()); | 2280 EmitSetHomeObject(value, 2, property->GetSlot()); |
| 2280 } | 2281 } |
| 2281 | 2282 |
| 2282 switch (property->kind()) { | 2283 switch (property->kind()) { |
| 2283 case ObjectLiteral::Property::CONSTANT: | 2284 case ObjectLiteral::Property::CONSTANT: |
| 2284 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 2285 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
| 2285 case ObjectLiteral::Property::PROTOTYPE: | 2286 case ObjectLiteral::Property::PROTOTYPE: |
| 2286 UNREACHABLE(); | 2287 UNREACHABLE(); |
| 2287 case ObjectLiteral::Property::COMPUTED: | 2288 case ObjectLiteral::Property::COMPUTED: |
| 2288 __ CallRuntime(Runtime::kDefineClassMethod); | 2289 __ push(Immediate(Smi::FromInt(DONT_ENUM))); |
| 2290 __ Push(Smi::FromInt(property->NeedsSetFunctionName())); |
| 2291 __ CallRuntime(Runtime::kDefineDataPropertyInLiteral); |
| 2289 break; | 2292 break; |
| 2290 | 2293 |
| 2291 case ObjectLiteral::Property::GETTER: | 2294 case ObjectLiteral::Property::GETTER: |
| 2292 __ push(Immediate(Smi::FromInt(DONT_ENUM))); | 2295 __ push(Immediate(Smi::FromInt(DONT_ENUM))); |
| 2293 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked); | 2296 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked); |
| 2294 break; | 2297 break; |
| 2295 | 2298 |
| 2296 case ObjectLiteral::Property::SETTER: | 2299 case ObjectLiteral::Property::SETTER: |
| 2297 __ push(Immediate(Smi::FromInt(DONT_ENUM))); | 2300 __ push(Immediate(Smi::FromInt(DONT_ENUM))); |
| 2298 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked); | 2301 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked); |
| (...skipping 2403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4702 Assembler::target_address_at(call_target_address, | 4705 Assembler::target_address_at(call_target_address, |
| 4703 unoptimized_code)); | 4706 unoptimized_code)); |
| 4704 return OSR_AFTER_STACK_CHECK; | 4707 return OSR_AFTER_STACK_CHECK; |
| 4705 } | 4708 } |
| 4706 | 4709 |
| 4707 | 4710 |
| 4708 } // namespace internal | 4711 } // namespace internal |
| 4709 } // namespace v8 | 4712 } // namespace v8 |
| 4710 | 4713 |
| 4711 #endif // V8_TARGET_ARCH_X87 | 4714 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |