Chromium Code Reviews| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 91 | 91 |
| 92 // ----------------------------------------------------------------------------- | 92 // ----------------------------------------------------------------------------- |
| 93 // Implementation of Label | 93 // Implementation of Label |
| 94 | 94 |
| 95 int Label::pos() const { | 95 int Label::pos() const { |
| 96 if (pos_ < 0) return -pos_ - 1; | 96 if (pos_ < 0) return -pos_ - 1; |
| 97 if (pos_ > 0) return pos_ - 1; | 97 if (pos_ > 0) return pos_ - 1; |
| 98 UNREACHABLE(); | 98 UNREACHABLE(); |
| 99 return 0; | 99 return 0; |
| 100 } | 100 } |
| 101 | 101 |
|
Erik Corry
2011/06/24 09:46:17
Inadvertent edit?
Lasse Reichstein
2011/06/24 11:09:08
fixed.
| |
| 102 | |
| 103 // ----------------------------------------------------------------------------- | 102 // ----------------------------------------------------------------------------- |
| 104 // Implementation of RelocInfoWriter and RelocIterator | 103 // Implementation of RelocInfoWriter and RelocIterator |
| 105 // | 104 // |
| 106 // Relocation information is written backwards in memory, from high addresses | 105 // Relocation information is written backwards in memory, from high addresses |
| 107 // towards low addresses, byte by byte. Therefore, in the encodings listed | 106 // towards low addresses, byte by byte. Therefore, in the encodings listed |
| 108 // below, the first byte listed it at the highest address, and successive | 107 // below, the first byte listed it at the highest address, and successive |
| 109 // bytes in the record are at progressively lower addresses. | 108 // bytes in the record are at progressively lower addresses. |
| 110 // | 109 // |
| 111 // Encoding | 110 // Encoding |
| 112 // | 111 // |
| (...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1221 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); | 1220 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); |
| 1222 state_.written_position = state_.current_position; | 1221 state_.written_position = state_.current_position; |
| 1223 written = true; | 1222 written = true; |
| 1224 } | 1223 } |
| 1225 | 1224 |
| 1226 // Return whether something was written. | 1225 // Return whether something was written. |
| 1227 return written; | 1226 return written; |
| 1228 } | 1227 } |
| 1229 | 1228 |
| 1230 } } // namespace v8::internal | 1229 } } // namespace v8::internal |
| OLD | NEW |