Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1256)

Unified Diff: src/x64/codegen-x64.cc

Issue 6599002: Detect overflow of contant pool in virtual frame compiler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: set untagged int32 Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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());
+ }
}

Powered by Google App Engine
This is Rietveld 408576698