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

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

Issue 10876008: Remove most superfluous getter arguments from dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 4 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
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("leg.dart"); 8 #import("leg.dart");
9 #import("scanner/scannerlib.dart"); 9 #import("scanner/scannerlib.dart");
10 #import("tree/tree.dart"); 10 #import("tree/tree.dart");
11 #import("util/util.dart"); 11 #import("util/util.dart");
12 12
13 class ClosureTask extends CompilerTask { 13 class ClosureTask extends CompilerTask {
14 Map<Node, ClosureClassMap> closureMappingCache; 14 Map<Node, ClosureClassMap> closureMappingCache;
15 ClosureTask(Compiler compiler) 15 ClosureTask(Compiler compiler)
16 : closureMappingCache = new Map<Node, ClosureClassMap>(), 16 : closureMappingCache = new Map<Node, ClosureClassMap>(),
17 super(compiler); 17 super(compiler);
18 18
19 String get name() => "Closure Simplifier"; 19 String get name => "Closure Simplifier";
20 20
21 ClosureClassMap computeClosureToClassMapping(FunctionExpression node, 21 ClosureClassMap computeClosureToClassMapping(FunctionExpression node,
22 TreeElements elements) { 22 TreeElements elements) {
23 return measure(() { 23 return measure(() {
24 ClosureClassMap cached = closureMappingCache[node]; 24 ClosureClassMap cached = closureMappingCache[node];
25 if (cached !== null) return cached; 25 if (cached !== null) return cached;
26 26
27 ClosureTranslator translator = 27 ClosureTranslator translator =
28 new ClosureTranslator(compiler, elements, closureMappingCache); 28 new ClosureTranslator(compiler, elements, closureMappingCache);
29 // The translator will store the computed closure-mappings inside the 29 // The translator will store the computed closure-mappings inside the
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 } 499 }
500 500
501 visitTryStatement(TryStatement node) { 501 visitTryStatement(TryStatement node) {
502 // TODO(ngeoffray): implement finer grain state. 502 // TODO(ngeoffray): implement finer grain state.
503 bool oldInTryStatement = inTryStatement; 503 bool oldInTryStatement = inTryStatement;
504 inTryStatement = true; 504 inTryStatement = true;
505 node.visitChildren(this); 505 node.visitChildren(this);
506 inTryStatement = oldInTryStatement; 506 inTryStatement = oldInTryStatement;
507 } 507 }
508 } 508 }
OLDNEW
« no previous file with comments | « dart/lib/compiler/implementation/apiimpl.dart ('k') | dart/lib/compiler/implementation/code_buffer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698