OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include <setjmp.h> // NOLINT | 5 #include <setjmp.h> // NOLINT |
6 #include <stdlib.h> | 6 #include <stdlib.h> |
7 | 7 |
8 #include "vm/globals.h" | 8 #include "vm/globals.h" |
9 #if defined(TARGET_ARCH_DBC) | 9 #if defined(TARGET_ARCH_DBC) |
10 | 10 |
(...skipping 2651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2662 { | 2662 { |
2663 BYTECODE(LoadUntagged, A_B_C); | 2663 BYTECODE(LoadUntagged, A_B_C); |
2664 const uint16_t instance_reg = rB; | 2664 const uint16_t instance_reg = rB; |
2665 const uint16_t offset_in_words = rC; | 2665 const uint16_t offset_in_words = rC; |
2666 RawInstance* instance = reinterpret_cast<RawInstance*>(FP[instance_reg]); | 2666 RawInstance* instance = reinterpret_cast<RawInstance*>(FP[instance_reg]); |
2667 FP[rA] = reinterpret_cast<RawObject**>(instance)[offset_in_words]; | 2667 FP[rA] = reinterpret_cast<RawObject**>(instance)[offset_in_words]; |
2668 DISPATCH(); | 2668 DISPATCH(); |
2669 } | 2669 } |
2670 | 2670 |
2671 { | 2671 { |
2672 BYTECODE(LoadFieldTOS, A_D); | 2672 BYTECODE(LoadFieldTOS, __D); |
2673 const uint16_t offset_in_words = rD; | 2673 const uint16_t offset_in_words = rD; |
2674 RawInstance* instance = static_cast<RawInstance*>(SP[0]); | 2674 RawInstance* instance = static_cast<RawInstance*>(SP[0]); |
2675 SP[0] = reinterpret_cast<RawObject**>(instance->ptr())[offset_in_words]; | 2675 SP[0] = reinterpret_cast<RawObject**>(instance->ptr())[offset_in_words]; |
2676 DISPATCH(); | 2676 DISPATCH(); |
2677 } | 2677 } |
2678 | 2678 |
2679 { | 2679 { |
2680 BYTECODE(InitStaticTOS, A); | 2680 BYTECODE(InitStaticTOS, 0); |
2681 RawField* field = static_cast<RawField*>(*SP--); | 2681 RawField* field = static_cast<RawField*>(*SP--); |
2682 RawObject* value = field->ptr()->value_.static_value_; | 2682 RawObject* value = field->ptr()->value_.static_value_; |
2683 if ((value == Object::sentinel().raw()) || | 2683 if ((value == Object::sentinel().raw()) || |
2684 (value == Object::transition_sentinel().raw())) { | 2684 (value == Object::transition_sentinel().raw())) { |
2685 // Note: SP[1] already contains the field object. | 2685 // Note: SP[1] already contains the field object. |
2686 SP[2] = 0; | 2686 SP[2] = 0; |
2687 Exit(thread, FP, SP + 3, pc); | 2687 Exit(thread, FP, SP + 3, pc); |
2688 NativeArguments args(thread, 1, SP + 1, SP + 2); | 2688 NativeArguments args(thread, 1, SP + 1, SP + 2); |
2689 INVOKE_RUNTIME(DRT_InitStaticField, args); | 2689 INVOKE_RUNTIME(DRT_InitStaticField, args); |
2690 } | 2690 } |
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3722 pc_ = pc; | 3722 pc_ = pc; |
3723 special_[kExceptionSpecialIndex] = raw_exception; | 3723 special_[kExceptionSpecialIndex] = raw_exception; |
3724 special_[kStacktraceSpecialIndex] = raw_stacktrace; | 3724 special_[kStacktraceSpecialIndex] = raw_stacktrace; |
3725 buf->Longjmp(); | 3725 buf->Longjmp(); |
3726 UNREACHABLE(); | 3726 UNREACHABLE(); |
3727 } | 3727 } |
3728 | 3728 |
3729 } // namespace dart | 3729 } // namespace dart |
3730 | 3730 |
3731 #endif // defined TARGET_ARCH_DBC | 3731 #endif // defined TARGET_ARCH_DBC |
OLD | NEW |