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 2446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2457 | 2457 |
2458 Object* ArrayList::Get(int index) { | 2458 Object* ArrayList::Get(int index) { |
2459 return FixedArray::cast(this)->get(kFirstIndex + index); | 2459 return FixedArray::cast(this)->get(kFirstIndex + index); |
2460 } | 2460 } |
2461 | 2461 |
2462 | 2462 |
2463 Object** ArrayList::Slot(int index) { | 2463 Object** ArrayList::Slot(int index) { |
2464 return data_start() + kFirstIndex + index; | 2464 return data_start() + kFirstIndex + index; |
2465 } | 2465 } |
2466 | 2466 |
2467 void ArrayList::Set(int index, Object* obj, WriteBarrierMode mode) { | 2467 |
2468 FixedArray::cast(this)->set(kFirstIndex + index, obj, mode); | 2468 void ArrayList::Set(int index, Object* obj) { |
| 2469 FixedArray::cast(this)->set(kFirstIndex + index, obj); |
2469 } | 2470 } |
2470 | 2471 |
2471 | 2472 |
2472 void ArrayList::Clear(int index, Object* undefined) { | 2473 void ArrayList::Clear(int index, Object* undefined) { |
2473 DCHECK(undefined->IsUndefined(GetIsolate())); | 2474 DCHECK(undefined->IsUndefined(GetIsolate())); |
2474 FixedArray::cast(this) | 2475 FixedArray::cast(this) |
2475 ->set(kFirstIndex + index, undefined, SKIP_WRITE_BARRIER); | 2476 ->set(kFirstIndex + index, undefined, SKIP_WRITE_BARRIER); |
2476 } | 2477 } |
2477 | 2478 |
2478 | 2479 |
(...skipping 5429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7908 #undef WRITE_INT64_FIELD | 7909 #undef WRITE_INT64_FIELD |
7909 #undef READ_BYTE_FIELD | 7910 #undef READ_BYTE_FIELD |
7910 #undef WRITE_BYTE_FIELD | 7911 #undef WRITE_BYTE_FIELD |
7911 #undef NOBARRIER_READ_BYTE_FIELD | 7912 #undef NOBARRIER_READ_BYTE_FIELD |
7912 #undef NOBARRIER_WRITE_BYTE_FIELD | 7913 #undef NOBARRIER_WRITE_BYTE_FIELD |
7913 | 7914 |
7914 } // namespace internal | 7915 } // namespace internal |
7915 } // namespace v8 | 7916 } // namespace v8 |
7916 | 7917 |
7917 #endif // V8_OBJECTS_INL_H_ | 7918 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |