| 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/object.h" | 5 #include "vm/object.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/become.h" | 10 #include "vm/become.h" |
| (...skipping 13761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13772 } else { | 13772 } else { |
| 13773 ASSERT(code.IsNull() || | 13773 ASSERT(code.IsNull() || |
| 13774 (code.function() == array.At(i + kSCallTableFunctionEntry))); | 13774 (code.function() == array.At(i + kSCallTableFunctionEntry))); |
| 13775 } | 13775 } |
| 13776 #endif | 13776 #endif |
| 13777 array.SetAt(i + kSCallTableCodeEntry, code); | 13777 array.SetAt(i + kSCallTableCodeEntry, code); |
| 13778 } | 13778 } |
| 13779 | 13779 |
| 13780 | 13780 |
| 13781 void Code::Disassemble(DisassemblyFormatter* formatter) const { | 13781 void Code::Disassemble(DisassemblyFormatter* formatter) const { |
| 13782 #ifndef PRODUCT |
| 13782 if (!FLAG_support_disassembler) { | 13783 if (!FLAG_support_disassembler) { |
| 13783 return; | 13784 return; |
| 13784 } | 13785 } |
| 13785 const Instructions& instr = Instructions::Handle(instructions()); | 13786 const Instructions& instr = Instructions::Handle(instructions()); |
| 13786 uword start = instr.EntryPoint(); | 13787 uword start = instr.EntryPoint(); |
| 13787 if (formatter == NULL) { | 13788 if (formatter == NULL) { |
| 13788 Disassembler::Disassemble(start, start + instr.size(), *this); | 13789 Disassembler::Disassemble(start, start + instr.size(), *this); |
| 13789 } else { | 13790 } else { |
| 13790 Disassembler::Disassemble(start, start + instr.size(), formatter, *this); | 13791 Disassembler::Disassemble(start, start + instr.size(), formatter, *this); |
| 13791 } | 13792 } |
| 13793 #endif |
| 13792 } | 13794 } |
| 13793 | 13795 |
| 13794 | 13796 |
| 13795 const Code::Comments& Code::comments() const { | 13797 const Code::Comments& Code::comments() const { |
| 13796 Comments* comments = new Code::Comments(Array::Handle(raw_ptr()->comments_)); | 13798 Comments* comments = new Code::Comments(Array::Handle(raw_ptr()->comments_)); |
| 13797 return *comments; | 13799 return *comments; |
| 13798 } | 13800 } |
| 13799 | 13801 |
| 13800 | 13802 |
| 13801 void Code::set_comments(const Code::Comments& comments) const { | 13803 void Code::set_comments(const Code::Comments& comments) const { |
| (...skipping 8802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 22604 return UserTag::null(); | 22606 return UserTag::null(); |
| 22605 } | 22607 } |
| 22606 | 22608 |
| 22607 | 22609 |
| 22608 const char* UserTag::ToCString() const { | 22610 const char* UserTag::ToCString() const { |
| 22609 const String& tag_label = String::Handle(label()); | 22611 const String& tag_label = String::Handle(label()); |
| 22610 return tag_label.ToCString(); | 22612 return tag_label.ToCString(); |
| 22611 } | 22613 } |
| 22612 | 22614 |
| 22613 } // namespace dart | 22615 } // namespace dart |
| OLD | NEW |