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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/cps_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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 // IrNodes are kept in a separate library to have precise control over their 5 // IrNodes are kept in a separate library to have precise control over their
6 // dependencies on other parts of the system. 6 // dependencies on other parts of the system.
7 library dart2js.ir_nodes; 7 library dart2js.ir_nodes;
8 8
9 import '../constants/expressions.dart'; 9 import '../constants/expressions.dart';
10 import '../constants/values.dart' as values show ConstantValue; 10 import '../constants/values.dart' as values show ConstantValue;
11 import '../cps_ir/optimizers.dart';
12 import '../dart_types.dart' show DartType, GenericType;
11 import '../dart2jslib.dart' as dart2js show invariant; 13 import '../dart2jslib.dart' as dart2js show invariant;
12 import '../elements/elements.dart'; 14 import '../elements/elements.dart';
15 import '../io/source_information.dart' show SourceInformation;
13 import '../universe/universe.dart' show Selector, SelectorKind; 16 import '../universe/universe.dart' show Selector, SelectorKind;
14 import '../dart_types.dart' show DartType, GenericType;
15 import '../cps_ir/optimizers.dart';
16 17
17 abstract class Node { 18 abstract class Node {
18 /// A pointer to the parent node. Is null until set by optimization passes. 19 /// A pointer to the parent node. Is null until set by optimization passes.
19 Node parent; 20 Node parent;
20 21
21 accept(Visitor visitor); 22 accept(Visitor visitor);
22 } 23 }
23 24
24 abstract class Expression extends Node { 25 abstract class Expression extends Node {
25 Expression plug(Expression expr) => throw 'impossible'; 26 Expression plug(Expression expr) => throw 'impossible';
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 203
203 /** 204 /**
204 * The selector encodes how the function is invoked: number of positional 205 * The selector encodes how the function is invoked: number of positional
205 * arguments, names used in named arguments. This information is required 206 * arguments, names used in named arguments. This information is required
206 * to build the [StaticCallSiteTypeInformation] for the inference graph. 207 * to build the [StaticCallSiteTypeInformation] for the inference graph.
207 */ 208 */
208 final Selector selector; 209 final Selector selector;
209 210
210 final Reference<Continuation> continuation; 211 final Reference<Continuation> continuation;
211 final List<Reference<Primitive>> arguments; 212 final List<Reference<Primitive>> arguments;
213 final SourceInformation sourceInformation;
212 214
213 InvokeStatic(this.target, this.selector, Continuation cont, 215 InvokeStatic(this.target,
214 List<Primitive> args) 216 this.selector,
217 Continuation cont,
218 List<Primitive> args,
219 this.sourceInformation)
215 : continuation = new Reference<Continuation>(cont), 220 : continuation = new Reference<Continuation>(cont),
216 arguments = _referenceList(args) { 221 arguments = _referenceList(args) {
217 assert(target is ErroneousElement || selector.name == target.name); 222 assert(target is ErroneousElement || selector.name == target.name);
218 } 223 }
219 224
220 accept(Visitor visitor) => visitor.visitInvokeStatic(this); 225 accept(Visitor visitor) => visitor.visitInvokeStatic(this);
221 } 226 }
222 227
223 /// A [CallingConvention] codifies how arguments are matched to parameters when 228 /// A [CallingConvention] codifies how arguments are matched to parameters when
224 /// emitting code for a function call. 229 /// emitting code for a function call.
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1395 1400
1396 void visitIdentical(Identical node) { 1401 void visitIdentical(Identical node) {
1397 visitReference(node.left); 1402 visitReference(node.left);
1398 visitReference(node.right); 1403 visitReference(node.right);
1399 } 1404 }
1400 1405
1401 void visitInterceptor(Interceptor node) { 1406 void visitInterceptor(Interceptor node) {
1402 visitReference(node.input); 1407 visitReference(node.input);
1403 } 1408 }
1404 } 1409 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698