| 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 9512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9523 DECL_ACCESSORS(handler, Object) | 9523 DECL_ACCESSORS(handler, Object) |
| 9524 // [target]: The target property. | 9524 // [target]: The target property. |
| 9525 DECL_ACCESSORS(target, Object) | 9525 DECL_ACCESSORS(target, Object) |
| 9526 // [hash]: The hash code property (undefined if not initialized yet). | 9526 // [hash]: The hash code property (undefined if not initialized yet). |
| 9527 DECL_ACCESSORS(hash, Object) | 9527 DECL_ACCESSORS(hash, Object) |
| 9528 | 9528 |
| 9529 inline bool has_handler(); | 9529 inline bool has_handler(); |
| 9530 | 9530 |
| 9531 DECLARE_CAST(JSProxy) | 9531 DECLARE_CAST(JSProxy) |
| 9532 | 9532 |
| 9533 static bool IsRevoked(Handle<JSProxy> proxy); |
| 9534 |
| 9533 // ES6 9.5.1 | 9535 // ES6 9.5.1 |
| 9534 static MaybeHandle<Object> GetPrototype(Handle<JSProxy> receiver); | 9536 static MaybeHandle<Object> GetPrototype(Handle<JSProxy> receiver); |
| 9535 | 9537 |
| 9538 // ES6 9.5.3 |
| 9539 MUST_USE_RESULT static Maybe<bool> IsExtensible(Handle<JSProxy> proxy); |
| 9540 |
| 9541 // ES6 9.5.4 (when passed DONT_THROW) |
| 9542 MUST_USE_RESULT static Maybe<bool> PreventExtensions( |
| 9543 Handle<JSProxy> proxy, ShouldThrow should_throw); |
| 9544 |
| 9536 // ES6 9.5.5 | 9545 // ES6 9.5.5 |
| 9537 static bool GetOwnPropertyDescriptor(LookupIterator* it, | 9546 static bool GetOwnPropertyDescriptor(LookupIterator* it, |
| 9538 PropertyDescriptor* desc); | 9547 PropertyDescriptor* desc); |
| 9539 | 9548 |
| 9540 // ES6 9.5.6 | 9549 // ES6 9.5.6 |
| 9541 static bool DefineOwnProperty(Isolate* isolate, Handle<JSProxy> object, | 9550 static bool DefineOwnProperty(Isolate* isolate, Handle<JSProxy> object, |
| 9542 Handle<Object> key, PropertyDescriptor* desc, | 9551 Handle<Object> key, PropertyDescriptor* desc, |
| 9543 ShouldThrow should_throw); | 9552 ShouldThrow should_throw); |
| 9544 | 9553 |
| 9545 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithHandler( | 9554 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithHandler( |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9578 | 9587 |
| 9579 typedef FixedBodyDescriptor<kTargetOffset, kSize, kSize> BodyDescriptor; | 9588 typedef FixedBodyDescriptor<kTargetOffset, kSize, kSize> BodyDescriptor; |
| 9580 | 9589 |
| 9581 MUST_USE_RESULT Object* GetIdentityHash(); | 9590 MUST_USE_RESULT Object* GetIdentityHash(); |
| 9582 | 9591 |
| 9583 static Handle<Smi> GetOrCreateIdentityHash(Handle<JSProxy> proxy); | 9592 static Handle<Smi> GetOrCreateIdentityHash(Handle<JSProxy> proxy); |
| 9584 | 9593 |
| 9585 private: | 9594 private: |
| 9586 friend class JSReceiver; | 9595 friend class JSReceiver; |
| 9587 | 9596 |
| 9597 MUST_USE_RESULT static MaybeHandle<Object> GetTrap(Handle<JSProxy> proxy, |
| 9598 Handle<String> trap); |
| 9599 |
| 9588 // Invoke a trap by name. If the trap does not exist on this's handler, | 9600 // Invoke a trap by name. If the trap does not exist on this's handler, |
| 9589 // but derived_trap is non-NULL, invoke that instead. May cause GC. | 9601 // but derived_trap is non-NULL, invoke that instead. May cause GC. |
| 9590 MUST_USE_RESULT static MaybeHandle<Object> CallTrap( | 9602 MUST_USE_RESULT static MaybeHandle<Object> CallTrap( |
| 9591 Handle<JSProxy> proxy, const char* name, Handle<Object> derived_trap, | 9603 Handle<JSProxy> proxy, const char* name, Handle<Object> derived_trap, |
| 9592 int argc, Handle<Object> args[]); | 9604 int argc, Handle<Object> args[]); |
| 9593 | 9605 |
| 9594 MUST_USE_RESULT static Maybe<bool> HasPropertyWithHandler( | 9606 MUST_USE_RESULT static Maybe<bool> HasPropertyWithHandler( |
| 9595 Handle<JSProxy> proxy, Handle<Name> name); | 9607 Handle<JSProxy> proxy, Handle<Name> name); |
| 9596 | 9608 |
| 9597 MUST_USE_RESULT static MaybeHandle<Object> DeletePropertyWithHandler( | 9609 MUST_USE_RESULT static MaybeHandle<Object> DeletePropertyWithHandler( |
| (...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10723 } | 10735 } |
| 10724 return value; | 10736 return value; |
| 10725 } | 10737 } |
| 10726 }; | 10738 }; |
| 10727 | 10739 |
| 10728 | 10740 |
| 10729 } // NOLINT, false-positive due to second-order macros. | 10741 } // NOLINT, false-positive due to second-order macros. |
| 10730 } // NOLINT, false-positive due to second-order macros. | 10742 } // NOLINT, false-positive due to second-order macros. |
| 10731 | 10743 |
| 10732 #endif // V8_OBJECTS_H_ | 10744 #endif // V8_OBJECTS_H_ |
| OLD | NEW |