| 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 "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/assert-scope.h" | 9 #include "src/assert-scope.h" |
| 10 #include "src/builtins.h" | 10 #include "src/builtins.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 // - Object | 35 // - Object |
| 36 // - Smi (immediate small integer) | 36 // - Smi (immediate small integer) |
| 37 // - HeapObject (superclass for everything allocated in the heap) | 37 // - HeapObject (superclass for everything allocated in the heap) |
| 38 // - JSReceiver (suitable for property access) | 38 // - JSReceiver (suitable for property access) |
| 39 // - JSObject | 39 // - JSObject |
| 40 // - JSArray | 40 // - JSArray |
| 41 // - JSArrayBuffer | 41 // - JSArrayBuffer |
| 42 // - JSArrayBufferView | 42 // - JSArrayBufferView |
| 43 // - JSTypedArray | 43 // - JSTypedArray |
| 44 // - JSDataView | 44 // - JSDataView |
| 45 // - JSSet | 45 // - JSCollection |
| 46 // - JSMap | 46 // - JSSet |
| 47 // - JSMap |
| 47 // - JSSetIterator | 48 // - JSSetIterator |
| 48 // - JSMapIterator | 49 // - JSMapIterator |
| 49 // - JSWeakCollection | 50 // - JSWeakCollection |
| 50 // - JSWeakMap | 51 // - JSWeakMap |
| 51 // - JSWeakSet | 52 // - JSWeakSet |
| 52 // - JSRegExp | 53 // - JSRegExp |
| 53 // - JSFunction | 54 // - JSFunction |
| 54 // - JSGeneratorObject | 55 // - JSGeneratorObject |
| 55 // - JSModule | 56 // - JSModule |
| 56 // - GlobalObject | 57 // - GlobalObject |
| (...skipping 10000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10057 | 10058 |
| 10058 typedef FixedBodyDescriptor<kHandlerOffset, | 10059 typedef FixedBodyDescriptor<kHandlerOffset, |
| 10059 kConstructTrapOffset + kPointerSize, | 10060 kConstructTrapOffset + kPointerSize, |
| 10060 kSize> BodyDescriptor; | 10061 kSize> BodyDescriptor; |
| 10061 | 10062 |
| 10062 private: | 10063 private: |
| 10063 DISALLOW_IMPLICIT_CONSTRUCTORS(JSFunctionProxy); | 10064 DISALLOW_IMPLICIT_CONSTRUCTORS(JSFunctionProxy); |
| 10064 }; | 10065 }; |
| 10065 | 10066 |
| 10066 | 10067 |
| 10068 class JSCollection : public JSObject { |
| 10069 public: |
| 10070 // [table]: the backing hash table |
| 10071 DECL_ACCESSORS(table, Object) |
| 10072 |
| 10073 static const int kTableOffset = JSObject::kHeaderSize; |
| 10074 static const int kSize = kTableOffset + kPointerSize; |
| 10075 |
| 10076 private: |
| 10077 DISALLOW_IMPLICIT_CONSTRUCTORS(JSCollection); |
| 10078 }; |
| 10079 |
| 10080 |
| 10067 // The JSSet describes EcmaScript Harmony sets | 10081 // The JSSet describes EcmaScript Harmony sets |
| 10068 class JSSet: public JSObject { | 10082 class JSSet : public JSCollection { |
| 10069 public: | 10083 public: |
| 10070 // [set]: the backing hash set containing keys. | |
| 10071 DECL_ACCESSORS(table, Object) | |
| 10072 | |
| 10073 DECLARE_CAST(JSSet) | 10084 DECLARE_CAST(JSSet) |
| 10074 | 10085 |
| 10075 // Dispatched behavior. | 10086 // Dispatched behavior. |
| 10076 DECLARE_PRINTER(JSSet) | 10087 DECLARE_PRINTER(JSSet) |
| 10077 DECLARE_VERIFIER(JSSet) | 10088 DECLARE_VERIFIER(JSSet) |
| 10078 | 10089 |
| 10079 static const int kTableOffset = JSObject::kHeaderSize; | |
| 10080 static const int kSize = kTableOffset + kPointerSize; | |
| 10081 | |
| 10082 private: | 10090 private: |
| 10083 DISALLOW_IMPLICIT_CONSTRUCTORS(JSSet); | 10091 DISALLOW_IMPLICIT_CONSTRUCTORS(JSSet); |
| 10084 }; | 10092 }; |
| 10085 | 10093 |
| 10086 | 10094 |
| 10087 // The JSMap describes EcmaScript Harmony maps | 10095 // The JSMap describes EcmaScript Harmony maps |
| 10088 class JSMap: public JSObject { | 10096 class JSMap : public JSCollection { |
| 10089 public: | 10097 public: |
| 10090 // [table]: the backing hash table mapping keys to values. | |
| 10091 DECL_ACCESSORS(table, Object) | |
| 10092 | |
| 10093 DECLARE_CAST(JSMap) | 10098 DECLARE_CAST(JSMap) |
| 10094 | 10099 |
| 10095 // Dispatched behavior. | 10100 // Dispatched behavior. |
| 10096 DECLARE_PRINTER(JSMap) | 10101 DECLARE_PRINTER(JSMap) |
| 10097 DECLARE_VERIFIER(JSMap) | 10102 DECLARE_VERIFIER(JSMap) |
| 10098 | 10103 |
| 10099 static const int kTableOffset = JSObject::kHeaderSize; | |
| 10100 static const int kSize = kTableOffset + kPointerSize; | |
| 10101 | |
| 10102 private: | 10104 private: |
| 10103 DISALLOW_IMPLICIT_CONSTRUCTORS(JSMap); | 10105 DISALLOW_IMPLICIT_CONSTRUCTORS(JSMap); |
| 10104 }; | 10106 }; |
| 10105 | 10107 |
| 10106 | 10108 |
| 10107 // OrderedHashTableIterator is an iterator that iterates over the keys and | 10109 // OrderedHashTableIterator is an iterator that iterates over the keys and |
| 10108 // values of an OrderedHashTable. | 10110 // values of an OrderedHashTable. |
| 10109 // | 10111 // |
| 10110 // The iterator has a reference to the underlying OrderedHashTable data, | 10112 // The iterator has a reference to the underlying OrderedHashTable data, |
| 10111 // [table], as well as the current [index] the iterator is at. | 10113 // [table], as well as the current [index] the iterator is at. |
| (...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11215 } else { | 11217 } else { |
| 11216 value &= ~(1 << bit_position); | 11218 value &= ~(1 << bit_position); |
| 11217 } | 11219 } |
| 11218 return value; | 11220 return value; |
| 11219 } | 11221 } |
| 11220 }; | 11222 }; |
| 11221 | 11223 |
| 11222 } } // namespace v8::internal | 11224 } } // namespace v8::internal |
| 11223 | 11225 |
| 11224 #endif // V8_OBJECTS_H_ | 11226 #endif // V8_OBJECTS_H_ |
| OLD | NEW |