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

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

Issue 448943004: Refactor and simplify the dart2dart renamer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix minifying name generation Created 6 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 part of resolution; 5 part of resolution;
6 6
7 /// [ResolutionRegistry] collects all resolution information. It stores node 7 /// [ResolutionRegistry] collects all resolution information. It stores node
8 /// related information in a [TreeElements] mapping and registers calls with 8 /// related information in a [TreeElements] mapping and registers calls with
9 /// [Backend], [World] and [Enqueuer]. 9 /// [Backend], [World] and [Enqueuer].
10 // TODO(johnniwinther): Split this into an interface and implementation class. 10 // TODO(johnniwinther): Split this into an interface and implementation class.
(...skipping 13 matching lines...) Expand all
24 World get universe => compiler.world; 24 World get universe => compiler.world;
25 25
26 Backend get backend => compiler.backend; 26 Backend get backend => compiler.backend;
27 27
28 ////////////////////////////////////////////////////////////////////////////// 28 //////////////////////////////////////////////////////////////////////////////
29 // Node-to-Element mapping functionality. 29 // Node-to-Element mapping functionality.
30 ////////////////////////////////////////////////////////////////////////////// 30 //////////////////////////////////////////////////////////////////////////////
31 31
32 /// Register [node] as the declaration of [element]. 32 /// Register [node] as the declaration of [element].
33 void defineFunction(FunctionExpression node, FunctionElement element) { 33 void defineFunction(FunctionExpression node, FunctionElement element) {
34 // TODO(sigurdm): Remove when not needed by the dart2dart backend.
35 if (node.name != null) {
36 mapping[node.name] = element;
37 }
34 mapping[node] = element; 38 mapping[node] = element;
35 } 39 }
36 40
37 /// Register [node] as a reference to [element]. 41 /// Register [node] as a reference to [element].
38 Element useElement(Node node, Element element) { 42 Element useElement(Node node, Element element) {
39 if (element == null) return null; 43 if (element == null) return null;
40 return mapping[node] = element; 44 return mapping[node] = element;
41 } 45 }
42 46
43 /// Register [node] as the declaration of [element]. 47 /// Register [node] as the declaration of [element].
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 358
355 void registerAssert(Send node) { 359 void registerAssert(Send node) {
356 mapping.setAssert(node); 360 mapping.setAssert(node);
357 backend.resolutionCallbacks.onAssert(node, this); 361 backend.resolutionCallbacks.onAssert(node, this);
358 } 362 }
359 363
360 bool isAssert(Send node) { 364 bool isAssert(Send node) {
361 return mapping.isAssert(node); 365 return mapping.isAssert(node);
362 } 366 }
363 } 367 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/resolution/members.dart ('k') | tests/co19/co19-dart2dart.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698