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 1379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1390 } | 1390 } |
1391 | 1391 |
1392 | 1392 |
1393 void FixedArray::set_the_hole(int index) { | 1393 void FixedArray::set_the_hole(int index) { |
1394 ASSERT(index >= 0 && index < this->length()); | 1394 ASSERT(index >= 0 && index < this->length()); |
1395 ASSERT(!Heap::InNewSpace(Heap::the_hole_value())); | 1395 ASSERT(!Heap::InNewSpace(Heap::the_hole_value())); |
1396 WRITE_FIELD(this, kHeaderSize + index * kPointerSize, Heap::the_hole_value()); | 1396 WRITE_FIELD(this, kHeaderSize + index * kPointerSize, Heap::the_hole_value()); |
1397 } | 1397 } |
1398 | 1398 |
1399 | 1399 |
| 1400 Object** FixedArray::data_start() { |
| 1401 return HeapObject::RawField(this, kHeaderSize); |
| 1402 } |
| 1403 |
| 1404 |
1400 bool DescriptorArray::IsEmpty() { | 1405 bool DescriptorArray::IsEmpty() { |
1401 ASSERT(this == Heap::empty_descriptor_array() || | 1406 ASSERT(this == Heap::empty_descriptor_array() || |
1402 this->length() > 2); | 1407 this->length() > 2); |
1403 return this == Heap::empty_descriptor_array(); | 1408 return this == Heap::empty_descriptor_array(); |
1404 } | 1409 } |
1405 | 1410 |
1406 | 1411 |
1407 void DescriptorArray::fast_swap(FixedArray* array, int first, int second) { | 1412 void DescriptorArray::fast_swap(FixedArray* array, int first, int second) { |
1408 Object* tmp = array->get(first); | 1413 Object* tmp = array->get(first); |
1409 fast_set(array, first, array->get(second)); | 1414 fast_set(array, first, array->get(second)); |
(...skipping 1638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3048 #undef WRITE_INT_FIELD | 3053 #undef WRITE_INT_FIELD |
3049 #undef READ_SHORT_FIELD | 3054 #undef READ_SHORT_FIELD |
3050 #undef WRITE_SHORT_FIELD | 3055 #undef WRITE_SHORT_FIELD |
3051 #undef READ_BYTE_FIELD | 3056 #undef READ_BYTE_FIELD |
3052 #undef WRITE_BYTE_FIELD | 3057 #undef WRITE_BYTE_FIELD |
3053 | 3058 |
3054 | 3059 |
3055 } } // namespace v8::internal | 3060 } } // namespace v8::internal |
3056 | 3061 |
3057 #endif // V8_OBJECTS_INL_H_ | 3062 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |