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

Unified Diff: src/hydrogen-instructions.cc

Issue 58923004: Make HTypeofIsAndBranch accept any representation input (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 7 years, 1 month 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/hydrogen-instructions.h ('k') | src/ia32/full-codegen-ia32.cc » ('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 206ab7e2accf5e496b6cd814eb1071c511cb21e7..100af0a0d18439d83c43951276ad8d33c52c4ec4 100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -1316,6 +1316,20 @@ HValue* HWrapReceiver::Canonicalize() {
}
+HValue* HTypeofIsAndBranch::Canonicalize() {
+ if (value()->representation().IsSpecialization()) {
+ AllowHandleDereference allow_deref;
Jakob Kummerow 2013/11/05 14:42:49 No way! If you absolutely need this information d
Weiliang 2013/11/07 11:53:30 Done.
+ if (type_literal()->Equals(isolate()->heap()->number_string())) {
+ state_ = kAlwaysTrue;
+ } else {
+ state_ = kAlwaysFalse;
+ }
+ }
+
+ return this;
+}
+
+
void HTypeof::PrintDataTo(StringStream* stream) {
value()->PrintNameTo(stream);
}
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698