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

Unified Diff: src/hydrogen-instructions.h

Issue 7945009: Merge experimental/gc branch to the bleeding_edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 3 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 | « src/heap-profiler.cc ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
===================================================================
--- src/hydrogen-instructions.h (revision 9327)
+++ src/hydrogen-instructions.h (working copy)
@@ -2259,6 +2259,19 @@
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;
+ if (*handle_ == heap->minus_zero_value()) return true;
+ if (*handle_ == heap->nan_value()) return true;
+ if (*handle_ == heap->empty_string()) return true;
+ return false;
+ }
+
virtual Representation RequiredInputRepresentation(int index) const {
return Representation::None();
}
@@ -3344,7 +3357,7 @@
static inline bool StoringValueNeedsWriteBarrier(HValue* value) {
return !value->type().IsBoolean()
&& !value->type().IsSmi()
- && !(value->IsConstant() && HConstant::cast(value)->InOldSpace());
+ && !(value->IsConstant() && HConstant::cast(value)->ImmortalImmovable());
}
« no previous file with comments | « src/heap-profiler.cc ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698