Chromium Code Reviews| Index: src/code-stubs.h |
| diff --git a/src/code-stubs.h b/src/code-stubs.h |
| index b2dc0afe30c70323829fa97c7f795fb9ec54ce2a..d246ee0749b0bc6fdfa1ea5ed7753c7f94cb78b6 100644 |
| --- a/src/code-stubs.h |
| +++ b/src/code-stubs.h |
| @@ -141,9 +141,10 @@ namespace internal { |
| V(ToLength) \ |
| /* IC Handler stubs */ \ |
| V(ArrayBufferViewLoadField) \ |
| - V(LoadConstant) \ |
| V(LoadFastElement) \ |
| V(LoadField) \ |
| + V(LoadConstant) \ |
|
Jakob Kummerow
2016/04/19 08:17:20
nit: why not maintain alphabetic ordering?
|
| + V(LoadApiGetter) \ |
| V(LoadIndexedInterceptor) \ |
| V(KeyedLoadSloppyArguments) \ |
| V(KeyedStoreSloppyArguments) \ |
| @@ -1459,6 +1460,30 @@ class LoadConstantStub : public HandlerStub { |
| DEFINE_HANDLER_CODE_STUB(LoadConstant, HandlerStub); |
| }; |
| +class LoadApiGetterStub : public TurboFanCodeStub { |
| + public: |
| + LoadApiGetterStub(Isolate* isolate, bool receiver_is_holder, int index) |
| + : TurboFanCodeStub(isolate) { |
| + minor_key_ = IndexBits::encode(index) | |
| + ReceiverIsHolderBits::encode(receiver_is_holder); |
| + } |
| + |
| + Code::Kind GetCodeKind() const override { return Code::HANDLER; } |
| + ExtraICState GetExtraICState() const override { return Code::LOAD_IC; } |
| + InlineCacheState GetICState() const override { return MONOMORPHIC; } |
| + |
| + int index() const { return IndexBits::decode(minor_key_); } |
| + bool receiver_is_holder() const { |
| + return ReceiverIsHolderBits::decode(minor_key_); |
| + } |
| + |
| + private: |
| + class ReceiverIsHolderBits : public BitField<bool, 0, 1> {}; |
| + class IndexBits : public BitField<int, 1, kDescriptorIndexBitCount> {}; |
| + |
| + DEFINE_CALL_INTERFACE_DESCRIPTOR(Load); |
| + DEFINE_TURBOFAN_CODE_STUB(LoadApiGetter, TurboFanCodeStub); |
| +}; |
| class StoreFieldStub : public HandlerStub { |
| public: |