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 2100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2111 MUST_USE_RESULT inline MaybeObject* EnsureWritableFastElements(); | 2111 MUST_USE_RESULT inline MaybeObject* EnsureWritableFastElements(); |
2112 | 2112 |
2113 // Collects elements starting at index 0. | 2113 // Collects elements starting at index 0. |
2114 // Undefined values are placed after non-undefined values. | 2114 // Undefined values are placed after non-undefined values. |
2115 // Returns the number of non-undefined values. | 2115 // Returns the number of non-undefined values. |
2116 MUST_USE_RESULT MaybeObject* PrepareElementsForSort(uint32_t limit); | 2116 MUST_USE_RESULT MaybeObject* PrepareElementsForSort(uint32_t limit); |
2117 // As PrepareElementsForSort, but only on objects where elements is | 2117 // As PrepareElementsForSort, but only on objects where elements is |
2118 // a dictionary, and it will stay a dictionary. | 2118 // a dictionary, and it will stay a dictionary. |
2119 MUST_USE_RESULT MaybeObject* PrepareSlowElementsForSort(uint32_t limit); | 2119 MUST_USE_RESULT MaybeObject* PrepareSlowElementsForSort(uint32_t limit); |
2120 | 2120 |
| 2121 static Handle<Object> GetPropertyWithCallback(Handle<JSObject> object, |
| 2122 Handle<Object> receiver, |
| 2123 Handle<Object> structure, |
| 2124 Handle<Name> name); |
| 2125 |
2121 MUST_USE_RESULT MaybeObject* GetPropertyWithCallback(Object* receiver, | 2126 MUST_USE_RESULT MaybeObject* GetPropertyWithCallback(Object* receiver, |
2122 Object* structure, | 2127 Object* structure, |
2123 Name* name); | 2128 Name* name); |
2124 | 2129 |
2125 static Handle<Object> SetPropertyWithCallback( | 2130 static Handle<Object> SetPropertyWithCallback( |
2126 Handle<JSObject> object, | 2131 Handle<JSObject> object, |
2127 Handle<Object> structure, | 2132 Handle<Object> structure, |
2128 Handle<Name> name, | 2133 Handle<Name> name, |
2129 Handle<Object> value, | 2134 Handle<Object> value, |
2130 Handle<JSObject> holder, | 2135 Handle<JSObject> holder, |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2236 Handle<Name> name, | 2241 Handle<Name> name, |
2237 Handle<Object> getter, | 2242 Handle<Object> getter, |
2238 Handle<Object> setter, | 2243 Handle<Object> setter, |
2239 PropertyAttributes attributes, | 2244 PropertyAttributes attributes, |
2240 v8::AccessControl access_control = v8::DEFAULT); | 2245 v8::AccessControl access_control = v8::DEFAULT); |
2241 | 2246 |
2242 // Defines an AccessorInfo property on the given object. | 2247 // Defines an AccessorInfo property on the given object. |
2243 static Handle<Object> SetAccessor(Handle<JSObject> object, | 2248 static Handle<Object> SetAccessor(Handle<JSObject> object, |
2244 Handle<AccessorInfo> info); | 2249 Handle<AccessorInfo> info); |
2245 | 2250 |
2246 // Used from Object::GetProperty(). | |
2247 MUST_USE_RESULT MaybeObject* GetPropertyWithFailedAccessCheck( | |
2248 Object* receiver, | |
2249 LookupResult* result, | |
2250 Name* name, | |
2251 PropertyAttributes* attributes); | |
2252 static Handle<Object> GetPropertyWithInterceptor( | 2251 static Handle<Object> GetPropertyWithInterceptor( |
2253 Handle<JSObject> object, | 2252 Handle<JSObject> object, |
2254 Handle<Object> receiver, | 2253 Handle<Object> receiver, |
2255 Handle<Name> name, | 2254 Handle<Name> name, |
2256 PropertyAttributes* attributes); | 2255 PropertyAttributes* attributes); |
2257 static Handle<Object> GetPropertyPostInterceptor( | 2256 static Handle<Object> GetPropertyPostInterceptor( |
2258 Handle<JSObject> object, | 2257 Handle<JSObject> object, |
2259 Handle<Object> receiver, | 2258 Handle<Object> receiver, |
2260 Handle<Name> name, | 2259 Handle<Name> name, |
2261 PropertyAttributes* attributes); | 2260 PropertyAttributes* attributes); |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2641 const char* type, | 2640 const char* type, |
2642 Handle<Name> name, | 2641 Handle<Name> name, |
2643 Handle<Object> old_value); | 2642 Handle<Object> old_value); |
2644 | 2643 |
2645 // Deliver change records to observers. May cause GC. | 2644 // Deliver change records to observers. May cause GC. |
2646 static void DeliverChangeRecords(Isolate* isolate); | 2645 static void DeliverChangeRecords(Isolate* isolate); |
2647 | 2646 |
2648 private: | 2647 private: |
2649 friend class DictionaryElementsAccessor; | 2648 friend class DictionaryElementsAccessor; |
2650 friend class JSReceiver; | 2649 friend class JSReceiver; |
| 2650 friend class Object; |
| 2651 |
| 2652 // Used from Object::GetProperty(). |
| 2653 static Handle<Object> GetPropertyWithFailedAccessCheck( |
| 2654 Handle<JSObject> object, |
| 2655 Handle<Object> receiver, |
| 2656 LookupResult* result, |
| 2657 Handle<Name> name, |
| 2658 PropertyAttributes* attributes); |
2651 | 2659 |
2652 MUST_USE_RESULT MaybeObject* GetElementWithCallback(Object* receiver, | 2660 MUST_USE_RESULT MaybeObject* GetElementWithCallback(Object* receiver, |
2653 Object* structure, | 2661 Object* structure, |
2654 uint32_t index, | 2662 uint32_t index, |
2655 Object* holder); | 2663 Object* holder); |
2656 MUST_USE_RESULT PropertyAttributes GetElementAttributeWithInterceptor( | 2664 MUST_USE_RESULT PropertyAttributes GetElementAttributeWithInterceptor( |
2657 JSReceiver* receiver, | 2665 JSReceiver* receiver, |
2658 uint32_t index, | 2666 uint32_t index, |
2659 bool continue_search); | 2667 bool continue_search); |
2660 MUST_USE_RESULT PropertyAttributes GetElementAttributeWithoutInterceptor( | 2668 MUST_USE_RESULT PropertyAttributes GetElementAttributeWithoutInterceptor( |
(...skipping 7641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10302 } else { | 10310 } else { |
10303 value &= ~(1 << bit_position); | 10311 value &= ~(1 << bit_position); |
10304 } | 10312 } |
10305 return value; | 10313 return value; |
10306 } | 10314 } |
10307 }; | 10315 }; |
10308 | 10316 |
10309 } } // namespace v8::internal | 10317 } } // namespace v8::internal |
10310 | 10318 |
10311 #endif // V8_OBJECTS_H_ | 10319 #endif // V8_OBJECTS_H_ |
OLD | NEW |