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

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

Issue 2980913002: Clean up code comments based on the changes in response to sra and johnniwinther's CL comments. (oo… (Closed)
Patch Set: Created 3 years, 5 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_model/closure_visitors.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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 import 'package:kernel/ast.dart' as ir; 5 import 'package:kernel/ast.dart' as ir;
6 6
7 import '../closure.dart'; 7 import '../closure.dart';
8 import '../common/tasks.dart'; 8 import '../common/tasks.dart';
9 import '../elements/entities.dart'; 9 import '../elements/entities.dart';
10 import '../kernel/element_map.dart'; 10 import '../kernel/element_map.dart';
(...skipping 15 matching lines...) Expand all
26 /// http://siek.blogspot.com/2012/07/essence-of-closure-conversion.html or 26 /// http://siek.blogspot.com/2012/07/essence-of-closure-conversion.html or
27 /// http://matt.might.net/articles/closure-conversion/. 27 /// http://matt.might.net/articles/closure-conversion/.
28 // TODO(efortuna): Change inheritance hierarchy so that the 28 // TODO(efortuna): Change inheritance hierarchy so that the
29 // ClosureConversionTask doesn't inherit from ClosureTask because it's just a 29 // ClosureConversionTask doesn't inherit from ClosureTask because it's just a
30 // glorified timer. 30 // glorified timer.
31 class KernelClosureConversionTask extends ClosureConversionTask<ir.Node> { 31 class KernelClosureConversionTask extends ClosureConversionTask<ir.Node> {
32 final KernelToElementMapForBuilding _elementMap; 32 final KernelToElementMapForBuilding _elementMap;
33 final GlobalLocalsMap _globalLocalsMap; 33 final GlobalLocalsMap _globalLocalsMap;
34 34
35 /// Map of the scoping information that corresponds to a particular entity. 35 /// Map of the scoping information that corresponds to a particular entity.
36 /// This particular map contains ScopeInfos only for entities that are *not*
37 /// closures. Entities that are closures are stored in the
38 /// [_loopClosureScopeMap]. TODO!!!
39 Map<Entity, ScopeInfo> _scopeMap = <Entity, ScopeInfo>{}; 36 Map<Entity, ScopeInfo> _scopeMap = <Entity, ScopeInfo>{};
40 Map<ir.Statement, LoopClosureScope> _loopClosureScopeMap = 37 Map<ir.Statement, LoopClosureScope> _loopClosureScopeMap =
41 <ir.Statement, LoopClosureScope>{}; 38 <ir.Statement, LoopClosureScope>{};
42 39
43 Map<Entity, ClosureRepresentationInfo> _closureRepresentationMap = 40 Map<Entity, ClosureRepresentationInfo> _closureRepresentationMap =
44 <Entity, ClosureRepresentationInfo>{}; 41 <Entity, ClosureRepresentationInfo>{};
45 42
46 /// Should only be used at the very beginning to ensure we are looking at the 43 /// Should only be used at the very beginning to ensure we are looking at the
47 /// right kind of elements. 44 /// right kind of elements.
48 // TODO(efortuna): Remove this map once we have one kernel backend strategy. 45 // TODO(efortuna): Remove this map once we have one kernel backend strategy.
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 // that (and the subsequent adjustment here) will follow soon. 281 // that (and the subsequent adjustment here) will follow soon.
285 bool get isClosure => false; 282 bool get isClosure => false;
286 283
287 bool get isAbstract => false; 284 bool get isAbstract => false;
288 285
289 // TODO(efortuna): Talk to Johnni. 286 // TODO(efortuna): Talk to Johnni.
290 JLibrary get library => null; 287 JLibrary get library => null;
291 288
292 String toString() => '${jsElementPrefix}class($name)'; 289 String toString() => '${jsElementPrefix}class($name)';
293 } 290 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_model/closure_visitors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698