| 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 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
| 6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
| 7 | 7 |
| 8 #include <iosfwd> | 8 #include <iosfwd> |
| 9 | 9 |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 756 LAST_NAME_TYPE = SYMBOL_TYPE, | 756 LAST_NAME_TYPE = SYMBOL_TYPE, |
| 757 FIRST_UNIQUE_NAME_TYPE = INTERNALIZED_STRING_TYPE, | 757 FIRST_UNIQUE_NAME_TYPE = INTERNALIZED_STRING_TYPE, |
| 758 LAST_UNIQUE_NAME_TYPE = SYMBOL_TYPE, | 758 LAST_UNIQUE_NAME_TYPE = SYMBOL_TYPE, |
| 759 FIRST_NONSTRING_TYPE = SYMBOL_TYPE, | 759 FIRST_NONSTRING_TYPE = SYMBOL_TYPE, |
| 760 // Boundaries for testing for an external array. | 760 // Boundaries for testing for an external array. |
| 761 FIRST_EXTERNAL_ARRAY_TYPE = EXTERNAL_INT8_ARRAY_TYPE, | 761 FIRST_EXTERNAL_ARRAY_TYPE = EXTERNAL_INT8_ARRAY_TYPE, |
| 762 LAST_EXTERNAL_ARRAY_TYPE = EXTERNAL_UINT8_CLAMPED_ARRAY_TYPE, | 762 LAST_EXTERNAL_ARRAY_TYPE = EXTERNAL_UINT8_CLAMPED_ARRAY_TYPE, |
| 763 // Boundaries for testing for a fixed typed array. | 763 // Boundaries for testing for a fixed typed array. |
| 764 FIRST_FIXED_TYPED_ARRAY_TYPE = FIXED_INT8_ARRAY_TYPE, | 764 FIRST_FIXED_TYPED_ARRAY_TYPE = FIXED_INT8_ARRAY_TYPE, |
| 765 LAST_FIXED_TYPED_ARRAY_TYPE = FIXED_UINT8_CLAMPED_ARRAY_TYPE, | 765 LAST_FIXED_TYPED_ARRAY_TYPE = FIXED_UINT8_CLAMPED_ARRAY_TYPE, |
| 766 // Boundary for promotion to old space. | 766 // Boundary for promotion to old data space/old pointer space. |
| 767 LAST_DATA_TYPE = FILLER_TYPE, | 767 LAST_DATA_TYPE = FILLER_TYPE, |
| 768 // Boundary for objects represented as JSReceiver (i.e. JSObject or JSProxy). | 768 // Boundary for objects represented as JSReceiver (i.e. JSObject or JSProxy). |
| 769 // Note that there is no range for JSObject or JSProxy, since their subtypes | 769 // Note that there is no range for JSObject or JSProxy, since their subtypes |
| 770 // are not continuous in this enum! The enum ranges instead reflect the | 770 // are not continuous in this enum! The enum ranges instead reflect the |
| 771 // external class names, where proxies are treated as either ordinary objects, | 771 // external class names, where proxies are treated as either ordinary objects, |
| 772 // or functions. | 772 // or functions. |
| 773 FIRST_JS_RECEIVER_TYPE = JS_FUNCTION_PROXY_TYPE, | 773 FIRST_JS_RECEIVER_TYPE = JS_FUNCTION_PROXY_TYPE, |
| 774 LAST_JS_RECEIVER_TYPE = LAST_TYPE, | 774 LAST_JS_RECEIVER_TYPE = LAST_TYPE, |
| 775 // Boundaries for testing the types represented as JSObject | 775 // Boundaries for testing the types represented as JSObject |
| 776 FIRST_JS_OBJECT_TYPE = JS_VALUE_TYPE, | 776 FIRST_JS_OBJECT_TYPE = JS_VALUE_TYPE, |
| (...skipping 9482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10259 | 10259 |
| 10260 static const int kSizeWithInternalFields = | 10260 static const int kSizeWithInternalFields = |
| 10261 kSize + v8::ArrayBufferView::kInternalFieldCount * kPointerSize; | 10261 kSize + v8::ArrayBufferView::kInternalFieldCount * kPointerSize; |
| 10262 | 10262 |
| 10263 private: | 10263 private: |
| 10264 DISALLOW_IMPLICIT_CONSTRUCTORS(JSDataView); | 10264 DISALLOW_IMPLICIT_CONSTRUCTORS(JSDataView); |
| 10265 }; | 10265 }; |
| 10266 | 10266 |
| 10267 | 10267 |
| 10268 // Foreign describes objects pointing from JavaScript to C structures. | 10268 // Foreign describes objects pointing from JavaScript to C structures. |
| 10269 // Since they cannot contain references to JS HeapObjects they can be |
| 10270 // placed in old_data_space. |
| 10269 class Foreign: public HeapObject { | 10271 class Foreign: public HeapObject { |
| 10270 public: | 10272 public: |
| 10271 // [address]: field containing the address. | 10273 // [address]: field containing the address. |
| 10272 inline Address foreign_address(); | 10274 inline Address foreign_address(); |
| 10273 inline void set_foreign_address(Address value); | 10275 inline void set_foreign_address(Address value); |
| 10274 | 10276 |
| 10275 DECLARE_CAST(Foreign) | 10277 DECLARE_CAST(Foreign) |
| 10276 | 10278 |
| 10277 // Dispatched behavior. | 10279 // Dispatched behavior. |
| 10278 inline void ForeignIterateBody(ObjectVisitor* v); | 10280 inline void ForeignIterateBody(ObjectVisitor* v); |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10990 } else { | 10992 } else { |
| 10991 value &= ~(1 << bit_position); | 10993 value &= ~(1 << bit_position); |
| 10992 } | 10994 } |
| 10993 return value; | 10995 return value; |
| 10994 } | 10996 } |
| 10995 }; | 10997 }; |
| 10996 | 10998 |
| 10997 } } // namespace v8::internal | 10999 } } // namespace v8::internal |
| 10998 | 11000 |
| 10999 #endif // V8_OBJECTS_H_ | 11001 #endif // V8_OBJECTS_H_ |
| OLD | NEW |