Reviewers: Toon Verwaest, Paul Lind, danno, kisg, kilvadyb,

Message:
Hi Toon,

Please take a look.

Description:
MIPS: Remove HCheckSmi, LCheckSmi and rename LCheckSmiAndReturn to LCheckSmi.

Port r14816 (0485153d)

BUG=


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

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

Affected files:
  M src/mips/lithium-codegen-mips.cc
  M src/mips/lithium-mips.h
  M src/mips/lithium-mips.cc


Index: src/mips/lithium-codegen-mips.cc
diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc index 3743da4f0a12853317964f91800909f379809870..a6cb7577a5e78d3206b02352fa14eb97f2c44e80 100644
--- a/src/mips/lithium-codegen-mips.cc
+++ b/src/mips/lithium-codegen-mips.cc
@@ -4947,13 +4947,6 @@ void LCodeGen::DoDoubleToSmi(LDoubleToSmi* instr) {
 }


-void LCodeGen::DoCheckSmiAndReturn(LCheckSmiAndReturn* instr) {
-  LOperand* input = instr->value();
-  __ And(at, ToRegister(input), Operand(kSmiTagMask));
-  DeoptimizeIf(ne, instr->environment(), at, Operand(zero_reg));
-}
-
-
 void LCodeGen::DoCheckSmi(LCheckSmi* instr) {
   LOperand* input = instr->value();
   __ And(at, ToRegister(input), Operand(kSmiTagMask));
Index: src/mips/lithium-mips.cc
diff --git a/src/mips/lithium-mips.cc b/src/mips/lithium-mips.cc
index 49e23d7d26f32e6a1d17b504cba652090b050d7a..22adc2a2b4d263d8ed399a5343b0422446c5c4c1 100644
--- a/src/mips/lithium-mips.cc
+++ b/src/mips/lithium-mips.cc
@@ -1778,8 +1778,7 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
       if (val->type().IsSmi()) {
         return DefineSameAsFirst(new(zone()) LDummyUse(value));
       }
-      return AssignEnvironment(
-          DefineSameAsFirst(new(zone()) LCheckSmiAndReturn(value)));
+ return AssignEnvironment(DefineSameAsFirst(new(zone()) LCheckSmi(value)));
     } else {
       ASSERT(to.IsInteger32());
       LOperand* value = NULL;
@@ -1886,12 +1885,6 @@ LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) {
 }


-LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) {
-  LOperand* value = UseRegisterAtStart(instr->value());
-  return AssignEnvironment(new(zone()) LCheckSmi(value));
-}
-
-
 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) {
   LOperand* value = UseRegisterAtStart(instr->value());
   return AssignEnvironment(new(zone()) LCheckFunction(value));
Index: src/mips/lithium-mips.h
diff --git a/src/mips/lithium-mips.h b/src/mips/lithium-mips.h
index 228ba57befeec6ef43e02d0083debcc1d26c10fa..e3ada264f84f4fe759731136e93c52881270c45c 100644
--- a/src/mips/lithium-mips.h
+++ b/src/mips/lithium-mips.h
@@ -76,7 +76,6 @@ class LCodeGen;
   V(CheckNonSmi)                                \
   V(CheckPrototypeMaps)                         \
   V(CheckSmi)                                   \
-  V(CheckSmiAndReturn)                          \
   V(ClampDToUint8)                              \
   V(ClampIToUint8)                              \
   V(ClampTToUint8)                              \
@@ -2325,7 +2324,7 @@ class LCheckPrototypeMaps: public LTemplateInstruction<0, 0, 2> {
 };


-class LCheckSmi: public LTemplateInstruction<0, 1, 0> {
+class LCheckSmi: public LTemplateInstruction<1, 1, 0> {
  public:
   explicit LCheckSmi(LOperand* value) {
     inputs_[0] = value;
@@ -2337,18 +2336,6 @@ class LCheckSmi: public LTemplateInstruction<0, 1, 0> {
 };


-class LCheckSmiAndReturn: public LTemplateInstruction<1, 1, 0> {
- public:
-  explicit LCheckSmiAndReturn(LOperand* value) {
-    inputs_[0] = value;
-  }
-
-  LOperand* value() { return inputs_[0]; }
-
-  DECLARE_CONCRETE_INSTRUCTION(CheckSmiAndReturn, "check-smi-and-return")
-};
-
-
 class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> {
  public:
   explicit LCheckNonSmi(LOperand* value) {


--
--
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/groups/opt_out.


Reply via email to