OLD | NEW |
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
2 // All Rights Reserved. | 2 // All Rights Reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
10 // | 10 // |
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
956 | 956 |
957 byte byte_at(int pos) { return buffer_[pos]; } | 957 byte byte_at(int pos) { return buffer_[pos]; } |
958 void set_byte_at(int pos, byte value) { buffer_[pos] = value; } | 958 void set_byte_at(int pos, byte value) { buffer_[pos] = value; } |
959 | 959 |
960 // Allocate a constant pool of the correct size for the generated code. | 960 // Allocate a constant pool of the correct size for the generated code. |
961 Handle<ConstantPoolArray> NewConstantPool(Isolate* isolate); | 961 Handle<ConstantPoolArray> NewConstantPool(Isolate* isolate); |
962 | 962 |
963 // Generate the constant pool for the generated code. | 963 // Generate the constant pool for the generated code. |
964 void PopulateConstantPool(ConstantPoolArray* constant_pool); | 964 void PopulateConstantPool(ConstantPoolArray* constant_pool); |
965 | 965 |
| 966 bool is_constant_pool_available() const { return false; } |
| 967 |
966 protected: | 968 protected: |
967 byte* addr_at(int pos) { return buffer_ + pos; } | 969 byte* addr_at(int pos) { return buffer_ + pos; } |
968 | 970 |
| 971 void set_constant_pool_available(bool available) { |
| 972 // Constant pool is not supported on x87. |
| 973 UNREACHABLE(); |
| 974 } |
| 975 |
969 | 976 |
970 private: | 977 private: |
971 uint32_t long_at(int pos) { | 978 uint32_t long_at(int pos) { |
972 return *reinterpret_cast<uint32_t*>(addr_at(pos)); | 979 return *reinterpret_cast<uint32_t*>(addr_at(pos)); |
973 } | 980 } |
974 void long_at_put(int pos, uint32_t x) { | 981 void long_at_put(int pos, uint32_t x) { |
975 *reinterpret_cast<uint32_t*>(addr_at(pos)) = x; | 982 *reinterpret_cast<uint32_t*>(addr_at(pos)) = x; |
976 } | 983 } |
977 | 984 |
978 // code emission | 985 // code emission |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1018 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); | 1025 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); |
1019 | 1026 |
1020 friend class CodePatcher; | 1027 friend class CodePatcher; |
1021 friend class EnsureSpace; | 1028 friend class EnsureSpace; |
1022 | 1029 |
1023 // code generation | 1030 // code generation |
1024 RelocInfoWriter reloc_info_writer; | 1031 RelocInfoWriter reloc_info_writer; |
1025 | 1032 |
1026 PositionsRecorder positions_recorder_; | 1033 PositionsRecorder positions_recorder_; |
1027 friend class PositionsRecorder; | 1034 friend class PositionsRecorder; |
| 1035 |
| 1036 // constant pool |
| 1037 friend class FrameAndConstantPoolScope; |
| 1038 friend class ConstantPoolUnavailableScope; |
1028 }; | 1039 }; |
1029 | 1040 |
1030 | 1041 |
1031 // Helper class that ensures that there is enough space for generating | 1042 // Helper class that ensures that there is enough space for generating |
1032 // instructions and relocation information. The constructor makes | 1043 // instructions and relocation information. The constructor makes |
1033 // sure that there is enough space and (in debug mode) the destructor | 1044 // sure that there is enough space and (in debug mode) the destructor |
1034 // checks that we did not generate too much. | 1045 // checks that we did not generate too much. |
1035 class EnsureSpace BASE_EMBEDDED { | 1046 class EnsureSpace BASE_EMBEDDED { |
1036 public: | 1047 public: |
1037 explicit EnsureSpace(Assembler* assembler) : assembler_(assembler) { | 1048 explicit EnsureSpace(Assembler* assembler) : assembler_(assembler) { |
(...skipping 13 matching lines...) Expand all Loading... |
1051 private: | 1062 private: |
1052 Assembler* assembler_; | 1063 Assembler* assembler_; |
1053 #ifdef DEBUG | 1064 #ifdef DEBUG |
1054 int space_before_; | 1065 int space_before_; |
1055 #endif | 1066 #endif |
1056 }; | 1067 }; |
1057 | 1068 |
1058 } } // namespace v8::internal | 1069 } } // namespace v8::internal |
1059 | 1070 |
1060 #endif // V8_X87_ASSEMBLER_X87_H_ | 1071 #endif // V8_X87_ASSEMBLER_X87_H_ |
OLD | NEW |