OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/compiler.h" | 5 #include "vm/compiler.h" |
6 | 6 |
7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
8 #include "vm/ast_printer.h" | 8 #include "vm/ast_printer.h" |
9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
10 #include "vm/code_index_table.h" | 10 #include "vm/code_index_table.h" |
11 #include "vm/code_patcher.h" | 11 #include "vm/code_patcher.h" |
12 #include "vm/dart_entry.h" | 12 #include "vm/dart_entry.h" |
| 13 #include "vm/debugger.h" |
13 #include "vm/disassembler.h" | 14 #include "vm/disassembler.h" |
14 #include "vm/exceptions.h" | 15 #include "vm/exceptions.h" |
15 #include "vm/flags.h" | 16 #include "vm/flags.h" |
16 #include "vm/flow_graph_builder.h" | 17 #include "vm/flow_graph_builder.h" |
17 #include "vm/flow_graph_compiler.h" | 18 #include "vm/flow_graph_compiler.h" |
18 #include "vm/longjump.h" | 19 #include "vm/longjump.h" |
19 #include "vm/object.h" | 20 #include "vm/object.h" |
20 #include "vm/object_store.h" | 21 #include "vm/object_store.h" |
21 #include "vm/opt_code_generator.h" | 22 #include "vm/opt_code_generator.h" |
22 #include "vm/os.h" | 23 #include "vm/os.h" |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 Code::Handle(function.unoptimized_code()).EntryPoint()); | 228 Code::Handle(function.unoptimized_code()).EntryPoint()); |
228 } | 229 } |
229 } | 230 } |
230 } | 231 } |
231 } | 232 } |
232 if (FLAG_trace_compiler) { | 233 if (FLAG_trace_compiler) { |
233 OS::Print("--> '%s' entry: 0x%x\n", | 234 OS::Print("--> '%s' entry: 0x%x\n", |
234 function_fullname, | 235 function_fullname, |
235 Code::Handle(function.CurrentCode()).EntryPoint()); | 236 Code::Handle(function.CurrentCode()).EntryPoint()); |
236 } | 237 } |
| 238 if (Isolate::Current()->debugger()->IsActive()) { |
| 239 Isolate::Current()->debugger()->NotifyCompilation(function); |
| 240 } |
237 if (FLAG_disassemble) { | 241 if (FLAG_disassemble) { |
238 OS::Print("Code for %sfunction '%s' {\n", | 242 OS::Print("Code for %sfunction '%s' {\n", |
239 optimized ? "optimized " : "", function_fullname); | 243 optimized ? "optimized " : "", function_fullname); |
240 const Code& code = Code::Handle(function.CurrentCode()); | 244 const Code& code = Code::Handle(function.CurrentCode()); |
241 const Instructions& instructions = | 245 const Instructions& instructions = |
242 Instructions::Handle(code.instructions()); | 246 Instructions::Handle(code.instructions()); |
243 uword start = instructions.EntryPoint(); | 247 uword start = instructions.EntryPoint(); |
244 Disassembler::Disassemble(start, start + instructions.size()); | 248 Disassembler::Disassemble(start, start + instructions.size()); |
245 OS::Print("}\n"); | 249 OS::Print("}\n"); |
246 OS::Print("Pointer offsets for function: {\n"); | 250 OS::Print("Pointer offsets for function: {\n"); |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 } else { | 392 } else { |
389 result = isolate->object_store()->sticky_error(); | 393 result = isolate->object_store()->sticky_error(); |
390 isolate->object_store()->clear_sticky_error(); | 394 isolate->object_store()->clear_sticky_error(); |
391 } | 395 } |
392 isolate->set_long_jump_base(base); | 396 isolate->set_long_jump_base(base); |
393 return result.raw(); | 397 return result.raw(); |
394 } | 398 } |
395 | 399 |
396 | 400 |
397 } // namespace dart | 401 } // namespace dart |
OLD | NEW |