Commit 98695fad authored by palfia@homejinni.com's avatar palfia@homejinni.com

MIPS: Remove BaseLoad/StoreStub compilers, and the stub-cache interface duplication.

Port r17165 (e3cb6e2e)

BUG=
R=plind44@gmail.com

Review URL: https://codereview.chromium.org/26883007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17172 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c0ff0b28
...@@ -425,7 +425,7 @@ static void GenerateCheckPropertyCell(MacroAssembler* masm, ...@@ -425,7 +425,7 @@ static void GenerateCheckPropertyCell(MacroAssembler* masm,
} }
void BaseStoreStubCompiler::GenerateNegativeHolderLookup( void StoreStubCompiler::GenerateNegativeHolderLookup(
MacroAssembler* masm, MacroAssembler* masm,
Handle<JSObject> holder, Handle<JSObject> holder,
Register holder_reg, Register holder_reg,
...@@ -444,19 +444,19 @@ void BaseStoreStubCompiler::GenerateNegativeHolderLookup( ...@@ -444,19 +444,19 @@ void BaseStoreStubCompiler::GenerateNegativeHolderLookup(
// Generate StoreTransition code, value is passed in a0 register. // Generate StoreTransition code, value is passed in a0 register.
// After executing generated code, the receiver_reg and name_reg // After executing generated code, the receiver_reg and name_reg
// may be clobbered. // may be clobbered.
void BaseStoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm, void StoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm,
Handle<JSObject> object, Handle<JSObject> object,
LookupResult* lookup, LookupResult* lookup,
Handle<Map> transition, Handle<Map> transition,
Handle<Name> name, Handle<Name> name,
Register receiver_reg, Register receiver_reg,
Register storage_reg, Register storage_reg,
Register value_reg, Register value_reg,
Register scratch1, Register scratch1,
Register scratch2, Register scratch2,
Register scratch3, Register scratch3,
Label* miss_label, Label* miss_label,
Label* slow) { Label* slow) {
// a0 : value. // a0 : value.
Label exit; Label exit;
...@@ -608,15 +608,15 @@ void BaseStoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm, ...@@ -608,15 +608,15 @@ void BaseStoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm,
// When leaving generated code after success, the receiver_reg and name_reg // When leaving generated code after success, the receiver_reg and name_reg
// may be clobbered. Upon branch to miss_label, the receiver and name // may be clobbered. Upon branch to miss_label, the receiver and name
// registers have their original values. // registers have their original values.
void BaseStoreStubCompiler::GenerateStoreField(MacroAssembler* masm, void StoreStubCompiler::GenerateStoreField(MacroAssembler* masm,
Handle<JSObject> object, Handle<JSObject> object,
LookupResult* lookup, LookupResult* lookup,
Register receiver_reg, Register receiver_reg,
Register name_reg, Register name_reg,
Register value_reg, Register value_reg,
Register scratch1, Register scratch1,
Register scratch2, Register scratch2,
Label* miss_label) { Label* miss_label) {
// a0 : value // a0 : value
Label exit; Label exit;
...@@ -729,9 +729,9 @@ void BaseStoreStubCompiler::GenerateStoreField(MacroAssembler* masm, ...@@ -729,9 +729,9 @@ void BaseStoreStubCompiler::GenerateStoreField(MacroAssembler* masm,
} }
void BaseStoreStubCompiler::GenerateRestoreName(MacroAssembler* masm, void StoreStubCompiler::GenerateRestoreName(MacroAssembler* masm,
Label* label, Label* label,
Handle<Name> name) { Handle<Name> name) {
if (!label->is_unused()) { if (!label->is_unused()) {
__ bind(label); __ bind(label);
__ li(this->name(), Operand(name)); __ li(this->name(), Operand(name));
...@@ -1296,9 +1296,9 @@ Register StubCompiler::CheckPrototypes(Handle<JSObject> object, ...@@ -1296,9 +1296,9 @@ Register StubCompiler::CheckPrototypes(Handle<JSObject> object,
} }
void BaseLoadStubCompiler::HandlerFrontendFooter(Handle<Name> name, void LoadStubCompiler::HandlerFrontendFooter(Handle<Name> name,
Label* success, Label* success,
Label* miss) { Label* miss) {
if (!miss->is_unused()) { if (!miss->is_unused()) {
__ Branch(success); __ Branch(success);
__ bind(miss); __ bind(miss);
...@@ -1307,9 +1307,9 @@ void BaseLoadStubCompiler::HandlerFrontendFooter(Handle<Name> name, ...@@ -1307,9 +1307,9 @@ void BaseLoadStubCompiler::HandlerFrontendFooter(Handle<Name> name,
} }
void BaseStoreStubCompiler::HandlerFrontendFooter(Handle<Name> name, void StoreStubCompiler::HandlerFrontendFooter(Handle<Name> name,
Label* success, Label* success,
Label* miss) { Label* miss) {
if (!miss->is_unused()) { if (!miss->is_unused()) {
__ b(success); __ b(success);
GenerateRestoreName(masm(), miss, name); GenerateRestoreName(masm(), miss, name);
...@@ -1318,7 +1318,7 @@ void BaseStoreStubCompiler::HandlerFrontendFooter(Handle<Name> name, ...@@ -1318,7 +1318,7 @@ void BaseStoreStubCompiler::HandlerFrontendFooter(Handle<Name> name,
} }
Register BaseLoadStubCompiler::CallbackHandlerFrontend( Register LoadStubCompiler::CallbackHandlerFrontend(
Handle<JSObject> object, Handle<JSObject> object,
Register object_reg, Register object_reg,
Handle<JSObject> holder, Handle<JSObject> holder,
...@@ -1364,7 +1364,7 @@ Register BaseLoadStubCompiler::CallbackHandlerFrontend( ...@@ -1364,7 +1364,7 @@ Register BaseLoadStubCompiler::CallbackHandlerFrontend(
} }
void BaseLoadStubCompiler::NonexistentHandlerFrontend( void LoadStubCompiler::NonexistentHandlerFrontend(
Handle<JSObject> object, Handle<JSObject> object,
Handle<JSObject> last, Handle<JSObject> last,
Handle<Name> name, Handle<Name> name,
...@@ -1384,10 +1384,10 @@ void BaseLoadStubCompiler::NonexistentHandlerFrontend( ...@@ -1384,10 +1384,10 @@ void BaseLoadStubCompiler::NonexistentHandlerFrontend(
} }
void BaseLoadStubCompiler::GenerateLoadField(Register reg, void LoadStubCompiler::GenerateLoadField(Register reg,
Handle<JSObject> holder, Handle<JSObject> holder,
PropertyIndex field, PropertyIndex field,
Representation representation) { Representation representation) {
if (!reg.is(receiver())) __ mov(receiver(), reg); if (!reg.is(receiver())) __ mov(receiver(), reg);
if (kind() == Code::LOAD_IC) { if (kind() == Code::LOAD_IC) {
LoadFieldStub stub(field.is_inobject(holder), LoadFieldStub stub(field.is_inobject(holder),
...@@ -1403,21 +1403,21 @@ void BaseLoadStubCompiler::GenerateLoadField(Register reg, ...@@ -1403,21 +1403,21 @@ void BaseLoadStubCompiler::GenerateLoadField(Register reg,
} }
void BaseLoadStubCompiler::GenerateLoadConstant(Handle<Object> value) { void LoadStubCompiler::GenerateLoadConstant(Handle<Object> value) {
// Return the constant value. // Return the constant value.
__ LoadObject(v0, value); __ LoadObject(v0, value);
__ Ret(); __ Ret();
} }
void BaseLoadStubCompiler::GenerateLoadCallback( void LoadStubCompiler::GenerateLoadCallback(
const CallOptimization& call_optimization) { const CallOptimization& call_optimization) {
GenerateFastApiCall( GenerateFastApiCall(
masm(), call_optimization, receiver(), scratch3(), 0, NULL); masm(), call_optimization, receiver(), scratch3(), 0, NULL);
} }
void BaseLoadStubCompiler::GenerateLoadCallback( void LoadStubCompiler::GenerateLoadCallback(
Register reg, Register reg,
Handle<ExecutableAccessorInfo> callback) { Handle<ExecutableAccessorInfo> callback) {
// Build AccessorInfo::args_ list on the stack and push property name below // Build AccessorInfo::args_ list on the stack and push property name below
...@@ -1487,7 +1487,7 @@ void BaseLoadStubCompiler::GenerateLoadCallback( ...@@ -1487,7 +1487,7 @@ void BaseLoadStubCompiler::GenerateLoadCallback(
} }
void BaseLoadStubCompiler::GenerateLoadInterceptor( void LoadStubCompiler::GenerateLoadInterceptor(
Register holder_reg, Register holder_reg,
Handle<JSObject> object, Handle<JSObject> object,
Handle<JSObject> interceptor_holder, Handle<JSObject> interceptor_holder,
...@@ -3019,6 +3019,7 @@ void KeyedStoreStubCompiler::GenerateNameCheck(Handle<Name> name, ...@@ -3019,6 +3019,7 @@ void KeyedStoreStubCompiler::GenerateNameCheck(Handle<Name> name,
void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm, void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm,
Register receiver,
Handle<JSFunction> getter) { Handle<JSFunction> getter) {
// ----------- S t a t e ------------- // ----------- S t a t e -------------
// -- a0 : receiver // -- a0 : receiver
...@@ -3030,7 +3031,7 @@ void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm, ...@@ -3030,7 +3031,7 @@ void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm,
if (!getter.is_null()) { if (!getter.is_null()) {
// Call the JavaScript getter with the receiver on the stack. // Call the JavaScript getter with the receiver on the stack.
__ push(a0); __ push(receiver);
ParameterCount actual(0); ParameterCount actual(0);
ParameterCount expected(getter); ParameterCount expected(getter);
__ InvokeFunction(getter, expected, actual, __ InvokeFunction(getter, expected, actual,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment