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 VM_SIMULATOR_DBC_H_ | 5 #ifndef VM_SIMULATOR_DBC_H_ |
6 #define VM_SIMULATOR_DBC_H_ | 6 #define VM_SIMULATOR_DBC_H_ |
7 | 7 |
8 #ifndef VM_SIMULATOR_H_ | 8 #ifndef 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 19 matching lines...) Expand all Loading... | |
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 | 37 |
38 class Simulator { | 38 class Simulator { |
39 public: | 39 public: |
40 static const uword kSimulatorStackUnderflowSize = 64; | 40 static const uword kSimulatorStackUnderflowSize = 0x80; |
zra
2016/04/22 21:13:27
I had to make this bigger for stack overflow tests
| |
41 | 41 |
42 Simulator(); | 42 Simulator(); |
43 ~Simulator(); | 43 ~Simulator(); |
44 | 44 |
45 // The currently executing Simulator instance, which is associated to the | 45 // The currently executing Simulator instance, which is associated to the |
46 // current isolate | 46 // current isolate |
47 static Simulator* Current(); | 47 static Simulator* Current(); |
48 | 48 |
49 // Accessors to the internal simulator stack base and top. | 49 // Accessors to the internal simulator stack base and top. |
50 uword StackBase() const { return reinterpret_cast<uword>(stack_); } | 50 uword StackBase() const { return reinterpret_cast<uword>(stack_); } |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
173 last_setjmp_buffer_ = buffer; | 173 last_setjmp_buffer_ = buffer; |
174 } | 174 } |
175 | 175 |
176 friend class SimulatorSetjmpBuffer; | 176 friend class SimulatorSetjmpBuffer; |
177 DISALLOW_COPY_AND_ASSIGN(Simulator); | 177 DISALLOW_COPY_AND_ASSIGN(Simulator); |
178 }; | 178 }; |
179 | 179 |
180 } // namespace dart | 180 } // namespace dart |
181 | 181 |
182 #endif // VM_SIMULATOR_DBC_H_ | 182 #endif // VM_SIMULATOR_DBC_H_ |
OLD | NEW |