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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
358 static const int kMaxCallSize = 6; | 358 static const int kMaxCallSize = 6; |
359 | 359 |
360 // The maximum pc delta that will use the short encoding. | 360 // The maximum pc delta that will use the short encoding. |
361 static const int kMaxSmallPCDelta; | 361 static const int kMaxSmallPCDelta; |
362 | 362 |
363 enum Mode { | 363 enum Mode { |
364 // Please note the order is important (see IsCodeTarget, IsGCRelocMode). | 364 // Please note the order is important (see IsCodeTarget, IsGCRelocMode). |
365 CODE_TARGET, // Code target which is not any of the above. | 365 CODE_TARGET, // Code target which is not any of the above. |
366 CODE_TARGET_WITH_ID, | 366 CODE_TARGET_WITH_ID, |
367 CONSTRUCT_CALL, // code target that is a call to a JavaScript constructor. | 367 CONSTRUCT_CALL, // code target that is a call to a JavaScript constructor. |
368 DEBUG_BREAK, // Code target for the debugger statement. | 368 DEBUG_BREAK, // Code target for the debugger statement. |
369 EMBEDDED_OBJECT, | 369 EMBEDDED_OBJECT, |
370 CELL, | 370 CELL, |
371 | 371 |
372 // Everything after runtime_entry (inclusive) is not GC'ed. | 372 // Everything after runtime_entry (inclusive) is not GC'ed. |
373 RUNTIME_ENTRY, | 373 RUNTIME_ENTRY, |
374 JS_RETURN, // Marks start of the ExitJSFrame code. | 374 JS_RETURN, // Marks start of the ExitJSFrame code. |
375 COMMENT, | 375 COMMENT, |
376 POSITION, // See comment for kNoPosition above. | 376 DEOPT_REASON, // Deoptimization reason index. |
Sven Panne
2015/01/30 11:50:08
Ooops, I just noticed that this might not work: We
loislo
2015/01/30 13:17:47
I did an investigation and found that we have abou
Sven Panne
2015/01/30 13:25:47
I was more concerned about encoding the Mode. Addi
loislo
2015/02/04 07:54:56
I used short encoding and reused b11 as the short
| |
377 POSITION, // See comment for kNoPosition above. | |
377 STATEMENT_POSITION, // See comment for kNoPosition above. | 378 STATEMENT_POSITION, // See comment for kNoPosition above. |
378 DEBUG_BREAK_SLOT, // Additional code inserted for debug break slot. | 379 DEBUG_BREAK_SLOT, // Additional code inserted for debug break slot. |
379 EXTERNAL_REFERENCE, // The address of an external C++ function. | 380 EXTERNAL_REFERENCE, // The address of an external C++ function. |
380 INTERNAL_REFERENCE, // An address inside the same function. | 381 INTERNAL_REFERENCE, // An address inside the same function. |
381 | 382 |
382 // Marks constant and veneer pools. Only used on ARM and ARM64. | 383 // Marks constant and veneer pools. Only used on ARM and ARM64. |
383 // They use a custom noncompact encoding. | 384 // They use a custom noncompact encoding. |
384 CONST_POOL, | 385 CONST_POOL, |
385 VENEER_POOL, | 386 VENEER_POOL, |
386 | 387 |
387 // add more as needed | 388 // add more as needed |
388 // Pseudo-types | 389 // Pseudo-types |
389 NUMBER_OF_MODES, // There are at most 15 modes with noncompact encoding. | 390 NUMBER_OF_MODES, // There are at most 15 modes with noncompact encoding. |
390 NONE32, // never recorded 32-bit value | 391 NONE32, // never recorded 32-bit value |
391 NONE64, // never recorded 64-bit value | 392 NONE64, // never recorded 64-bit value |
392 CODE_AGE_SEQUENCE, // Not stored in RelocInfo array, used explictly by | 393 CODE_AGE_SEQUENCE, // Not stored in RelocInfo array, used explictly by |
393 // code aging. | 394 // code aging. |
394 FIRST_REAL_RELOC_MODE = CODE_TARGET, | 395 FIRST_REAL_RELOC_MODE = CODE_TARGET, |
395 LAST_REAL_RELOC_MODE = VENEER_POOL, | 396 LAST_REAL_RELOC_MODE = VENEER_POOL, |
396 FIRST_PSEUDO_RELOC_MODE = CODE_AGE_SEQUENCE, | 397 FIRST_PSEUDO_RELOC_MODE = CODE_AGE_SEQUENCE, |
397 LAST_PSEUDO_RELOC_MODE = CODE_AGE_SEQUENCE, | 398 LAST_PSEUDO_RELOC_MODE = CODE_AGE_SEQUENCE, |
398 LAST_CODE_ENUM = DEBUG_BREAK, | 399 LAST_CODE_ENUM = DEBUG_BREAK, |
399 LAST_GCED_ENUM = CELL, | 400 LAST_GCED_ENUM = CELL, |
400 // Modes <= LAST_COMPACT_ENUM are guaranteed to have compact encoding. | 401 // Modes <= LAST_COMPACT_ENUM are guaranteed to have compact encoding. |
401 LAST_COMPACT_ENUM = CODE_TARGET_WITH_ID, | 402 LAST_COMPACT_ENUM = CODE_TARGET_WITH_ID, |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
726 void ReadTaggedPC(); | 727 void ReadTaggedPC(); |
727 void AdvanceReadPC(); | 728 void AdvanceReadPC(); |
728 void AdvanceReadId(); | 729 void AdvanceReadId(); |
729 void AdvanceReadPoolData(); | 730 void AdvanceReadPoolData(); |
730 void AdvanceReadPosition(); | 731 void AdvanceReadPosition(); |
731 void AdvanceReadData(); | 732 void AdvanceReadData(); |
732 void AdvanceReadVariableLengthPCJump(); | 733 void AdvanceReadVariableLengthPCJump(); |
733 int GetLocatableTypeTag(); | 734 int GetLocatableTypeTag(); |
734 void ReadTaggedId(); | 735 void ReadTaggedId(); |
735 void ReadTaggedPosition(); | 736 void ReadTaggedPosition(); |
737 void ReadTaggedData(); | |
736 | 738 |
737 // If the given mode is wanted, set it in rinfo_ and return true. | 739 // If the given mode is wanted, set it in rinfo_ and return true. |
738 // Else return false. Used for efficiently skipping unwanted modes. | 740 // Else return false. Used for efficiently skipping unwanted modes. |
739 bool SetMode(RelocInfo::Mode mode) { | 741 bool SetMode(RelocInfo::Mode mode) { |
740 return (mode_mask_ & (1 << mode)) ? (rinfo_.rmode_ = mode, true) : false; | 742 return (mode_mask_ & (1 << mode)) ? (rinfo_.rmode_ = mode, true) : false; |
741 } | 743 } |
742 | 744 |
743 byte* pos_; | 745 byte* pos_; |
744 byte* end_; | 746 byte* end_; |
745 byte* code_age_sequence_; | 747 byte* code_age_sequence_; |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1129 NullCallWrapper() { } | 1131 NullCallWrapper() { } |
1130 virtual ~NullCallWrapper() { } | 1132 virtual ~NullCallWrapper() { } |
1131 virtual void BeforeCall(int call_size) const { } | 1133 virtual void BeforeCall(int call_size) const { } |
1132 virtual void AfterCall() const { } | 1134 virtual void AfterCall() const { } |
1133 }; | 1135 }; |
1134 | 1136 |
1135 | 1137 |
1136 } } // namespace v8::internal | 1138 } } // namespace v8::internal |
1137 | 1139 |
1138 #endif // V8_ASSEMBLER_H_ | 1140 #endif // V8_ASSEMBLER_H_ |
OLD | NEW |