| Index: src/code-stubs.h
|
| diff --git a/src/code-stubs.h b/src/code-stubs.h
|
| index ab56f3424eb32fa876314e0b44aaff9112e64ef2..4fa440bb70658f9131bf71d36e674a9623b50ef4 100644
|
| --- a/src/code-stubs.h
|
| +++ b/src/code-stubs.h
|
| @@ -24,6 +24,7 @@ namespace internal {
|
| V(ArrayConstructor) \
|
| V(BinaryOpICWithAllocationSite) \
|
| V(CallApiFunction) \
|
| + V(CallApiAccessor) \
|
| V(CallApiGetter) \
|
| V(CallConstruct) \
|
| V(CallFunction) \
|
| @@ -1130,14 +1131,29 @@ class StoreGlobalStub : public HandlerStub {
|
|
|
| class CallApiFunctionStub : public PlatformCodeStub {
|
| public:
|
| - CallApiFunctionStub(Isolate* isolate,
|
| - bool is_store,
|
| - bool call_data_undefined,
|
| - int argc) : PlatformCodeStub(isolate) {
|
| + explicit CallApiFunctionStub(Isolate* isolate, bool call_data_undefined)
|
| + : PlatformCodeStub(isolate) {
|
| + minor_key_ = CallDataUndefinedBits::encode(call_data_undefined);
|
| + }
|
| +
|
| + private:
|
| + bool call_data_undefined() const {
|
| + return CallDataUndefinedBits::decode(minor_key_);
|
| + }
|
| +
|
| + class CallDataUndefinedBits : public BitField<bool, 0, 1> {};
|
| +
|
| + DEFINE_CALL_INTERFACE_DESCRIPTOR(ApiFunction);
|
| + DEFINE_PLATFORM_CODE_STUB(CallApiFunction, PlatformCodeStub);
|
| +};
|
| +
|
| +
|
| +class CallApiAccessorStub : public PlatformCodeStub {
|
| + public:
|
| + CallApiAccessorStub(Isolate* isolate, bool is_store, bool call_data_undefined)
|
| + : PlatformCodeStub(isolate) {
|
| minor_key_ = IsStoreBits::encode(is_store) |
|
| - CallDataUndefinedBits::encode(call_data_undefined) |
|
| - ArgumentBits::encode(argc);
|
| - DCHECK(!is_store || argc == 1);
|
| + CallDataUndefinedBits::encode(call_data_undefined);
|
| }
|
|
|
| private:
|
| @@ -1145,15 +1161,12 @@ class CallApiFunctionStub : public PlatformCodeStub {
|
| bool call_data_undefined() const {
|
| return CallDataUndefinedBits::decode(minor_key_);
|
| }
|
| - int argc() const { return ArgumentBits::decode(minor_key_); }
|
|
|
| class IsStoreBits: public BitField<bool, 0, 1> {};
|
| class CallDataUndefinedBits: public BitField<bool, 1, 1> {};
|
| - class ArgumentBits: public BitField<int, 2, Code::kArgumentsBits> {};
|
| - STATIC_ASSERT(Code::kArgumentsBits + 2 <= kStubMinorKeyBits);
|
|
|
| - DEFINE_CALL_INTERFACE_DESCRIPTOR(ApiFunction);
|
| - DEFINE_PLATFORM_CODE_STUB(CallApiFunction, PlatformCodeStub);
|
| + DEFINE_CALL_INTERFACE_DESCRIPTOR(ApiAccessor);
|
| + DEFINE_PLATFORM_CODE_STUB(CallApiAccessor, PlatformCodeStub);
|
| };
|
|
|
|
|
|
|