| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 // invalid/uninitialized position value. | 114 // invalid/uninitialized position value. |
| 115 static const int kNoPosition = -1; | 115 static const int kNoPosition = -1; |
| 116 | 116 |
| 117 enum Mode { | 117 enum Mode { |
| 118 // Please note the order is important (see IsCodeTarget, IsGCRelocMode). | 118 // Please note the order is important (see IsCodeTarget, IsGCRelocMode). |
| 119 CONSTRUCT_CALL, // code target that is a call to a JavaScript constructor. | 119 CONSTRUCT_CALL, // code target that is a call to a JavaScript constructor. |
| 120 CODE_TARGET_CONTEXT, // code target used for contextual loads. | 120 CODE_TARGET_CONTEXT, // code target used for contextual loads. |
| 121 DEBUG_BREAK, | 121 DEBUG_BREAK, |
| 122 CODE_TARGET, // code target which is not any of the above. | 122 CODE_TARGET, // code target which is not any of the above. |
| 123 EMBEDDED_OBJECT, | 123 EMBEDDED_OBJECT, |
| 124 EMBEDDED_STRING, | |
| 125 | 124 |
| 126 // Everything after runtime_entry (inclusive) is not GC'ed. | 125 // Everything after runtime_entry (inclusive) is not GC'ed. |
| 127 RUNTIME_ENTRY, | 126 RUNTIME_ENTRY, |
| 128 JS_RETURN, // Marks start of the ExitJSFrame code. | 127 JS_RETURN, // Marks start of the ExitJSFrame code. |
| 129 COMMENT, | 128 COMMENT, |
| 130 POSITION, // See comment for kNoPosition above. | 129 POSITION, // See comment for kNoPosition above. |
| 131 STATEMENT_POSITION, // See comment for kNoPosition above. | 130 STATEMENT_POSITION, // See comment for kNoPosition above. |
| 132 EXTERNAL_REFERENCE, // The address of an external C++ function. | 131 EXTERNAL_REFERENCE, // The address of an external C++ function. |
| 133 INTERNAL_REFERENCE, // An address inside the same function. | 132 INTERNAL_REFERENCE, // An address inside the same function. |
| 134 | 133 |
| 135 // add more as needed | 134 // add more as needed |
| 136 // Pseudo-types | 135 // Pseudo-types |
| 137 NUMBER_OF_MODES, // must be no greater than 14 - see RelocInfoWriter | 136 NUMBER_OF_MODES, // must be no greater than 14 - see RelocInfoWriter |
| 138 NONE, // never recorded | 137 NONE, // never recorded |
| 139 LAST_CODE_ENUM = CODE_TARGET, | 138 LAST_CODE_ENUM = CODE_TARGET, |
| 140 LAST_GCED_ENUM = EMBEDDED_STRING | 139 LAST_GCED_ENUM = EMBEDDED_OBJECT |
| 141 }; | 140 }; |
| 142 | 141 |
| 143 | 142 |
| 144 RelocInfo() {} | 143 RelocInfo() {} |
| 145 RelocInfo(byte* pc, Mode rmode, intptr_t data) | 144 RelocInfo(byte* pc, Mode rmode, intptr_t data) |
| 146 : pc_(pc), rmode_(rmode), data_(data) { | 145 : pc_(pc), rmode_(rmode), data_(data) { |
| 147 } | 146 } |
| 148 | 147 |
| 149 static inline bool IsConstructCall(Mode mode) { | 148 static inline bool IsConstructCall(Mode mode) { |
| 150 return mode == CONSTRUCT_CALL; | 149 return mode == CONSTRUCT_CALL; |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 unsigned int num_bits_set; | 534 unsigned int num_bits_set; |
| 536 for (num_bits_set = 0; x; x >>= 1) { | 535 for (num_bits_set = 0; x; x >>= 1) { |
| 537 num_bits_set += x & 1; | 536 num_bits_set += x & 1; |
| 538 } | 537 } |
| 539 return num_bits_set; | 538 return num_bits_set; |
| 540 } | 539 } |
| 541 | 540 |
| 542 } } // namespace v8::internal | 541 } } // namespace v8::internal |
| 543 | 542 |
| 544 #endif // V8_ASSEMBLER_H_ | 543 #endif // V8_ASSEMBLER_H_ |
| OLD | NEW |