Chromium Code Reviews| Index: src/code-stubs.h |
| diff --git a/src/code-stubs.h b/src/code-stubs.h |
| index 433e97aff092c4f00ae0ec6e334dac179c9d2e83..a034f72908f0218e0b03489321baf028729b781d 100644 |
| --- a/src/code-stubs.h |
| +++ b/src/code-stubs.h |
| @@ -77,6 +77,7 @@ namespace internal { |
| V(NumberToString) \ |
| V(RegExpConstructResult) \ |
| V(StoreFastElement) \ |
| + V(StoreGlobalContextField) \ |
| V(StringAdd) \ |
| V(ToBoolean) \ |
| V(TransitionElementsKind) \ |
| @@ -2017,10 +2018,10 @@ class DoubleToIStub : public PlatformCodeStub { |
| }; |
| -class LoadGlobalContextFieldStub : public HandlerStub { |
| +class GlobalContextFieldStub : public HandlerStub { |
| public: |
| - LoadGlobalContextFieldStub( |
| - Isolate* isolate, const GlobalContextTable::LookupResult* lookup_result) |
| + GlobalContextFieldStub(Isolate* isolate, |
| + const GlobalContextTable::LookupResult* lookup_result) |
| : HandlerStub(isolate) { |
| DCHECK(Accepted(lookup_result)); |
| set_sub_minor_key(ContextIndexBits::encode(lookup_result->context_index) | |
| @@ -2045,15 +2046,35 @@ class LoadGlobalContextFieldStub : public HandlerStub { |
| class SlotIndexBits |
| : public BitField<int, kContextIndexBits, kSlotIndexBits> {}; |
| - virtual Code::Kind kind() const { return Code::LOAD_IC; } |
| virtual Code::StubType GetStubType() OVERRIDE { return Code::FAST; } |
| + DEFINE_CODE_STUB_BASE(GlobalContextFieldStub, HandlerStub); |
| +}; |
| - virtual CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE { |
| - return ContextOnlyDescriptor(isolate()); |
| - } |
| - DEFINE_HANDLER_CODE_STUB(LoadGlobalContextField, HandlerStub); |
| +class LoadGlobalContextFieldStub : public GlobalContextFieldStub { |
| + public: |
| + LoadGlobalContextFieldStub( |
| + Isolate* isolate, const GlobalContextTable::LookupResult* lookup_result) |
| + : GlobalContextFieldStub(isolate, lookup_result) {} |
| + |
| + private: |
| + virtual Code::Kind kind() const { return Code::LOAD_IC; } |
|
rossberg
2014/11/11 12:37:39
OVERRIDE?
Dmitry Lomov (no reviews)
2014/11/11 15:15:25
Done.
|
| + |
| + DEFINE_HANDLER_CODE_STUB(LoadGlobalContextField, GlobalContextFieldStub); |
| +}; |
| + |
| + |
| +class StoreGlobalContextFieldStub : public GlobalContextFieldStub { |
| + public: |
| + StoreGlobalContextFieldStub( |
| + Isolate* isolate, const GlobalContextTable::LookupResult* lookup_result) |
| + : GlobalContextFieldStub(isolate, lookup_result) {} |
| + |
| + private: |
| + virtual Code::Kind kind() const { return Code::STORE_IC; } |
|
rossberg
2014/11/11 12:37:39
OVERRIDE?
Dmitry Lomov (no reviews)
2014/11/11 15:15:25
Done.
|
| + |
| + DEFINE_HANDLER_CODE_STUB(StoreGlobalContextField, GlobalContextFieldStub); |
| }; |