OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1863 inline int GetInternalFieldCount(); | 1863 inline int GetInternalFieldCount(); |
1864 inline int GetInternalFieldOffset(int index); | 1864 inline int GetInternalFieldOffset(int index); |
1865 inline Object* GetInternalField(int index); | 1865 inline Object* GetInternalField(int index); |
1866 inline void SetInternalField(int index, Object* value); | 1866 inline void SetInternalField(int index, Object* value); |
1867 inline void SetInternalField(int index, Smi* value); | 1867 inline void SetInternalField(int index, Smi* value); |
1868 | 1868 |
1869 // The following lookup functions skip interceptors. | 1869 // The following lookup functions skip interceptors. |
1870 void LocalLookupRealNamedProperty(String* name, LookupResult* result); | 1870 void LocalLookupRealNamedProperty(String* name, LookupResult* result); |
1871 void LookupRealNamedProperty(String* name, LookupResult* result); | 1871 void LookupRealNamedProperty(String* name, LookupResult* result); |
1872 void LookupRealNamedPropertyInPrototypes(String* name, LookupResult* result); | 1872 void LookupRealNamedPropertyInPrototypes(String* name, LookupResult* result); |
1873 void LookupCallbackSetterInPrototypes(String* name, LookupResult* result); | |
1874 MUST_USE_RESULT MaybeObject* SetElementWithCallbackSetterInPrototypes( | 1873 MUST_USE_RESULT MaybeObject* SetElementWithCallbackSetterInPrototypes( |
1875 uint32_t index, Object* value, bool* found, StrictModeFlag strict_mode); | 1874 uint32_t index, Object* value, bool* found, StrictModeFlag strict_mode); |
1876 void LookupCallback(String* name, LookupResult* result); | 1875 void LookupCallback(String* name, LookupResult* result); |
1877 | 1876 |
1878 // Returns the number of properties on this object filtering out properties | 1877 // Returns the number of properties on this object filtering out properties |
1879 // with the specified attributes (ignoring interceptors). | 1878 // with the specified attributes (ignoring interceptors). |
1880 int NumberOfLocalProperties(PropertyAttributes filter = NONE); | 1879 int NumberOfLocalProperties(PropertyAttributes filter = NONE); |
1881 // Fill in details for properties into storage starting at the specified | 1880 // Fill in details for properties into storage starting at the specified |
1882 // index. | 1881 // index. |
1883 void GetLocalPropertyNames(FixedArray* storage, int index); | 1882 void GetLocalPropertyNames(FixedArray* storage, int index); |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2148 bool check_prototype, | 2147 bool check_prototype, |
2149 SetPropertyMode set_mode); | 2148 SetPropertyMode set_mode); |
2150 MUST_USE_RESULT MaybeObject* SetElementWithoutInterceptor( | 2149 MUST_USE_RESULT MaybeObject* SetElementWithoutInterceptor( |
2151 uint32_t index, | 2150 uint32_t index, |
2152 Object* value, | 2151 Object* value, |
2153 PropertyAttributes attributes, | 2152 PropertyAttributes attributes, |
2154 StrictModeFlag strict_mode, | 2153 StrictModeFlag strict_mode, |
2155 bool check_prototype, | 2154 bool check_prototype, |
2156 SetPropertyMode set_mode); | 2155 SetPropertyMode set_mode); |
2157 | 2156 |
2158 // Searches the prototype chain for a callback setter and sets the property | 2157 // Searches the prototype chain for property 'name'. If it is found and |
2159 // with the setter if it finds one. The '*found' flag indicates whether | 2158 // has a setter, invoke it and set '*done' to true. If it is found and is |
2160 // a setter was found or not. | 2159 // read-only, reject and set '*done' to true. Otherwise, set '*done' to |
2161 // This function can cause GC and can return a failure result with | 2160 // false. Can cause GC and can return a failure result with '*done==true'. |
2162 // '*found==true'. | 2161 MUST_USE_RESULT MaybeObject* SetPropertyViaPrototypes( |
2163 MUST_USE_RESULT MaybeObject* SetPropertyWithCallbackSetterInPrototypes( | |
2164 String* name, | 2162 String* name, |
2165 Object* value, | 2163 Object* value, |
2166 PropertyAttributes attributes, | 2164 PropertyAttributes attributes, |
2167 bool* found, | 2165 StrictModeFlag strict_mode, |
2168 StrictModeFlag strict_mode); | 2166 bool* done); |
2169 | 2167 |
2170 MUST_USE_RESULT MaybeObject* DeletePropertyPostInterceptor(String* name, | 2168 MUST_USE_RESULT MaybeObject* DeletePropertyPostInterceptor(String* name, |
2171 DeleteMode mode); | 2169 DeleteMode mode); |
2172 MUST_USE_RESULT MaybeObject* DeletePropertyWithInterceptor(String* name); | 2170 MUST_USE_RESULT MaybeObject* DeletePropertyWithInterceptor(String* name); |
2173 | 2171 |
2174 MUST_USE_RESULT MaybeObject* DeleteElementWithInterceptor(uint32_t index); | 2172 MUST_USE_RESULT MaybeObject* DeleteElementWithInterceptor(uint32_t index); |
2175 | 2173 |
2176 MUST_USE_RESULT MaybeObject* DeleteFastElement(uint32_t index); | 2174 MUST_USE_RESULT MaybeObject* DeleteFastElement(uint32_t index); |
2177 MUST_USE_RESULT MaybeObject* DeleteDictionaryElement(uint32_t index, | 2175 MUST_USE_RESULT MaybeObject* DeleteDictionaryElement(uint32_t index, |
2178 DeleteMode mode); | 2176 DeleteMode mode); |
(...skipping 5542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7721 MUST_USE_RESULT MaybeObject* SetPropertyWithHandler( | 7719 MUST_USE_RESULT MaybeObject* SetPropertyWithHandler( |
7722 String* name, | 7720 String* name, |
7723 Object* value, | 7721 Object* value, |
7724 PropertyAttributes attributes, | 7722 PropertyAttributes attributes, |
7725 StrictModeFlag strict_mode); | 7723 StrictModeFlag strict_mode); |
7726 MUST_USE_RESULT MaybeObject* SetElementWithHandler( | 7724 MUST_USE_RESULT MaybeObject* SetElementWithHandler( |
7727 uint32_t index, | 7725 uint32_t index, |
7728 Object* value, | 7726 Object* value, |
7729 StrictModeFlag strict_mode); | 7727 StrictModeFlag strict_mode); |
7730 | 7728 |
7731 // If the handler defines an accessor property, invoke its setter | 7729 // If the handler defines an accessor property with a setter, invoke it. |
7732 // (or throw if only a getter exists) and set *found to true. Otherwise false. | 7730 // If it defines an accessor property without a setter, or a data property |
7733 MUST_USE_RESULT MaybeObject* SetPropertyWithHandlerIfDefiningSetter( | 7731 // that is read-only, throw. In all these cases set '*done' to true, |
| 7732 // otherwise set it to false. |
| 7733 MUST_USE_RESULT MaybeObject* SetPropertyViaPrototypesWithHandler( |
| 7734 JSObject* receiver, |
7734 String* name, | 7735 String* name, |
7735 Object* value, | 7736 Object* value, |
7736 PropertyAttributes attributes, | 7737 PropertyAttributes attributes, |
7737 StrictModeFlag strict_mode, | 7738 StrictModeFlag strict_mode, |
7738 bool* found); | 7739 bool* done); |
7739 | 7740 |
7740 MUST_USE_RESULT MaybeObject* DeletePropertyWithHandler( | 7741 MUST_USE_RESULT MaybeObject* DeletePropertyWithHandler( |
7741 String* name, | 7742 String* name, |
7742 DeleteMode mode); | 7743 DeleteMode mode); |
7743 MUST_USE_RESULT MaybeObject* DeleteElementWithHandler( | 7744 MUST_USE_RESULT MaybeObject* DeleteElementWithHandler( |
7744 uint32_t index, | 7745 uint32_t index, |
7745 DeleteMode mode); | 7746 DeleteMode mode); |
7746 | 7747 |
7747 MUST_USE_RESULT PropertyAttributes GetPropertyAttributeWithHandler( | 7748 MUST_USE_RESULT PropertyAttributes GetPropertyAttributeWithHandler( |
7748 JSReceiver* receiver, | 7749 JSReceiver* receiver, |
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8660 } else { | 8661 } else { |
8661 value &= ~(1 << bit_position); | 8662 value &= ~(1 << bit_position); |
8662 } | 8663 } |
8663 return value; | 8664 return value; |
8664 } | 8665 } |
8665 }; | 8666 }; |
8666 | 8667 |
8667 } } // namespace v8::internal | 8668 } } // namespace v8::internal |
8668 | 8669 |
8669 #endif // V8_OBJECTS_H_ | 8670 #endif // V8_OBJECTS_H_ |
OLD | NEW |