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 | 5 // modification, are permitted provided that the following conditions |
6 // are met: | 6 // are 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 1160 matching lines...) Loading... |
1171 // Debugging | 1171 // Debugging |
1172 | 1172 |
1173 // Mark address of the ExitJSFrame code. | 1173 // Mark address of the ExitJSFrame code. |
1174 void RecordJSReturn(); | 1174 void RecordJSReturn(); |
1175 | 1175 |
1176 // Mark address of a debug break slot. | 1176 // Mark address of a debug break slot. |
1177 void RecordDebugBreakSlot(); | 1177 void RecordDebugBreakSlot(); |
1178 | 1178 |
1179 // Record the AST id of the CallIC being compiled, so that it can be placed | 1179 // Record the AST id of the CallIC being compiled, so that it can be placed |
1180 // in the relocation information. | 1180 // in the relocation information. |
1181 void RecordAstId(unsigned ast_id) { ast_id_for_reloc_info_ = ast_id; } | 1181 void SetRecordedAstId(unsigned ast_id) { |
| 1182 ASSERT(recorded_ast_id_ == kNoASTId); |
| 1183 recorded_ast_id_ = ast_id; |
| 1184 } |
| 1185 |
| 1186 unsigned RecordedAstId() { |
| 1187 ASSERT(recorded_ast_id_ != kNoASTId); |
| 1188 return recorded_ast_id_; |
| 1189 } |
| 1190 |
| 1191 void ClearRecordedAstId() { recorded_ast_id_ = kNoASTId; } |
1182 | 1192 |
1183 // Record a comment relocation entry that can be used by a disassembler. | 1193 // Record a comment relocation entry that can be used by a disassembler. |
1184 // Use --code-comments to enable. | 1194 // Use --code-comments to enable. |
1185 void RecordComment(const char* msg); | 1195 void RecordComment(const char* msg); |
1186 | 1196 |
1187 // Writes a single byte or word of data in the code stream. Used | 1197 // Writes a single byte or word of data in the code stream. Used |
1188 // for inline tables, e.g., jump-tables. The constant pool should be | 1198 // for inline tables, e.g., jump-tables. The constant pool should be |
1189 // emitted before any use of db and dd to ensure that constant pools | 1199 // emitted before any use of db and dd to ensure that constant pools |
1190 // are not emitted as part of the tables generated. | 1200 // are not emitted as part of the tables generated. |
1191 void db(uint8_t data); | 1201 void db(uint8_t data); |
(...skipping 45 matching lines...) Loading... |
1237 // instructions. | 1247 // instructions. |
1238 void BlockConstPoolFor(int instructions); | 1248 void BlockConstPoolFor(int instructions); |
1239 | 1249 |
1240 // Check if is time to emit a constant pool. | 1250 // Check if is time to emit a constant pool. |
1241 void CheckConstPool(bool force_emit, bool require_jump); | 1251 void CheckConstPool(bool force_emit, bool require_jump); |
1242 | 1252 |
1243 protected: | 1253 protected: |
1244 // Relocation for a type-recording IC has the AST id added to it. This | 1254 // Relocation for a type-recording IC has the AST id added to it. This |
1245 // member variable is a way to pass the information from the call site to | 1255 // member variable is a way to pass the information from the call site to |
1246 // the relocation info. | 1256 // the relocation info. |
1247 unsigned ast_id_for_reloc_info_; | 1257 unsigned recorded_ast_id_; |
1248 | 1258 |
1249 bool emit_debug_code() const { return emit_debug_code_; } | 1259 bool emit_debug_code() const { return emit_debug_code_; } |
1250 | 1260 |
1251 int buffer_space() const { return reloc_info_writer.pos() - pc_; } | 1261 int buffer_space() const { return reloc_info_writer.pos() - pc_; } |
1252 | 1262 |
1253 // Read/patch instructions | 1263 // Read/patch instructions |
1254 Instr instr_at(int pos) { return *reinterpret_cast<Instr*>(buffer_ + pos); } | 1264 Instr instr_at(int pos) { return *reinterpret_cast<Instr*>(buffer_ + pos); } |
1255 void instr_at_put(int pos, Instr instr) { | 1265 void instr_at_put(int pos, Instr instr) { |
1256 *reinterpret_cast<Instr*>(buffer_ + pos) = instr; | 1266 *reinterpret_cast<Instr*>(buffer_ + pos) = instr; |
1257 } | 1267 } |
(...skipping 144 matching lines...) Loading... |
1402 public: | 1412 public: |
1403 explicit EnsureSpace(Assembler* assembler) { | 1413 explicit EnsureSpace(Assembler* assembler) { |
1404 assembler->CheckBuffer(); | 1414 assembler->CheckBuffer(); |
1405 } | 1415 } |
1406 }; | 1416 }; |
1407 | 1417 |
1408 | 1418 |
1409 } } // namespace v8::internal | 1419 } } // namespace v8::internal |
1410 | 1420 |
1411 #endif // V8_ARM_ASSEMBLER_ARM_H_ | 1421 #endif // V8_ARM_ASSEMBLER_ARM_H_ |
OLD | NEW |