| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
| 8 | 8 |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 2413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2424 Literal* key = property->key()->AsLiteral(); | 2424 Literal* key = property->key()->AsLiteral(); |
| 2425 Expression* value = property->value(); | 2425 Expression* value = property->value(); |
| 2426 DCHECK(key != NULL); | 2426 DCHECK(key != NULL); |
| 2427 | 2427 |
| 2428 if (property->is_static()) { | 2428 if (property->is_static()) { |
| 2429 __ push(Operand(esp, kPointerSize)); // constructor | 2429 __ push(Operand(esp, kPointerSize)); // constructor |
| 2430 } else { | 2430 } else { |
| 2431 __ push(Operand(esp, 0)); // prototype | 2431 __ push(Operand(esp, 0)); // prototype |
| 2432 } | 2432 } |
| 2433 VisitForStackValue(key); | 2433 VisitForStackValue(key); |
| 2434 VisitForStackValue(value); |
| 2434 | 2435 |
| 2435 switch (property->kind()) { | 2436 switch (property->kind()) { |
| 2436 case ObjectLiteral::Property::CONSTANT: | 2437 case ObjectLiteral::Property::CONSTANT: |
| 2437 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 2438 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
| 2438 case ObjectLiteral::Property::COMPUTED: | 2439 case ObjectLiteral::Property::COMPUTED: |
| 2439 case ObjectLiteral::Property::PROTOTYPE: | 2440 case ObjectLiteral::Property::PROTOTYPE: |
| 2440 VisitForStackValue(value); | 2441 __ CallRuntime(Runtime::kDefineClassMethod, 3); |
| 2441 __ push(Immediate(Smi::FromInt(NONE))); | |
| 2442 __ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4); | |
| 2443 break; | 2442 break; |
| 2444 | 2443 |
| 2445 case ObjectLiteral::Property::GETTER: | 2444 case ObjectLiteral::Property::GETTER: |
| 2446 VisitForStackValue(value); | 2445 __ CallRuntime(Runtime::kDefineClassGetter, 3); |
| 2447 __ push(Immediate(isolate()->factory()->null_value())); | |
| 2448 __ push(Immediate(Smi::FromInt(NONE))); | |
| 2449 __ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5); | |
| 2450 break; | 2446 break; |
| 2451 | 2447 |
| 2452 case ObjectLiteral::Property::SETTER: | 2448 case ObjectLiteral::Property::SETTER: |
| 2453 __ push(Immediate(isolate()->factory()->null_value())); | 2449 __ CallRuntime(Runtime::kDefineClassSetter, 3); |
| 2454 VisitForStackValue(value); | |
| 2455 __ push(Immediate(Smi::FromInt(NONE))); | |
| 2456 __ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5); | |
| 2457 break; | 2450 break; |
| 2458 | 2451 |
| 2459 default: | 2452 default: |
| 2460 UNREACHABLE(); | 2453 UNREACHABLE(); |
| 2461 } | 2454 } |
| 2462 } | 2455 } |
| 2463 | 2456 |
| 2464 // prototype | 2457 // prototype |
| 2465 __ CallRuntime(Runtime::kToFastProperties, 1); | 2458 __ CallRuntime(Runtime::kToFastProperties, 1); |
| 2466 | 2459 |
| (...skipping 2741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5208 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5201 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 5209 Assembler::target_address_at(call_target_address, | 5202 Assembler::target_address_at(call_target_address, |
| 5210 unoptimized_code)); | 5203 unoptimized_code)); |
| 5211 return OSR_AFTER_STACK_CHECK; | 5204 return OSR_AFTER_STACK_CHECK; |
| 5212 } | 5205 } |
| 5213 | 5206 |
| 5214 | 5207 |
| 5215 } } // namespace v8::internal | 5208 } } // namespace v8::internal |
| 5216 | 5209 |
| 5217 #endif // V8_TARGET_ARCH_X87 | 5210 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |