Reviewers: Michael Starzinger,
Description:
Don't actually create Handles for the constant hole. This is required to
have
some parts of Crankshaft run without creating Handles.
BUG=
TEST=
Please review this at http://codereview.chromium.org/10699052/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/hydrogen.cc
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]);
+ HConstant* constant = new(zone()) HConstant(hole_value,
+ Representation::Tagged());
+ constant->InsertAfter(GetConstantUndefined());
+ constant_hole_.set(constant);
+ }
+ return constant_hole_.get();
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev