| 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 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 828 V(MapCache) \ | 828 V(MapCache) \ |
| 829 V(Primitive) \ | 829 V(Primitive) \ |
| 830 V(GlobalObject) \ | 830 V(GlobalObject) \ |
| 831 V(JSGlobalObject) \ | 831 V(JSGlobalObject) \ |
| 832 V(JSBuiltinsObject) \ | 832 V(JSBuiltinsObject) \ |
| 833 V(JSGlobalProxy) \ | 833 V(JSGlobalProxy) \ |
| 834 V(UndetectableObject) \ | 834 V(UndetectableObject) \ |
| 835 V(AccessCheckNeeded) \ | 835 V(AccessCheckNeeded) \ |
| 836 V(JSGlobalPropertyCell) \ | 836 V(JSGlobalPropertyCell) \ |
| 837 | 837 |
| 838 |
| 839 class JSReceiver; |
| 840 |
| 838 // Object is the abstract superclass for all classes in the | 841 // Object is the abstract superclass for all classes in the |
| 839 // object hierarchy. | 842 // object hierarchy. |
| 840 // Object does not use any virtual functions to avoid the | 843 // Object does not use any virtual functions to avoid the |
| 841 // allocation of the C++ vtable. | 844 // allocation of the C++ vtable. |
| 842 // Since Smi and Failure are subclasses of Object no | 845 // Since Smi and Failure are subclasses of Object no |
| 843 // data members can be present in Object. | 846 // data members can be present in Object. |
| 844 class Object : public MaybeObject { | 847 class Object : public MaybeObject { |
| 845 public: | 848 public: |
| 846 // Type testing. | 849 // Type testing. |
| 847 #define IS_TYPE_FUNCTION_DECL(type_) inline bool Is##type_(); | 850 #define IS_TYPE_FUNCTION_DECL(type_) inline bool Is##type_(); |
| 848 OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL) | 851 OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL) |
| 849 HEAP_OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL) | 852 HEAP_OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL) |
| 850 #undef IS_TYPE_FUNCTION_DECL | 853 #undef IS_TYPE_FUNCTION_DECL |
| 851 | 854 |
| 852 // Returns true if this object is an instance of the specified | 855 // Returns true if this object is an instance of the specified |
| 853 // function template. | 856 // function template. |
| 854 inline bool IsInstanceOf(FunctionTemplateInfo* type); | 857 inline bool IsInstanceOf(FunctionTemplateInfo* type); |
| 855 | 858 |
| 856 inline bool IsStruct(); | 859 inline bool IsStruct(); |
| 857 #define DECLARE_STRUCT_PREDICATE(NAME, Name, name) inline bool Is##Name(); | 860 #define DECLARE_STRUCT_PREDICATE(NAME, Name, name) inline bool Is##Name(); |
| 858 STRUCT_LIST(DECLARE_STRUCT_PREDICATE) | 861 STRUCT_LIST(DECLARE_STRUCT_PREDICATE) |
| 859 #undef DECLARE_STRUCT_PREDICATE | 862 #undef DECLARE_STRUCT_PREDICATE |
| 860 | 863 |
| 861 INLINE(bool IsSpecObject()); | 864 INLINE(bool IsSpecObject()); |
| 865 INLINE(bool IsSpecFunction()); |
| 862 | 866 |
| 863 // Oddball testing. | 867 // Oddball testing. |
| 864 INLINE(bool IsUndefined()); | 868 INLINE(bool IsUndefined()); |
| 865 INLINE(bool IsNull()); | 869 INLINE(bool IsNull()); |
| 866 INLINE(bool IsTheHole()); // Shadows MaybeObject's implementation. | 870 INLINE(bool IsTheHole()); // Shadows MaybeObject's implementation. |
| 867 INLINE(bool IsTrue()); | 871 INLINE(bool IsTrue()); |
| 868 INLINE(bool IsFalse()); | 872 INLINE(bool IsFalse()); |
| 869 inline bool IsArgumentsMarker(); | 873 inline bool IsArgumentsMarker(); |
| 870 | 874 |
| 871 // Extract the number. | 875 // Extract the number. |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 904 String* key, | 908 String* key, |
| 905 PropertyAttributes* attributes); | 909 PropertyAttributes* attributes); |
| 906 MUST_USE_RESULT MaybeObject* GetPropertyWithCallback(Object* receiver, | 910 MUST_USE_RESULT MaybeObject* GetPropertyWithCallback(Object* receiver, |
| 907 Object* structure, | 911 Object* structure, |
| 908 String* name, | 912 String* name, |
| 909 Object* holder); | 913 Object* holder); |
| 910 MUST_USE_RESULT MaybeObject* GetPropertyWithHandler(Object* receiver, | 914 MUST_USE_RESULT MaybeObject* GetPropertyWithHandler(Object* receiver, |
| 911 String* name, | 915 String* name, |
| 912 Object* handler); | 916 Object* handler); |
| 913 MUST_USE_RESULT MaybeObject* GetPropertyWithDefinedGetter(Object* receiver, | 917 MUST_USE_RESULT MaybeObject* GetPropertyWithDefinedGetter(Object* receiver, |
| 914 JSFunction* getter); | 918 JSReceiver* getter); |
| 915 | 919 |
| 916 inline MaybeObject* GetElement(uint32_t index); | 920 inline MaybeObject* GetElement(uint32_t index); |
| 917 // For use when we know that no exception can be thrown. | 921 // For use when we know that no exception can be thrown. |
| 918 inline Object* GetElementNoExceptionThrown(uint32_t index); | 922 inline Object* GetElementNoExceptionThrown(uint32_t index); |
| 919 MaybeObject* GetElementWithReceiver(Object* receiver, uint32_t index); | 923 MaybeObject* GetElementWithReceiver(Object* receiver, uint32_t index); |
| 920 | 924 |
| 921 // Return the object's prototype (might be Heap::null_value()). | 925 // Return the object's prototype (might be Heap::null_value()). |
| 922 Object* GetPrototype(); | 926 Object* GetPrototype(); |
| 923 | 927 |
| 924 // Tries to convert an object to an array index. Returns true and sets | 928 // Tries to convert an object to an array index. Returns true and sets |
| (...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1564 String* name, | 1568 String* name, |
| 1565 Object* value, | 1569 Object* value, |
| 1566 bool check_prototype, | 1570 bool check_prototype, |
| 1567 StrictModeFlag strict_mode); | 1571 StrictModeFlag strict_mode); |
| 1568 MUST_USE_RESULT MaybeObject* SetPropertyWithCallback( | 1572 MUST_USE_RESULT MaybeObject* SetPropertyWithCallback( |
| 1569 Object* structure, | 1573 Object* structure, |
| 1570 String* name, | 1574 String* name, |
| 1571 Object* value, | 1575 Object* value, |
| 1572 JSObject* holder, | 1576 JSObject* holder, |
| 1573 StrictModeFlag strict_mode); | 1577 StrictModeFlag strict_mode); |
| 1574 MUST_USE_RESULT MaybeObject* SetPropertyWithDefinedSetter(JSFunction* setter, | 1578 MUST_USE_RESULT MaybeObject* SetPropertyWithDefinedSetter(JSReceiver* setter, |
| 1575 Object* value); | 1579 Object* value); |
| 1576 MUST_USE_RESULT MaybeObject* SetPropertyWithInterceptor( | 1580 MUST_USE_RESULT MaybeObject* SetPropertyWithInterceptor( |
| 1577 String* name, | 1581 String* name, |
| 1578 Object* value, | 1582 Object* value, |
| 1579 PropertyAttributes attributes, | 1583 PropertyAttributes attributes, |
| 1580 StrictModeFlag strict_mode); | 1584 StrictModeFlag strict_mode); |
| 1581 MUST_USE_RESULT MaybeObject* SetPropertyPostInterceptor( | 1585 MUST_USE_RESULT MaybeObject* SetPropertyPostInterceptor( |
| 1582 String* name, | 1586 String* name, |
| 1583 Object* value, | 1587 Object* value, |
| 1584 PropertyAttributes attributes, | 1588 PropertyAttributes attributes, |
| (...skipping 5901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7486 } else { | 7490 } else { |
| 7487 value &= ~(1 << bit_position); | 7491 value &= ~(1 << bit_position); |
| 7488 } | 7492 } |
| 7489 return value; | 7493 return value; |
| 7490 } | 7494 } |
| 7491 }; | 7495 }; |
| 7492 | 7496 |
| 7493 } } // namespace v8::internal | 7497 } } // namespace v8::internal |
| 7494 | 7498 |
| 7495 #endif // V8_OBJECTS_H_ | 7499 #endif // V8_OBJECTS_H_ |
| OLD | NEW |