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 "vm/globals.h" | 5 #include "vm/globals.h" |
6 #if defined(TARGET_ARCH_DBC) | 6 #if defined(TARGET_ARCH_DBC) |
7 | 7 |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 | 43 |
44 // Not executed, but used as a sentinel in Simulator::JumpToFrame. | 44 // Not executed, but used as a sentinel in Simulator::JumpToFrame. |
45 void StubCode::GenerateRunExceptionHandlerStub(Assembler* assembler) { | 45 void StubCode::GenerateRunExceptionHandlerStub(Assembler* assembler) { |
46 __ Trap(); | 46 __ Trap(); |
47 } | 47 } |
48 | 48 |
49 | 49 |
50 void StubCode::GenerateDeoptForRewindStub(Assembler* assembler) { | 50 void StubCode::GenerateDeoptForRewindStub(Assembler* assembler) { |
51 __ DeoptRewind(); | 51 __ DeoptRewind(); |
| 52 __ Trap(); |
52 } | 53 } |
53 | 54 |
54 | 55 |
55 // TODO(vegorov) Don't generate this stub. | 56 // TODO(vegorov) Don't generate this stub. |
56 void StubCode::GenerateFixCallersTargetStub(Assembler* assembler) { | 57 void StubCode::GenerateFixCallersTargetStub(Assembler* assembler) { |
57 __ Trap(); | 58 __ Trap(); |
58 } | 59 } |
59 | 60 |
60 | 61 |
61 // TODO(vegorov) Don't generate these stubs. | 62 // TODO(vegorov) Don't generate these stubs. |
62 void StubCode::GenerateAllocationStubForClass(Assembler* assembler, | 63 void StubCode::GenerateAllocationStubForClass(Assembler* assembler, |
63 const Class& cls) { | 64 const Class& cls) { |
64 __ Trap(); | 65 __ Trap(); |
65 } | 66 } |
66 | 67 |
67 | 68 |
68 // TODO(vegorov) Don't generate this stub. | 69 // TODO(vegorov) Don't generate this stub. |
69 void StubCode::GenerateMegamorphicMissStub(Assembler* assembler) { | 70 void StubCode::GenerateMegamorphicMissStub(Assembler* assembler) { |
70 __ Trap(); | 71 __ Trap(); |
71 } | 72 } |
72 | 73 |
73 | 74 |
74 // These deoptimization stubs are only used to populate stack frames | 75 // These deoptimization stubs are only used to populate stack frames |
75 // with something meaningful to make sure GC can scan the stack during | 76 // with something meaningful to make sure GC can scan the stack during |
76 // the last phase of deoptimization which materializes objects. | 77 // the last phase of deoptimization which materializes objects. |
77 void StubCode::GenerateDeoptimizeLazyFromReturnStub(Assembler* assembler) { | 78 void StubCode::GenerateDeoptimizeLazyFromReturnStub(Assembler* assembler) { |
78 __ Trap(); | 79 __ Deopt(0 /* unused */, 0 /* lazy */); |
| 80 __ Trap(); // Not reached: pc is updated as part of deoptimization. |
79 } | 81 } |
80 | 82 |
81 | 83 |
82 void StubCode::GenerateDeoptimizeLazyFromThrowStub(Assembler* assembler) { | 84 void StubCode::GenerateDeoptimizeLazyFromThrowStub(Assembler* assembler) { |
83 __ Trap(); | 85 __ Deopt(0 /* unused */, 0 /* lazy */); |
| 86 __ Trap(); // Not reached: pc is updated as part of deoptimization. |
84 } | 87 } |
85 | 88 |
86 | 89 |
87 void StubCode::GenerateDeoptimizeStub(Assembler* assembler) { | 90 void StubCode::GenerateDeoptimizeStub(Assembler* assembler) { |
88 __ Trap(); | 91 __ Trap(); |
89 } | 92 } |
90 | 93 |
91 | 94 |
92 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { | 95 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { |
93 __ Trap(); | 96 __ Trap(); |
94 } | 97 } |
95 | 98 |
96 | 99 |
97 void StubCode::GenerateAsynchronousGapMarkerStub(Assembler* assembler) { | 100 void StubCode::GenerateAsynchronousGapMarkerStub(Assembler* assembler) { |
98 __ Trap(); | 101 __ Trap(); |
99 } | 102 } |
100 | 103 |
101 | 104 |
102 // Print the stop message. | 105 // Print the stop message. |
103 DEFINE_LEAF_RUNTIME_ENTRY(void, PrintStopMessage, 1, const char* message) { | 106 DEFINE_LEAF_RUNTIME_ENTRY(void, PrintStopMessage, 1, const char* message) { |
104 OS::Print("Stop message: %s\n", message); | 107 OS::Print("Stop message: %s\n", message); |
105 } | 108 } |
106 END_LEAF_RUNTIME_ENTRY | 109 END_LEAF_RUNTIME_ENTRY |
107 | 110 |
108 } // namespace dart | 111 } // namespace dart |
109 | 112 |
110 #endif // defined TARGET_ARCH_DBC | 113 #endif // defined TARGET_ARCH_DBC |
OLD | NEW |