OLD | NEW |
1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 #ifdef FLETCH_ENABLE_LIVE_CODING | 5 #ifdef DARTINO_ENABLE_LIVE_CODING |
6 | 6 |
7 #include "src/vm/debug_info.h" | 7 #include "src/vm/debug_info.h" |
8 | 8 |
9 #include "src/shared/bytecodes.h" | 9 #include "src/shared/bytecodes.h" |
10 #include "src/vm/object.h" | 10 #include "src/vm/object.h" |
11 #include "src/vm/native_interpreter.h" | 11 #include "src/vm/native_interpreter.h" |
12 #include "src/vm/process.h" | 12 #include "src/vm/process.h" |
13 | 13 |
14 namespace fletch { | 14 namespace dartino { |
15 | 15 |
16 static Mutex* breakpoint_mutex = new Mutex(); | 16 static Mutex* breakpoint_mutex = new Mutex(); |
17 | 17 |
18 Breakpoint::Breakpoint(Function* function, int bytecode_index, int id, | 18 Breakpoint::Breakpoint(Function* function, int bytecode_index, int id, |
19 bool is_one_shot, Coroutine* coroutine, | 19 bool is_one_shot, Coroutine* coroutine, |
20 word stack_height) | 20 word stack_height) |
21 : function_(function), | 21 : function_(function), |
22 bytecode_index_(bytecode_index), | 22 bytecode_index_(bytecode_index), |
23 id_(id), | 23 id_(id), |
24 is_one_shot_(is_one_shot), | 24 is_one_shot_(is_one_shot), |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 for (; it != end; ++it) { | 171 for (; it != end; ++it) { |
172 Function* function = it->second.function(); | 172 Function* function = it->second.function(); |
173 uint8_t* bcp = | 173 uint8_t* bcp = |
174 function->bytecode_address_for(0) + it->second.bytecode_index(); | 174 function->bytecode_address_for(0) + it->second.bytecode_index(); |
175 SetBytecodeBreak(static_cast<Opcode>(*bcp)); | 175 SetBytecodeBreak(static_cast<Opcode>(*bcp)); |
176 new_breakpoints.Insert({bcp, it->second}); | 176 new_breakpoints.Insert({bcp, it->second}); |
177 } | 177 } |
178 breakpoints_.Swap(new_breakpoints); | 178 breakpoints_.Swap(new_breakpoints); |
179 } | 179 } |
180 | 180 |
181 } // namespace fletch | 181 } // namespace dartino |
182 | 182 |
183 #endif // FLETCH_ENABLE_LIVE_CODING | 183 #endif // DARTINO_ENABLE_LIVE_CODING |
OLD | NEW |