| OLD | NEW | 
|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ | 
| 6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ | 
| 7 | 7 | 
| 8 #include <iosfwd> | 8 #include <iosfwd> | 
| 9 | 9 | 
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" | 
| (...skipping 1814 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1825                                                 Handle<Object> attributes); | 1825                                                 Handle<Object> attributes); | 
| 1826   MUST_USE_RESULT static Object* DefineProperties(Isolate* isolate, | 1826   MUST_USE_RESULT static Object* DefineProperties(Isolate* isolate, | 
| 1827                                                   Handle<Object> object, | 1827                                                   Handle<Object> object, | 
| 1828                                                   Handle<Object> properties); | 1828                                                   Handle<Object> properties); | 
| 1829 | 1829 | 
| 1830   // "virtual" dispatcher to the correct [[DefineOwnProperty]] implementation. | 1830   // "virtual" dispatcher to the correct [[DefineOwnProperty]] implementation. | 
| 1831   static bool DefineOwnProperty(Isolate* isolate, Handle<JSReceiver> object, | 1831   static bool DefineOwnProperty(Isolate* isolate, Handle<JSReceiver> object, | 
| 1832                                 Handle<Object> key, PropertyDescriptor* desc, | 1832                                 Handle<Object> key, PropertyDescriptor* desc, | 
| 1833                                 ShouldThrow should_throw); | 1833                                 ShouldThrow should_throw); | 
| 1834 | 1834 | 
| 1835   // "virtual" dispatcher to the correct [[CreateDataProperty]] implementation. | 1835   // ES6 7.3.4 (when passed DONT_THROW) | 
| 1836   MUST_USE_RESULT static Maybe<bool> CreateDataProperty(LookupIterator* it, | 1836   MUST_USE_RESULT static Maybe<bool> CreateDataProperty( | 
| 1837                                                         Handle<Object> value); | 1837       LookupIterator* it, Handle<Object> value, ShouldThrow should_throw); | 
| 1838 | 1838 | 
| 1839   // ES6 9.1.6.1 | 1839   // ES6 9.1.6.1 | 
| 1840   static bool OrdinaryDefineOwnProperty(Isolate* isolate, | 1840   static bool OrdinaryDefineOwnProperty(Isolate* isolate, | 
| 1841                                         Handle<JSObject> object, | 1841                                         Handle<JSObject> object, | 
| 1842                                         Handle<Object> key, | 1842                                         Handle<Object> key, | 
| 1843                                         PropertyDescriptor* desc, | 1843                                         PropertyDescriptor* desc, | 
| 1844                                         ShouldThrow should_throw); | 1844                                         ShouldThrow should_throw); | 
| 1845   static bool OrdinaryDefineOwnProperty(LookupIterator* it, | 1845   static bool OrdinaryDefineOwnProperty(LookupIterator* it, | 
| 1846                                         PropertyDescriptor* desc, | 1846                                         PropertyDescriptor* desc, | 
| 1847                                         ShouldThrow should_throw); | 1847                                         ShouldThrow should_throw); | 
| (...skipping 7684 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 9532   static bool OwnPropertyKeys(Isolate* isolate, Handle<JSReceiver> receiver, | 9532   static bool OwnPropertyKeys(Isolate* isolate, Handle<JSReceiver> receiver, | 
| 9533                               Handle<JSProxy> proxy, KeyFilter filter, | 9533                               Handle<JSProxy> proxy, KeyFilter filter, | 
| 9534                               Enumerability enum_policy, | 9534                               Enumerability enum_policy, | 
| 9535                               KeyAccumulator* accumulator); | 9535                               KeyAccumulator* accumulator); | 
| 9536 | 9536 | 
| 9537   MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithHandler( | 9537   MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithHandler( | 
| 9538       Handle<JSProxy> proxy, | 9538       Handle<JSProxy> proxy, | 
| 9539       Handle<Object> receiver, | 9539       Handle<Object> receiver, | 
| 9540       Handle<Name> name); | 9540       Handle<Name> name); | 
| 9541 | 9541 | 
| 9542   // If the handler defines an accessor property with a setter, invoke it. |  | 
| 9543   // If it defines an accessor property without a setter, or a data property |  | 
| 9544   // that is read-only, fail.  In all these cases set '*done' to true. |  | 
| 9545   // Otherwise set it to false, in which case the return value is not |  | 
| 9546   // meaningful. |  | 
| 9547   MUST_USE_RESULT |  | 
| 9548   static Maybe<bool> SetPropertyViaPrototypesWithHandler( |  | 
| 9549       Handle<JSProxy> proxy, Handle<Object> receiver, Handle<Name> name, |  | 
| 9550       Handle<Object> value, ShouldThrow should_throw, bool* done); |  | 
| 9551 |  | 
| 9552   MUST_USE_RESULT static Maybe<PropertyAttributes> GetPropertyAttributes( | 9542   MUST_USE_RESULT static Maybe<PropertyAttributes> GetPropertyAttributes( | 
| 9553       LookupIterator* it); | 9543       LookupIterator* it); | 
| 9554 | 9544 | 
| 9555   MUST_USE_RESULT static Maybe<bool> SetPropertyWithHandler( | 9545   MUST_USE_RESULT static Maybe<bool> SetProperty(Handle<JSProxy> proxy, | 
| 9556       Handle<JSProxy> proxy, Handle<Object> receiver, Handle<Name> name, | 9546                                                  Handle<Name> name, | 
| 9557       Handle<Object> value, ShouldThrow should_throw); | 9547                                                  Handle<Object> value, | 
|  | 9548                                                  Handle<Object> receiver, | 
|  | 9549                                                  LanguageMode language_mode); | 
| 9558 | 9550 | 
| 9559   // Dispatched behavior. | 9551   // Dispatched behavior. | 
| 9560   DECLARE_PRINTER(JSProxy) | 9552   DECLARE_PRINTER(JSProxy) | 
| 9561   DECLARE_VERIFIER(JSProxy) | 9553   DECLARE_VERIFIER(JSProxy) | 
| 9562 | 9554 | 
| 9563   // Layout description. We add padding so that a proxy has the same | 9555   // Layout description. We add padding so that a proxy has the same | 
| 9564   // size as a virgin JSObject. This is essential for becoming a JSObject | 9556   // size as a virgin JSObject. This is essential for becoming a JSObject | 
| 9565   // upon freeze. | 9557   // upon freeze. | 
| 9566   static const int kTargetOffset = HeapObject::kHeaderSize; | 9558   static const int kTargetOffset = HeapObject::kHeaderSize; | 
| 9567   static const int kHandlerOffset = kTargetOffset + kPointerSize; | 9559   static const int kHandlerOffset = kTargetOffset + kPointerSize; | 
| (...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 10711     } | 10703     } | 
| 10712     return value; | 10704     return value; | 
| 10713   } | 10705   } | 
| 10714 }; | 10706 }; | 
| 10715 | 10707 | 
| 10716 | 10708 | 
| 10717 }  // NOLINT, false-positive due to second-order macros. | 10709 }  // NOLINT, false-positive due to second-order macros. | 
| 10718 }  // NOLINT, false-positive due to second-order macros. | 10710 }  // NOLINT, false-positive due to second-order macros. | 
| 10719 | 10711 | 
| 10720 #endif  // V8_OBJECTS_H_ | 10712 #endif  // V8_OBJECTS_H_ | 
| OLD | NEW | 
|---|