Revision: 13468
Author: [email protected]
Date: Wed Jan 23 02:05:08 2013
Log: MIPS: Migrate FunctionPrototype (Keyed|Named)LoadIC to CodeStub
Port r13459 (491896eb)
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/12049015
Patch from Akos Palfi <[email protected]>.
http://code.google.com/p/v8/source/detail?r=13468
Modified:
/branches/bleeding_edge/src/mips/code-stubs-mips.cc
/branches/bleeding_edge/src/mips/ic-mips.cc
/branches/bleeding_edge/src/mips/stub-cache-mips.cc
=======================================
--- /branches/bleeding_edge/src/mips/code-stubs-mips.cc Wed Jan 23 02:02:48
2013
+++ /branches/bleeding_edge/src/mips/code-stubs-mips.cc Wed Jan 23 02:05:08
2013
@@ -4571,6 +4571,35 @@
__ bind(&miss);
StubCompiler::GenerateLoadMiss(masm, kind());
}
+
+
+void FunctionPrototypeStub::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()->prototype_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::GenerateLoadFunctionPrototype(masm, receiver, a3, t0,
&miss);
+ __ bind(&miss);
+ StubCompiler::GenerateLoadMiss(masm, kind());
+}
void StringLengthStub::Generate(MacroAssembler* masm) {
=======================================
--- /branches/bleeding_edge/src/mips/ic-mips.cc Wed Jan 23 02:02:48 2013
+++ /branches/bleeding_edge/src/mips/ic-mips.cc Wed Jan 23 02:05:08 2013
@@ -213,21 +213,6 @@
__ RecordWrite(
elements, scratch2, scratch1, kRAHasNotBeenSaved, kDontSaveFPRegs);
}
-
-
-void LoadIC::GenerateFunctionPrototype(MacroAssembler* masm) {
- // ----------- S t a t e -------------
- // -- a2 : name
- // -- lr : return address
- // -- a0 : receiver
- // -- sp[0] : receiver
- // -----------------------------------
- Label miss;
-
- StubCompiler::GenerateLoadFunctionPrototype(masm, a0, a1, a3, &miss);
- __ bind(&miss);
- StubCompiler::GenerateLoadMiss(masm, Code::LOAD_IC);
-}
// Checks the receiver for special cases (value type, slow case bits).
=======================================
--- /branches/bleeding_edge/src/mips/stub-cache-mips.cc Wed Jan 23 02:02:48
2013
+++ /branches/bleeding_edge/src/mips/stub-cache-mips.cc Wed Jan 23 02:05:08
2013
@@ -3201,30 +3201,6 @@
return GetCode(Code::INTERCEPTOR, name);
}
-
-
-Handle<Code> KeyedLoadStubCompiler::CompileLoadFunctionPrototype(
- Handle<String> name) {
- // ----------- S t a t e -------------
- // -- ra : return address
- // -- a0 : key
- // -- a1 : receiver
- // -----------------------------------
- Label miss;
-
- Counters* counters = masm()->isolate()->counters();
- __ IncrementCounter(counters->keyed_load_function_prototype(), 1, a2,
a3);
-
- // Check the name hasn't changed.
- __ Branch(&miss, ne, a0, Operand(name));
-
- GenerateLoadFunctionPrototype(masm(), a1, a2, a3, &miss);
- __ bind(&miss);
- __ DecrementCounter(counters->keyed_load_function_prototype(), 1, a2,
a3);
- GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
-
- return GetCode(Code::CALLBACKS, name);
-}
Handle<Code> KeyedLoadStubCompiler::CompileLoadElement(
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev