| 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 | 8 |
| 9 #include "vm/ast_printer.h" | 9 #include "vm/ast_printer.h" |
| 10 #include "vm/block_scheduler.h" | 10 #include "vm/block_scheduler.h" |
| (...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 const char* function_fullname = function.ToFullyQualifiedCString(); | 632 const char* function_fullname = function.ToFullyQualifiedCString(); |
| 633 OS::Print("Code for %sfunction '%s' {\n", | 633 OS::Print("Code for %sfunction '%s' {\n", |
| 634 optimized ? "optimized " : "", | 634 optimized ? "optimized " : "", |
| 635 function_fullname); | 635 function_fullname); |
| 636 const Code& code = Code::Handle(function.CurrentCode()); | 636 const Code& code = Code::Handle(function.CurrentCode()); |
| 637 code.Disassemble(); | 637 code.Disassemble(); |
| 638 OS::Print("}\n"); | 638 OS::Print("}\n"); |
| 639 | 639 |
| 640 OS::Print("Pointer offsets for function: {\n"); | 640 OS::Print("Pointer offsets for function: {\n"); |
| 641 // Pointer offsets are stored in descending order. | 641 // Pointer offsets are stored in descending order. |
| 642 Object& obj = Object::Handle(); |
| 642 for (intptr_t i = code.pointer_offsets_length() - 1; i >= 0; i--) { | 643 for (intptr_t i = code.pointer_offsets_length() - 1; i >= 0; i--) { |
| 643 const uword addr = code.GetPointerOffsetAt(i) + code.EntryPoint(); | 644 const uword addr = code.GetPointerOffsetAt(i) + code.EntryPoint(); |
| 644 Object& obj = Object::Handle(); | |
| 645 obj = *reinterpret_cast<RawObject**>(addr); | 645 obj = *reinterpret_cast<RawObject**>(addr); |
| 646 OS::Print(" %d : %#" Px " '%s'\n", | 646 OS::Print(" %d : %#" Px " '%s'\n", |
| 647 code.GetPointerOffsetAt(i), addr, obj.ToCString()); | 647 code.GetPointerOffsetAt(i), addr, obj.ToCString()); |
| 648 } | 648 } |
| 649 OS::Print("}\n"); | 649 OS::Print("}\n"); |
| 650 | 650 |
| 651 OS::Print("PC Descriptors for function '%s' {\n", function_fullname); | 651 OS::Print("PC Descriptors for function '%s' {\n", function_fullname); |
| 652 PcDescriptors::PrintHeaderString(); | 652 PcDescriptors::PrintHeaderString(); |
| 653 const PcDescriptors& descriptors = | 653 const PcDescriptors& descriptors = |
| 654 PcDescriptors::Handle(code.pc_descriptors()); | 654 PcDescriptors::Handle(code.pc_descriptors()); |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 969 const Object& result = | 969 const Object& result = |
| 970 Object::Handle(isolate->object_store()->sticky_error()); | 970 Object::Handle(isolate->object_store()->sticky_error()); |
| 971 isolate->object_store()->clear_sticky_error(); | 971 isolate->object_store()->clear_sticky_error(); |
| 972 return result.raw(); | 972 return result.raw(); |
| 973 } | 973 } |
| 974 UNREACHABLE(); | 974 UNREACHABLE(); |
| 975 return Object::null(); | 975 return Object::null(); |
| 976 } | 976 } |
| 977 | 977 |
| 978 } // namespace dart | 978 } // namespace dart |
| OLD | NEW |