| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 | 675 |
| 676 | 676 |
| 677 bool Object::IsBoolean() { | 677 bool Object::IsBoolean() { |
| 678 return IsOddball() && | 678 return IsOddball() && |
| 679 ((Oddball::cast(this)->kind() & Oddball::kNotBooleanMask) == 0); | 679 ((Oddball::cast(this)->kind() & Oddball::kNotBooleanMask) == 0); |
| 680 } | 680 } |
| 681 | 681 |
| 682 | 682 |
| 683 TYPE_CHECKER(JSArray, JS_ARRAY_TYPE) | 683 TYPE_CHECKER(JSArray, JS_ARRAY_TYPE) |
| 684 TYPE_CHECKER(JSArrayBuffer, JS_ARRAY_BUFFER_TYPE) | 684 TYPE_CHECKER(JSArrayBuffer, JS_ARRAY_BUFFER_TYPE) |
| 685 TYPE_CHECKER(JSDataView, JS_DATA_VIEW_TYPE) |
| 685 TYPE_CHECKER(JSTypedArray, JS_TYPED_ARRAY_TYPE) | 686 TYPE_CHECKER(JSTypedArray, JS_TYPED_ARRAY_TYPE) |
| 686 TYPE_CHECKER(JSRegExp, JS_REGEXP_TYPE) | 687 TYPE_CHECKER(JSRegExp, JS_REGEXP_TYPE) |
| 687 | 688 |
| 688 | 689 |
| 689 template <> inline bool Is<JSArray>(Object* obj) { | 690 template <> inline bool Is<JSArray>(Object* obj) { |
| 690 return obj->IsJSArray(); | 691 return obj->IsJSArray(); |
| 691 } | 692 } |
| 692 | 693 |
| 693 | 694 |
| 694 bool Object::IsHashTable() { | 695 bool Object::IsHashTable() { |
| (...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1637 case JS_FUNCTION_TYPE: | 1638 case JS_FUNCTION_TYPE: |
| 1638 return JSFunction::kSize; | 1639 return JSFunction::kSize; |
| 1639 case JS_VALUE_TYPE: | 1640 case JS_VALUE_TYPE: |
| 1640 return JSValue::kSize; | 1641 return JSValue::kSize; |
| 1641 case JS_DATE_TYPE: | 1642 case JS_DATE_TYPE: |
| 1642 return JSDate::kSize; | 1643 return JSDate::kSize; |
| 1643 case JS_ARRAY_TYPE: | 1644 case JS_ARRAY_TYPE: |
| 1644 return JSArray::kSize; | 1645 return JSArray::kSize; |
| 1645 case JS_ARRAY_BUFFER_TYPE: | 1646 case JS_ARRAY_BUFFER_TYPE: |
| 1646 return JSArrayBuffer::kSize; | 1647 return JSArrayBuffer::kSize; |
| 1648 case JS_DATA_VIEW_TYPE: |
| 1649 return JSDataView::kSize; |
| 1647 case JS_TYPED_ARRAY_TYPE: | 1650 case JS_TYPED_ARRAY_TYPE: |
| 1648 return JSTypedArray::kSize; | 1651 return JSTypedArray::kSize; |
| 1649 case JS_SET_TYPE: | 1652 case JS_SET_TYPE: |
| 1650 return JSSet::kSize; | 1653 return JSSet::kSize; |
| 1651 case JS_MAP_TYPE: | 1654 case JS_MAP_TYPE: |
| 1652 return JSMap::kSize; | 1655 return JSMap::kSize; |
| 1653 case JS_WEAK_MAP_TYPE: | 1656 case JS_WEAK_MAP_TYPE: |
| 1654 return JSWeakMap::kSize; | 1657 return JSWeakMap::kSize; |
| 1655 case JS_REGEXP_TYPE: | 1658 case JS_REGEXP_TYPE: |
| 1656 return JSRegExp::kSize; | 1659 return JSRegExp::kSize; |
| (...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2541 CAST_ACCESSOR(SharedFunctionInfo) | 2544 CAST_ACCESSOR(SharedFunctionInfo) |
| 2542 CAST_ACCESSOR(Map) | 2545 CAST_ACCESSOR(Map) |
| 2543 CAST_ACCESSOR(JSFunction) | 2546 CAST_ACCESSOR(JSFunction) |
| 2544 CAST_ACCESSOR(GlobalObject) | 2547 CAST_ACCESSOR(GlobalObject) |
| 2545 CAST_ACCESSOR(JSGlobalProxy) | 2548 CAST_ACCESSOR(JSGlobalProxy) |
| 2546 CAST_ACCESSOR(JSGlobalObject) | 2549 CAST_ACCESSOR(JSGlobalObject) |
| 2547 CAST_ACCESSOR(JSBuiltinsObject) | 2550 CAST_ACCESSOR(JSBuiltinsObject) |
| 2548 CAST_ACCESSOR(Code) | 2551 CAST_ACCESSOR(Code) |
| 2549 CAST_ACCESSOR(JSArray) | 2552 CAST_ACCESSOR(JSArray) |
| 2550 CAST_ACCESSOR(JSArrayBuffer) | 2553 CAST_ACCESSOR(JSArrayBuffer) |
| 2554 CAST_ACCESSOR(JSDataView) |
| 2551 CAST_ACCESSOR(JSTypedArray) | 2555 CAST_ACCESSOR(JSTypedArray) |
| 2552 CAST_ACCESSOR(JSRegExp) | 2556 CAST_ACCESSOR(JSRegExp) |
| 2553 CAST_ACCESSOR(JSProxy) | 2557 CAST_ACCESSOR(JSProxy) |
| 2554 CAST_ACCESSOR(JSFunctionProxy) | 2558 CAST_ACCESSOR(JSFunctionProxy) |
| 2555 CAST_ACCESSOR(JSSet) | 2559 CAST_ACCESSOR(JSSet) |
| 2556 CAST_ACCESSOR(JSMap) | 2560 CAST_ACCESSOR(JSMap) |
| 2557 CAST_ACCESSOR(JSWeakMap) | 2561 CAST_ACCESSOR(JSWeakMap) |
| 2558 CAST_ACCESSOR(Foreign) | 2562 CAST_ACCESSOR(Foreign) |
| 2559 CAST_ACCESSOR(ByteArray) | 2563 CAST_ACCESSOR(ByteArray) |
| 2560 CAST_ACCESSOR(FreeSpace) | 2564 CAST_ACCESSOR(FreeSpace) |
| (...skipping 2765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5326 bool JSArrayBuffer::is_external() { | 5330 bool JSArrayBuffer::is_external() { |
| 5327 return BooleanBit::get(flag(), kIsExternalBit); | 5331 return BooleanBit::get(flag(), kIsExternalBit); |
| 5328 } | 5332 } |
| 5329 | 5333 |
| 5330 | 5334 |
| 5331 void JSArrayBuffer::set_is_external(bool value) { | 5335 void JSArrayBuffer::set_is_external(bool value) { |
| 5332 set_flag(BooleanBit::set(flag(), kIsExternalBit, value)); | 5336 set_flag(BooleanBit::set(flag(), kIsExternalBit, value)); |
| 5333 } | 5337 } |
| 5334 | 5338 |
| 5335 | 5339 |
| 5340 ACCESSORS(JSDataView, buffer, Object, kBufferOffset) |
| 5341 ACCESSORS(JSDataView, byte_offset, Object, kByteOffsetOffset) |
| 5342 ACCESSORS(JSDataView, byte_length, Object, kByteLengthOffset) |
| 5343 |
| 5344 |
| 5336 ACCESSORS(JSTypedArray, buffer, Object, kBufferOffset) | 5345 ACCESSORS(JSTypedArray, buffer, Object, kBufferOffset) |
| 5337 ACCESSORS(JSTypedArray, byte_offset, Object, kByteOffsetOffset) | 5346 ACCESSORS(JSTypedArray, byte_offset, Object, kByteOffsetOffset) |
| 5338 ACCESSORS(JSTypedArray, byte_length, Object, kByteLengthOffset) | 5347 ACCESSORS(JSTypedArray, byte_length, Object, kByteLengthOffset) |
| 5339 ACCESSORS(JSTypedArray, length, Object, kLengthOffset) | 5348 ACCESSORS(JSTypedArray, length, Object, kLengthOffset) |
| 5340 | 5349 |
| 5341 ACCESSORS(JSRegExp, data, Object, kDataOffset) | 5350 ACCESSORS(JSRegExp, data, Object, kDataOffset) |
| 5342 | 5351 |
| 5343 | 5352 |
| 5344 JSRegExp::Type JSRegExp::TypeTag() { | 5353 JSRegExp::Type JSRegExp::TypeTag() { |
| 5345 Object* data = this->data(); | 5354 Object* data = this->data(); |
| (...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6229 #undef WRITE_UINT32_FIELD | 6238 #undef WRITE_UINT32_FIELD |
| 6230 #undef READ_SHORT_FIELD | 6239 #undef READ_SHORT_FIELD |
| 6231 #undef WRITE_SHORT_FIELD | 6240 #undef WRITE_SHORT_FIELD |
| 6232 #undef READ_BYTE_FIELD | 6241 #undef READ_BYTE_FIELD |
| 6233 #undef WRITE_BYTE_FIELD | 6242 #undef WRITE_BYTE_FIELD |
| 6234 | 6243 |
| 6235 | 6244 |
| 6236 } } // namespace v8::internal | 6245 } } // namespace v8::internal |
| 6237 | 6246 |
| 6238 #endif // V8_OBJECTS_INL_H_ | 6247 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |