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

Unified Diff: src/hydrogen-instructions.cc

Issue 19504007: Calls to HCheckFunction can be eliminated if the value is an HConstant. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Deobfuscate a predicate Created 7 years, 5 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/hydrogen-instructions.h ('k') | src/objects.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 5a9510f8e31349117533232d5a4eca93263ecdda..e99f90920a9ac6cf4f252ab3472217e424247d5f 100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -1690,6 +1690,14 @@ void HCheckFunction::PrintDataTo(StringStream* stream) {
}
+HValue* HCheckFunction::Canonicalize() {
+ return (value()->IsConstant() &&
+ HConstant::cast(value())->UniqueValueIdsMatch(target_unique_id_))
+ ? NULL
+ : this;
+}
+
+
const char* HCheckInstanceType::GetCheckName() {
switch (check_) {
case IS_SPEC_OBJECT: return "object";
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698