MIPS: Migrate ArrayLength (Keyed|Named)LoadIC to CodeStub
Port r13458 (e8729cf9) BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/12052011 Patch from Akos Palfi <palfia@homejinni.com>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13467 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
073ab01dbd
commit
84e8ca1679
@ -4544,6 +4544,35 @@ void InstanceofStub::Generate(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
void ArrayLengthStub::Generate(MacroAssembler* masm) {
|
||||
Label miss;
|
||||
Register receiver;
|
||||
if (kind() == Code::KEYED_LOAD_IC) {
|
||||
// ----------- S t a t e -------------
|
||||
// -- ra : return address
|
||||
// -- a0 : key
|
||||
// -- a1 : receiver
|
||||
// -----------------------------------
|
||||
__ Branch(&miss, ne, a0,
|
||||
Operand(masm->isolate()->factory()->length_symbol()));
|
||||
receiver = a1;
|
||||
} else {
|
||||
ASSERT(kind() == Code::LOAD_IC);
|
||||
// ----------- S t a t e -------------
|
||||
// -- a2 : name
|
||||
// -- ra : return address
|
||||
// -- a0 : receiver
|
||||
// -- sp[0] : receiver
|
||||
// -----------------------------------
|
||||
receiver = a0;
|
||||
}
|
||||
|
||||
StubCompiler::GenerateLoadArrayLength(masm, receiver, a3, &miss);
|
||||
__ bind(&miss);
|
||||
StubCompiler::GenerateLoadMiss(masm, kind());
|
||||
}
|
||||
|
||||
|
||||
void StringLengthStub::Generate(MacroAssembler* masm) {
|
||||
Label miss;
|
||||
Register receiver;
|
||||
|
@ -215,21 +215,6 @@ static void GenerateDictionaryStore(MacroAssembler* masm,
|
||||
}
|
||||
|
||||
|
||||
void LoadIC::GenerateArrayLength(MacroAssembler* masm) {
|
||||
// ----------- S t a t e -------------
|
||||
// -- a2 : name
|
||||
// -- ra : return address
|
||||
// -- a0 : receiver
|
||||
// -- sp[0] : receiver
|
||||
// -----------------------------------
|
||||
Label miss;
|
||||
|
||||
StubCompiler::GenerateLoadArrayLength(masm, a0, a3, &miss);
|
||||
__ bind(&miss);
|
||||
StubCompiler::GenerateLoadMiss(masm, Code::LOAD_IC);
|
||||
}
|
||||
|
||||
|
||||
void LoadIC::GenerateFunctionPrototype(MacroAssembler* masm) {
|
||||
// ----------- S t a t e -------------
|
||||
// -- a2 : name
|
||||
|
@ -3203,26 +3203,6 @@ Handle<Code> KeyedLoadStubCompiler::CompileLoadInterceptor(
|
||||
}
|
||||
|
||||
|
||||
Handle<Code> KeyedLoadStubCompiler::CompileLoadArrayLength(
|
||||
Handle<String> name) {
|
||||
// ----------- S t a t e -------------
|
||||
// -- ra : return address
|
||||
// -- a0 : key
|
||||
// -- a1 : receiver
|
||||
// -----------------------------------
|
||||
Label miss;
|
||||
|
||||
// Check the key is the cached one.
|
||||
__ Branch(&miss, ne, a0, Operand(name));
|
||||
|
||||
GenerateLoadArrayLength(masm(), a1, a2, &miss);
|
||||
__ bind(&miss);
|
||||
GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
|
||||
|
||||
return GetCode(Code::CALLBACKS, name);
|
||||
}
|
||||
|
||||
|
||||
Handle<Code> KeyedLoadStubCompiler::CompileLoadFunctionPrototype(
|
||||
Handle<String> name) {
|
||||
// ----------- S t a t e -------------
|
||||
|
Loading…
Reference in New Issue
Block a user