| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 // | 4 // |
| 5 // Review notes: | 5 // Review notes: |
| 6 // | 6 // |
| 7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous |
| 8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal |
| 9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. |
| 10 // | 10 // |
| (...skipping 2331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2342 void FixedDoubleArray::FillWithHoles(int from, int to) { | 2342 void FixedDoubleArray::FillWithHoles(int from, int to) { |
| 2343 for (int i = from; i < to; i++) { | 2343 for (int i = from; i < to; i++) { |
| 2344 set_the_hole(i); | 2344 set_the_hole(i); |
| 2345 } | 2345 } |
| 2346 } | 2346 } |
| 2347 | 2347 |
| 2348 | 2348 |
| 2349 Object* WeakFixedArray::Get(int index) const { | 2349 Object* WeakFixedArray::Get(int index) const { |
| 2350 Object* raw = FixedArray::cast(this)->get(index + kFirstIndex); | 2350 Object* raw = FixedArray::cast(this)->get(index + kFirstIndex); |
| 2351 if (raw->IsSmi()) return raw; | 2351 if (raw->IsSmi()) return raw; |
| 2352 DCHECK(raw->IsWeakCell()); |
| 2352 return WeakCell::cast(raw)->value(); | 2353 return WeakCell::cast(raw)->value(); |
| 2353 } | 2354 } |
| 2354 | 2355 |
| 2355 | 2356 |
| 2356 bool WeakFixedArray::IsEmptySlot(int index) const { | 2357 bool WeakFixedArray::IsEmptySlot(int index) const { |
| 2357 DCHECK(index < Length()); | 2358 DCHECK(index < Length()); |
| 2358 return Get(index)->IsSmi(); | 2359 return Get(index)->IsSmi(); |
| 2359 } | 2360 } |
| 2360 | 2361 |
| 2361 | 2362 |
| (...skipping 5134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7496 #undef READ_SHORT_FIELD | 7497 #undef READ_SHORT_FIELD |
| 7497 #undef WRITE_SHORT_FIELD | 7498 #undef WRITE_SHORT_FIELD |
| 7498 #undef READ_BYTE_FIELD | 7499 #undef READ_BYTE_FIELD |
| 7499 #undef WRITE_BYTE_FIELD | 7500 #undef WRITE_BYTE_FIELD |
| 7500 #undef NOBARRIER_READ_BYTE_FIELD | 7501 #undef NOBARRIER_READ_BYTE_FIELD |
| 7501 #undef NOBARRIER_WRITE_BYTE_FIELD | 7502 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7502 | 7503 |
| 7503 } } // namespace v8::internal | 7504 } } // namespace v8::internal |
| 7504 | 7505 |
| 7505 #endif // V8_OBJECTS_INL_H_ | 7506 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |