Commit 18320951 authored by palfia@homejinni.com's avatar palfia@homejinni.com

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

Port r14816 (0485153d)

BUG=

Review URL: https://codereview.chromium.org/16035008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14823 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 67927694
...@@ -4947,13 +4947,6 @@ void LCodeGen::DoDoubleToSmi(LDoubleToSmi* instr) { ...@@ -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) { void LCodeGen::DoCheckSmi(LCheckSmi* instr) {
LOperand* input = instr->value(); LOperand* input = instr->value();
__ And(at, ToRegister(input), Operand(kSmiTagMask)); __ And(at, ToRegister(input), Operand(kSmiTagMask));
......
...@@ -1778,8 +1778,7 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) { ...@@ -1778,8 +1778,7 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
if (val->type().IsSmi()) { if (val->type().IsSmi()) {
return DefineSameAsFirst(new(zone()) LDummyUse(value)); return DefineSameAsFirst(new(zone()) LDummyUse(value));
} }
return AssignEnvironment( return AssignEnvironment(DefineSameAsFirst(new(zone()) LCheckSmi(value)));
DefineSameAsFirst(new(zone()) LCheckSmiAndReturn(value)));
} else { } else {
ASSERT(to.IsInteger32()); ASSERT(to.IsInteger32());
LOperand* value = NULL; LOperand* value = NULL;
...@@ -1886,12 +1885,6 @@ LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) { ...@@ -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) { LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) {
LOperand* value = UseRegisterAtStart(instr->value()); LOperand* value = UseRegisterAtStart(instr->value());
return AssignEnvironment(new(zone()) LCheckFunction(value)); return AssignEnvironment(new(zone()) LCheckFunction(value));
......
...@@ -76,7 +76,6 @@ class LCodeGen; ...@@ -76,7 +76,6 @@ class LCodeGen;
V(CheckNonSmi) \ V(CheckNonSmi) \
V(CheckPrototypeMaps) \ V(CheckPrototypeMaps) \
V(CheckSmi) \ V(CheckSmi) \
V(CheckSmiAndReturn) \
V(ClampDToUint8) \ V(ClampDToUint8) \
V(ClampIToUint8) \ V(ClampIToUint8) \
V(ClampTToUint8) \ V(ClampTToUint8) \
...@@ -2325,7 +2324,7 @@ class LCheckPrototypeMaps: public LTemplateInstruction<0, 0, 2> { ...@@ -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: public:
explicit LCheckSmi(LOperand* value) { explicit LCheckSmi(LOperand* value) {
inputs_[0] = value; inputs_[0] = value;
...@@ -2337,18 +2336,6 @@ class LCheckSmi: public LTemplateInstruction<0, 1, 0> { ...@@ -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> { class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> {
public: public:
explicit LCheckNonSmi(LOperand* value) { explicit LCheckNonSmi(LOperand* value) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment