| 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 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1360 WriteBarrierMode mode) { | 1360 WriteBarrierMode mode) { |
| 1361 ASSERT(index >= 0 && index < this->length()); | 1361 ASSERT(index >= 0 && index < this->length()); |
| 1362 int offset = kHeaderSize + index * kPointerSize; | 1362 int offset = kHeaderSize + index * kPointerSize; |
| 1363 WRITE_FIELD(this, offset, value); | 1363 WRITE_FIELD(this, offset, value); |
| 1364 CONDITIONAL_WRITE_BARRIER(this, offset, mode); | 1364 CONDITIONAL_WRITE_BARRIER(this, offset, mode); |
| 1365 } | 1365 } |
| 1366 | 1366 |
| 1367 | 1367 |
| 1368 void FixedArray::fast_set(FixedArray* array, int index, Object* value) { | 1368 void FixedArray::fast_set(FixedArray* array, int index, Object* value) { |
| 1369 ASSERT(index >= 0 && index < array->length()); | 1369 ASSERT(index >= 0 && index < array->length()); |
| 1370 ASSERT(!Heap::InNewSpace(value)); |
| 1370 WRITE_FIELD(array, kHeaderSize + index * kPointerSize, value); | 1371 WRITE_FIELD(array, kHeaderSize + index * kPointerSize, value); |
| 1371 } | 1372 } |
| 1372 | 1373 |
| 1373 | 1374 |
| 1374 void FixedArray::set_undefined(int index) { | 1375 void FixedArray::set_undefined(int index) { |
| 1375 ASSERT(index >= 0 && index < this->length()); | 1376 ASSERT(index >= 0 && index < this->length()); |
| 1376 ASSERT(!Heap::InNewSpace(Heap::undefined_value())); | 1377 ASSERT(!Heap::InNewSpace(Heap::undefined_value())); |
| 1377 WRITE_FIELD(this, kHeaderSize + index * kPointerSize, | 1378 WRITE_FIELD(this, kHeaderSize + index * kPointerSize, |
| 1378 Heap::undefined_value()); | 1379 Heap::undefined_value()); |
| 1379 } | 1380 } |
| (...skipping 1655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3035 #undef WRITE_INT_FIELD | 3036 #undef WRITE_INT_FIELD |
| 3036 #undef READ_SHORT_FIELD | 3037 #undef READ_SHORT_FIELD |
| 3037 #undef WRITE_SHORT_FIELD | 3038 #undef WRITE_SHORT_FIELD |
| 3038 #undef READ_BYTE_FIELD | 3039 #undef READ_BYTE_FIELD |
| 3039 #undef WRITE_BYTE_FIELD | 3040 #undef WRITE_BYTE_FIELD |
| 3040 | 3041 |
| 3041 | 3042 |
| 3042 } } // namespace v8::internal | 3043 } } // namespace v8::internal |
| 3043 | 3044 |
| 3044 #endif // V8_OBJECTS_INL_H_ | 3045 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |