Chromium Code Reviews

Unified Diff: src/hydrogen-instructions.h

Issue 16099006: Fix the hole loading optimization. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index 6fbfd15f388054854e9b39a25faac0ffa7456dfd..5d4b90a5bc5c4e70f1389d3bc7a1d01e6d088721 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -1718,7 +1718,9 @@ class HChange: public HUnaryOperation {
ASSERT(!value->representation().Equals(to));
set_representation(to);
SetFlag(kUseGVN);
- if (deoptimize_on_undefined) SetFlag(kDeoptimizeOnUndefined);
+ if (deoptimize_on_undefined || to.IsTagged()) {
+ SetFlag(kDeoptimizeOnUndefined);
+ }
if (is_truncating) SetFlag(kTruncatingToInt32);
if (value->representation().IsSmi() || value->type().IsSmi()) {
set_type(HType::Smi());

Powered by Google App Engine