Index: src/x64/codegen-x64.cc |
diff --git a/src/x64/codegen-x64.cc b/src/x64/codegen-x64.cc |
index f47ba18473216cf0356f0ee4e7b974230470c7fd..783484e66331cc5cf6a80dcebb0587f10d18d668 100644 |
--- a/src/x64/codegen-x64.cc |
+++ b/src/x64/codegen-x64.cc |
@@ -4694,7 +4694,18 @@ void CodeGenerator::VisitVariableProxy(VariableProxy* node) { |
void CodeGenerator::VisitLiteral(Literal* node) { |
Comment cmnt(masm_, "[ Literal"); |
- frame_->Push(node->handle()); |
+ if (frame_->ConstantPoolOverflowed()) { |
+ Result temp = allocator_->Allocate(); |
+ ASSERT(temp.is_valid()); |
+ if (node->handle()->IsSmi()) { |
+ __ Move(temp.reg(), Smi::cast(*node->handle())); |
+ } else { |
+ __ movq(temp.reg(), node->handle(), RelocInfo::EMBEDDED_OBJECT); |
+ } |
+ frame_->Push(&temp); |
+ } else { |
+ frame_->Push(node->handle()); |
+ } |
} |