Revision: 13466
Author:   [email protected]
Date:     Wed Jan 23 01:45:48 2013
Log: MIPS: Replace special IC builtins and stubs in the map's cache by codestubs.

Port r13453 (94525069)

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/12051014
Patch from Akos Palfi <[email protected]>.
http://code.google.com/p/v8/source/detail?r=13466

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 Mon Jan 21 00:30:11 2013 +++ /branches/bleeding_edge/src/mips/code-stubs-mips.cc Wed Jan 23 01:45:48 2013
@@ -33,6 +33,7 @@
 #include "code-stubs.h"
 #include "codegen.h"
 #include "regexp-macro-assembler.h"
+#include "stub-cache.h"

 namespace v8 {
 namespace internal {
@@ -4541,6 +4542,37 @@
     __ DropAndRet(HasArgsInRegisters() ? 0 : 2);
   }
 }
+
+
+void StringLengthStub::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::GenerateLoadStringLength(masm, receiver, a3, t0, &miss,
+                                         support_wrapper_);
+
+  __ bind(&miss);
+  StubCompiler::GenerateLoadMiss(masm, kind());
+}


 Register InstanceofStub::left() { return a0; }
=======================================
--- /branches/bleeding_edge/src/mips/ic-mips.cc Mon Jan 21 00:30:11 2013
+++ /branches/bleeding_edge/src/mips/ic-mips.cc Wed Jan 23 01:45:48 2013
@@ -228,23 +228,6 @@
   __ bind(&miss);
   StubCompiler::GenerateLoadMiss(masm, Code::LOAD_IC);
 }
-
-
-void LoadIC::GenerateStringLength(MacroAssembler* masm, bool support_wrappers) {
-  // ----------- S t a t e -------------
-  //  -- a2    : name
-  //  -- lr    : return address
-  //  -- a0    : receiver
-  //  -- sp[0] : receiver
-  // -----------------------------------
-  Label miss;
-
-  StubCompiler::GenerateLoadStringLength(masm, a0, a1, a3, &miss,
-                                         support_wrappers);
-  // Cache miss: Jump to runtime.
-  __ bind(&miss);
-  StubCompiler::GenerateLoadMiss(masm, Code::LOAD_IC);
-}


 void LoadIC::GenerateFunctionPrototype(MacroAssembler* masm) {
=======================================
--- /branches/bleeding_edge/src/mips/stub-cache-mips.cc Mon Jan 21 00:30:11 2013 +++ /branches/bleeding_edge/src/mips/stub-cache-mips.cc Wed Jan 23 01:45:48 2013
@@ -3221,31 +3221,6 @@

   return GetCode(Code::CALLBACKS, name);
 }
-
-
-Handle<Code> KeyedLoadStubCompiler::CompileLoadStringLength(
-    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_string_length(), 1, a2, a3);
-
-  // Check the key is the cached one.
-  __ Branch(&miss, ne, a0, Operand(name));
-
-  GenerateLoadStringLength(masm(), a1, a2, a3, &miss, true);
-  __ bind(&miss);
-  __ DecrementCounter(counters->keyed_load_string_length(), 1, a2, a3);
-
-  GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
-
-  return GetCode(Code::CALLBACKS, name);
-}


 Handle<Code> KeyedLoadStubCompiler::CompileLoadFunctionPrototype(

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to