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 1518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1529 | 1529 |
1530 void Lookup(Name* name, LookupResult* result); | 1530 void Lookup(Name* name, LookupResult* result); |
1531 | 1531 |
1532 // Property access. | 1532 // Property access. |
1533 MUST_USE_RESULT inline MaybeObject* GetProperty(Name* key); | 1533 MUST_USE_RESULT inline MaybeObject* GetProperty(Name* key); |
1534 MUST_USE_RESULT inline MaybeObject* GetProperty( | 1534 MUST_USE_RESULT inline MaybeObject* GetProperty( |
1535 Name* key, | 1535 Name* key, |
1536 PropertyAttributes* attributes); | 1536 PropertyAttributes* attributes); |
1537 | 1537 |
1538 // TODO(yangguo): this should eventually replace the non-handlified version. | 1538 // TODO(yangguo): this should eventually replace the non-handlified version. |
1539 static Handle<Object> GetPropertyWithReceiver(Handle<Object> object, | 1539 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithReceiver( |
1540 Handle<Object> receiver, | 1540 Handle<Object> object, |
1541 Handle<Name> name, | 1541 Handle<Object> receiver, |
1542 PropertyAttributes* attributes); | 1542 Handle<Name> name, |
| 1543 PropertyAttributes* attributes); |
1543 MUST_USE_RESULT MaybeObject* GetPropertyWithReceiver( | 1544 MUST_USE_RESULT MaybeObject* GetPropertyWithReceiver( |
1544 Object* receiver, | 1545 Object* receiver, |
1545 Name* key, | 1546 Name* key, |
1546 PropertyAttributes* attributes); | 1547 PropertyAttributes* attributes); |
1547 | 1548 |
1548 static Handle<Object> GetPropertyOrElement(Handle<Object> object, | 1549 static Handle<Object> GetPropertyOrElement(Handle<Object> object, |
1549 Handle<Name> key); | 1550 Handle<Name> key); |
1550 | 1551 |
1551 static Handle<Object> GetProperty(Handle<Object> object, | 1552 static Handle<Object> GetProperty(Handle<Object> object, |
1552 Handle<Name> key); | 1553 Handle<Name> key); |
1553 static Handle<Object> GetProperty(Handle<Object> object, | 1554 MUST_USE_RESULT static MaybeHandle<Object> GetProperty( |
1554 Handle<Object> receiver, | 1555 Handle<Object> object, |
1555 LookupResult* result, | 1556 Handle<Object> receiver, |
1556 Handle<Name> key, | 1557 LookupResult* result, |
1557 PropertyAttributes* attributes); | 1558 Handle<Name> key, |
| 1559 PropertyAttributes* attributes); |
1558 | 1560 |
1559 MUST_USE_RESULT MaybeObject* GetProperty(Object* receiver, | 1561 MUST_USE_RESULT MaybeObject* GetProperty(Object* receiver, |
1560 LookupResult* result, | 1562 LookupResult* result, |
1561 Name* key, | 1563 Name* key, |
1562 PropertyAttributes* attributes); | 1564 PropertyAttributes* attributes); |
1563 | 1565 |
1564 MUST_USE_RESULT MaybeObject* GetPropertyWithDefinedGetter(Object* receiver, | 1566 MUST_USE_RESULT MaybeObject* GetPropertyWithDefinedGetter(Object* receiver, |
1565 JSReceiver* getter); | 1567 JSReceiver* getter); |
1566 | 1568 |
1567 static inline Handle<Object> GetElement(Isolate* isolate, | 1569 static inline Handle<Object> GetElement(Isolate* isolate, |
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2241 // Undefined values are placed after non-undefined values. | 2243 // Undefined values are placed after non-undefined values. |
2242 // Returns the number of non-undefined values. | 2244 // Returns the number of non-undefined values. |
2243 static Handle<Object> PrepareElementsForSort(Handle<JSObject> object, | 2245 static Handle<Object> PrepareElementsForSort(Handle<JSObject> object, |
2244 uint32_t limit); | 2246 uint32_t limit); |
2245 // As PrepareElementsForSort, but only on objects where elements is | 2247 // As PrepareElementsForSort, but only on objects where elements is |
2246 // a dictionary, and it will stay a dictionary. | 2248 // a dictionary, and it will stay a dictionary. |
2247 static Handle<Object> PrepareSlowElementsForSort(Handle<JSObject> object, | 2249 static Handle<Object> PrepareSlowElementsForSort(Handle<JSObject> object, |
2248 uint32_t limit); | 2250 uint32_t limit); |
2249 MUST_USE_RESULT MaybeObject* PrepareSlowElementsForSort(uint32_t limit); | 2251 MUST_USE_RESULT MaybeObject* PrepareSlowElementsForSort(uint32_t limit); |
2250 | 2252 |
2251 static Handle<Object> GetPropertyWithCallback(Handle<JSObject> object, | 2253 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithCallback( |
2252 Handle<Object> receiver, | 2254 Handle<JSObject> object, |
2253 Handle<Object> structure, | 2255 Handle<Object> receiver, |
2254 Handle<Name> name); | 2256 Handle<Object> structure, |
| 2257 Handle<Name> name); |
2255 | 2258 |
2256 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyWithCallback( | 2259 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyWithCallback( |
2257 Handle<JSObject> object, | 2260 Handle<JSObject> object, |
2258 Handle<Object> structure, | 2261 Handle<Object> structure, |
2259 Handle<Name> name, | 2262 Handle<Name> name, |
2260 Handle<Object> value, | 2263 Handle<Object> value, |
2261 Handle<JSObject> holder, | 2264 Handle<JSObject> holder, |
2262 StrictMode strict_mode); | 2265 StrictMode strict_mode); |
2263 | 2266 |
2264 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyWithInterceptor( | 2267 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyWithInterceptor( |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2364 Handle<Name> name, | 2367 Handle<Name> name, |
2365 Handle<Object> getter, | 2368 Handle<Object> getter, |
2366 Handle<Object> setter, | 2369 Handle<Object> setter, |
2367 PropertyAttributes attributes, | 2370 PropertyAttributes attributes, |
2368 v8::AccessControl access_control = v8::DEFAULT); | 2371 v8::AccessControl access_control = v8::DEFAULT); |
2369 | 2372 |
2370 // Defines an AccessorInfo property on the given object. | 2373 // Defines an AccessorInfo property on the given object. |
2371 static Handle<Object> SetAccessor(Handle<JSObject> object, | 2374 static Handle<Object> SetAccessor(Handle<JSObject> object, |
2372 Handle<AccessorInfo> info); | 2375 Handle<AccessorInfo> info); |
2373 | 2376 |
2374 static Handle<Object> GetPropertyWithInterceptor( | 2377 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithInterceptor( |
2375 Handle<JSObject> object, | 2378 Handle<JSObject> object, |
2376 Handle<Object> receiver, | 2379 Handle<Object> receiver, |
2377 Handle<Name> name, | 2380 Handle<Name> name, |
2378 PropertyAttributes* attributes); | 2381 PropertyAttributes* attributes); |
2379 static Handle<Object> GetPropertyPostInterceptor( | 2382 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyPostInterceptor( |
2380 Handle<JSObject> object, | 2383 Handle<JSObject> object, |
2381 Handle<Object> receiver, | 2384 Handle<Object> receiver, |
2382 Handle<Name> name, | 2385 Handle<Name> name, |
2383 PropertyAttributes* attributes); | 2386 PropertyAttributes* attributes); |
2384 MUST_USE_RESULT MaybeObject* GetLocalPropertyPostInterceptor( | 2387 MUST_USE_RESULT MaybeObject* GetLocalPropertyPostInterceptor( |
2385 Object* receiver, | 2388 Object* receiver, |
2386 Name* name, | 2389 Name* name, |
2387 PropertyAttributes* attributes); | 2390 PropertyAttributes* attributes); |
2388 | 2391 |
2389 // Returns true if this is an instance of an api function and has | 2392 // Returns true if this is an instance of an api function and has |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2767 | 2770 |
2768 private: | 2771 private: |
2769 friend class DictionaryElementsAccessor; | 2772 friend class DictionaryElementsAccessor; |
2770 friend class JSReceiver; | 2773 friend class JSReceiver; |
2771 friend class Object; | 2774 friend class Object; |
2772 | 2775 |
2773 static void UpdateAllocationSite(Handle<JSObject> object, | 2776 static void UpdateAllocationSite(Handle<JSObject> object, |
2774 ElementsKind to_kind); | 2777 ElementsKind to_kind); |
2775 | 2778 |
2776 // Used from Object::GetProperty(). | 2779 // Used from Object::GetProperty(). |
2777 static Handle<Object> GetPropertyWithFailedAccessCheck( | 2780 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithFailedAccessCheck( |
2778 Handle<JSObject> object, | 2781 Handle<JSObject> object, |
2779 Handle<Object> receiver, | 2782 Handle<Object> receiver, |
2780 LookupResult* result, | 2783 LookupResult* result, |
2781 Handle<Name> name, | 2784 Handle<Name> name, |
2782 PropertyAttributes* attributes); | 2785 PropertyAttributes* attributes); |
2783 | 2786 |
2784 MUST_USE_RESULT MaybeObject* GetElementWithCallback(Object* receiver, | 2787 MUST_USE_RESULT MaybeObject* GetElementWithCallback(Object* receiver, |
2785 Object* structure, | 2788 Object* structure, |
2786 uint32_t index, | 2789 uint32_t index, |
2787 Object* holder); | 2790 Object* holder); |
(...skipping 8032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10820 } else { | 10823 } else { |
10821 value &= ~(1 << bit_position); | 10824 value &= ~(1 << bit_position); |
10822 } | 10825 } |
10823 return value; | 10826 return value; |
10824 } | 10827 } |
10825 }; | 10828 }; |
10826 | 10829 |
10827 } } // namespace v8::internal | 10830 } } // namespace v8::internal |
10828 | 10831 |
10829 #endif // V8_OBJECTS_H_ | 10832 #endif // V8_OBJECTS_H_ |
OLD | NEW |