| 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 6465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6476 | 6476 |
| 6477 | 6477 |
| 6478 bool JSArrayBuffer::was_neutered() { return WasNeutered::decode(bit_field()); } | 6478 bool JSArrayBuffer::was_neutered() { return WasNeutered::decode(bit_field()); } |
| 6479 | 6479 |
| 6480 | 6480 |
| 6481 void JSArrayBuffer::set_was_neutered(bool value) { | 6481 void JSArrayBuffer::set_was_neutered(bool value) { |
| 6482 set_bit_field(WasNeutered::update(bit_field(), value)); | 6482 set_bit_field(WasNeutered::update(bit_field(), value)); |
| 6483 } | 6483 } |
| 6484 | 6484 |
| 6485 | 6485 |
| 6486 bool JSArrayBuffer::is_shared() { return IsShared::decode(bit_field()); } |
| 6487 |
| 6488 |
| 6489 void JSArrayBuffer::set_is_shared(bool value) { |
| 6490 set_bit_field(IsShared::update(bit_field(), value)); |
| 6491 } |
| 6492 |
| 6493 |
| 6486 Object* JSArrayBufferView::byte_offset() const { | 6494 Object* JSArrayBufferView::byte_offset() const { |
| 6487 if (WasNeutered()) return Smi::FromInt(0); | 6495 if (WasNeutered()) return Smi::FromInt(0); |
| 6488 return Object::cast(READ_FIELD(this, kByteOffsetOffset)); | 6496 return Object::cast(READ_FIELD(this, kByteOffsetOffset)); |
| 6489 } | 6497 } |
| 6490 | 6498 |
| 6491 | 6499 |
| 6492 void JSArrayBufferView::set_byte_offset(Object* value, WriteBarrierMode mode) { | 6500 void JSArrayBufferView::set_byte_offset(Object* value, WriteBarrierMode mode) { |
| 6493 WRITE_FIELD(this, kByteOffsetOffset, value); | 6501 WRITE_FIELD(this, kByteOffsetOffset, value); |
| 6494 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kByteOffsetOffset, value, mode); | 6502 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kByteOffsetOffset, value, mode); |
| 6495 } | 6503 } |
| (...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7626 #undef READ_SHORT_FIELD | 7634 #undef READ_SHORT_FIELD |
| 7627 #undef WRITE_SHORT_FIELD | 7635 #undef WRITE_SHORT_FIELD |
| 7628 #undef READ_BYTE_FIELD | 7636 #undef READ_BYTE_FIELD |
| 7629 #undef WRITE_BYTE_FIELD | 7637 #undef WRITE_BYTE_FIELD |
| 7630 #undef NOBARRIER_READ_BYTE_FIELD | 7638 #undef NOBARRIER_READ_BYTE_FIELD |
| 7631 #undef NOBARRIER_WRITE_BYTE_FIELD | 7639 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7632 | 7640 |
| 7633 } } // namespace v8::internal | 7641 } } // namespace v8::internal |
| 7634 | 7642 |
| 7635 #endif // V8_OBJECTS_INL_H_ | 7643 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |