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

Unified Diff: src/hydrogen-instructions.cc

Issue 7237024: Refactor handling of test expressions in the graph builder. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 6 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
Index: src/hydrogen-instructions.cc
===================================================================
--- src/hydrogen-instructions.cc (revision 8460)
+++ src/hydrogen-instructions.cc (working copy)
@@ -669,7 +669,7 @@
}
-void HClassOfTest::PrintDataTo(StringStream* stream) {
+void HClassOfTestAndBranch::PrintDataTo(StringStream* stream) {
stream->Add("class_of_test(");
value()->PrintNameTo(stream);
stream->Add(", \"%o\")", *class_name());
@@ -747,7 +747,7 @@
}
-void HHasInstanceType::PrintDataTo(StringStream* stream) {
+void HHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) {
value()->PrintNameTo(stream);
switch (from_) {
case FIRST_JS_RECEIVER_TYPE:
@@ -768,7 +768,7 @@
}
-void HTypeofIs::PrintDataTo(StringStream* stream) {
+void HTypeofIsAndBranch::PrintDataTo(StringStream* stream) {
value()->PrintNameTo(stream);
stream->Add(" == ");
stream->Add(type_literal_->ToAsciiVector());
@@ -1231,25 +1231,28 @@
-void HCompare::PrintDataTo(StringStream* stream) {
+void HCompareGeneric::PrintDataTo(StringStream* stream) {
stream->Add(Token::Name(token()));
stream->Add(" ");
HBinaryOperation::PrintDataTo(stream);
}
-void HCompare::SetInputRepresentation(Representation r) {
+void HCompareIDAndBranch::PrintDataTo(StringStream* stream) {
+ stream->Add(Token::Name(token()));
+ stream->Add(" ");
+ left()->PrintNameTo(stream);
+ stream->Add(" ");
+ right()->PrintNameTo(stream);
+}
+
+
+void HCompareIDAndBranch::SetInputRepresentation(Representation r) {
input_representation_ = r;
- if (r.IsTagged()) {
- SetAllSideEffects();
- ClearFlag(kUseGVN);
- } else if (r.IsDouble()) {
+ if (r.IsDouble()) {
SetFlag(kDeoptimizeOnUndefined);
- ClearAllSideEffects();
- SetFlag(kUseGVN);
} else {
- ClearAllSideEffects();
- SetFlag(kUseGVN);
+ ASSERT(r.IsInteger32());
}
}
@@ -1566,21 +1569,11 @@
}
-HType HCompare::CalculateInferredType() {
+HType HCompareGeneric::CalculateInferredType() {
return HType::Boolean();
}
-HType HCompareObjectEq::CalculateInferredType() {
- return HType::Boolean();
-}
-
-
-HType HUnaryPredicate::CalculateInferredType() {
- return HType::Boolean();
-}
-
-
HType HInstanceOf::CalculateInferredType() {
return HType::Boolean();
}

Powered by Google App Engine
This is Rietveld 408576698