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

Side by Side Diff: dart/sdk/lib/_internal/compiler/implementation/js/nodes.dart

Issue 103863004: Revert "Generate tear-off closures dynamically." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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 | « no previous file | dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 446
447 accept(NodeVisitor visitor) => visitor.visitLiteralStatement(this); 447 accept(NodeVisitor visitor) => visitor.visitLiteralStatement(this);
448 void visitChildren(NodeVisitor visitor) { } 448 void visitChildren(NodeVisitor visitor) { }
449 } 449 }
450 450
451 abstract class Expression extends Node { 451 abstract class Expression extends Node {
452 int get precedenceLevel; 452 int get precedenceLevel;
453 453
454 Call callWith(List<Expression> arguments) => new Call(this, arguments); 454 Call callWith(List<Expression> arguments) => new Call(this, arguments);
455 455
456 New newWith(List<Expression> arguments) => new New(this, arguments);
457
456 PropertyAccess operator [](expression) { 458 PropertyAccess operator [](expression) {
457 if (expression is Expression) { 459 if (expression is Expression) {
458 return new PropertyAccess(this, expression); 460 return new PropertyAccess(this, expression);
459 } else if (expression is int) { 461 } else if (expression is int) {
460 return new PropertyAccess.indexed(this, expression); 462 return new PropertyAccess.indexed(this, expression);
461 } else if (expression is String) { 463 } else if (expression is String) {
462 return new PropertyAccess.field(this, expression); 464 return new PropertyAccess.field(this, expression);
463 } else { 465 } else {
464 throw new ArgumentError('Expected an int, String, or Expression'); 466 throw new ArgumentError('Expected an int, String, or Expression');
465 } 467 }
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
1004 */ 1006 */
1005 class Comment extends Statement { 1007 class Comment extends Statement {
1006 final String comment; 1008 final String comment;
1007 1009
1008 Comment(this.comment); 1010 Comment(this.comment);
1009 1011
1010 accept(NodeVisitor visitor) => visitor.visitComment(this); 1012 accept(NodeVisitor visitor) => visitor.visitComment(this);
1011 1013
1012 void visitChildren(NodeVisitor visitor) {} 1014 void visitChildren(NodeVisitor visitor) {}
1013 } 1015 }
OLDNEW
« no previous file with comments | « no previous file | dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698