| 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 2456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2467 | 2467 |
| 2468 Object* ArrayList::Get(int index) { | 2468 Object* ArrayList::Get(int index) { |
| 2469 return FixedArray::cast(this)->get(kFirstIndex + index); | 2469 return FixedArray::cast(this)->get(kFirstIndex + index); |
| 2470 } | 2470 } |
| 2471 | 2471 |
| 2472 | 2472 |
| 2473 Object** ArrayList::Slot(int index) { | 2473 Object** ArrayList::Slot(int index) { |
| 2474 return data_start() + kFirstIndex + index; | 2474 return data_start() + kFirstIndex + index; |
| 2475 } | 2475 } |
| 2476 | 2476 |
| 2477 | 2477 void ArrayList::Set(int index, Object* obj, WriteBarrierMode mode) { |
| 2478 void ArrayList::Set(int index, Object* obj) { | 2478 FixedArray::cast(this)->set(kFirstIndex + index, obj, mode); |
| 2479 FixedArray::cast(this)->set(kFirstIndex + index, obj); | |
| 2480 } | 2479 } |
| 2481 | 2480 |
| 2482 | 2481 |
| 2483 void ArrayList::Clear(int index, Object* undefined) { | 2482 void ArrayList::Clear(int index, Object* undefined) { |
| 2484 DCHECK(undefined->IsUndefined(GetIsolate())); | 2483 DCHECK(undefined->IsUndefined(GetIsolate())); |
| 2485 FixedArray::cast(this) | 2484 FixedArray::cast(this) |
| 2486 ->set(kFirstIndex + index, undefined, SKIP_WRITE_BARRIER); | 2485 ->set(kFirstIndex + index, undefined, SKIP_WRITE_BARRIER); |
| 2487 } | 2486 } |
| 2488 | 2487 |
| 2489 | 2488 |
| (...skipping 5442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7932 #undef WRITE_INT64_FIELD | 7931 #undef WRITE_INT64_FIELD |
| 7933 #undef READ_BYTE_FIELD | 7932 #undef READ_BYTE_FIELD |
| 7934 #undef WRITE_BYTE_FIELD | 7933 #undef WRITE_BYTE_FIELD |
| 7935 #undef NOBARRIER_READ_BYTE_FIELD | 7934 #undef NOBARRIER_READ_BYTE_FIELD |
| 7936 #undef NOBARRIER_WRITE_BYTE_FIELD | 7935 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7937 | 7936 |
| 7938 } // namespace internal | 7937 } // namespace internal |
| 7939 } // namespace v8 | 7938 } // namespace v8 |
| 7940 | 7939 |
| 7941 #endif // V8_OBJECTS_INL_H_ | 7940 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |