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 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1212 ASSERT(recorded_ast_id_ != kNoASTId); | 1212 ASSERT(recorded_ast_id_ != kNoASTId); |
1213 return recorded_ast_id_; | 1213 return recorded_ast_id_; |
1214 } | 1214 } |
1215 | 1215 |
1216 void ClearRecordedAstId() { recorded_ast_id_ = kNoASTId; } | 1216 void ClearRecordedAstId() { recorded_ast_id_ = kNoASTId; } |
1217 | 1217 |
1218 // Record a comment relocation entry that can be used by a disassembler. | 1218 // Record a comment relocation entry that can be used by a disassembler. |
1219 // Use --code-comments to enable. | 1219 // Use --code-comments to enable. |
1220 void RecordComment(const char* msg); | 1220 void RecordComment(const char* msg); |
1221 | 1221 |
| 1222 // Record the emission of a constant pool. |
| 1223 // |
| 1224 // The emission of constant pool depends on the size of the code generated and |
| 1225 // the number of RelocInfo recorded. |
| 1226 // The Debug mechanism needs to map code offsets between two versions of a |
| 1227 // function, compiled with and without debugger support (see for example |
| 1228 // Debug::PrepareForBreakPoints()). |
| 1229 // Compiling functions with debugger support generates additional code |
| 1230 // (Debug::GenerateSlot()). This may affect the emission of the constant |
| 1231 // pools and cause the version of the code with debugger support to have |
| 1232 // constant pools generated in different places. |
| 1233 // Recording the position and size of emitted constant pools allows to |
| 1234 // correctly compute the offset mappings between the different versions of a |
| 1235 // function in all situations. |
| 1236 // |
| 1237 // The parameter indicates the size of the constant pool (in bytes), including |
| 1238 // the marker and branch over the data. |
| 1239 void RecordConstPool(int size); |
| 1240 |
1222 // Writes a single byte or word of data in the code stream. Used | 1241 // Writes a single byte or word of data in the code stream. Used |
1223 // for inline tables, e.g., jump-tables. The constant pool should be | 1242 // for inline tables, e.g., jump-tables. The constant pool should be |
1224 // emitted before any use of db and dd to ensure that constant pools | 1243 // emitted before any use of db and dd to ensure that constant pools |
1225 // are not emitted as part of the tables generated. | 1244 // are not emitted as part of the tables generated. |
1226 void db(uint8_t data); | 1245 void db(uint8_t data); |
1227 void dd(uint32_t data); | 1246 void dd(uint32_t data); |
1228 | 1247 |
1229 int pc_offset() const { return pc_ - buffer_; } | 1248 int pc_offset() const { return pc_ - buffer_; } |
1230 | 1249 |
1231 PositionsRecorder* positions_recorder() { return &positions_recorder_; } | 1250 PositionsRecorder* positions_recorder() { return &positions_recorder_; } |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1435 public: | 1454 public: |
1436 explicit EnsureSpace(Assembler* assembler) { | 1455 explicit EnsureSpace(Assembler* assembler) { |
1437 assembler->CheckBuffer(); | 1456 assembler->CheckBuffer(); |
1438 } | 1457 } |
1439 }; | 1458 }; |
1440 | 1459 |
1441 | 1460 |
1442 } } // namespace v8::internal | 1461 } } // namespace v8::internal |
1443 | 1462 |
1444 #endif // V8_ARM_ASSEMBLER_ARM_H_ | 1463 #endif // V8_ARM_ASSEMBLER_ARM_H_ |
OLD | NEW |