OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 #ifndef VM_STUB_CODE_H_ | 5 #ifndef VM_STUB_CODE_H_ |
6 #define VM_STUB_CODE_H_ | 6 #define VM_STUB_CODE_H_ |
7 | 7 |
8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
10 | 10 |
11 namespace dart { | 11 namespace dart { |
12 | 12 |
13 // Forward declarations. | 13 // Forward declarations. |
14 class Code; | 14 class Code; |
15 class Isolate; | 15 class Isolate; |
16 class ObjectPointerVisitor; | 16 class ObjectPointerVisitor; |
17 class RawCode; | 17 class RawCode; |
18 class SnapshotReader; | 18 class SnapshotReader; |
19 class SnapshotWriter; | 19 class SnapshotWriter; |
20 | 20 |
21 | |
22 // List of stubs created in the VM isolate, these stubs are shared by different | 21 // List of stubs created in the VM isolate, these stubs are shared by different |
23 // isolates running in this dart process. | 22 // isolates running in this dart process. |
| 23 #if !defined(TARGET_ARCH_DBC) |
24 #define VM_STUB_CODE_LIST(V) \ | 24 #define VM_STUB_CODE_LIST(V) \ |
25 V(GetStackPointer) \ | 25 V(GetStackPointer) \ |
26 V(JumpToExceptionHandler) \ | 26 V(JumpToExceptionHandler) \ |
27 V(UpdateStoreBuffer) \ | 27 V(UpdateStoreBuffer) \ |
28 V(PrintStopMessage) \ | 28 V(PrintStopMessage) \ |
29 V(CallToRuntime) \ | 29 V(CallToRuntime) \ |
30 V(LazyCompile) \ | 30 V(LazyCompile) \ |
31 V(CallBootstrapCFunction) \ | 31 V(CallBootstrapCFunction) \ |
32 V(CallNativeCFunction) \ | 32 V(CallNativeCFunction) \ |
33 V(FixCallersTarget) \ | 33 V(FixCallersTarget) \ |
(...skipping 24 matching lines...) Expand all Loading... |
58 V(TwoArgsOptimizedCheckInlineCache) \ | 58 V(TwoArgsOptimizedCheckInlineCache) \ |
59 V(ZeroArgsUnoptimizedStaticCall) \ | 59 V(ZeroArgsUnoptimizedStaticCall) \ |
60 V(OneArgUnoptimizedStaticCall) \ | 60 V(OneArgUnoptimizedStaticCall) \ |
61 V(TwoArgsUnoptimizedStaticCall) \ | 61 V(TwoArgsUnoptimizedStaticCall) \ |
62 V(Subtype1TestCache) \ | 62 V(Subtype1TestCache) \ |
63 V(Subtype2TestCache) \ | 63 V(Subtype2TestCache) \ |
64 V(Subtype3TestCache) \ | 64 V(Subtype3TestCache) \ |
65 V(CallClosureNoSuchMethod) \ | 65 V(CallClosureNoSuchMethod) \ |
66 V(FrameAwaitingMaterialization) \ | 66 V(FrameAwaitingMaterialization) \ |
67 | 67 |
| 68 #else |
| 69 #define VM_STUB_CODE_LIST(V) \ |
| 70 V(LazyCompile) \ |
| 71 V(FixCallersTarget) \ |
| 72 |
| 73 #endif // !defined(TARGET_ARCH_DBC) |
| 74 |
68 // Is it permitted for the stubs above to refer to Object::null(), which is | 75 // Is it permitted for the stubs above to refer to Object::null(), which is |
69 // allocated in the VM isolate and shared across all isolates. | 76 // allocated in the VM isolate and shared across all isolates. |
70 // However, in cases where a simple GC-safe placeholder is needed on the stack, | 77 // However, in cases where a simple GC-safe placeholder is needed on the stack, |
71 // using Smi 0 instead of Object::null() is slightly more efficient, since a Smi | 78 // using Smi 0 instead of Object::null() is slightly more efficient, since a Smi |
72 // does not require relocation. | 79 // does not require relocation. |
73 | 80 |
74 // class StubEntry is used to describe stub methods generated in dart to | 81 // class StubEntry is used to describe stub methods generated in dart to |
75 // abstract out common code executed from generated dart code. | 82 // abstract out common code executed from generated dart code. |
76 class StubEntry { | 83 class StubEntry { |
77 public: | 84 public: |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 | 193 |
187 | 194 |
188 enum DeoptStubKind { | 195 enum DeoptStubKind { |
189 kLazyDeopt, | 196 kLazyDeopt, |
190 kEagerDeopt | 197 kEagerDeopt |
191 }; | 198 }; |
192 | 199 |
193 } // namespace dart | 200 } // namespace dart |
194 | 201 |
195 #endif // VM_STUB_CODE_H_ | 202 #endif // VM_STUB_CODE_H_ |
OLD | NEW |