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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart

Issue 171253004: Fix for issue 16967 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 | tests/compiler/dart2js_extra/16967_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart b/sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart
index 82b32bad82ff791c8b1dc5ca9ff53a4a06368a6e..716fb512ea3cd690b5f7201166d6964f5960d150 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart
@@ -126,6 +126,13 @@ class SsaTypePropagator extends HBaseVisitor implements OptimizationPhase {
}
TypeMask visitNegate(HNegate instruction) {
+ HInstruction operand = instruction.operand;
+ // We have integer subclasses that represent ranges, so widen any int
+ // subclass to full integer.
+ if (operand.isInteger(compiler)) {
+ JavaScriptBackend backend = compiler.backend;
+ return backend.intType;
+ }
return instruction.operand.instructionType;
}
« no previous file with comments | « no previous file | tests/compiler/dart2js_extra/16967_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698