Bug 881380 - Pull the LDouble class into shared code. r=luke

This commit is contained in:
Dan Gohman 2013-06-10 14:13:57 -07:00
parent 4bb5b68ad4
commit 8140ae1733
3 changed files with 14 additions and 31 deletions

View File

@ -173,6 +173,20 @@ class LPointer : public LInstructionHelper<1, 0, 0>
} }
}; };
// Constant double.
class LDouble : public LInstructionHelper<1, 0, 0>
{
double d_;
public:
LIR_HEADER(Double);
LDouble(double d) : d_(d)
{ }
double getDouble() const {
return d_;
}
};
// A constant Value. // A constant Value.
class LValue : public LInstructionHelper<BOX_PIECES, 0, 0> class LValue : public LInstructionHelper<BOX_PIECES, 0, 0>
{ {

View File

@ -69,20 +69,6 @@ class LUnboxDouble : public LInstructionHelper<1, 2, 0>
} }
}; };
// Constant double.
class LDouble : public LInstructionHelper<1, 0, 0>
{
double d_;
public:
LIR_HEADER(Double);
LDouble(double d) : d_(d)
{ }
double getDouble() const {
return d_;
}
};
// Convert a 32-bit unsigned integer to a double. // Convert a 32-bit unsigned integer to a double.
class LUInt32ToDouble : public LInstructionHelper<1, 1, 0> class LUInt32ToDouble : public LInstructionHelper<1, 1, 0>
{ {

View File

@ -277,23 +277,6 @@ class LMulI : public LBinaryMath<0, 1>
} }
}; };
// Constant double.
class LDouble : public LInstructionHelper<1, 0, 0>
{
double d_;
public:
LIR_HEADER(Double)
LDouble(double d)
: d_(d)
{ }
double getDouble() const {
return d_;
}
};
} // namespace ion } // namespace ion
} // namespace js } // namespace js