| 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 #ifndef VM_ASSEMBLER_H_ | 5 #ifndef VM_ASSEMBLER_H_ |
| 6 #define VM_ASSEMBLER_H_ | 6 #define VM_ASSEMBLER_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/assert.h" | 9 #include "vm/assert.h" |
| 10 #include "vm/globals.h" | 10 #include "vm/globals.h" |
| 11 #include "vm/growable_array.h" | 11 #include "vm/growable_array.h" |
| 12 #include "vm/object.h" | 12 #include "vm/object.h" |
| 13 | 13 |
| 14 namespace dart { | 14 namespace dart { |
| 15 | 15 |
| 16 // Forward declarations. | 16 // Forward declarations. |
| 17 class Assembler; | 17 class Assembler; |
| 18 class AssemblerFixup; | 18 class AssemblerFixup; |
| 19 class AssemblerBuffer; | 19 class AssemblerBuffer; |
| 20 class MemoryRegion; | 20 class MemoryRegion; |
| 21 | 21 |
| 22 | 22 |
| 23 // External labels keep a function pointer to allow them | 23 // External labels keep a function pointer to allow them |
| 24 // to be called from code generated by the assembler. | 24 // to be called from code generated by the assembler. |
| 25 class ExternalLabel : public ValueObject { | 25 class ExternalLabel : public ValueObject { |
| 26 public: | 26 public: |
| 27 | |
| 28 ExternalLabel(const char* name, uword address) | 27 ExternalLabel(const char* name, uword address) |
| 29 : name_(name), address_(address) { | 28 : name_(name), address_(address) { |
| 30 ASSERT(name != NULL); | 29 ASSERT(name != NULL); |
| 31 } | 30 } |
| 32 | 31 |
| 33 const char* name() const { return name_; } | 32 const char* name() const { return name_; } |
| 34 bool is_resolved() const { return address_ != 0; } | 33 bool is_resolved() const { return address_ != 0; } |
| 35 uword address() const { | 34 uword address() const { |
| 36 ASSERT(is_resolved()); | 35 ASSERT(is_resolved()); |
| 37 return address_; | 36 return address_; |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 #include "vm/assembler_ia32.h" | 198 #include "vm/assembler_ia32.h" |
| 200 #elif defined(TARGET_ARCH_X64) | 199 #elif defined(TARGET_ARCH_X64) |
| 201 #include "vm/assembler_x64.h" | 200 #include "vm/assembler_x64.h" |
| 202 #elif defined(TARGET_ARCH_ARM) | 201 #elif defined(TARGET_ARCH_ARM) |
| 203 #include "vm/assembler_arm.h" | 202 #include "vm/assembler_arm.h" |
| 204 #else | 203 #else |
| 205 #error Unknown architecture. | 204 #error Unknown architecture. |
| 206 #endif | 205 #endif |
| 207 | 206 |
| 208 #endif // VM_ASSEMBLER_H_ | 207 #endif // VM_ASSEMBLER_H_ |
| OLD | NEW |