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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/closure.dart

Issue 12764005: Get rid of old code for union/intersection in HType. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add comments. Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/js_backend/emitter.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 "scanner/scannerlib.dart" show Token; 10 import "scanner/scannerlib.dart" show Token;
11 import "tree/tree.dart"; 11 import "tree/tree.dart";
12 import "util/util.dart"; 12 import "util/util.dart";
13 import "elements/modelx.dart" show ElementX, FunctionElementX, ClassElementX; 13 import "elements/modelx.dart" show ElementX, FunctionElementX, ClassElementX;
14 14
15 class ClosureNamer { 15 class ClosureNamer {
16 SourceString getClosureVariableName(SourceString name, int id) { 16 SourceString getClosureVariableName(SourceString name, int id) {
17 return new SourceString("${name.slowToString()}_$id"); 17 return new SourceString("${name.slowToString()}_$id");
18 } 18 }
19 } 19 }
20 20
21 21
22 class ClosureTask extends CompilerTask { 22 class ClosureTask extends CompilerTask {
23 Map<Node, ClosureClassMap> closureMappingCache; 23 Map<Node, ClosureClassMap> closureMappingCache;
24 ClosureNamer namer; 24 ClosureNamer namer;
25 ClosureTask(Compiler compiler, this.namer) 25 ClosureTask(Compiler compiler, this.namer)
26 : closureMappingCache = new Map<Node, ClosureClassMap>(), 26 : closureMappingCache = new Map<Node, ClosureClassMap>(),
27 super(compiler); 27 super(compiler);
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 } 690 }
691 691
692 visitTryStatement(TryStatement node) { 692 visitTryStatement(TryStatement node) {
693 // TODO(ngeoffray): implement finer grain state. 693 // TODO(ngeoffray): implement finer grain state.
694 bool oldInTryStatement = inTryStatement; 694 bool oldInTryStatement = inTryStatement;
695 inTryStatement = true; 695 inTryStatement = true;
696 node.visitChildren(this); 696 node.visitChildren(this);
697 inTryStatement = oldInTryStatement; 697 inTryStatement = oldInTryStatement;
698 } 698 }
699 } 699 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698