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

Side by Side Diff: pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart

Issue 955543004: Pass SourceInformation through the CPS IR. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update comments Created 5 years, 9 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library tree_ir_nodes; 5 library tree_ir_nodes;
6 6
7 import '../constants/expressions.dart'; 7 import '../constants/expressions.dart';
8 import '../constants/values.dart' as values; 8 import '../constants/values.dart' as values;
9 import '../dart_types.dart' show DartType, GenericType; 9 import '../dart_types.dart' show DartType, GenericType;
10 import '../elements/elements.dart'; 10 import '../elements/elements.dart';
11 import '../io/source_information.dart' show SourceInformation;
11 import '../universe/universe.dart'; 12 import '../universe/universe.dart';
12 import '../universe/universe.dart' show Selector; 13 import '../universe/universe.dart' show Selector;
13 import 'optimization/optimization.dart'; 14 import 'optimization/optimization.dart';
14 15
15 // The Tree language is the target of translation out of the CPS-based IR. 16 // The Tree language is the target of translation out of the CPS-based IR.
16 // 17 //
17 // The translation from CPS to Dart consists of several stages. Among the 18 // The translation from CPS to Dart consists of several stages. Among the
18 // stages are translation to direct style, translation out of SSA, eliminating 19 // stages are translation to direct style, translation out of SSA, eliminating
19 // unnecessary names, recognizing high-level control constructs. Combining 20 // unnecessary names, recognizing high-level control constructs. Combining
20 // these separate concerns is complicated and the constraints of the CPS-based 21 // these separate concerns is complicated and the constraints of the CPS-based
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 121
121 /** 122 /**
122 * A call to a static function or getter/setter to a static field. 123 * A call to a static function or getter/setter to a static field.
123 * 124 *
124 * In contrast to the CPS-based IR, the arguments can be arbitrary expressions. 125 * In contrast to the CPS-based IR, the arguments can be arbitrary expressions.
125 */ 126 */
126 class InvokeStatic extends Expression implements Invoke { 127 class InvokeStatic extends Expression implements Invoke {
127 final Entity target; 128 final Entity target;
128 final List<Expression> arguments; 129 final List<Expression> arguments;
129 final Selector selector; 130 final Selector selector;
131 final SourceInformation sourceInformation;
130 132
131 InvokeStatic(this.target, this.selector, this.arguments); 133 InvokeStatic(this.target, this.selector, this.arguments,
134 {this.sourceInformation});
132 135
133 accept(ExpressionVisitor visitor) => visitor.visitInvokeStatic(this); 136 accept(ExpressionVisitor visitor) => visitor.visitInvokeStatic(this);
134 accept1(ExpressionVisitor1 visitor, arg) { 137 accept1(ExpressionVisitor1 visitor, arg) {
135 return visitor.visitInvokeStatic(this, arg); 138 return visitor.visitInvokeStatic(this, arg);
136 } 139 }
137 } 140 }
138 141
139 /** 142 /**
140 * A call to a method, operator, getter, setter or index getter/setter. 143 * A call to a method, operator, getter, setter or index getter/setter.
141 * 144 *
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 visitStatement(node.next); 925 visitStatement(node.next);
923 } 926 }
924 927
925 visitCreateBox(CreateBox node) { 928 visitCreateBox(CreateBox node) {
926 } 929 }
927 930
928 visitCreateInstance(CreateInstance node) { 931 visitCreateInstance(CreateInstance node) {
929 node.arguments.forEach(visitExpression); 932 node.arguments.forEach(visitExpression);
930 } 933 }
931 } 934 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698