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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 | 345 |
346 // Relocation information consists of the address (pc) of the datum | 346 // Relocation information consists of the address (pc) of the datum |
347 // to which the relocation information applies, the relocation mode | 347 // to which the relocation information applies, the relocation mode |
348 // (rmode), and an optional data field. The relocation mode may be | 348 // (rmode), and an optional data field. The relocation mode may be |
349 // "descriptive" and not indicate a need for relocation, but simply | 349 // "descriptive" and not indicate a need for relocation, but simply |
350 // describe a property of the datum. Such rmodes are useful for GC | 350 // describe a property of the datum. Such rmodes are useful for GC |
351 // and nice disassembly output. | 351 // and nice disassembly output. |
352 | 352 |
353 class RelocInfo { | 353 class RelocInfo { |
354 public: | 354 public: |
355 // The constant kNoPosition is used with the collecting of source positions | |
356 // in the relocation information. Two types of source positions are collected | |
357 // "position" (RelocMode position) and "statement position" (RelocMode | |
358 // statement_position). The "position" is collected at places in the source | |
359 // code which are of interest when making stack traces to pin-point the source | |
360 // location of a stack frame as close as possible. The "statement position" is | |
361 // collected at the beginning at each statement, and is used to indicate | |
362 // possible break locations. kNoPosition is used to indicate an | |
363 // invalid/uninitialized position value. | |
364 static const int kNoPosition = -1; | |
365 | |
366 // This string is used to add padding comments to the reloc info in cases | 355 // This string is used to add padding comments to the reloc info in cases |
367 // where we are not sure to have enough space for patching in during | 356 // where we are not sure to have enough space for patching in during |
368 // lazy deoptimization. This is the case if we have indirect calls for which | 357 // lazy deoptimization. This is the case if we have indirect calls for which |
369 // we do not normally record relocation info. | 358 // we do not normally record relocation info. |
370 static const char* const kFillerCommentString; | 359 static const char* const kFillerCommentString; |
371 | 360 |
372 // The minimum size of a comment is equal to two bytes for the extra tagged | 361 // The minimum size of a comment is equal to two bytes for the extra tagged |
373 // pc and kPointerSize for the actual pointer to the comment. | 362 // pc and kPointerSize for the actual pointer to the comment. |
374 static const int kMinRelocCommentSize = 2 + kPointerSize; | 363 static const int kMinRelocCommentSize = 2 + kPointerSize; |
375 | 364 |
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1269 std::vector<ConstantPoolEntry> shared_entries; | 1258 std::vector<ConstantPoolEntry> shared_entries; |
1270 }; | 1259 }; |
1271 | 1260 |
1272 Label emitted_label_; // Records pc_offset of emitted pool | 1261 Label emitted_label_; // Records pc_offset of emitted pool |
1273 PerTypeEntryInfo info_[ConstantPoolEntry::NUMBER_OF_TYPES]; | 1262 PerTypeEntryInfo info_[ConstantPoolEntry::NUMBER_OF_TYPES]; |
1274 }; | 1263 }; |
1275 | 1264 |
1276 } // namespace internal | 1265 } // namespace internal |
1277 } // namespace v8 | 1266 } // namespace v8 |
1278 #endif // V8_ASSEMBLER_H_ | 1267 #endif // V8_ASSEMBLER_H_ |
OLD | NEW |