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

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: 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..bdaa18336c06ba84fa9d8c693ed417c73f57c7f3 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,8 @@ class SsaValueRangeAnalyzer extends HBaseVisitor implements OptimizationPhase {
// that the graph does not get polluted with these instructions
// only necessary for this phase.
removeRangeConversion();
+ // TODO(herhut): Find a better way to pass around ranges
+ (compiler.backend as JavaScriptBackend).optimizer.ranges = ranges;
karlklose 2014/03/12 14:43:45 Do you want the explicit type check here? Conside
herhut 2014/03/13 13:27:45 Done.
}
void removeRangeConversion() {

Powered by Google App Engine
This is Rietveld 408576698