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

Side by Side Diff: pkg/compiler/lib/src/closure.dart

Issue 1077093002: Revert "Model 'await for' as an explicit node in tree and fix its handling." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/compiler/lib/src/compiler.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library closureToClassMapper; 5 library closureToClassMapper;
6 6
7 import "elements/elements.dart"; 7 import "elements/elements.dart";
8 import "dart2jslib.dart"; 8 import "dart2jslib.dart";
9 import "dart_types.dart"; 9 import "dart_types.dart";
10 import "js_backend/js_backend.dart" show JavaScriptBackend; 10 import "js_backend/js_backend.dart" show JavaScriptBackend;
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
1062 } 1062 }
1063 1063
1064 visitTryStatement(TryStatement node) { 1064 visitTryStatement(TryStatement node) {
1065 // TODO(ngeoffray): implement finer grain state. 1065 // TODO(ngeoffray): implement finer grain state.
1066 bool oldInTryStatement = inTryStatement; 1066 bool oldInTryStatement = inTryStatement;
1067 inTryStatement = true; 1067 inTryStatement = true;
1068 node.visitChildren(this); 1068 node.visitChildren(this);
1069 inTryStatement = oldInTryStatement; 1069 inTryStatement = oldInTryStatement;
1070 } 1070 }
1071 1071
1072 visitAsyncForIn(AsyncForIn node) { 1072 visitForIn(ForIn node) {
1073 // An `await for` loop is enclosed in an implicit try-finally. 1073 if (node.awaitToken != null) {
1074 bool oldInTryStatement = inTryStatement; 1074 // An `await for` loop is enclosed in an implicit try-finally.
1075 inTryStatement = true; 1075 bool oldInTryStatement = inTryStatement;
1076 visitLoop(node); 1076 inTryStatement = true;
1077 inTryStatement = oldInTryStatement; 1077 visitLoop(node);
1078 inTryStatement = oldInTryStatement;
1079 } else {
1080 visitLoop(node);
1081 }
1078 } 1082 }
1079 } 1083 }
1080 1084
1081 /// A type variable as a local variable. 1085 /// A type variable as a local variable.
1082 class TypeVariableLocal implements Local { 1086 class TypeVariableLocal implements Local {
1083 final TypeVariableType typeVariable; 1087 final TypeVariableType typeVariable;
1084 final ExecutableElement executableContext; 1088 final ExecutableElement executableContext;
1085 1089
1086 TypeVariableLocal(this.typeVariable, this.executableContext); 1090 TypeVariableLocal(this.typeVariable, this.executableContext);
1087 1091
1088 String get name => typeVariable.name; 1092 String get name => typeVariable.name;
1089 1093
1090 int get hashCode => typeVariable.hashCode; 1094 int get hashCode => typeVariable.hashCode;
1091 1095
1092 bool operator ==(other) { 1096 bool operator ==(other) {
1093 if (other is! TypeVariableLocal) return false; 1097 if (other is! TypeVariableLocal) return false;
1094 return typeVariable == other.typeVariable; 1098 return typeVariable == other.typeVariable;
1095 } 1099 }
1096 } 1100 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698