| Index: src/stub-cache.h
|
| diff --git a/src/stub-cache.h b/src/stub-cache.h
|
| index b7c37c398b1007fb9e42d12ee68f8041420ee336..ad2b550143fe10c1b12805611c6fc7e4be3b5cfc 100644
|
| --- a/src/stub-cache.h
|
| +++ b/src/stub-cache.h
|
| @@ -522,11 +522,11 @@ class BaseLoadStoreStubCompiler: public StubCompiler {
|
| }
|
| void JitEvent(Handle<Name> name, Handle<Code> code);
|
|
|
| - virtual Register receiver() = 0;
|
| - virtual Register name() = 0;
|
| - virtual Register scratch1() = 0;
|
| - virtual Register scratch2() = 0;
|
| - virtual Register scratch3() = 0;
|
| + Register receiver() { return registers_[0]; }
|
| + Register name() { return registers_[1]; }
|
| + Register scratch1() { return registers_[2]; }
|
| + Register scratch2() { return registers_[3]; }
|
| + Register scratch3() { return registers_[4]; }
|
|
|
| void InitializeRegisters();
|
|
|
| @@ -583,6 +583,11 @@ class LoadStubCompiler: public BaseLoadStoreStubCompiler {
|
| Register receiver,
|
| Handle<JSFunction> getter);
|
|
|
| + static void GenerateLoadViaGetterForDeopt(MacroAssembler* masm) {
|
| + GenerateLoadViaGetter(
|
| + masm, Handle<HeapType>::null(), no_reg, Handle<JSFunction>());
|
| + }
|
| +
|
| Handle<Code> CompileLoadNonexistent(Handle<HeapType> type,
|
| Handle<JSObject> last,
|
| Handle<Name> name);
|
| @@ -593,8 +598,6 @@ class LoadStubCompiler: public BaseLoadStoreStubCompiler {
|
| Handle<Name> name,
|
| bool is_dont_delete);
|
|
|
| - static Register* registers();
|
| -
|
| protected:
|
| ContextualMode contextual_mode() {
|
| return LoadIC::GetContextualMode(extra_state());
|
| @@ -636,12 +639,10 @@ class LoadStubCompiler: public BaseLoadStoreStubCompiler {
|
| Handle<Name> name,
|
| LookupResult* lookup);
|
|
|
| - virtual Register receiver() { return registers_[0]; }
|
| - virtual Register name() { return registers_[1]; }
|
| - virtual Register scratch1() { return registers_[2]; }
|
| - virtual Register scratch2() { return registers_[3]; }
|
| - virtual Register scratch3() { return registers_[4]; }
|
| + private:
|
| + static Register* registers();
|
| Register scratch4() { return registers_[5]; }
|
| + friend class BaseLoadStoreStubCompiler;
|
| };
|
|
|
|
|
| @@ -726,8 +727,14 @@ class StoreStubCompiler: public BaseLoadStoreStubCompiler {
|
|
|
| static void GenerateStoreViaSetter(MacroAssembler* masm,
|
| Handle<HeapType> type,
|
| + Register receiver,
|
| Handle<JSFunction> setter);
|
|
|
| + static void GenerateStoreViaSetterForDeopt(MacroAssembler* masm) {
|
| + GenerateStoreViaSetter(
|
| + masm, Handle<HeapType>::null(), no_reg, Handle<JSFunction>());
|
| + }
|
| +
|
| Handle<Code> CompileStoreViaSetter(Handle<JSObject> object,
|
| Handle<JSObject> holder,
|
| Handle<Name> name,
|
| @@ -757,17 +764,9 @@ class StoreStubCompiler: public BaseLoadStoreStubCompiler {
|
| Label* label,
|
| Handle<Name> name);
|
|
|
| - virtual Register receiver() { return registers_[0]; }
|
| - virtual Register name() { return registers_[1]; }
|
| - Register value() { return registers_[2]; }
|
| - virtual Register scratch1() { return registers_[3]; }
|
| - virtual Register scratch2() { return registers_[4]; }
|
| - virtual Register scratch3() { return registers_[5]; }
|
| -
|
| - protected:
|
| - static Register* registers();
|
| -
|
| private:
|
| + static Register* registers();
|
| + static Register value();
|
| friend class BaseLoadStoreStubCompiler;
|
| };
|
|
|
| @@ -795,9 +794,7 @@ class KeyedStoreStubCompiler: public StoreStubCompiler {
|
| return KeyedStoreIC::GetKeyedAccessStoreMode(extra_state());
|
| }
|
|
|
| - Register transition_map() {
|
| - return registers()[3];
|
| - }
|
| + Register transition_map() { return scratch1(); }
|
|
|
| friend class BaseLoadStoreStubCompiler;
|
| };
|
|
|