| 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 2338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2349 return WeakCell::cast(raw)->value(); | 2349 return WeakCell::cast(raw)->value(); |
| 2350 } | 2350 } |
| 2351 | 2351 |
| 2352 | 2352 |
| 2353 bool WeakFixedArray::IsEmptySlot(int index) const { | 2353 bool WeakFixedArray::IsEmptySlot(int index) const { |
| 2354 DCHECK(index < Length()); | 2354 DCHECK(index < Length()); |
| 2355 return Get(index)->IsSmi(); | 2355 return Get(index)->IsSmi(); |
| 2356 } | 2356 } |
| 2357 | 2357 |
| 2358 | 2358 |
| 2359 void WeakFixedArray::Clear(int index) { | 2359 void WeakFixedArray::clear(int index) { |
| 2360 FixedArray::cast(this)->set(index + kFirstIndex, Smi::FromInt(0)); | 2360 FixedArray::cast(this)->set(index + kFirstIndex, Smi::FromInt(0)); |
| 2361 } | 2361 } |
| 2362 | 2362 |
| 2363 | 2363 |
| 2364 int WeakFixedArray::Length() const { | 2364 int WeakFixedArray::Length() const { |
| 2365 return FixedArray::cast(this)->length() - kFirstIndex; | 2365 return FixedArray::cast(this)->length() - kFirstIndex; |
| 2366 } | 2366 } |
| 2367 | 2367 |
| 2368 | 2368 |
| 2369 int WeakFixedArray::last_used_index() const { | 2369 int WeakFixedArray::last_used_index() const { |
| (...skipping 5233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7603 #undef READ_SHORT_FIELD | 7603 #undef READ_SHORT_FIELD |
| 7604 #undef WRITE_SHORT_FIELD | 7604 #undef WRITE_SHORT_FIELD |
| 7605 #undef READ_BYTE_FIELD | 7605 #undef READ_BYTE_FIELD |
| 7606 #undef WRITE_BYTE_FIELD | 7606 #undef WRITE_BYTE_FIELD |
| 7607 #undef NOBARRIER_READ_BYTE_FIELD | 7607 #undef NOBARRIER_READ_BYTE_FIELD |
| 7608 #undef NOBARRIER_WRITE_BYTE_FIELD | 7608 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7609 | 7609 |
| 7610 } } // namespace v8::internal | 7610 } } // namespace v8::internal |
| 7611 | 7611 |
| 7612 #endif // V8_OBJECTS_INL_H_ | 7612 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |