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

Unified Diff: lib/compiler/implementation/ssa/codegen.dart

Issue 10332088: Undo optimization in cases where NaN might be involved. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/codegen.dart
diff --git a/lib/compiler/implementation/ssa/codegen.dart b/lib/compiler/implementation/ssa/codegen.dart
index b486e0c62e1453be31363255855eb58daf207840..66239fb08a953bbdc060bf818b96726c38d203eb 100644
--- a/lib/compiler/implementation/ssa/codegen.dart
+++ b/lib/compiler/implementation/ssa/codegen.dart
@@ -1689,7 +1689,12 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
use(input.inputs[0], JSPrecedence.EQUALITY_PRECEDENCE);
buffer.add(' !== true');
endExpression(JSPrecedence.EQUALITY_PRECEDENCE);
- } else if (isBuiltinRelational(input) && isGenerateAtUseSite(input)) {
+ } else if (isBuiltinRelational(input) &&
+ isGenerateAtUseSite(input) &&
+ !input.inputs[0].isDouble() &&
+ !input.inputs[0].isTypeUnknown()) {
ngeoffray 2012/05/10 10:41:13 I think this will cover 'conflicting'. What you sh
+ // This optimization doesn't work for NaN, so we don't do it if the
+ // type isn't known to be non-Double.
Map<String, String> inverseOperator = const <String>{
"==" : "!=",
"!=" : "==",
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698