| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index ff13aedcce6f9ba667cccbcdc20b8fd49f4c3f2e..3acb16bff6ab84c4051d4515d3de3bdb7b6cb4d0 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -6584,9 +6584,6 @@ class JSProxy: public JSReceiver {
|
| // [handler]: The handler property.
|
| DECL_ACCESSORS(handler, Object)
|
|
|
| - // [padding]: The padding slot (unused, see below).
|
| - DECL_ACCESSORS(padding, Object)
|
| -
|
| // Casting.
|
| static inline JSProxy* cast(Object* obj);
|
|
|
| @@ -6610,6 +6607,9 @@ class JSProxy: public JSReceiver {
|
| // Turn this into an (empty) JSObject.
|
| void Fix();
|
|
|
| + // Initializes the body after the handler slot.
|
| + inline void InitializeBody(int object_size, Object* value);
|
| +
|
| // Dispatched behavior.
|
| #ifdef OBJECT_PRINT
|
| inline void JSProxyPrint() {
|
| @@ -6626,9 +6626,11 @@ class JSProxy: public JSReceiver {
|
| // upon freeze.
|
| static const int kHandlerOffset = HeapObject::kHeaderSize;
|
| static const int kPaddingOffset = kHandlerOffset + kPointerSize;
|
| - static const int kSize = kPaddingOffset + kPointerSize;
|
| + static const int kSize = JSObject::kHeaderSize;
|
| + static const int kHeaderSize = kPaddingOffset;
|
| + static const int kPaddingSize = kSize - kPaddingOffset;
|
|
|
| - STATIC_CHECK(kSize == JSObject::kHeaderSize);
|
| + STATIC_CHECK(kPaddingSize >= 0);
|
|
|
| typedef FixedBodyDescriptor<kHandlerOffset,
|
| kHandlerOffset + kPointerSize,
|
| @@ -6639,12 +6641,41 @@ class JSProxy: public JSReceiver {
|
| };
|
|
|
|
|
| -// TODO(rossberg): Only a stub for now.
|
| class JSFunctionProxy: public JSProxy {
|
| public:
|
| + // [call_trap]: The call trap.
|
| + DECL_ACCESSORS(call_trap, Object)
|
| +
|
| + // [construct_trap]: The construct trap.
|
| + DECL_ACCESSORS(construct_trap, Object)
|
| +
|
| // Casting.
|
| static inline JSFunctionProxy* cast(Object* obj);
|
|
|
| + // Dispatched behavior.
|
| +#ifdef OBJECT_PRINT
|
| + inline void JSFunctionProxyPrint() {
|
| + JSFunctionProxyPrint(stdout);
|
| + }
|
| + void JSFunctionProxyPrint(FILE* out);
|
| +#endif
|
| +#ifdef DEBUG
|
| + void JSFunctionProxyVerify();
|
| +#endif
|
| +
|
| + // Layout description.
|
| + static const int kCallTrapOffset = kHandlerOffset + kPointerSize;
|
| + 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_CHECK(kPaddingSize >= 0);
|
| +
|
| + typedef FixedBodyDescriptor<kHandlerOffset,
|
| + kConstructTrapOffset + kPointerSize,
|
| + kSize> BodyDescriptor;
|
| +
|
| private:
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(JSFunctionProxy);
|
| };
|
|
|