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 { | 905 |
906 return object_pool_.data(); | 906 ObjectPoolWrapper& object_pool_wrapper() { return object_pool_wrapper_; } |
| 907 |
| 908 RawObjectPool* MakeObjectPool() { |
| 909 return object_pool_wrapper_.MakeObjectPool(); |
907 } | 910 } |
908 | 911 |
909 ObjectPool& object_pool() { return object_pool_; } | |
910 | |
911 void FinalizeInstructions(const MemoryRegion& region) { | 912 void FinalizeInstructions(const MemoryRegion& region) { |
912 buffer_.FinalizeInstructions(region); | 913 buffer_.FinalizeInstructions(region); |
913 } | 914 } |
914 | 915 |
915 void LoadPoolPointer(Register pp); | 916 void LoadPoolPointer(Register pp); |
916 | 917 |
917 // Set up a Dart frame on entry with a frame pointer and PC information to | 918 // 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 | 919 // enable easy access to the RawInstruction object of code corresponding |
919 // to this frame. | 920 // to this frame. |
920 // The dart frame layout is as follows: | 921 // The dart frame layout is as follows: |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1026 Register index); | 1027 Register index); |
1027 | 1028 |
1028 // On some other platforms, we draw a distinction between safe and unsafe | 1029 // On some other platforms, we draw a distinction between safe and unsafe |
1029 // smis. | 1030 // smis. |
1030 static bool IsSafe(const Object& object) { return true; } | 1031 static bool IsSafe(const Object& object) { return true; } |
1031 static bool IsSafeSmi(const Object& object) { return object.IsSmi(); } | 1032 static bool IsSafeSmi(const Object& object) { return object.IsSmi(); } |
1032 | 1033 |
1033 private: | 1034 private: |
1034 AssemblerBuffer buffer_; | 1035 AssemblerBuffer buffer_; |
1035 | 1036 |
1036 // Objects and jump targets. | 1037 ObjectPoolWrapper object_pool_wrapper_; |
1037 ObjectPool object_pool_; | |
1038 | 1038 |
1039 intptr_t prologue_offset_; | 1039 intptr_t prologue_offset_; |
1040 | 1040 |
1041 class CodeComment : public ZoneAllocated { | 1041 class CodeComment : public ZoneAllocated { |
1042 public: | 1042 public: |
1043 CodeComment(intptr_t pc_offset, const String& comment) | 1043 CodeComment(intptr_t pc_offset, const String& comment) |
1044 : pc_offset_(pc_offset), comment_(comment) { } | 1044 : pc_offset_(pc_offset), comment_(comment) { } |
1045 | 1045 |
1046 intptr_t pc_offset() const { return pc_offset_; } | 1046 intptr_t pc_offset() const { return pc_offset_; } |
1047 const String& comment() const { return comment_; } | 1047 const String& comment() const { return comment_; } |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1195 } | 1195 } |
1196 | 1196 |
1197 | 1197 |
1198 inline void Assembler::EmitOperandSizeOverride() { | 1198 inline void Assembler::EmitOperandSizeOverride() { |
1199 EmitUint8(0x66); | 1199 EmitUint8(0x66); |
1200 } | 1200 } |
1201 | 1201 |
1202 } // namespace dart | 1202 } // namespace dart |
1203 | 1203 |
1204 #endif // VM_ASSEMBLER_X64_H_ | 1204 #endif // VM_ASSEMBLER_X64_H_ |
OLD | NEW |