Reviewers: danno, Toon Verwaest, paul.l..., gergely.kis.imgtec, akos.palfi.imgtec, dusmil.imgtec,

Description:
MIPS: Remove KeyedStoreIC::GenerateRuntimeSetProperty and move
Store::GenerateRuntimeSetProperty to the PropertyICCompiler.

Port r23311 (654ca86)

BUG=

Please review this at https://codereview.chromium.org/504743002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+30, -49 lines):
  M src/ic/mips/ic-compiler-mips.cc
  M src/ic/mips/ic-mips.cc
  M src/ic/mips64/ic-compiler-mips64.cc
  M src/ic/mips64/ic-mips64.cc


Index: src/ic/mips/ic-compiler-mips.cc
diff --git a/src/ic/mips/ic-compiler-mips.cc b/src/ic/mips/ic-compiler-mips.cc index f0c285d879a44e66d2a2811763b824a2b4f45588..d0e5a00ec03065b2850ad66c19b2bd4c178b7405 100644
--- a/src/ic/mips/ic-compiler-mips.cc
+++ b/src/ic/mips/ic-compiler-mips.cc
@@ -963,6 +963,19 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement(
 }


+void PropertyICCompiler::GenerateRuntimeSetProperty(MacroAssembler* masm,
+ StrictMode strict_mode) {
+  __ Push(StoreIC::ReceiverRegister(), StoreIC::NameRegister(),
+          StoreIC::ValueRegister());
+
+  __ li(a0, Operand(Smi::FromInt(strict_mode)));
+  __ Push(a0);
+
+  // Do tail-call to runtime routine.
+  __ TailCallRuntime(Runtime::kSetProperty, 4, 1);
+}
+
+
 #undef __
 }
 }  // namespace v8::internal
Index: src/ic/mips/ic-mips.cc
diff --git a/src/ic/mips/ic-mips.cc b/src/ic/mips/ic-mips.cc
index cbfbc3b3ec9513cceb579dc8caf315ff517c62e6..a4df1bd08c086711404276d0b587caa319cfc94c 100644
--- a/src/ic/mips/ic-mips.cc
+++ b/src/ic/mips/ic-mips.cc
@@ -9,6 +9,7 @@

 #include "src/codegen.h"
 #include "src/ic/ic.h"
+#include "src/ic/ic-compiler.h"
 #include "src/ic/stub-cache.h"

 namespace v8 {
@@ -687,17 +688,6 @@ void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
 }


-void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm,
-                                              StrictMode strict_mode) {
-  // Push receiver, key and value for runtime call.
-  __ Push(ReceiverRegister(), NameRegister(), ValueRegister());
-  __ li(a0, Operand(Smi::FromInt(strict_mode)));  // Strict mode.
-  __ Push(a0);
-
-  __ TailCallRuntime(Runtime::kSetProperty, 4, 1);
-}
-
-
 static void KeyedStoreGenerateGenericHelper(
MacroAssembler* masm, Label* fast_object, Label* fast_double, Label* slow, KeyedStoreCheckMap check_map, KeyedStoreIncrementLength increment_length,
@@ -896,7 +886,7 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
   // a0: value.
   // a1: key.
   // a2: receiver.
-  GenerateRuntimeSetProperty(masm, strict_mode);
+  PropertyICCompiler::GenerateRuntimeSetProperty(masm, strict_mode);

   // Extra capacity case: Check if there is extra capacity to
   // perform the store and update the length. Used for adding one
@@ -1065,18 +1055,6 @@ void StoreIC::GenerateNormal(MacroAssembler* masm) {
 }


-void StoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm,
-                                         StrictMode strict_mode) {
-  __ Push(ReceiverRegister(), NameRegister(), ValueRegister());
-
-  __ li(a0, Operand(Smi::FromInt(strict_mode)));
-  __ Push(a0);
-
-  // Do tail-call to runtime routine.
-  __ TailCallRuntime(Runtime::kSetProperty, 4, 1);
-}
-
-
 #undef __


Index: src/ic/mips64/ic-compiler-mips64.cc
diff --git a/src/ic/mips64/ic-compiler-mips64.cc b/src/ic/mips64/ic-compiler-mips64.cc index 0cfd93102a7957aee2999f6a5c5045c6b9bdfa19..ddb3117b5d13fe793016ac53764de4e12d51407a 100644
--- a/src/ic/mips64/ic-compiler-mips64.cc
+++ b/src/ic/mips64/ic-compiler-mips64.cc
@@ -964,6 +964,19 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement(
 }


+void PropertyICCompiler::GenerateRuntimeSetProperty(MacroAssembler* masm,
+ StrictMode strict_mode) {
+  __ Push(StoreIC::ReceiverRegister(), StoreIC::NameRegister(),
+          StoreIC::ValueRegister());
+
+  __ li(a0, Operand(Smi::FromInt(strict_mode)));
+  __ Push(a0);
+
+  // Do tail-call to runtime routine.
+  __ TailCallRuntime(Runtime::kSetProperty, 4, 1);
+}
+
+
 #undef __
 }
 }  // namespace v8::internal
Index: src/ic/mips64/ic-mips64.cc
diff --git a/src/ic/mips64/ic-mips64.cc b/src/ic/mips64/ic-mips64.cc
index 4070b35bf3a3a17615b714f1e22d1668a21764b7..4ee37713c0c94ca5efa2741bea770e446d46ce42 100644
--- a/src/ic/mips64/ic-mips64.cc
+++ b/src/ic/mips64/ic-mips64.cc
@@ -9,6 +9,7 @@

 #include "src/codegen.h"
 #include "src/ic/ic.h"
+#include "src/ic/ic-compiler.h"
 #include "src/ic/stub-cache.h"

 namespace v8 {
@@ -692,18 +693,6 @@ void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
 }


-void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm,
-                                              StrictMode strict_mode) {
-  // Push receiver, key and value for runtime call.
-  __ Push(ReceiverRegister(), NameRegister(), ValueRegister());
-
-  __ li(a0, Operand(Smi::FromInt(strict_mode)));  // Strict mode.
-  __ Push(a0);
-
-  __ TailCallRuntime(Runtime::kSetProperty, 4, 1);
-}
-
-
 static void KeyedStoreGenerateGenericHelper(
MacroAssembler* masm, Label* fast_object, Label* fast_double, Label* slow, KeyedStoreCheckMap check_map, KeyedStoreIncrementLength increment_length,
@@ -906,7 +895,7 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
   // a0: value.
   // a1: key.
   // a2: receiver.
-  GenerateRuntimeSetProperty(masm, strict_mode);
+  PropertyICCompiler::GenerateRuntimeSetProperty(masm, strict_mode);

   // Extra capacity case: Check if there is extra capacity to
   // perform the store and update the length. Used for adding one
@@ -1072,18 +1061,6 @@ void StoreIC::GenerateNormal(MacroAssembler* masm) {
 }


-void StoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm,
-                                         StrictMode strict_mode) {
-  __ Push(ReceiverRegister(), NameRegister(), ValueRegister());
-
-  __ li(a0, Operand(Smi::FromInt(strict_mode)));
-  __ Push(a0);
-
-  // Do tail-call to runtime routine.
-  __ TailCallRuntime(Runtime::kSetProperty, 4, 1);
-}
-
-
 #undef __




--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to