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 #ifndef RUNTIME_VM_SIMULATOR_DBC_H_ | 5 #ifndef RUNTIME_VM_SIMULATOR_DBC_H_ |
6 #define RUNTIME_VM_SIMULATOR_DBC_H_ | 6 #define RUNTIME_VM_SIMULATOR_DBC_H_ |
7 | 7 |
8 #ifndef RUNTIME_VM_SIMULATOR_H_ | 8 #ifndef RUNTIME_VM_SIMULATOR_H_ |
9 #error Do not include simulator_dbc.h directly; use simulator.h. | 9 #error Do not include simulator_dbc.h directly; use simulator.h. |
10 #endif | 10 #endif |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 // Simulator intrinsic handler. It is invoked on entry to the intrinsified | 28 // Simulator intrinsic handler. It is invoked on entry to the intrinsified |
29 // function via Intrinsic bytecode before the frame is setup. | 29 // function via Intrinsic bytecode before the frame is setup. |
30 // If the handler returns true then Intrinsic bytecode works as a return | 30 // If the handler returns true then Intrinsic bytecode works as a return |
31 // instruction returning the value in result. Otherwise interpreter proceeds to | 31 // instruction returning the value in result. Otherwise interpreter proceeds to |
32 // execute the body of the function. | 32 // execute the body of the function. |
33 typedef bool (*IntrinsicHandler)(Thread* thread, | 33 typedef bool (*IntrinsicHandler)(Thread* thread, |
34 RawObject** FP, | 34 RawObject** FP, |
35 RawObject** result); | 35 RawObject** result); |
36 | 36 |
37 | |
38 class Simulator { | 37 class Simulator { |
39 public: | 38 public: |
40 static const uword kSimulatorStackUnderflowSize = 0x80; | 39 static const uword kSimulatorStackUnderflowSize = 0x80; |
41 | 40 |
42 Simulator(); | 41 Simulator(); |
43 ~Simulator(); | 42 ~Simulator(); |
44 | 43 |
45 // The currently executing Simulator instance, which is associated to the | 44 // The currently executing Simulator instance, which is associated to the |
46 // current isolate | 45 // current isolate |
47 static Simulator* Current(); | 46 static Simulator* Current(); |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 last_setjmp_buffer_ = buffer; | 175 last_setjmp_buffer_ = buffer; |
177 } | 176 } |
178 | 177 |
179 friend class SimulatorSetjmpBuffer; | 178 friend class SimulatorSetjmpBuffer; |
180 DISALLOW_COPY_AND_ASSIGN(Simulator); | 179 DISALLOW_COPY_AND_ASSIGN(Simulator); |
181 }; | 180 }; |
182 | 181 |
183 } // namespace dart | 182 } // namespace dart |
184 | 183 |
185 #endif // RUNTIME_VM_SIMULATOR_DBC_H_ | 184 #endif // RUNTIME_VM_SIMULATOR_DBC_H_ |
OLD | NEW |