Chromium Code Reviews| Index: src/x64/lithium-codegen-x64.cc |
| diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
| index 808c4d87355f3626d5829df45f62745d893f236c..438c9774389ed69a2250b0afabcb7b0ee32e2516 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_->LookupLiteral(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* value = chunk_->LookupLiteral(op); |
| + ASSERT(value->HasDoubleValue()); |
| + return value->DoubleValue(); |
| } |
| Handle<Object> LCodeGen::ToHandle(LConstantOperand* op) const { |
| - Handle<Object> literal = chunk_->LookupLiteral(op); |
| + HConstant* constant = chunk_->LookupLiteral(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* literal = chunk()->LookupLiteral(LConstantOperand::cast(op)); |
|
Michael Starzinger
2012/07/09 09:57:09
Better rename that local variable to "constant".
sanjoy
2012/07/09 13:47:37
Done. Also renamed LookupLiteral to LookupConstan
|
| + int src_index = DefineDeoptimizationLiteral(literal->handle()); |
| translation->StoreLiteral(src_index); |
| } else { |
| UNREACHABLE(); |