Chromium Code Reviews| Index: src/ia32/lithium-codegen-ia32.cc |
| diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
| index b307512d673bb92db1df7781c132264b927b0f9f..3a1e6c51ae2f57827c9ff60fc35decc9c3d7e4e7 100644 |
| --- a/src/ia32/lithium-codegen-ia32.cc |
| +++ b/src/ia32/lithium-codegen-ia32.cc |
| @@ -360,24 +360,24 @@ XMMRegister LCodeGen::ToDoubleRegister(LOperand* 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(); |
| } |
| 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(); |
| } |
| 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(); |
| } |
| @@ -494,8 +494,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(); |
| @@ -554,9 +554,9 @@ void LCodeGen::CallRuntimeFromDeferred(Runtime::FunctionId id, |
| } else if (context->IsStackSlot()) { |
| __ mov(esi, ToOperand(context)); |
| } else if (context->IsConstantOperand()) { |
| - Handle<Object> literal = |
| - chunk_->LookupLiteral(LConstantOperand::cast(context)); |
| - __ LoadHeapObject(esi, Handle<Context>::cast(literal)); |
| + HConstant* constant = chunk_->LookupConstant(LConstantOperand::cast( |
|
Michael Starzinger
2012/07/11 09:16:10
Break the line after the "=" sign, that's more rea
|
| + context)); |
| + __ LoadHeapObject(esi, Handle<Context>::cast(constant->handle())); |
| } else { |
| UNREACHABLE(); |
| } |