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

Unified Diff: lib/compiler/implementation/tree/nodes.dart

Issue 10919033: Rework Unparser/unparse StringBuffer management. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: lib/compiler/implementation/tree/nodes.dart
diff --git a/lib/compiler/implementation/tree/nodes.dart b/lib/compiler/implementation/tree/nodes.dart
index c535d9a697bd9042dc5204530859e1056432fdc8..7fd2edc2f94d53524b1c36c5a86166b7582235ad 100644
--- a/lib/compiler/implementation/tree/nodes.dart
+++ b/lib/compiler/implementation/tree/nodes.dart
@@ -99,7 +99,7 @@ class Node implements Hashable {
/**
* Returns this node unparsed to Dart source string.
*/
- toString() => unparse();
+ toString() => unparse(this);
/**
* Returns Xml-like tree representation of this node.
@@ -110,16 +110,6 @@ class Node implements Hashable {
String getObjectDescription() => super.toString();
- String unparse() {
- Unparser unparser = new Unparser();
- try {
- return unparser.unparse(this);
- } catch (e, trace) {
ahe 2012/09/18 13:29:18 Why was this removed? I'm looking at this stack t
Anton Muhin 2012/09/19 09:38:43 Sorry, I don't immediately see what's the problem:
ahe 2012/09/19 10:33:12 The code is there to handle when something that is
- print(trace);
- return '<<unparse error: ${getObjectDescription()}: ${unparser.sb}>>';
- }
- }
-
abstract Token getBeginToken();
abstract Token getEndToken();
« no previous file with comments | « lib/compiler/implementation/dart_backend/emitter.dart ('k') | lib/compiler/implementation/tree/unparser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698