| 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 2372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2383 ObjectLiteral::Property* property = lit->properties()->at(i); | 2383 ObjectLiteral::Property* property = lit->properties()->at(i); |
| 2384 Literal* key = property->key()->AsLiteral(); | 2384 Literal* key = property->key()->AsLiteral(); |
| 2385 Expression* value = property->value(); | 2385 Expression* value = property->value(); |
| 2386 DCHECK(key != NULL); | 2386 DCHECK(key != NULL); |
| 2387 | 2387 |
| 2388 if (property->is_static()) { | 2388 if (property->is_static()) { |
| 2389 __ push(Operand(esp, kPointerSize)); // constructor | 2389 __ push(Operand(esp, kPointerSize)); // constructor |
| 2390 } else { | 2390 } else { |
| 2391 __ push(Operand(esp, 0)); // prototype | 2391 __ push(Operand(esp, 0)); // prototype |
| 2392 } | 2392 } |
| 2393 VisitForStackValue(key); | 2393 EmitPropertyKey(property); |
| 2394 VisitForStackValue(value); | 2394 VisitForStackValue(value); |
| 2395 EmitSetHomeObjectIfNeeded(value, 2); | 2395 EmitSetHomeObjectIfNeeded(value, 2); |
| 2396 | 2396 |
| 2397 switch (property->kind()) { | 2397 switch (property->kind()) { |
| 2398 case ObjectLiteral::Property::CONSTANT: | 2398 case ObjectLiteral::Property::CONSTANT: |
| 2399 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 2399 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
| 2400 case ObjectLiteral::Property::COMPUTED: | 2400 case ObjectLiteral::Property::COMPUTED: |
| 2401 case ObjectLiteral::Property::PROTOTYPE: | 2401 case ObjectLiteral::Property::PROTOTYPE: |
| 2402 __ CallRuntime(Runtime::kDefineClassMethod, 3); | 2402 __ CallRuntime(Runtime::kDefineClassMethod, 3); |
| 2403 break; | 2403 break; |
| 2404 | 2404 |
| 2405 case ObjectLiteral::Property::GETTER: | 2405 case ObjectLiteral::Property::GETTER: |
| 2406 __ CallRuntime(Runtime::kDefineClassGetter, 3); | 2406 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 3); |
| 2407 break; | 2407 break; |
| 2408 | 2408 |
| 2409 case ObjectLiteral::Property::SETTER: | 2409 case ObjectLiteral::Property::SETTER: |
| 2410 __ CallRuntime(Runtime::kDefineClassSetter, 3); | 2410 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 3); |
| 2411 break; | 2411 break; |
| 2412 | 2412 |
| 2413 default: | 2413 default: |
| 2414 UNREACHABLE(); | 2414 UNREACHABLE(); |
| 2415 } | 2415 } |
| 2416 } | 2416 } |
| 2417 | 2417 |
| 2418 // prototype | 2418 // prototype |
| 2419 __ CallRuntime(Runtime::kToFastProperties, 1); | 2419 __ CallRuntime(Runtime::kToFastProperties, 1); |
| 2420 | 2420 |
| (...skipping 2741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5162 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5162 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 5163 Assembler::target_address_at(call_target_address, | 5163 Assembler::target_address_at(call_target_address, |
| 5164 unoptimized_code)); | 5164 unoptimized_code)); |
| 5165 return OSR_AFTER_STACK_CHECK; | 5165 return OSR_AFTER_STACK_CHECK; |
| 5166 } | 5166 } |
| 5167 | 5167 |
| 5168 | 5168 |
| 5169 } } // namespace v8::internal | 5169 } } // namespace v8::internal |
| 5170 | 5170 |
| 5171 #endif // V8_TARGET_ARCH_X87 | 5171 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |