Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index dd58cd2365f1daee41abb17724ff40d45b2d22fa..6317a54a2b400385c2c75ff3c59b6fac8ca36deb 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(context)); |
+ __ LoadHeapObject(esi, Handle<Context>::cast(constant->handle())); |
} else { |
UNREACHABLE(); |
} |