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

Side by Side Diff: pkg/compiler/lib/src/js/nodes.dart

Issue 812233004: Add CodeOutput to prepare for emission without in-memory buffers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reinsert return. Created 5 years, 11 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
« no previous file with comments | « pkg/compiler/lib/src/js/js.dart ('k') | pkg/compiler/lib/src/js/printer.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 js; 5 part of js;
6 6
7 abstract class NodeVisitor<T> { 7 abstract class NodeVisitor<T> {
8 T visitProgram(Program node); 8 T visitProgram(Program node);
9 9
10 T visitBlock(Block node); 10 T visitBlock(Block node);
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 535
536 Expression withPosition(var sourcePosition, var endSourcePosition) => 536 Expression withPosition(var sourcePosition, var endSourcePosition) =>
537 super.withPosition(sourcePosition, endSourcePosition); 537 super.withPosition(sourcePosition, endSourcePosition);
538 } 538 }
539 539
540 /// Wrap a CodeBuffer as an expression. 540 /// Wrap a CodeBuffer as an expression.
541 class Blob extends Expression { 541 class Blob extends Expression {
542 // TODO(ahe): This class is an aid to convert everything to ASTs, remove when 542 // TODO(ahe): This class is an aid to convert everything to ASTs, remove when
543 // not needed anymore. 543 // not needed anymore.
544 544
545 final leg.CodeBuffer buffer; 545 final CodeBuffer buffer;
546 546
547 Blob(this.buffer); 547 Blob(this.buffer);
548 548
549 accept(NodeVisitor visitor) => visitor.visitBlob(this); 549 accept(NodeVisitor visitor) => visitor.visitBlob(this);
550 550
551 void visitChildren(NodeVisitor visitor) {} 551 void visitChildren(NodeVisitor visitor) {}
552 552
553 Blob _clone() => new Blob(buffer); 553 Blob _clone() => new Blob(buffer);
554 554
555 int get precedenceLevel => PRIMARY; 555 int get precedenceLevel => PRIMARY;
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 class Comment extends Statement { 1100 class Comment extends Statement {
1101 final String comment; 1101 final String comment;
1102 1102
1103 Comment(this.comment); 1103 Comment(this.comment);
1104 1104
1105 accept(NodeVisitor visitor) => visitor.visitComment(this); 1105 accept(NodeVisitor visitor) => visitor.visitComment(this);
1106 Comment _clone() => new Comment(comment); 1106 Comment _clone() => new Comment(comment);
1107 1107
1108 void visitChildren(NodeVisitor visitor) {} 1108 void visitChildren(NodeVisitor visitor) {}
1109 } 1109 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js/js.dart ('k') | pkg/compiler/lib/src/js/printer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698