| 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/stub_code.h" | 5 #include "vm/stub_code.h" |
| 6 | 6 |
| 7 #include "platform/assert.h" | 7 #include "platform/assert.h" |
| 8 #include "platform/globals.h" | 8 #include "platform/globals.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/disassembler.h" | 10 #include "vm/disassembler.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 DEFINE_FLAG(bool, disassemble_stubs, false, "Disassemble generated stubs."); | 21 DEFINE_FLAG(bool, disassemble_stubs, false, "Disassemble generated stubs."); |
| 22 | 22 |
| 23 #define STUB_CODE_DECLARE(name) \ | 23 #define STUB_CODE_DECLARE(name) \ |
| 24 StubEntry* StubCode::name##_entry_ = NULL; | 24 StubEntry* StubCode::name##_entry_ = NULL; |
| 25 VM_STUB_CODE_LIST(STUB_CODE_DECLARE); | 25 VM_STUB_CODE_LIST(STUB_CODE_DECLARE); |
| 26 #undef STUB_CODE_DECLARE | 26 #undef STUB_CODE_DECLARE |
| 27 | 27 |
| 28 | 28 |
| 29 StubEntry::StubEntry(const Code& code) | 29 StubEntry::StubEntry(const Code& code) |
| 30 : code_(code.raw()), | 30 : code_(code.raw()), |
| 31 entry_point_(code.EntryPoint()), | 31 entry_point_(code.UncheckedEntryPoint()), |
| 32 checked_entry_point_(code.CheckedEntryPoint()), |
| 32 size_(code.Size()), | 33 size_(code.Size()), |
| 33 label_(code.EntryPoint()) { | 34 label_(code.UncheckedEntryPoint()) { |
| 34 } | 35 } |
| 35 | 36 |
| 36 | 37 |
| 37 // Visit all object pointers. | 38 // Visit all object pointers. |
| 38 void StubEntry::VisitObjectPointers(ObjectPointerVisitor* visitor) { | 39 void StubEntry::VisitObjectPointers(ObjectPointerVisitor* visitor) { |
| 39 ASSERT(visitor != NULL); | 40 ASSERT(visitor != NULL); |
| 40 visitor->VisitPointer(reinterpret_cast<RawObject**>(&code_)); | 41 visitor->VisitPointer(reinterpret_cast<RawObject**>(&code_)); |
| 41 } | 42 } |
| 42 | 43 |
| 43 | 44 |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 if ((name##_entry() != NULL) && \ | 250 if ((name##_entry() != NULL) && \ |
| 250 (entry_point == name##_entry()->EntryPoint())) { \ | 251 (entry_point == name##_entry()->EntryPoint())) { \ |
| 251 return ""#name; \ | 252 return ""#name; \ |
| 252 } | 253 } |
| 253 VM_STUB_CODE_LIST(VM_STUB_CODE_TESTER); | 254 VM_STUB_CODE_LIST(VM_STUB_CODE_TESTER); |
| 254 #undef VM_STUB_CODE_TESTER | 255 #undef VM_STUB_CODE_TESTER |
| 255 return NULL; | 256 return NULL; |
| 256 } | 257 } |
| 257 | 258 |
| 258 } // namespace dart | 259 } // namespace dart |
| OLD | NEW |