| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_X64_H_ | 5 #ifndef VM_ASSEMBLER_X64_H_ |
| 6 #define VM_ASSEMBLER_X64_H_ | 6 #define VM_ASSEMBLER_X64_H_ |
| 7 | 7 |
| 8 #ifndef VM_ASSEMBLER_H_ | 8 #ifndef VM_ASSEMBLER_H_ |
| 9 #error Do not include assembler_x64.h directly; use assembler.h instead. | 9 #error Do not include assembler_x64.h directly; use assembler.h instead. |
| 10 #endif | 10 #endif |
| (...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 895 | 895 |
| 896 // Count the fixups that produce a pointer offset, without processing | 896 // Count the fixups that produce a pointer offset, without processing |
| 897 // the fixups. | 897 // the fixups. |
| 898 intptr_t CountPointerOffsets() const { | 898 intptr_t CountPointerOffsets() const { |
| 899 return buffer_.CountPointerOffsets(); | 899 return buffer_.CountPointerOffsets(); |
| 900 } | 900 } |
| 901 | 901 |
| 902 const ZoneGrowableArray<intptr_t>& GetPointerOffsets() const { | 902 const ZoneGrowableArray<intptr_t>& GetPointerOffsets() const { |
| 903 return buffer_.pointer_offsets(); | 903 return buffer_.pointer_offsets(); |
| 904 } | 904 } |
| 905 const GrowableObjectArray& object_pool_data() const { | |
| 906 return object_pool_.data(); | |
| 907 } | |
| 908 | 905 |
| 909 ObjectPool& object_pool() { return object_pool_; } | 906 ObjectPoolHelper& object_pool() { return object_pool_; } |
| 907 |
| 908 RawObjectPool* MakeObjectPool() { return object_pool_.MakeObjectPool(); } |
| 910 | 909 |
| 911 void FinalizeInstructions(const MemoryRegion& region) { | 910 void FinalizeInstructions(const MemoryRegion& region) { |
| 912 buffer_.FinalizeInstructions(region); | 911 buffer_.FinalizeInstructions(region); |
| 913 } | 912 } |
| 914 | 913 |
| 915 void LoadPoolPointer(Register pp); | 914 void LoadPoolPointer(Register pp); |
| 916 | 915 |
| 917 // Set up a Dart frame on entry with a frame pointer and PC information to | 916 // Set up a Dart frame on entry with a frame pointer and PC information to |
| 918 // enable easy access to the RawInstruction object of code corresponding | 917 // enable easy access to the RawInstruction object of code corresponding |
| 919 // to this frame. | 918 // to this frame. |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1026 Register index); | 1025 Register index); |
| 1027 | 1026 |
| 1028 // On some other platforms, we draw a distinction between safe and unsafe | 1027 // On some other platforms, we draw a distinction between safe and unsafe |
| 1029 // smis. | 1028 // smis. |
| 1030 static bool IsSafe(const Object& object) { return true; } | 1029 static bool IsSafe(const Object& object) { return true; } |
| 1031 static bool IsSafeSmi(const Object& object) { return object.IsSmi(); } | 1030 static bool IsSafeSmi(const Object& object) { return object.IsSmi(); } |
| 1032 | 1031 |
| 1033 private: | 1032 private: |
| 1034 AssemblerBuffer buffer_; | 1033 AssemblerBuffer buffer_; |
| 1035 | 1034 |
| 1036 // Objects and jump targets. | 1035 ObjectPoolHelper object_pool_; |
| 1037 ObjectPool object_pool_; | |
| 1038 | 1036 |
| 1039 intptr_t prologue_offset_; | 1037 intptr_t prologue_offset_; |
| 1040 | 1038 |
| 1041 class CodeComment : public ZoneAllocated { | 1039 class CodeComment : public ZoneAllocated { |
| 1042 public: | 1040 public: |
| 1043 CodeComment(intptr_t pc_offset, const String& comment) | 1041 CodeComment(intptr_t pc_offset, const String& comment) |
| 1044 : pc_offset_(pc_offset), comment_(comment) { } | 1042 : pc_offset_(pc_offset), comment_(comment) { } |
| 1045 | 1043 |
| 1046 intptr_t pc_offset() const { return pc_offset_; } | 1044 intptr_t pc_offset() const { return pc_offset_; } |
| 1047 const String& comment() const { return comment_; } | 1045 const String& comment() const { return comment_; } |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1195 } | 1193 } |
| 1196 | 1194 |
| 1197 | 1195 |
| 1198 inline void Assembler::EmitOperandSizeOverride() { | 1196 inline void Assembler::EmitOperandSizeOverride() { |
| 1199 EmitUint8(0x66); | 1197 EmitUint8(0x66); |
| 1200 } | 1198 } |
| 1201 | 1199 |
| 1202 } // namespace dart | 1200 } // namespace dart |
| 1203 | 1201 |
| 1204 #endif // VM_ASSEMBLER_X64_H_ | 1202 #endif // VM_ASSEMBLER_X64_H_ |
| OLD | NEW |