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

Side by Side Diff: pkg/compiler/lib/src/kernel/kernel_debug.dart

Issue 2359453002: Handle local functions in kernel_impact. (Closed)
Patch Set: Created 4 years, 3 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
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 /// Helper for debug Kernel nodes. 5 /// Helper for debug Kernel nodes.
6 6
7 library kernel.debug; 7 library kernel.debug;
8 8
9 import 'package:kernel/kernel.dart'; 9 import 'package:kernel/kernel.dart';
10 import 'package:kernel/visitor.dart'; 10 import 'package:kernel/visitor.dart';
(...skipping 18 matching lines...) Expand all
29 void visitName(Name node) { 29 void visitName(Name node) {
30 openAndCloseNode(node, '${node.runtimeType}', 30 openAndCloseNode(node, '${node.runtimeType}',
31 {'name': node.name, 'library': node.library?.name}); 31 {'name': node.name, 'library': node.library?.name});
32 } 32 }
33 33
34 @override 34 @override
35 void visitIntLiteral(IntLiteral node) { 35 void visitIntLiteral(IntLiteral node) {
36 openAndCloseNode(node, '${node.runtimeType}', {'value': '${node.value}'}); 36 openAndCloseNode(node, '${node.runtimeType}', {'value': '${node.value}'});
37 } 37 }
38 38
39 @override
40 void visitVariableGet(VariableGet node) {
41 openAndCloseNode(
42 node, '${node.runtimeType}', {'variable': '${node.variable}'});
43 }
44
45 @override
46 void visitVariableDeclaration(VariableDeclaration node) {
47 openNode(node, '${node.runtimeType}', {
48 'name': '${node.name}',
49 'isFinal': '${node.isFinal}',
50 'isConst': '${node.isConst}'
51 });
52 node.visitChildren(this);
53 closeNode();
54 }
55
39 /// Pretty-prints given node tree into string. 56 /// Pretty-prints given node tree into string.
40 static String prettyPrint(Node node) { 57 static String prettyPrint(Node node) {
41 var p = new DebugPrinter(); 58 var p = new DebugPrinter();
42 node.accept(p); 59 node.accept(p);
43 return p.sb.toString(); 60 return p.sb.toString();
44 } 61 }
45 } 62 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698