OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
44 // | 44 // |
45 // Inheritance hierarchy: | 45 // Inheritance hierarchy: |
46 // - MaybeObject (an object or a failure) | 46 // - MaybeObject (an object or a failure) |
47 // - Failure (immediate for marking failed operation) | 47 // - Failure (immediate for marking failed operation) |
48 // - Object | 48 // - Object |
49 // - Smi (immediate small integer) | 49 // - Smi (immediate small integer) |
50 // - HeapObject (superclass for everything allocated in the heap) | 50 // - HeapObject (superclass for everything allocated in the heap) |
51 // - JSReceiver (suitable for property access) | 51 // - JSReceiver (suitable for property access) |
52 // - JSObject | 52 // - JSObject |
53 // - JSArray | 53 // - JSArray |
54 // - JSWeakMap | |
54 // - JSRegExp | 55 // - JSRegExp |
55 // - JSFunction | 56 // - JSFunction |
56 // - GlobalObject | 57 // - GlobalObject |
57 // - JSGlobalObject | 58 // - JSGlobalObject |
58 // - JSBuiltinsObject | 59 // - JSBuiltinsObject |
59 // - JSGlobalProxy | 60 // - JSGlobalProxy |
60 // - JSValue | 61 // - JSValue |
61 // - JSMessageObject | 62 // - JSMessageObject |
62 // - JSProxy | 63 // - JSProxy |
63 // - JSFunctionProxy | 64 // - JSFunctionProxy |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
324 V(JS_MESSAGE_OBJECT_TYPE) \ | 325 V(JS_MESSAGE_OBJECT_TYPE) \ |
325 \ | 326 \ |
326 V(JS_VALUE_TYPE) \ | 327 V(JS_VALUE_TYPE) \ |
327 V(JS_OBJECT_TYPE) \ | 328 V(JS_OBJECT_TYPE) \ |
328 V(JS_CONTEXT_EXTENSION_OBJECT_TYPE) \ | 329 V(JS_CONTEXT_EXTENSION_OBJECT_TYPE) \ |
329 V(JS_GLOBAL_OBJECT_TYPE) \ | 330 V(JS_GLOBAL_OBJECT_TYPE) \ |
330 V(JS_BUILTINS_OBJECT_TYPE) \ | 331 V(JS_BUILTINS_OBJECT_TYPE) \ |
331 V(JS_GLOBAL_PROXY_TYPE) \ | 332 V(JS_GLOBAL_PROXY_TYPE) \ |
332 V(JS_ARRAY_TYPE) \ | 333 V(JS_ARRAY_TYPE) \ |
333 V(JS_PROXY_TYPE) \ | 334 V(JS_PROXY_TYPE) \ |
335 V(JS_WEAKMAP_TYPE) \ | |
danno
2011/07/29 08:17:33
nit: WEAK_MAP is more consistent
| |
334 V(JS_REGEXP_TYPE) \ | 336 V(JS_REGEXP_TYPE) \ |
335 \ | 337 \ |
336 V(JS_FUNCTION_TYPE) \ | 338 V(JS_FUNCTION_TYPE) \ |
337 V(JS_FUNCTION_PROXY_TYPE) \ | 339 V(JS_FUNCTION_PROXY_TYPE) \ |
338 | 340 |
339 #ifdef ENABLE_DEBUGGER_SUPPORT | 341 #ifdef ENABLE_DEBUGGER_SUPPORT |
340 #define INSTANCE_TYPE_LIST_DEBUGGER(V) \ | 342 #define INSTANCE_TYPE_LIST_DEBUGGER(V) \ |
341 V(DEBUG_INFO_TYPE) \ | 343 V(DEBUG_INFO_TYPE) \ |
342 V(BREAK_POINT_INFO_TYPE) | 344 V(BREAK_POINT_INFO_TYPE) |
343 #else | 345 #else |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
561 JS_MESSAGE_OBJECT_TYPE, | 563 JS_MESSAGE_OBJECT_TYPE, |
562 | 564 |
563 JS_VALUE_TYPE, // FIRST_NON_CALLABLE_OBJECT_TYPE, FIRST_JS_RECEIVER_TYPE | 565 JS_VALUE_TYPE, // FIRST_NON_CALLABLE_OBJECT_TYPE, FIRST_JS_RECEIVER_TYPE |
564 JS_OBJECT_TYPE, | 566 JS_OBJECT_TYPE, |
565 JS_CONTEXT_EXTENSION_OBJECT_TYPE, | 567 JS_CONTEXT_EXTENSION_OBJECT_TYPE, |
566 JS_GLOBAL_OBJECT_TYPE, | 568 JS_GLOBAL_OBJECT_TYPE, |
567 JS_BUILTINS_OBJECT_TYPE, | 569 JS_BUILTINS_OBJECT_TYPE, |
568 JS_GLOBAL_PROXY_TYPE, | 570 JS_GLOBAL_PROXY_TYPE, |
569 JS_ARRAY_TYPE, | 571 JS_ARRAY_TYPE, |
570 JS_PROXY_TYPE, | 572 JS_PROXY_TYPE, |
573 JS_WEAKMAP_TYPE, | |
571 | 574 |
572 JS_REGEXP_TYPE, // LAST_NONCALLABLE_SPEC_OBJECT_TYPE | 575 JS_REGEXP_TYPE, // LAST_NONCALLABLE_SPEC_OBJECT_TYPE |
573 | 576 |
574 JS_FUNCTION_TYPE, // FIRST_CALLABLE_SPEC_OBJECT_TYPE | 577 JS_FUNCTION_TYPE, // FIRST_CALLABLE_SPEC_OBJECT_TYPE |
575 JS_FUNCTION_PROXY_TYPE, // LAST_CALLABLE_SPEC_OBJECT_TYPE | 578 JS_FUNCTION_PROXY_TYPE, // LAST_CALLABLE_SPEC_OBJECT_TYPE |
576 | 579 |
577 // Pseudo-types | 580 // Pseudo-types |
578 FIRST_TYPE = 0x0, | 581 FIRST_TYPE = 0x0, |
579 LAST_TYPE = JS_FUNCTION_PROXY_TYPE, | 582 LAST_TYPE = JS_FUNCTION_PROXY_TYPE, |
580 INVALID_TYPE = FIRST_TYPE - 1, | 583 INVALID_TYPE = FIRST_TYPE - 1, |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
741 V(Oddball) \ | 744 V(Oddball) \ |
742 V(SharedFunctionInfo) \ | 745 V(SharedFunctionInfo) \ |
743 V(JSValue) \ | 746 V(JSValue) \ |
744 V(JSMessageObject) \ | 747 V(JSMessageObject) \ |
745 V(StringWrapper) \ | 748 V(StringWrapper) \ |
746 V(Foreign) \ | 749 V(Foreign) \ |
747 V(Boolean) \ | 750 V(Boolean) \ |
748 V(JSArray) \ | 751 V(JSArray) \ |
749 V(JSProxy) \ | 752 V(JSProxy) \ |
750 V(JSFunctionProxy) \ | 753 V(JSFunctionProxy) \ |
754 V(JSWeakMap) \ | |
751 V(JSRegExp) \ | 755 V(JSRegExp) \ |
752 V(HashTable) \ | 756 V(HashTable) \ |
753 V(Dictionary) \ | 757 V(Dictionary) \ |
754 V(SymbolTable) \ | 758 V(SymbolTable) \ |
755 V(JSFunctionResultCache) \ | 759 V(JSFunctionResultCache) \ |
756 V(NormalizedMapCache) \ | 760 V(NormalizedMapCache) \ |
757 V(CompilationCacheTable) \ | 761 V(CompilationCacheTable) \ |
758 V(CodeCacheHashTable) \ | 762 V(CodeCacheHashTable) \ |
759 V(PolymorphicCodeCacheHashTable) \ | 763 V(PolymorphicCodeCacheHashTable) \ |
760 V(MapCache) \ | 764 V(MapCache) \ |
(...skipping 5850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6611 class JSFunctionProxy: public JSProxy { | 6615 class JSFunctionProxy: public JSProxy { |
6612 public: | 6616 public: |
6613 // Casting. | 6617 // Casting. |
6614 static inline JSFunctionProxy* cast(Object* obj); | 6618 static inline JSFunctionProxy* cast(Object* obj); |
6615 | 6619 |
6616 private: | 6620 private: |
6617 DISALLOW_IMPLICIT_CONSTRUCTORS(JSFunctionProxy); | 6621 DISALLOW_IMPLICIT_CONSTRUCTORS(JSFunctionProxy); |
6618 }; | 6622 }; |
6619 | 6623 |
6620 | 6624 |
6625 // The JSWeakMap describes EcmaScript Harmony weak maps | |
6626 class JSWeakMap: public JSObject { | |
6627 public: | |
6628 // [table]: the backing hash table mapping keys to values. | |
6629 DECL_ACCESSORS(table, ObjectHashTable) | |
6630 | |
6631 // Casting. | |
6632 static inline JSWeakMap* cast(Object* obj); | |
6633 | |
6634 static const int kTableOffset = JSObject::kHeaderSize; | |
6635 static const int kSize = kTableOffset + kPointerSize; | |
6636 | |
6637 private: | |
6638 DISALLOW_IMPLICIT_CONSTRUCTORS(JSWeakMap); | |
6639 }; | |
6640 | |
6641 | |
6621 // Foreign describes objects pointing from JavaScript to C structures. | 6642 // Foreign describes objects pointing from JavaScript to C structures. |
6622 // Since they cannot contain references to JS HeapObjects they can be | 6643 // Since they cannot contain references to JS HeapObjects they can be |
6623 // placed in old_data_space. | 6644 // placed in old_data_space. |
6624 class Foreign: public HeapObject { | 6645 class Foreign: public HeapObject { |
6625 public: | 6646 public: |
6626 // [address]: field containing the address. | 6647 // [address]: field containing the address. |
6627 inline Address address(); | 6648 inline Address address(); |
6628 inline void set_address(Address value); | 6649 inline void set_address(Address value); |
6629 | 6650 |
6630 // Casting. | 6651 // Casting. |
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
7254 } else { | 7275 } else { |
7255 value &= ~(1 << bit_position); | 7276 value &= ~(1 << bit_position); |
7256 } | 7277 } |
7257 return value; | 7278 return value; |
7258 } | 7279 } |
7259 }; | 7280 }; |
7260 | 7281 |
7261 } } // namespace v8::internal | 7282 } } // namespace v8::internal |
7262 | 7283 |
7263 #endif // V8_OBJECTS_H_ | 7284 #endif // V8_OBJECTS_H_ |
OLD | NEW |