| 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 RUNTIME_VM_STUB_CODE_H_ | 5 #ifndef RUNTIME_VM_STUB_CODE_H_ |
| 6 #define RUNTIME_VM_STUB_CODE_H_ | 6 #define RUNTIME_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 class Serializer; | 20 class Serializer; |
| 21 class Deserializer; | 21 class Deserializer; |
| 22 | 22 |
| 23 // List of stubs created in the VM isolate, these stubs are shared by different | 23 // List of stubs created in the VM isolate, these stubs are shared by different |
| 24 // isolates running in this dart process. | 24 // isolates running in this dart process. |
| 25 #if !defined(TARGET_ARCH_DBC) | 25 #if !defined(TARGET_ARCH_DBC) |
| 26 #define VM_STUB_CODE_LIST(V) \ | 26 #define VM_STUB_CODE_LIST(V) \ |
| 27 V(GetStackPointer) \ | 27 V(GetStackPointer) \ |
| 28 V(JumpToFrame) \ | 28 V(JumpToFrame) \ |
| 29 V(RunExceptionHandler) \ | 29 V(RunExceptionHandler) \ |
| 30 V(DeoptForRewind) \ | |
| 31 V(UpdateStoreBuffer) \ | 30 V(UpdateStoreBuffer) \ |
| 32 V(PrintStopMessage) \ | 31 V(PrintStopMessage) \ |
| 33 V(CallToRuntime) \ | 32 V(CallToRuntime) \ |
| 34 V(LazyCompile) \ | 33 V(LazyCompile) \ |
| 35 V(CallBootstrapCFunction) \ | 34 V(CallBootstrapCFunction) \ |
| 36 V(CallNativeCFunction) \ | 35 V(CallNativeCFunction) \ |
| 37 V(FixCallersTarget) \ | 36 V(FixCallersTarget) \ |
| 38 V(CallStaticFunction) \ | 37 V(CallStaticFunction) \ |
| 39 V(OptimizeFunction) \ | 38 V(OptimizeFunction) \ |
| 40 V(InvokeDartCode) \ | 39 V(InvokeDartCode) \ |
| (...skipping 28 matching lines...) Expand all Loading... |
| 69 V(Subtype2TestCache) \ | 68 V(Subtype2TestCache) \ |
| 70 V(Subtype3TestCache) \ | 69 V(Subtype3TestCache) \ |
| 71 V(CallClosureNoSuchMethod) \ | 70 V(CallClosureNoSuchMethod) \ |
| 72 V(FrameAwaitingMaterialization) | 71 V(FrameAwaitingMaterialization) |
| 73 | 72 |
| 74 #else | 73 #else |
| 75 #define VM_STUB_CODE_LIST(V) \ | 74 #define VM_STUB_CODE_LIST(V) \ |
| 76 V(LazyCompile) \ | 75 V(LazyCompile) \ |
| 77 V(OptimizeFunction) \ | 76 V(OptimizeFunction) \ |
| 78 V(RunExceptionHandler) \ | 77 V(RunExceptionHandler) \ |
| 79 V(DeoptForRewind) \ | |
| 80 V(FixCallersTarget) \ | 78 V(FixCallersTarget) \ |
| 81 V(Deoptimize) \ | 79 V(Deoptimize) \ |
| 82 V(DeoptimizeLazyFromReturn) \ | 80 V(DeoptimizeLazyFromReturn) \ |
| 83 V(DeoptimizeLazyFromThrow) \ | 81 V(DeoptimizeLazyFromThrow) \ |
| 84 V(FrameAwaitingMaterialization) | 82 V(FrameAwaitingMaterialization) |
| 85 | 83 |
| 86 #endif // !defined(TARGET_ARCH_DBC) | 84 #endif // !defined(TARGET_ARCH_DBC) |
| 87 | 85 |
| 88 // Is it permitted for the stubs above to refer to Object::null(), which is | 86 // Is it permitted for the stubs above to refer to Object::null(), which is |
| 89 // allocated in the VM isolate and shared across all isolates. | 87 // allocated in the VM isolate and shared across all isolates. |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 Token::Kind kind, | 188 Token::Kind kind, |
| 191 bool optimized = false); | 189 bool optimized = false); |
| 192 static void GenerateUsageCounterIncrement(Assembler* assembler, | 190 static void GenerateUsageCounterIncrement(Assembler* assembler, |
| 193 Register temp_reg); | 191 Register temp_reg); |
| 194 static void GenerateOptimizedUsageCounterIncrement(Assembler* assembler); | 192 static void GenerateOptimizedUsageCounterIncrement(Assembler* assembler); |
| 195 }; | 193 }; |
| 196 | 194 |
| 197 | 195 |
| 198 enum DeoptStubKind { kLazyDeoptFromReturn, kLazyDeoptFromThrow, kEagerDeopt }; | 196 enum DeoptStubKind { kLazyDeoptFromReturn, kLazyDeoptFromThrow, kEagerDeopt }; |
| 199 | 197 |
| 200 // Zap value used to indicate unused CODE_REG in deopt. | |
| 201 static const int64_t kZapCodeReg = 0xf1f1f1f1; | |
| 202 | |
| 203 // Zap value used to indicate unused return address in deopt. | |
| 204 static const int64_t kZapReturnAddress = 0xe1e1e1e1; | |
| 205 | |
| 206 } // namespace dart | 198 } // namespace dart |
| 207 | 199 |
| 208 #endif // RUNTIME_VM_STUB_CODE_H_ | 200 #endif // RUNTIME_VM_STUB_CODE_H_ |
| OLD | NEW |