| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1347 WRITE_BYTE_FIELD(this, kHeaderSize + index * kCharSize, | 1347 WRITE_BYTE_FIELD(this, kHeaderSize + index * kCharSize, |
| 1348 static_cast<byte>(value)); | 1348 static_cast<byte>(value)); |
| 1349 } | 1349 } |
| 1350 | 1350 |
| 1351 | 1351 |
| 1352 Address AsciiString::GetCharsAddress() { | 1352 Address AsciiString::GetCharsAddress() { |
| 1353 return FIELD_ADDR(this, kHeaderSize); | 1353 return FIELD_ADDR(this, kHeaderSize); |
| 1354 } | 1354 } |
| 1355 | 1355 |
| 1356 | 1356 |
| 1357 Address TwoByteString::GetCharsAddress() { |
| 1358 return FIELD_ADDR(this, kHeaderSize); |
| 1359 } |
| 1360 |
| 1361 |
| 1357 uint16_t TwoByteString::TwoByteStringGet(int index) { | 1362 uint16_t TwoByteString::TwoByteStringGet(int index) { |
| 1358 ASSERT(index >= 0 && index < length()); | 1363 ASSERT(index >= 0 && index < length()); |
| 1359 return READ_SHORT_FIELD(this, kHeaderSize + index * kShortSize); | 1364 return READ_SHORT_FIELD(this, kHeaderSize + index * kShortSize); |
| 1360 } | 1365 } |
| 1361 | 1366 |
| 1362 | 1367 |
| 1363 void TwoByteString::TwoByteStringSet(int index, uint16_t value) { | 1368 void TwoByteString::TwoByteStringSet(int index, uint16_t value) { |
| 1364 ASSERT(index >= 0 && index < length()); | 1369 ASSERT(index >= 0 && index < length()); |
| 1365 WRITE_SHORT_FIELD(this, kHeaderSize + index * kShortSize, value); | 1370 WRITE_SHORT_FIELD(this, kHeaderSize + index * kShortSize, value); |
| 1366 } | 1371 } |
| (...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2174 #undef WRITE_INT_FIELD | 2179 #undef WRITE_INT_FIELD |
| 2175 #undef READ_SHORT_FIELD | 2180 #undef READ_SHORT_FIELD |
| 2176 #undef WRITE_SHORT_FIELD | 2181 #undef WRITE_SHORT_FIELD |
| 2177 #undef READ_BYTE_FIELD | 2182 #undef READ_BYTE_FIELD |
| 2178 #undef WRITE_BYTE_FIELD | 2183 #undef WRITE_BYTE_FIELD |
| 2179 | 2184 |
| 2180 | 2185 |
| 2181 } } // namespace v8::internal | 2186 } } // namespace v8::internal |
| 2182 | 2187 |
| 2183 #endif // V8_OBJECTS_INL_H_ | 2188 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |