| 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 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 bool Object::IsDeoptimizationOutputData() const { | 748 bool Object::IsDeoptimizationOutputData() const { |
| 749 if (!IsFixedArray()) return false; | 749 if (!IsFixedArray()) return false; |
| 750 // There's actually no way to see the difference between a fixed array and | 750 // There's actually no way to see the difference between a fixed array and |
| 751 // a deoptimization data array. Since this is used for asserts we can check | 751 // a deoptimization data array. Since this is used for asserts we can check |
| 752 // that the length is plausible though. | 752 // that the length is plausible though. |
| 753 if (FixedArray::cast(this)->length() % 2 != 0) return false; | 753 if (FixedArray::cast(this)->length() % 2 != 0) return false; |
| 754 return true; | 754 return true; |
| 755 } | 755 } |
| 756 | 756 |
| 757 | 757 |
| 758 bool Object::IsHandlerTable() const { |
| 759 if (!IsFixedArray()) return false; |
| 760 // There's actually no way to see the difference between a fixed array and |
| 761 // a handler table array. |
| 762 return true; |
| 763 } |
| 764 |
| 765 |
| 758 bool Object::IsDependentCode() const { | 766 bool Object::IsDependentCode() const { |
| 759 if (!IsFixedArray()) return false; | 767 if (!IsFixedArray()) return false; |
| 760 // There's actually no way to see the difference between a fixed array and | 768 // There's actually no way to see the difference between a fixed array and |
| 761 // a dependent codes array. | 769 // a dependent codes array. |
| 762 return true; | 770 return true; |
| 763 } | 771 } |
| 764 | 772 |
| 765 | 773 |
| 766 bool Object::IsContext() const { | 774 bool Object::IsContext() const { |
| 767 if (!Object::IsHeapObject()) return false; | 775 if (!Object::IsHeapObject()) return false; |
| (...skipping 2567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3335 CAST_ACCESSOR(ExternalUint16Array) | 3343 CAST_ACCESSOR(ExternalUint16Array) |
| 3336 CAST_ACCESSOR(ExternalUint32Array) | 3344 CAST_ACCESSOR(ExternalUint32Array) |
| 3337 CAST_ACCESSOR(ExternalUint8Array) | 3345 CAST_ACCESSOR(ExternalUint8Array) |
| 3338 CAST_ACCESSOR(ExternalUint8ClampedArray) | 3346 CAST_ACCESSOR(ExternalUint8ClampedArray) |
| 3339 CAST_ACCESSOR(FixedArray) | 3347 CAST_ACCESSOR(FixedArray) |
| 3340 CAST_ACCESSOR(FixedArrayBase) | 3348 CAST_ACCESSOR(FixedArrayBase) |
| 3341 CAST_ACCESSOR(FixedDoubleArray) | 3349 CAST_ACCESSOR(FixedDoubleArray) |
| 3342 CAST_ACCESSOR(FixedTypedArrayBase) | 3350 CAST_ACCESSOR(FixedTypedArrayBase) |
| 3343 CAST_ACCESSOR(Foreign) | 3351 CAST_ACCESSOR(Foreign) |
| 3344 CAST_ACCESSOR(GlobalObject) | 3352 CAST_ACCESSOR(GlobalObject) |
| 3353 CAST_ACCESSOR(HandlerTable) |
| 3345 CAST_ACCESSOR(HeapObject) | 3354 CAST_ACCESSOR(HeapObject) |
| 3346 CAST_ACCESSOR(JSArray) | 3355 CAST_ACCESSOR(JSArray) |
| 3347 CAST_ACCESSOR(JSArrayBuffer) | 3356 CAST_ACCESSOR(JSArrayBuffer) |
| 3348 CAST_ACCESSOR(JSArrayBufferView) | 3357 CAST_ACCESSOR(JSArrayBufferView) |
| 3349 CAST_ACCESSOR(JSBuiltinsObject) | 3358 CAST_ACCESSOR(JSBuiltinsObject) |
| 3350 CAST_ACCESSOR(JSDataView) | 3359 CAST_ACCESSOR(JSDataView) |
| 3351 CAST_ACCESSOR(JSDate) | 3360 CAST_ACCESSOR(JSDate) |
| 3352 CAST_ACCESSOR(JSFunction) | 3361 CAST_ACCESSOR(JSFunction) |
| 3353 CAST_ACCESSOR(JSFunctionProxy) | 3362 CAST_ACCESSOR(JSFunctionProxy) |
| 3354 CAST_ACCESSOR(JSFunctionResultCache) | 3363 CAST_ACCESSOR(JSFunctionResultCache) |
| (...skipping 2867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6222 void Foreign::set_foreign_address(Address value) { | 6231 void Foreign::set_foreign_address(Address value) { |
| 6223 WRITE_INTPTR_FIELD(this, kForeignAddressOffset, OffsetFrom(value)); | 6232 WRITE_INTPTR_FIELD(this, kForeignAddressOffset, OffsetFrom(value)); |
| 6224 } | 6233 } |
| 6225 | 6234 |
| 6226 | 6235 |
| 6227 ACCESSORS(JSGeneratorObject, function, JSFunction, kFunctionOffset) | 6236 ACCESSORS(JSGeneratorObject, function, JSFunction, kFunctionOffset) |
| 6228 ACCESSORS(JSGeneratorObject, context, Context, kContextOffset) | 6237 ACCESSORS(JSGeneratorObject, context, Context, kContextOffset) |
| 6229 ACCESSORS(JSGeneratorObject, receiver, Object, kReceiverOffset) | 6238 ACCESSORS(JSGeneratorObject, receiver, Object, kReceiverOffset) |
| 6230 SMI_ACCESSORS(JSGeneratorObject, continuation, kContinuationOffset) | 6239 SMI_ACCESSORS(JSGeneratorObject, continuation, kContinuationOffset) |
| 6231 ACCESSORS(JSGeneratorObject, operand_stack, FixedArray, kOperandStackOffset) | 6240 ACCESSORS(JSGeneratorObject, operand_stack, FixedArray, kOperandStackOffset) |
| 6232 SMI_ACCESSORS(JSGeneratorObject, stack_handler_index, kStackHandlerIndexOffset) | |
| 6233 | 6241 |
| 6234 bool JSGeneratorObject::is_suspended() { | 6242 bool JSGeneratorObject::is_suspended() { |
| 6235 DCHECK_LT(kGeneratorExecuting, kGeneratorClosed); | 6243 DCHECK_LT(kGeneratorExecuting, kGeneratorClosed); |
| 6236 DCHECK_EQ(kGeneratorClosed, 0); | 6244 DCHECK_EQ(kGeneratorClosed, 0); |
| 6237 return continuation() > 0; | 6245 return continuation() > 0; |
| 6238 } | 6246 } |
| 6239 | 6247 |
| 6240 bool JSGeneratorObject::is_closed() { | 6248 bool JSGeneratorObject::is_closed() { |
| 6241 return continuation() == kGeneratorClosed; | 6249 return continuation() == kGeneratorClosed; |
| 6242 } | 6250 } |
| (...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7502 #undef READ_SHORT_FIELD | 7510 #undef READ_SHORT_FIELD |
| 7503 #undef WRITE_SHORT_FIELD | 7511 #undef WRITE_SHORT_FIELD |
| 7504 #undef READ_BYTE_FIELD | 7512 #undef READ_BYTE_FIELD |
| 7505 #undef WRITE_BYTE_FIELD | 7513 #undef WRITE_BYTE_FIELD |
| 7506 #undef NOBARRIER_READ_BYTE_FIELD | 7514 #undef NOBARRIER_READ_BYTE_FIELD |
| 7507 #undef NOBARRIER_WRITE_BYTE_FIELD | 7515 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7508 | 7516 |
| 7509 } } // namespace v8::internal | 7517 } } // namespace v8::internal |
| 7510 | 7518 |
| 7511 #endif // V8_OBJECTS_INL_H_ | 7519 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |