| Index: pkg/compiler/lib/src/cps_ir/cps_fragment.dart
|
| diff --git a/pkg/compiler/lib/src/cps_ir/cps_fragment.dart b/pkg/compiler/lib/src/cps_ir/cps_fragment.dart
|
| index 9bdb9ea15f882f2e4078ca1b9748d7841c50ec39..a9190ddf77aea155692d8abd5577be719ce2a22e 100644
|
| --- a/pkg/compiler/lib/src/cps_ir/cps_fragment.dart
|
| +++ b/pkg/compiler/lib/src/cps_ir/cps_fragment.dart
|
| @@ -33,19 +33,19 @@ import '../elements/elements.dart';
|
| ///
|
| /// If `condition` is true then invoke `cont1`, else `cont2`.
|
| ///
|
| -/// cps.ifTrue(condition).invokeContinuation(cont1, []);
|
| +/// cps.ifTruthy(condition).invokeContinuation(cont1, []);
|
| /// cps.invokeContinuation(cont2, []);
|
| ///
|
| /// If `condition` is true then invoke `cont` with a bound primitive:
|
| ///
|
| -/// CpsFragment branch = cps.ifTrue(condition);
|
| +/// CpsFragment branch = cps.ifTruthy(condition);
|
| /// branch.invokeContinuation(cont, [branch.letPrim(arg)]);
|
| ///
|
| /// Loop and call a method until it returns false:
|
| ///
|
| /// Continuation loop = cps.beginLoop();
|
| /// var result = cps.invokeMethod(receiver, selector, ...);
|
| -/// cps.ifFalse(result).invokeContinuation(exit, []);
|
| +/// cps.ifFalsy(result).invokeContinuation(exit, []);
|
| /// cps.continueLoop(loop);
|
| ///
|
| class CpsFragment {
|
| @@ -198,11 +198,11 @@ class CpsFragment {
|
| /// Returns a new fragment for the 'then' branch.
|
| ///
|
| /// The 'else' branch becomes the new hole.
|
| - CpsFragment ifTrue(Primitive condition) {
|
| + CpsFragment ifTruthy(Primitive condition) {
|
| Continuation trueCont = new Continuation(<Parameter>[]);
|
| Continuation falseCont = new Continuation(<Parameter>[]);
|
| put(new LetCont.two(trueCont, falseCont,
|
| - new Branch(new IsTrue(condition), trueCont, falseCont)));
|
| + new Branch.loose(condition, trueCont, falseCont)));
|
| context = falseCont;
|
| return new CpsFragment(sourceInformation, trueCont);
|
| }
|
| @@ -212,11 +212,11 @@ class CpsFragment {
|
| /// Returns a new fragment for the 'else' branch.
|
| ///
|
| /// The 'then' branch becomes the new hole.
|
| - CpsFragment ifFalse(Primitive condition) {
|
| + CpsFragment ifFalsy(Primitive condition) {
|
| Continuation trueCont = new Continuation(<Parameter>[]);
|
| Continuation falseCont = new Continuation(<Parameter>[]);
|
| put(new LetCont.two(trueCont, falseCont,
|
| - new Branch(new IsTrue(condition), trueCont, falseCont)));
|
| + new Branch.loose(condition, trueCont, falseCont)));
|
| context = trueCont;
|
| return new CpsFragment(sourceInformation, falseCont);
|
| }
|
|
|