Index: src/ia32/codegen-ia32.cc |
diff --git a/src/ia32/codegen-ia32.cc b/src/ia32/codegen-ia32.cc |
index ae544dc63b211ac43ea618e7d1ecde9178e2daaa..4f69a3637a68a6feac239d45bd057acfeafbef1f 100644 |
--- a/src/ia32/codegen-ia32.cc |
+++ b/src/ia32/codegen-ia32.cc |
@@ -5360,10 +5360,24 @@ void CodeGenerator::VisitVariableProxy(VariableProxy* node) { |
void CodeGenerator::VisitLiteral(Literal* node) { |
Comment cmnt(masm_, "[ Literal"); |
- if (in_safe_int32_mode()) { |
- frame_->PushUntaggedElement(node->handle()); |
+ if (frame_->ConstantPoolOverflowed()) { |
+ Result temp = allocator_->Allocate(); |
+ ASSERT(temp.is_valid()); |
+ if (in_safe_int32_mode()) { |
+ temp.set_untagged_int32(true); |
+ } |
+ if (node->handle()->IsSmi()) { |
Kevin Millikin (Chromium)
2011/02/28 11:58:15
I think MacroAssembler::Set will do the right thin
|
+ __ Set(temp.reg(), Immediate(Smi::cast(*node->handle()))); |
+ } else { |
+ __ mov(temp.reg(), node->handle()); |
+ } |
+ frame_->Push(&temp); |
} else { |
- frame_->Push(node->handle()); |
+ if (in_safe_int32_mode()) { |
+ frame_->PushUntaggedElement(node->handle()); |
+ } else { |
+ frame_->Push(node->handle()); |
+ } |
} |
} |