| 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_ARM | 7 #if V8_TARGET_ARCH_ARM |
| 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 2512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2523 Expression* value = property->value(); | 2523 Expression* value = property->value(); |
| 2524 DCHECK(key != NULL); | 2524 DCHECK(key != NULL); |
| 2525 | 2525 |
| 2526 if (property->is_static()) { | 2526 if (property->is_static()) { |
| 2527 __ ldr(scratch, MemOperand(sp, kPointerSize)); // constructor | 2527 __ ldr(scratch, MemOperand(sp, kPointerSize)); // constructor |
| 2528 } else { | 2528 } else { |
| 2529 __ ldr(scratch, MemOperand(sp, 0)); // prototype | 2529 __ ldr(scratch, MemOperand(sp, 0)); // prototype |
| 2530 } | 2530 } |
| 2531 __ push(scratch); | 2531 __ push(scratch); |
| 2532 VisitForStackValue(key); | 2532 VisitForStackValue(key); |
| 2533 VisitForStackValue(value); |
| 2533 | 2534 |
| 2534 switch (property->kind()) { | 2535 switch (property->kind()) { |
| 2535 case ObjectLiteral::Property::CONSTANT: | 2536 case ObjectLiteral::Property::CONSTANT: |
| 2536 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 2537 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
| 2537 case ObjectLiteral::Property::COMPUTED: | 2538 case ObjectLiteral::Property::COMPUTED: |
| 2538 case ObjectLiteral::Property::PROTOTYPE: | 2539 case ObjectLiteral::Property::PROTOTYPE: |
| 2539 VisitForStackValue(value); | 2540 __ CallRuntime(Runtime::kDefineClassMethod, 3); |
| 2540 __ mov(scratch, Operand(Smi::FromInt(NONE))); | |
| 2541 __ push(scratch); | |
| 2542 __ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4); | |
| 2543 break; | 2541 break; |
| 2544 | 2542 |
| 2545 case ObjectLiteral::Property::GETTER: | 2543 case ObjectLiteral::Property::GETTER: |
| 2546 VisitForStackValue(value); | 2544 __ CallRuntime(Runtime::kDefineClassGetter, 3); |
| 2547 __ LoadRoot(scratch, Heap::kNullValueRootIndex); | |
| 2548 __ push(scratch); | |
| 2549 __ mov(scratch, Operand(Smi::FromInt(NONE))); | |
| 2550 __ push(scratch); | |
| 2551 __ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5); | |
| 2552 break; | 2545 break; |
| 2553 | 2546 |
| 2554 case ObjectLiteral::Property::SETTER: | 2547 case ObjectLiteral::Property::SETTER: |
| 2555 __ LoadRoot(scratch, Heap::kNullValueRootIndex); | 2548 __ CallRuntime(Runtime::kDefineClassSetter, 3); |
| 2556 __ push(scratch); | |
| 2557 VisitForStackValue(value); | |
| 2558 __ mov(scratch, Operand(Smi::FromInt(NONE))); | |
| 2559 __ push(scratch); | |
| 2560 __ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5); | |
| 2561 break; | 2549 break; |
| 2562 | 2550 |
| 2563 default: | 2551 default: |
| 2564 UNREACHABLE(); | 2552 UNREACHABLE(); |
| 2565 } | 2553 } |
| 2566 } | 2554 } |
| 2567 | 2555 |
| 2568 // prototype | 2556 // prototype |
| 2569 __ CallRuntime(Runtime::kToFastProperties, 1); | 2557 __ CallRuntime(Runtime::kToFastProperties, 1); |
| 2570 | 2558 |
| (...skipping 2779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5350 | 5338 |
| 5351 DCHECK(interrupt_address == | 5339 DCHECK(interrupt_address == |
| 5352 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5340 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 5353 return OSR_AFTER_STACK_CHECK; | 5341 return OSR_AFTER_STACK_CHECK; |
| 5354 } | 5342 } |
| 5355 | 5343 |
| 5356 | 5344 |
| 5357 } } // namespace v8::internal | 5345 } } // namespace v8::internal |
| 5358 | 5346 |
| 5359 #endif // V8_TARGET_ARCH_ARM | 5347 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |