| OLD | NEW | 
|---|
| 1 // Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file | 1 // Copyright (c) 2011, 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/disassembler.h" | 5 #include "vm/disassembler.h" | 
| 6 | 6 | 
| 7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" | 
| 8 #include "vm/deopt_instructions.h" | 8 #include "vm/deopt_instructions.h" | 
| 9 #include "vm/globals.h" | 9 #include "vm/globals.h" | 
| 10 #include "vm/il_printer.h" | 10 #include "vm/il_printer.h" | 
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 122            comments.PCOffsetAt(comment_finger) <= offset) { | 122            comments.PCOffsetAt(comment_finger) <= offset) { | 
| 123       formatter->Print( | 123       formatter->Print( | 
| 124           "        ;; %s\n", | 124           "        ;; %s\n", | 
| 125           String::Handle(comments.CommentAt(comment_finger)).ToCString()); | 125           String::Handle(comments.CommentAt(comment_finger)).ToCString()); | 
| 126       comment_finger++; | 126       comment_finger++; | 
| 127     } | 127     } | 
| 128     if (old_comment_finger != comment_finger) { | 128     if (old_comment_finger != comment_finger) { | 
| 129       char str[4000]; | 129       char str[4000]; | 
| 130       BufferFormatter f(str, sizeof(str)); | 130       BufferFormatter f(str, sizeof(str)); | 
| 131       // Comment emitted, emit inlining information. | 131       // Comment emitted, emit inlining information. | 
| 132       code.GetInlinedFunctionsAt(offset, &inlined_functions, &token_positions); | 132       code.GetInlinedFunctionsAtInstruction(offset, &inlined_functions, | 
|  | 133                                             &token_positions); | 
| 133       // Skip top scope function printing (last entry in 'inlined_functions'). | 134       // Skip top scope function printing (last entry in 'inlined_functions'). | 
| 134       bool first = true; | 135       bool first = true; | 
| 135       for (intptr_t i = 1; i < inlined_functions.length(); i++) { | 136       for (intptr_t i = 1; i < inlined_functions.length(); i++) { | 
| 136         const char* name = inlined_functions[i]->ToQualifiedCString(); | 137         const char* name = inlined_functions[i]->ToQualifiedCString(); | 
| 137         if (first) { | 138         if (first) { | 
| 138           f.Print("        ;; Inlined [%s", name); | 139           f.Print("        ;; Inlined [%s", name); | 
| 139           first = false; | 140           first = false; | 
| 140         } else { | 141         } else { | 
| 141           f.Print(" -> %s", name); | 142           f.Print(" -> %s", name); | 
| 142         } | 143         } | 
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 311                                               bool optimized) { | 312                                               bool optimized) { | 
| 312   const char* function_fullname = function.ToFullyQualifiedCString(); | 313   const char* function_fullname = function.ToFullyQualifiedCString(); | 
| 313   const Code& code = Code::Handle(function.unoptimized_code()); | 314   const Code& code = Code::Handle(function.unoptimized_code()); | 
| 314   DisassembleCodeHelper(function_fullname, code, optimized); | 315   DisassembleCodeHelper(function_fullname, code, optimized); | 
| 315 } | 316 } | 
| 316 | 317 | 
| 317 | 318 | 
| 318 #endif  // !PRODUCT | 319 #endif  // !PRODUCT | 
| 319 | 320 | 
| 320 }  // namespace dart | 321 }  // namespace dart | 
| OLD | NEW | 
|---|