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

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

Issue 2360773003: More kernel_impact. (Closed)
Patch Set: Updated cf. comments 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 void visitVariableDeclaration(VariableDeclaration node) { 46 void visitVariableDeclaration(VariableDeclaration node) {
47 openNode(node, '${node.runtimeType}', { 47 openNode(node, '${node.runtimeType}', {
48 'name': '${node.name}', 48 'name': '${node.name}',
49 'isFinal': '${node.isFinal}', 49 'isFinal': '${node.isFinal}',
50 'isConst': '${node.isConst}' 50 'isConst': '${node.isConst}'
51 }); 51 });
52 node.visitChildren(this); 52 node.visitChildren(this);
53 closeNode(); 53 closeNode();
54 } 54 }
55 55
56 @override
57 void visitInterfaceType(InterfaceType node) {
58 openNode(node, '${node.runtimeType}', {
59 'name': '${node.classNode.name}',
60 });
61 node.visitChildren(this);
62 closeNode();
63 }
64
56 /// Pretty-prints given node tree into string. 65 /// Pretty-prints given node tree into string.
57 static String prettyPrint(Node node) { 66 static String prettyPrint(Node node) {
58 var p = new DebugPrinter(); 67 var p = new DebugPrinter();
59 node.accept(p); 68 node.accept(p);
60 return p.sb.toString(); 69 return p.sb.toString();
61 } 70 }
62 } 71 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/kernel/kernel.dart ('k') | pkg/compiler/lib/src/kernel/kernel_visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698