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 6484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6495 | 6495 |
6496 | 6496 |
6497 ACCESSORS(JSArrayBufferView, buffer, Object, kBufferOffset) | 6497 ACCESSORS(JSArrayBufferView, buffer, Object, kBufferOffset) |
6498 #ifdef VERIFY_HEAP | 6498 #ifdef VERIFY_HEAP |
6499 ACCESSORS(JSArrayBufferView, raw_byte_offset, Object, kByteOffsetOffset) | 6499 ACCESSORS(JSArrayBufferView, raw_byte_offset, Object, kByteOffsetOffset) |
6500 ACCESSORS(JSArrayBufferView, raw_byte_length, Object, kByteLengthOffset) | 6500 ACCESSORS(JSArrayBufferView, raw_byte_length, Object, kByteLengthOffset) |
6501 #endif | 6501 #endif |
6502 | 6502 |
6503 | 6503 |
6504 bool JSArrayBufferView::WasNeutered() const { | 6504 bool JSArrayBufferView::WasNeutered() const { |
6505 return !buffer()->IsSmi() && JSArrayBuffer::cast(buffer())->was_neutered(); | 6505 return JSArrayBuffer::cast(buffer())->was_neutered(); |
6506 } | 6506 } |
6507 | 6507 |
6508 | 6508 |
6509 Object* JSTypedArray::length() const { | 6509 Object* JSTypedArray::length() const { |
6510 if (WasNeutered()) return Smi::FromInt(0); | 6510 if (WasNeutered()) return Smi::FromInt(0); |
6511 return Object::cast(READ_FIELD(this, kLengthOffset)); | 6511 return Object::cast(READ_FIELD(this, kLengthOffset)); |
6512 } | 6512 } |
6513 | 6513 |
6514 | 6514 |
6515 void JSTypedArray::set_length(Object* value, WriteBarrierMode mode) { | 6515 void JSTypedArray::set_length(Object* value, WriteBarrierMode mode) { |
(...skipping 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7603 #undef READ_SHORT_FIELD | 7603 #undef READ_SHORT_FIELD |
7604 #undef WRITE_SHORT_FIELD | 7604 #undef WRITE_SHORT_FIELD |
7605 #undef READ_BYTE_FIELD | 7605 #undef READ_BYTE_FIELD |
7606 #undef WRITE_BYTE_FIELD | 7606 #undef WRITE_BYTE_FIELD |
7607 #undef NOBARRIER_READ_BYTE_FIELD | 7607 #undef NOBARRIER_READ_BYTE_FIELD |
7608 #undef NOBARRIER_WRITE_BYTE_FIELD | 7608 #undef NOBARRIER_WRITE_BYTE_FIELD |
7609 | 7609 |
7610 } } // namespace v8::internal | 7610 } } // namespace v8::internal |
7611 | 7611 |
7612 #endif // V8_OBJECTS_INL_H_ | 7612 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |