Reviewers: fschneider,
Description:
We don't need to track writes of
pointers to immortal immovable objects.
Please review this at http://codereview.chromium.org/7831052/
SVN Base: http://v8.googlecode.com/svn/branches/experimental/gc/
Affected files:
M src/hydrogen-instructions.h
Index: src/hydrogen-instructions.h
===================================================================
--- src/hydrogen-instructions.h (revision 9191)
+++ src/hydrogen-instructions.h (working copy)
@@ -2249,6 +2249,16 @@
bool InOldSpace() const { return !HEAP->InNewSpace(*handle_); }
+ bool ImmortalImmovable() const {
+ Heap* heap = HEAP;
+ if (*handle_ == heap->undefined_value()) return true;
+ if (*handle_ == heap->null_value()) return true;
+ if (*handle_ == heap->true_value()) return true;
+ if (*handle_ == heap->false_value()) return true;
+ if (*handle_ == heap->the_hole_value()) return true;
+ return false;
+ }
+
virtual Representation RequiredInputRepresentation(int index) const {
return Representation::None();
}
@@ -3333,7 +3343,9 @@
// TODO(gc) On bleeding edge we omit write barrier when we are
// storing old space constant. We can't allow such an optimization
// on GC branch.
- return !value->type().IsSmi();
+ return !value->type().IsBoolean()
+ && !value->type().IsSmi()
+ && !(value->IsConstant() &&
HConstant::cast(value)->ImmortalImmovable());
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev