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

Unified Diff: pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart

Issue 1278353003: Handle more unqualified SendSets (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/compile_time_constants.dart ('k') | pkg/compiler/lib/src/dart_backend/backend.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
index fcd6e76bff9f6ec4fa2a54d43c847f487818e077..a7aac4e4f3d0fdc47aae1f65a53c44fb6a65292f 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
@@ -885,7 +885,9 @@ class Constant extends Primitive {
final values.ConstantValue value;
final SourceInformation sourceInformation;
- Constant(this.value, {this.sourceInformation});
+ Constant(this.value, {this.sourceInformation}) {
+ assert(value != null);
+ }
accept(Visitor visitor) => visitor.visitConstant(this);
@@ -1167,10 +1169,10 @@ abstract class Visitor<T> {
/// Visits all non-recursive children of a CPS term, i.e. anything
/// not of type [Expression] or [Continuation].
-///
+///
/// Note that the non-recursive nodes can contain other nodes inside of them,
/// e.g. [Branch] contains an [IsTrue] which contains a [Reference].
-///
+///
/// The `process*` methods are called in pre-order for every node visited.
/// These can be overridden without disrupting the visitor traversal.
class LeafVisitor implements Visitor {
@@ -1471,25 +1473,25 @@ typedef void StackAction();
/// Calls `process*` for all nodes in a tree.
/// For simple usage, only override the `process*` methods.
-///
+///
/// To avoid deep recursion, this class uses an "action stack" containing
/// callbacks to be invoked after the processing of some term has finished.
-///
+///
/// To avoid excessive overhead from the action stack, basic blocks of
/// interior nodes are iterated in a loop without using the action stack.
-///
+///
/// The iteration order can be controlled by overriding the `traverse*`
/// methods for [LetCont], [LetPrim], [LetMutable], [LetHandler] and
/// [Continuation].
-///
+///
/// The `traverse*` methods return the expression to visit next, and may
/// push other subterms onto the stack using [push] or [pushAction] to visit
/// them later. Actions pushed onto the stack will be executed after the body
/// has been processed (and the stack actions it pushed have been executed).
-///
-/// By default, the `traverse` methods visit all non-recursive subterms,
+///
+/// By default, the `traverse` methods visit all non-recursive subterms,
/// push all bound continuations on the stack, and return the body of the term.
-///
+///
/// Subclasses should not override the `visit` methods for the nodes that have
/// a `traverse` method.
class RecursiveVisitor extends LeafVisitor {
« no previous file with comments | « pkg/compiler/lib/src/compile_time_constants.dart ('k') | pkg/compiler/lib/src/dart_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698