| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index 93f57333a150498810f73f264c74082e2147ff3b..e135bd2dd1c4dcbf3d6a2123a3b0824d082edf3d 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -9565,6 +9565,9 @@ class WeakCell : public HeapObject {
|
| // The JSProxy describes EcmaScript Harmony proxies
|
| class JSProxy: public JSReceiver {
|
| public:
|
| + // [target]: The target property.
|
| + DECL_ACCESSORS(target, Object)
|
| +
|
| // [handler]: The handler property.
|
| DECL_ACCESSORS(handler, Object)
|
|
|
| @@ -9596,21 +9599,6 @@ class JSProxy: public JSReceiver {
|
| Handle<JSProxy> proxy, Handle<Object> receiver, Handle<Name> name,
|
| Handle<Object> value, ShouldThrow should_throw);
|
|
|
| - // Turn the proxy into an (empty) JSObject.
|
| - static void Fix(Handle<JSProxy> proxy);
|
| -
|
| - // Initializes the body after the handler slot.
|
| - inline void InitializeBody(int object_size, Object* value);
|
| -
|
| - // Invoke a trap by name. If the trap does not exist on this's handler,
|
| - // but derived_trap is non-NULL, invoke that instead. May cause GC.
|
| - MUST_USE_RESULT static MaybeHandle<Object> CallTrap(
|
| - Handle<JSProxy> proxy,
|
| - const char* name,
|
| - Handle<Object> derived_trap,
|
| - int argc,
|
| - Handle<Object> args[]);
|
| -
|
| // Dispatched behavior.
|
| DECLARE_PRINTER(JSProxy)
|
| DECLARE_VERIFIER(JSProxy)
|
| @@ -9618,22 +9606,22 @@ class JSProxy: public JSReceiver {
|
| // Layout description. We add padding so that a proxy has the same
|
| // size as a virgin JSObject. This is essential for becoming a JSObject
|
| // upon freeze.
|
| - static const int kHandlerOffset = HeapObject::kHeaderSize;
|
| + static const int kTargetOffset = HeapObject::kHeaderSize;
|
| + static const int kHandlerOffset = kTargetOffset + kPointerSize;
|
| static const int kHashOffset = kHandlerOffset + kPointerSize;
|
| - static const int kPaddingOffset = kHashOffset + kPointerSize;
|
| - static const int kSize = JSObject::kHeaderSize;
|
| - static const int kHeaderSize = kPaddingOffset;
|
| - static const int kPaddingSize = kSize - kPaddingOffset;
|
| -
|
| - STATIC_ASSERT(kPaddingSize >= 0);
|
| + static const int kSize = kHashOffset + kPointerSize;
|
|
|
| - typedef FixedBodyDescriptor<kHandlerOffset,
|
| - kPaddingOffset,
|
| - kSize> BodyDescriptor;
|
| + typedef FixedBodyDescriptor<kTargetOffset, kSize, kSize> BodyDescriptor;
|
|
|
| private:
|
| friend class JSReceiver;
|
|
|
| + // Invoke a trap by name. If the trap does not exist on this's handler,
|
| + // but derived_trap is non-NULL, invoke that instead. May cause GC.
|
| + MUST_USE_RESULT static MaybeHandle<Object> CallTrap(
|
| + Handle<JSProxy> proxy, const char* name, Handle<Object> derived_trap,
|
| + int argc, Handle<Object> args[]);
|
| +
|
| MUST_USE_RESULT static Maybe<bool> HasPropertyWithHandler(
|
| Handle<JSProxy> proxy, Handle<Name> name);
|
|
|
| @@ -9663,17 +9651,11 @@ class JSFunctionProxy: public JSProxy {
|
| DECLARE_VERIFIER(JSFunctionProxy)
|
|
|
| // Layout description.
|
| - static const int kCallTrapOffset = JSProxy::kPaddingOffset;
|
| + static const int kCallTrapOffset = JSProxy::kSize;
|
| static const int kConstructTrapOffset = kCallTrapOffset + kPointerSize;
|
| - static const int kPaddingOffset = kConstructTrapOffset + kPointerSize;
|
| - static const int kSize = JSFunction::kSize;
|
| - static const int kPaddingSize = kSize - kPaddingOffset;
|
| + static const int kSize = kConstructTrapOffset + kPointerSize;
|
|
|
| - STATIC_ASSERT(kPaddingSize >= 0);
|
| -
|
| - typedef FixedBodyDescriptor<kHandlerOffset,
|
| - kConstructTrapOffset + kPointerSize,
|
| - kSize> BodyDescriptor;
|
| + typedef FixedBodyDescriptor<kTargetOffset, kSize, kSize> BodyDescriptor;
|
|
|
| private:
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(JSFunctionProxy);
|
|
|