| Index: src/a64/lithium-a64.h
|
| diff --git a/src/a64/lithium-a64.h b/src/a64/lithium-a64.h
|
| index a643394c79750c67b13e49bc9a20fb49aa8cd18b..d734317edeaceb3a08484d7a89882091075d4381 100644
|
| --- a/src/a64/lithium-a64.h
|
| +++ b/src/a64/lithium-a64.h
|
| @@ -93,8 +93,7 @@ class LCodeGen;
|
| V(DeclareGlobals) \
|
| V(Deoptimize) \
|
| V(DivI) \
|
| - V(DoubleToI) \
|
| - V(DoubleToSmi) \
|
| + V(DoubleToIntOrSmi) \
|
| V(Drop) \
|
| V(DummyUse) \
|
| V(ElementsKind) \
|
| @@ -189,6 +188,7 @@ class LCodeGen;
|
| V(ToFastProperties) \
|
| V(TransitionElementsKind) \
|
| V(TrapAllocationMemento) \
|
| + V(TruncateDoubleToIntOrSmi) \
|
| V(Typeof) \
|
| V(TypeofIsAndBranch) \
|
| V(Uint32ToDouble) \
|
| @@ -1207,41 +1207,18 @@ class LDivI: public LTemplateInstruction<1, 2, 1> {
|
| };
|
|
|
|
|
| -class LDoubleToI: public LTemplateInstruction<1, 1, 2> {
|
| +class LDoubleToIntOrSmi: public LTemplateInstruction<1, 1, 0> {
|
| public:
|
| - LDoubleToI(LOperand* value, LOperand* temp1, LOperand* temp2) {
|
| + explicit LDoubleToIntOrSmi(LOperand* value) {
|
| inputs_[0] = value;
|
| - temps_[0] = temp1;
|
| - temps_[1] = temp2;
|
| - }
|
| -
|
| - LOperand* value() { return inputs_[0]; }
|
| - LOperand* temp1() { return temps_[0]; }
|
| - LOperand* temp2() { return temps_[1]; }
|
| -
|
| - DECLARE_CONCRETE_INSTRUCTION(DoubleToI, "double-to-i")
|
| - DECLARE_HYDROGEN_ACCESSOR(UnaryOperation)
|
| -
|
| - bool truncating() { return hydrogen()->CanTruncateToInt32(); }
|
| -};
|
| -
|
| -
|
| -class LDoubleToSmi: public LTemplateInstruction<1, 1, 2> {
|
| - public:
|
| - LDoubleToSmi(LOperand* value, LOperand* temp1, LOperand* temp2) {
|
| - inputs_[0] = value;
|
| - temps_[0] = temp1;
|
| - temps_[1] = temp2;
|
| }
|
|
|
| LOperand* value() { return inputs_[0]; }
|
| - LOperand* temp1() { return temps_[0]; }
|
| - LOperand* temp2() { return temps_[1]; }
|
|
|
| - DECLARE_CONCRETE_INSTRUCTION(DoubleToI, "double-to-smi")
|
| + DECLARE_CONCRETE_INSTRUCTION(DoubleToIntOrSmi, "double-to-int-or-smi")
|
| DECLARE_HYDROGEN_ACCESSOR(UnaryOperation)
|
|
|
| - bool truncating() { return hydrogen()->CanTruncateToInt32(); }
|
| + bool tag_result() { return hydrogen()->representation().IsSmi(); }
|
| };
|
|
|
|
|
| @@ -2589,6 +2566,26 @@ class LTrapAllocationMemento : public LTemplateInstruction<0, 1, 2> {
|
| };
|
|
|
|
|
| +class LTruncateDoubleToIntOrSmi: public LTemplateInstruction<1, 1, 2> {
|
| + public:
|
| + LTruncateDoubleToIntOrSmi(LOperand* value, LOperand* temp1, LOperand* temp2) {
|
| + inputs_[0] = value;
|
| + temps_[0] = temp1;
|
| + temps_[1] = temp2;
|
| + }
|
| +
|
| + LOperand* value() { return inputs_[0]; }
|
| + LOperand* temp1() { return temps_[0]; }
|
| + LOperand* temp2() { return temps_[1]; }
|
| +
|
| + DECLARE_CONCRETE_INSTRUCTION(TruncateDoubleToIntOrSmi,
|
| + "truncate-double-to-int-or-smi")
|
| + DECLARE_HYDROGEN_ACCESSOR(UnaryOperation)
|
| +
|
| + bool tag_result() { return hydrogen()->representation().IsSmi(); }
|
| +};
|
| +
|
| +
|
| class LTypeof: public LTemplateInstruction<1, 1, 0> {
|
| public:
|
| explicit LTypeof(LOperand* value) {
|
|
|