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

Unified Diff: src/hydrogen-instructions.cc

Issue 18751003: 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: Fixed two issues 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 041ef8b37408f11fcb8cdc68e26abbf3c479966e..8e7032f6ec0a285fb9fcfb70876daa0125dddb64 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