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 2445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2456 | 2456 |
2457 Object* ArrayList::Get(int index) { | 2457 Object* ArrayList::Get(int index) { |
2458 return FixedArray::cast(this)->get(kFirstIndex + index); | 2458 return FixedArray::cast(this)->get(kFirstIndex + index); |
2459 } | 2459 } |
2460 | 2460 |
2461 | 2461 |
2462 Object** ArrayList::Slot(int index) { | 2462 Object** ArrayList::Slot(int index) { |
2463 return data_start() + kFirstIndex + index; | 2463 return data_start() + kFirstIndex + index; |
2464 } | 2464 } |
2465 | 2465 |
2466 | 2466 void ArrayList::Set(int index, Object* obj, WriteBarrierMode mode) { |
2467 void ArrayList::Set(int index, Object* obj) { | 2467 FixedArray::cast(this)->set(kFirstIndex + index, obj, mode); |
2468 FixedArray::cast(this)->set(kFirstIndex + index, obj); | |
2469 } | 2468 } |
2470 | 2469 |
2471 | 2470 |
2472 void ArrayList::Clear(int index, Object* undefined) { | 2471 void ArrayList::Clear(int index, Object* undefined) { |
2473 DCHECK(undefined->IsUndefined(GetIsolate())); | 2472 DCHECK(undefined->IsUndefined(GetIsolate())); |
2474 FixedArray::cast(this) | 2473 FixedArray::cast(this) |
2475 ->set(kFirstIndex + index, undefined, SKIP_WRITE_BARRIER); | 2474 ->set(kFirstIndex + index, undefined, SKIP_WRITE_BARRIER); |
2476 } | 2475 } |
2477 | 2476 |
2478 | 2477 |
(...skipping 5451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7930 #undef WRITE_INT64_FIELD | 7929 #undef WRITE_INT64_FIELD |
7931 #undef READ_BYTE_FIELD | 7930 #undef READ_BYTE_FIELD |
7932 #undef WRITE_BYTE_FIELD | 7931 #undef WRITE_BYTE_FIELD |
7933 #undef NOBARRIER_READ_BYTE_FIELD | 7932 #undef NOBARRIER_READ_BYTE_FIELD |
7934 #undef NOBARRIER_WRITE_BYTE_FIELD | 7933 #undef NOBARRIER_WRITE_BYTE_FIELD |
7935 | 7934 |
7936 } // namespace internal | 7935 } // namespace internal |
7937 } // namespace v8 | 7936 } // namespace v8 |
7938 | 7937 |
7939 #endif // V8_OBJECTS_INL_H_ | 7938 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |