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

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

Issue 190763013: Detect total switches to prevent type pollution by default cases. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address review comments Created 6 years, 9 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: sdk/lib/_internal/compiler/implementation/ssa/value_range_analyzer.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/value_range_analyzer.dart b/sdk/lib/_internal/compiler/implementation/ssa/value_range_analyzer.dart
index ed6852e719f9d405b8f3bfe74f5b819aff98c82b..2585ecadddf5b5e91d6ec32b29f04007eeb64f86 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/value_range_analyzer.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/value_range_analyzer.dart
@@ -610,6 +610,9 @@ class SsaValueRangeAnalyzer extends HBaseVisitor implements OptimizationPhase {
// that the graph does not get polluted with these instructions
// only necessary for this phase.
removeRangeConversion();
+ JavaScriptBackend backend = compiler.backend;
+ // TODO(herhut): Find a cleaner way to pass around ranges.
+ backend.optimizer.ranges = ranges;
}
void removeRangeConversion() {
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/tracer.dart ('k') | tests/compiler/dart2js/switch_empty_default_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698