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

Unified Diff: src/hydrogen-instructions.cc

Issue 183383006: Fix HCheckValue::Canonicalize wrt uninitialized HConstant unique. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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 | test/mjsunit/regress/regress-348280.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index a35134952da753ee932fd104ee680e06f5173d2f..1c6f76f3b157313e3a8490494b14a0c92926498a 100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -1566,10 +1566,11 @@ void HCheckValue::PrintDataTo(StringStream* stream) {
HValue* HCheckValue::Canonicalize() {
- return (value()->IsConstant() &&
- HConstant::cast(value())->GetUnique() == object_)
- ? NULL
- : this;
+ if (value()->IsConstant()) {
+ Unique<Object> unique = HConstant::cast(value())->GetUnique();
titzer 2014/03/03 12:42:38 Can you move this logic into a method on HConstant
+ if (unique.IsInitialized() && unique == object_) return NULL;
+ }
+ return this;
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-348280.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698