| Index: src/mips/lithium-mips.h
|
| diff --git a/src/mips/lithium-mips.h b/src/mips/lithium-mips.h
|
| index 197254f703002d66de007854fa7cc3582306de2f..96065512b204037e77d1b49691106c7d264abdd1 100644
|
| --- a/src/mips/lithium-mips.h
|
| +++ b/src/mips/lithium-mips.h
|
| @@ -95,6 +95,7 @@ class LCodeGen;
|
| V(Deoptimize) \
|
| V(DivI) \
|
| V(DoubleToI) \
|
| + V(DoubleToSmi) \
|
| V(DummyUse) \
|
| V(ElementsKind) \
|
| V(FixedArrayBaseLength) \
|
| @@ -111,6 +112,7 @@ class LCodeGen;
|
| V(InstanceSize) \
|
| V(InstructionGap) \
|
| V(Integer32ToDouble) \
|
| + V(Integer32ToSmi) \
|
| V(Uint32ToDouble) \
|
| V(InvokeFunction) \
|
| V(IsConstructCallAndBranch) \
|
| @@ -1901,6 +1903,19 @@ class LInteger32ToDouble: public LTemplateInstruction<1, 1, 0> {
|
| };
|
|
|
|
|
| +class LInteger32ToSmi: public LTemplateInstruction<1, 1, 0> {
|
| + public:
|
| + explicit LInteger32ToSmi(LOperand* value) {
|
| + inputs_[0] = value;
|
| + }
|
| +
|
| + LOperand* value() { return inputs_[0]; }
|
| +
|
| + DECLARE_CONCRETE_INSTRUCTION(Integer32ToSmi, "int32-to-smi")
|
| + DECLARE_HYDROGEN_ACCESSOR(Change)
|
| +};
|
| +
|
| +
|
| class LUint32ToDouble: public LTemplateInstruction<1, 1, 0> {
|
| public:
|
| explicit LUint32ToDouble(LOperand* value) {
|
| @@ -1954,6 +1969,25 @@ class LNumberTagD: public LTemplateInstruction<1, 1, 2> {
|
| };
|
|
|
|
|
| +class LDoubleToSmi: public LTemplateInstruction<1, 1, 2> {
|
| + public:
|
| + LDoubleToSmi(LOperand* value, LOperand* temp, LOperand* temp2) {
|
| + inputs_[0] = value;
|
| + temps_[0] = temp;
|
| + temps_[1] = temp2;
|
| + }
|
| +
|
| + LOperand* value() { return inputs_[0]; }
|
| + LOperand* temp() { return temps_[0]; }
|
| + LOperand* temp2() { return temps_[1]; }
|
| +
|
| + DECLARE_CONCRETE_INSTRUCTION(DoubleToSmi, "double-to-smi")
|
| + DECLARE_HYDROGEN_ACCESSOR(UnaryOperation)
|
| +
|
| + bool truncating() { return hydrogen()->CanTruncateToInt32(); }
|
| +};
|
| +
|
| +
|
| // Sometimes truncating conversion from a tagged value to an int32.
|
| class LDoubleToI: public LTemplateInstruction<1, 1, 2> {
|
| public:
|
| @@ -2294,7 +2328,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;
|
|
|