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

Unified Diff: frog/leg/ssa/closure.dart

Issue 9695059: Fix leg assert and NPE to make BB green. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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: frog/leg/ssa/closure.dart
===================================================================
--- frog/leg/ssa/closure.dart (revision 5433)
+++ frog/leg/ssa/closure.dart (working copy)
@@ -396,8 +396,10 @@
savedClosureData.freeVariableMapping.getKeys();
assert(freeVariables.isEmpty() || savedInsideClosure);
for (Element freeElement in freeVariables) {
- assert(capturedVariableMapping[freeElement] == null ||
- capturedVariableMapping[freeElement] == freeElement);
+ if (capturedVariableMapping[freeElement] != null &&
+ capturedVariableMapping[freeElement] != freeElement) {
+ compiler.internalError('In closure analyzer', node: node);
+ }
capturedVariableMapping[freeElement] = freeElement;
useLocal(freeElement);
}

Powered by Google App Engine
This is Rietveld 408576698