| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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_DBC_H_ | 5 #ifndef VM_ASSEMBLER_DBC_H_ |
| 6 #define VM_ASSEMBLER_DBC_H_ | 6 #define VM_ASSEMBLER_DBC_H_ |
| 7 | 7 |
| 8 #ifndef VM_ASSEMBLER_H_ | 8 #ifndef VM_ASSEMBLER_H_ |
| 9 #error Do not include assembler_dbc.h directly; use assembler.h instead. | 9 #error Do not include assembler_dbc.h directly; use assembler.h instead. |
| 10 #endif | 10 #endif |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 #undef PARAMS_A_X | 159 #undef PARAMS_A_X |
| 160 #undef DECLARE_EMIT | 160 #undef DECLARE_EMIT |
| 161 | 161 |
| 162 void Emit(int32_t value); | 162 void Emit(int32_t value); |
| 163 | 163 |
| 164 void PushConstant(const Object& obj); | 164 void PushConstant(const Object& obj); |
| 165 void LoadConstant(uintptr_t ra, const Object& obj); | 165 void LoadConstant(uintptr_t ra, const Object& obj); |
| 166 | 166 |
| 167 intptr_t AddConstant(const Object& obj); | 167 intptr_t AddConstant(const Object& obj); |
| 168 | 168 |
| 169 void Nop(intptr_t d) { Nop(0, d); } |
| 170 |
| 169 private: | 171 private: |
| 170 AssemblerBuffer buffer_; // Contains position independent code. | 172 AssemblerBuffer buffer_; // Contains position independent code. |
| 171 ObjectPoolWrapper object_pool_wrapper_; | 173 ObjectPoolWrapper object_pool_wrapper_; |
| 172 | 174 |
| 173 class CodeComment : public ZoneAllocated { | 175 class CodeComment : public ZoneAllocated { |
| 174 public: | 176 public: |
| 175 CodeComment(intptr_t pc_offset, const String& comment) | 177 CodeComment(intptr_t pc_offset, const String& comment) |
| 176 : pc_offset_(pc_offset), comment_(comment) { } | 178 : pc_offset_(pc_offset), comment_(comment) { } |
| 177 | 179 |
| 178 intptr_t pc_offset() const { return pc_offset_; } | 180 intptr_t pc_offset() const { return pc_offset_; } |
| 179 const String& comment() const { return comment_; } | 181 const String& comment() const { return comment_; } |
| 180 | 182 |
| 181 private: | 183 private: |
| 182 intptr_t pc_offset_; | 184 intptr_t pc_offset_; |
| 183 const String& comment_; | 185 const String& comment_; |
| 184 | 186 |
| 185 DISALLOW_COPY_AND_ASSIGN(CodeComment); | 187 DISALLOW_COPY_AND_ASSIGN(CodeComment); |
| 186 }; | 188 }; |
| 187 | 189 |
| 188 GrowableArray<CodeComment*> comments_; | 190 GrowableArray<CodeComment*> comments_; |
| 189 | 191 |
| 190 DISALLOW_ALLOCATION(); | 192 DISALLOW_ALLOCATION(); |
| 191 DISALLOW_COPY_AND_ASSIGN(Assembler); | 193 DISALLOW_COPY_AND_ASSIGN(Assembler); |
| 192 }; | 194 }; |
| 193 | 195 |
| 194 | 196 |
| 195 } // namespace dart | 197 } // namespace dart |
| 196 | 198 |
| 197 #endif // VM_ASSEMBLER_DBC_H_ | 199 #endif // VM_ASSEMBLER_DBC_H_ |
| OLD | NEW |