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 2457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2468 | 2468 |
2469 Object* ArrayList::Get(int index) { | 2469 Object* ArrayList::Get(int index) { |
2470 return FixedArray::cast(this)->get(kFirstIndex + index); | 2470 return FixedArray::cast(this)->get(kFirstIndex + index); |
2471 } | 2471 } |
2472 | 2472 |
2473 | 2473 |
2474 Object** ArrayList::Slot(int index) { | 2474 Object** ArrayList::Slot(int index) { |
2475 return data_start() + kFirstIndex + index; | 2475 return data_start() + kFirstIndex + index; |
2476 } | 2476 } |
2477 | 2477 |
2478 | 2478 void ArrayList::Set(int index, Object* obj, WriteBarrierMode mode) { |
2479 void ArrayList::Set(int index, Object* obj) { | 2479 FixedArray::cast(this)->set(kFirstIndex + index, obj, mode); |
2480 FixedArray::cast(this)->set(kFirstIndex + index, obj); | |
2481 } | 2480 } |
2482 | 2481 |
2483 | 2482 |
2484 void ArrayList::Clear(int index, Object* undefined) { | 2483 void ArrayList::Clear(int index, Object* undefined) { |
2485 DCHECK(undefined->IsUndefined(GetIsolate())); | 2484 DCHECK(undefined->IsUndefined(GetIsolate())); |
2486 FixedArray::cast(this) | 2485 FixedArray::cast(this) |
2487 ->set(kFirstIndex + index, undefined, SKIP_WRITE_BARRIER); | 2486 ->set(kFirstIndex + index, undefined, SKIP_WRITE_BARRIER); |
2488 } | 2487 } |
2489 | 2488 |
2490 | 2489 |
(...skipping 5422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7913 #undef WRITE_INT64_FIELD | 7912 #undef WRITE_INT64_FIELD |
7914 #undef READ_BYTE_FIELD | 7913 #undef READ_BYTE_FIELD |
7915 #undef WRITE_BYTE_FIELD | 7914 #undef WRITE_BYTE_FIELD |
7916 #undef NOBARRIER_READ_BYTE_FIELD | 7915 #undef NOBARRIER_READ_BYTE_FIELD |
7917 #undef NOBARRIER_WRITE_BYTE_FIELD | 7916 #undef NOBARRIER_WRITE_BYTE_FIELD |
7918 | 7917 |
7919 } // namespace internal | 7918 } // namespace internal |
7920 } // namespace v8 | 7919 } // namespace v8 |
7921 | 7920 |
7922 #endif // V8_OBJECTS_INL_H_ | 7921 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |