| Index: src/x64/lithium-codegen-x64.cc
|
| diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
|
| index 33c175aebf3d12a49470549a600aea48add01451..68e43964e0c5ef9fb97891386084fc97405d183b 100644
|
| --- a/src/x64/lithium-codegen-x64.cc
|
| +++ b/src/x64/lithium-codegen-x64.cc
|
| @@ -320,24 +320,24 @@ bool LCodeGen::IsTaggedConstant(LConstantOperand* op) const {
|
|
|
|
|
| int LCodeGen::ToInteger32(LConstantOperand* op) const {
|
| - Handle<Object> value = chunk_->LookupLiteral(op);
|
| + HConstant* constant = chunk_->LookupConstant(op);
|
| ASSERT(chunk_->LookupLiteralRepresentation(op).IsInteger32());
|
| - ASSERT(static_cast<double>(static_cast<int32_t>(value->Number())) ==
|
| - value->Number());
|
| - return static_cast<int32_t>(value->Number());
|
| + ASSERT(constant->HasInteger32Value());
|
| + return constant->Integer32Value();
|
| }
|
|
|
|
|
| double LCodeGen::ToDouble(LConstantOperand* op) const {
|
| - Handle<Object> value = chunk_->LookupLiteral(op);
|
| - return value->Number();
|
| + HConstant* constant = chunk_->LookupConstant(op);
|
| + ASSERT(constant->HasDoubleValue());
|
| + return constant->DoubleValue();
|
| }
|
|
|
|
|
| Handle<Object> LCodeGen::ToHandle(LConstantOperand* op) const {
|
| - Handle<Object> literal = chunk_->LookupLiteral(op);
|
| + HConstant* constant = chunk_->LookupConstant(op);
|
| ASSERT(chunk_->LookupLiteralRepresentation(op).IsTagged());
|
| - return literal;
|
| + return constant->handle();
|
| }
|
|
|
|
|
| @@ -442,8 +442,8 @@ void LCodeGen::AddToTranslation(Translation* translation,
|
| XMMRegister reg = ToDoubleRegister(op);
|
| translation->StoreDoubleRegister(reg);
|
| } else if (op->IsConstantOperand()) {
|
| - Handle<Object> literal = chunk()->LookupLiteral(LConstantOperand::cast(op));
|
| - int src_index = DefineDeoptimizationLiteral(literal);
|
| + HConstant* constant = chunk()->LookupConstant(LConstantOperand::cast(op));
|
| + int src_index = DefineDeoptimizationLiteral(constant->handle());
|
| translation->StoreLiteral(src_index);
|
| } else {
|
| UNREACHABLE();
|
|
|