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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/ir/ir_nodes.dart

Issue 223783002: Support ExpressionStatement in the dart2dart backend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Also check for null. Created 6 years, 8 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 | « sdk/lib/_internal/compiler/implementation/ir/ir_builder.dart ('k') | no next file » | 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) 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 '../dart2jslib.dart' as dart2js show Constant; 9 import '../dart2jslib.dart' as dart2js show Constant;
10 import '../elements/elements.dart' show FunctionElement, LibraryElement; 10 import '../elements/elements.dart' show FunctionElement, LibraryElement;
(...skipping 13 matching lines...) Expand all
24 } 24 }
25 25
26 /// The base class of things that variables can refer to: primitives, 26 /// The base class of things that variables can refer to: primitives,
27 /// continuations, function and continuation parameters, etc. 27 /// continuations, function and continuation parameters, etc.
28 abstract class Definition extends Node { 28 abstract class Definition extends Node {
29 // The head of a linked-list of occurrences, in no particular order. 29 // The head of a linked-list of occurrences, in no particular order.
30 Reference firstRef = null; 30 Reference firstRef = null;
31 31
32 bool get hasAtMostOneUse => firstRef == null || firstRef.nextRef == null; 32 bool get hasAtMostOneUse => firstRef == null || firstRef.nextRef == null;
33 bool get hasExactlyOneUse => firstRef != null && firstRef.nextRef == null; 33 bool get hasExactlyOneUse => firstRef != null && firstRef.nextRef == null;
34 bool get hasAtLeastOneUse => firstRef != null;
34 } 35 }
35 36
36 abstract class Primitive extends Definition { 37 abstract class Primitive extends Definition {
37 } 38 }
38 39
39 /// Operands to invocations and primitives are always variables. They point to 40 /// Operands to invocations and primitives are always variables. They point to
40 /// their definition and are linked into a list of occurrences. 41 /// their definition and are linked into a list of occurrences.
41 class Reference { 42 class Reference {
42 Definition definition; 43 Definition definition;
43 Reference nextRef = null; 44 Reference nextRef = null;
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 String visitParameter(Parameter triv) { 248 String visitParameter(Parameter triv) {
248 // Parameters are visited directly in visitLetCont. 249 // Parameters are visited directly in visitLetCont.
249 return '(Unexpected Parameter)'; 250 return '(Unexpected Parameter)';
250 } 251 }
251 252
252 String visitContinuation(Continuation triv) { 253 String visitContinuation(Continuation triv) {
253 // Continuations are visited directly in visitLetCont. 254 // Continuations are visited directly in visitLetCont.
254 return '(Unexpected Continuation)'; 255 return '(Unexpected Continuation)';
255 } 256 }
256 } 257 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ir/ir_builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698