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

Unified Diff: src/typing.cc

Issue 17444011: Fix to_boolean type feedback for unary and binary ops (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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/typing.cc
diff --git a/src/typing.cc b/src/typing.cc
index e890333d135e36750a546cc61eac25e78ee60005..295b9c370f65829fe0307933332ef9a0b7e41778 100644
--- a/src/typing.cc
+++ b/src/typing.cc
@@ -409,7 +409,7 @@ void AstTyper::VisitUnaryOperation(UnaryOperation* expr) {
MergeLowerType(expr->expression(), op_type);
if (expr->op() == Token::NOT) {
// TODO(rossberg): only do in test or value context.
- expr->expression()->RecordToBooleanTypeFeedback(oracle());
+ expr->RecordToBooleanTypeFeedback(oracle(), expr->expression()->test_id());
}
}
@@ -441,7 +441,8 @@ void AstTyper::VisitBinaryOperation(BinaryOperation* expr) {
MergeLowerType(expr->right(), right_type);
expr->set_fixed_right_arg(fixed_right_arg);
if (expr->op() == Token::OR || expr->op() == Token::AND) {
- expr->left()->RecordToBooleanTypeFeedback(oracle());
+ expr->RecordToBooleanTypeFeedback(oracle(), expr->left()->test_id());
Jakob Kummerow 2013/06/24 09:25:07 I don't think this change is correct, seeing that
+ expr->RecordToBooleanTypeFeedback(oracle(), expr->right()->test_id());
}
}

Powered by Google App Engine
This is Rietveld 408576698