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 data space/old pointer space. | 766 // Boundary for promotion to old 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 9494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10271 | 10271 |
10272 static const int kSizeWithInternalFields = | 10272 static const int kSizeWithInternalFields = |
10273 kSize + v8::ArrayBufferView::kInternalFieldCount * kPointerSize; | 10273 kSize + v8::ArrayBufferView::kInternalFieldCount * kPointerSize; |
10274 | 10274 |
10275 private: | 10275 private: |
10276 DISALLOW_IMPLICIT_CONSTRUCTORS(JSDataView); | 10276 DISALLOW_IMPLICIT_CONSTRUCTORS(JSDataView); |
10277 }; | 10277 }; |
10278 | 10278 |
10279 | 10279 |
10280 // Foreign describes objects pointing from JavaScript to C structures. | 10280 // Foreign describes objects pointing from JavaScript to C structures. |
10281 // Since they cannot contain references to JS HeapObjects they can be | |
10282 // placed in old_data_space. | |
10283 class Foreign: public HeapObject { | 10281 class Foreign: public HeapObject { |
10284 public: | 10282 public: |
10285 // [address]: field containing the address. | 10283 // [address]: field containing the address. |
10286 inline Address foreign_address(); | 10284 inline Address foreign_address(); |
10287 inline void set_foreign_address(Address value); | 10285 inline void set_foreign_address(Address value); |
10288 | 10286 |
10289 DECLARE_CAST(Foreign) | 10287 DECLARE_CAST(Foreign) |
10290 | 10288 |
10291 // Dispatched behavior. | 10289 // Dispatched behavior. |
10292 inline void ForeignIterateBody(ObjectVisitor* v); | 10290 inline void ForeignIterateBody(ObjectVisitor* v); |
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10999 } else { | 10997 } else { |
11000 value &= ~(1 << bit_position); | 10998 value &= ~(1 << bit_position); |
11001 } | 10999 } |
11002 return value; | 11000 return value; |
11003 } | 11001 } |
11004 }; | 11002 }; |
11005 | 11003 |
11006 } } // namespace v8::internal | 11004 } } // namespace v8::internal |
11007 | 11005 |
11008 #endif // V8_OBJECTS_H_ | 11006 #endif // V8_OBJECTS_H_ |
OLD | NEW |