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

Unified Diff: runtime/vm/intermediate_language_arm.cc

Issue 798643003: Pass condition result explicitly. Do not imply the existence of a status (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years 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 | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/intermediate_language_arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_arm.cc
===================================================================
--- runtime/vm/intermediate_language_arm.cc (revision 42293)
+++ runtime/vm/intermediate_language_arm.cc (working copy)
@@ -6831,23 +6831,27 @@
Location left = locs()->in(0);
Location right = locs()->in(1);
ASSERT(!left.IsConstant() || !right.IsConstant());
+ Condition true_condition;
if (left.IsConstant()) {
- compiler->EmitEqualityRegConstCompare(right.reg(),
- left.constant(),
- needs_number_check(),
- token_pos());
+ true_condition = compiler->EmitEqualityRegConstCompare(right.reg(),
+ left.constant(),
+ needs_number_check(),
+ token_pos());
} else if (right.IsConstant()) {
- compiler->EmitEqualityRegConstCompare(left.reg(),
- right.constant(),
- needs_number_check(),
- token_pos());
+ true_condition = compiler->EmitEqualityRegConstCompare(left.reg(),
+ right.constant(),
+ needs_number_check(),
+ token_pos());
} else {
- compiler->EmitEqualityRegRegCompare(left.reg(),
- right.reg(),
- needs_number_check(),
- token_pos());
+ true_condition = compiler->EmitEqualityRegRegCompare(left.reg(),
+ right.reg(),
+ needs_number_check(),
+ token_pos());
}
- Condition true_condition = (kind() == Token::kEQ_STRICT) ? EQ : NE;
+ if (kind() != Token::kEQ_STRICT) {
+ ASSERT(kind() == Token::kNE_STRICT);
+ true_condition = NegateCondition(true_condition);
+ }
return true_condition;
}
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/intermediate_language_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698