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

Unified Diff: src/hydrogen.cc

Issue 10699052: Don't actually create Handles for the constant hole. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index ee3d6b5cfb632effc8ac270dfdeeed222528cdf0..2d62349cff30e329fbef22c3095a34c810b2a0f5 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -600,7 +600,15 @@ HConstant* HGraph::GetConstantFalse() {
HConstant* HGraph::GetConstantHole() {
- return GetConstant(&constant_hole_, isolate()->heap()->the_hole_value());
+ if (!constant_hole_.is_set()) {
+ Handle<Object> hole_value = Handle<Object>(
+ &isolate()->heap()->roots_array_start()[Heap::kTheHoleValueRootIndex]);
Michael Starzinger 2012/07/02 20:11:20 Likewise.
sanjoy 2012/07/03 09:05:52 Done.
+ HConstant* constant = new(zone()) HConstant(hole_value,
+ Representation::Tagged());
+ constant->InsertAfter(GetConstantUndefined());
+ constant_hole_.set(constant);
+ }
+ return constant_hole_.get();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698