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 6447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6458 | 6458 |
6459 | 6459 |
6460 bool JSArrayBuffer::was_neutered() { return WasNeutered::decode(bit_field()); } | 6460 bool JSArrayBuffer::was_neutered() { return WasNeutered::decode(bit_field()); } |
6461 | 6461 |
6462 | 6462 |
6463 void JSArrayBuffer::set_was_neutered(bool value) { | 6463 void JSArrayBuffer::set_was_neutered(bool value) { |
6464 set_bit_field(WasNeutered::update(bit_field(), value)); | 6464 set_bit_field(WasNeutered::update(bit_field(), value)); |
6465 } | 6465 } |
6466 | 6466 |
6467 | 6467 |
6468 ACCESSORS(JSArrayBuffer, weak_next, Object, kWeakNextOffset) | |
6469 | |
6470 | |
6471 Object* JSArrayBufferView::byte_offset() const { | 6468 Object* JSArrayBufferView::byte_offset() const { |
6472 if (WasNeutered()) return Smi::FromInt(0); | 6469 if (WasNeutered()) return Smi::FromInt(0); |
6473 return Object::cast(READ_FIELD(this, kByteOffsetOffset)); | 6470 return Object::cast(READ_FIELD(this, kByteOffsetOffset)); |
6474 } | 6471 } |
6475 | 6472 |
6476 | 6473 |
6477 void JSArrayBufferView::set_byte_offset(Object* value, WriteBarrierMode mode) { | 6474 void JSArrayBufferView::set_byte_offset(Object* value, WriteBarrierMode mode) { |
6478 WRITE_FIELD(this, kByteOffsetOffset, value); | 6475 WRITE_FIELD(this, kByteOffsetOffset, value); |
6479 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kByteOffsetOffset, value, mode); | 6476 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kByteOffsetOffset, value, mode); |
6480 } | 6477 } |
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7601 #undef READ_SHORT_FIELD | 7598 #undef READ_SHORT_FIELD |
7602 #undef WRITE_SHORT_FIELD | 7599 #undef WRITE_SHORT_FIELD |
7603 #undef READ_BYTE_FIELD | 7600 #undef READ_BYTE_FIELD |
7604 #undef WRITE_BYTE_FIELD | 7601 #undef WRITE_BYTE_FIELD |
7605 #undef NOBARRIER_READ_BYTE_FIELD | 7602 #undef NOBARRIER_READ_BYTE_FIELD |
7606 #undef NOBARRIER_WRITE_BYTE_FIELD | 7603 #undef NOBARRIER_WRITE_BYTE_FIELD |
7607 | 7604 |
7608 } } // namespace v8::internal | 7605 } } // namespace v8::internal |
7609 | 7606 |
7610 #endif // V8_OBJECTS_INL_H_ | 7607 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |