Skip to content

Commit

Permalink
Issue #2130: Refactoring Span iteration transformations (tests)
Browse files Browse the repository at this point in the history
  • Loading branch information
tombentley committed Jun 18, 2015
1 parent 8668415 commit be5d4bc
Show file tree
Hide file tree
Showing 11 changed files with 154 additions and 154 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ public final class innerMethodInvocation_ {
}
}
final fib_ fib = new fib_();
final long $ceylontmp$start$1 = 0L;
final long $ceylontmp$end$2 = 50L;
final boolean $ceylontmp$increasing$3 = .ceylon.language.Integer.offset($ceylontmp$end$2, $ceylontmp$start$1) >= 0;
final long $ceylontmp$first$1 = 0L;
final long $ceylontmp$last$2 = 50L;
final boolean $ceylontmp$increasing$3 = .ceylon.language.Integer.offset($ceylontmp$last$2, $ceylontmp$first$1) >= 0;
final long $ceylontmp$incr$4 = $ceylontmp$increasing$3 ? 1L : -1L;
loop_0: for (long n$5 = $ceylontmp$start$1; $ceylontmp$increasing$3 ? n$5 - $ceylontmp$end$2 <= 0L : n$5 - $ceylontmp$end$2 >= 0L; n$5 += $ceylontmp$incr$4) {
loop_0: for (long n$5 = $ceylontmp$first$1; $ceylontmp$increasing$3 ? n$5 - $ceylontmp$last$2 <= 0L : n$5 - $ceylontmp$last$2 >= 0L; n$5 += $ceylontmp$incr$4) {
final long n = n$5;
.ceylon.language.print_.print(.ceylon.language.String.instance("n! = " + .ceylon.language.Integer.toString(fib.fib(n))));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ final class bug1227_ifBreak_returnElse_opt_ {
final long from;
long from$12 = 0L;
boolean doforelse$13 = true;
final long $ceylontmp$start$14 = 1L;
final long $ceylontmp$end$15 = 10L;
final boolean $ceylontmp$increasing$16 = .ceylon.language.Integer.offset($ceylontmp$end$15, $ceylontmp$start$14) >= 0;
final long $ceylontmp$first$14 = 1L;
final long $ceylontmp$last$15 = 10L;
final boolean $ceylontmp$increasing$16 = .ceylon.language.Integer.offset($ceylontmp$last$15, $ceylontmp$first$14) >= 0;
final long $ceylontmp$incr$17 = $ceylontmp$increasing$16 ? 1L : -1L;
loop_1: for (long index$18 = $ceylontmp$start$14; $ceylontmp$increasing$16 ? index$18 - $ceylontmp$end$15 <= 0L : index$18 - $ceylontmp$end$15 >= 0L; index$18 += $ceylontmp$incr$17) {
loop_1: for (long index$18 = $ceylontmp$first$14; $ceylontmp$increasing$16 ? index$18 - $ceylontmp$last$15 <= 0L : index$18 - $ceylontmp$last$15 >= 0L; index$18 += $ceylontmp$incr$17) {
final long index = index$18;
if (someBoolean) {
from$12 = index;
Expand Down Expand Up @@ -145,11 +145,11 @@ final class bug1227_ifBreak_specifiedElse_opt_ {
final long from;
long from$34 = 0L;
boolean doforelse$35 = true;
final long $ceylontmp$start$36 = 1L;
final long $ceylontmp$end$37 = 10L;
final boolean $ceylontmp$increasing$38 = .ceylon.language.Integer.offset($ceylontmp$end$37, $ceylontmp$start$36) >= 0;
final long $ceylontmp$first$36 = 1L;
final long $ceylontmp$last$37 = 10L;
final boolean $ceylontmp$increasing$38 = .ceylon.language.Integer.offset($ceylontmp$last$37, $ceylontmp$first$36) >= 0;
final long $ceylontmp$incr$39 = $ceylontmp$increasing$38 ? 1L : -1L;
loop_3: for (long index$40 = $ceylontmp$start$36; $ceylontmp$increasing$38 ? index$40 - $ceylontmp$end$37 <= 0L : index$40 - $ceylontmp$end$37 >= 0L; index$40 += $ceylontmp$incr$39) {
loop_3: for (long index$40 = $ceylontmp$first$36; $ceylontmp$increasing$38 ? index$40 - $ceylontmp$last$37 <= 0L : index$40 - $ceylontmp$last$37 >= 0L; index$40 += $ceylontmp$incr$39) {
final long index = index$40;
if (someBoolean) {
from$34 = index;
Expand Down Expand Up @@ -252,11 +252,11 @@ final class bug1227_ifBreak_elseBreak_specifiedElse_opt_ {
final long from;
long from$58 = 0L;
boolean doforelse$59 = true;
final long $ceylontmp$start$60 = 1L;
final long $ceylontmp$end$61 = 10L;
final boolean $ceylontmp$increasing$62 = .ceylon.language.Integer.offset($ceylontmp$end$61, $ceylontmp$start$60) >= 0;
final long $ceylontmp$first$60 = 1L;
final long $ceylontmp$last$61 = 10L;
final boolean $ceylontmp$increasing$62 = .ceylon.language.Integer.offset($ceylontmp$last$61, $ceylontmp$first$60) >= 0;
final long $ceylontmp$incr$63 = $ceylontmp$increasing$62 ? 1L : -1L;
loop_5: for (long index$64 = $ceylontmp$start$60; $ceylontmp$increasing$62 ? index$64 - $ceylontmp$end$61 <= 0L : index$64 - $ceylontmp$end$61 >= 0L; index$64 += $ceylontmp$incr$63) {
loop_5: for (long index$64 = $ceylontmp$first$60; $ceylontmp$increasing$62 ? index$64 - $ceylontmp$last$61 <= 0L : index$64 - $ceylontmp$last$61 >= 0L; index$64 += $ceylontmp$incr$63) {
final long index = index$64;
if (someBoolean) {
from$58 = index;
Expand Down Expand Up @@ -364,11 +364,11 @@ final class bug1227_ifReturn_specifiedElse_opt_ {
final boolean someBoolean = ((.ceylon.language.Boolean).ceylon.language.nothing_.get_()).booleanValue();
final long from;
long from$81 = 0L;
final long $ceylontmp$start$82 = 1L;
final long $ceylontmp$end$83 = 10L;
final boolean $ceylontmp$increasing$84 = .ceylon.language.Integer.offset($ceylontmp$end$83, $ceylontmp$start$82) >= 0;
final long $ceylontmp$first$82 = 1L;
final long $ceylontmp$last$83 = 10L;
final boolean $ceylontmp$increasing$84 = .ceylon.language.Integer.offset($ceylontmp$last$83, $ceylontmp$first$82) >= 0;
final long $ceylontmp$incr$85 = $ceylontmp$increasing$84 ? 1L : -1L;
loop_7: for (long index$86 = $ceylontmp$start$82; $ceylontmp$increasing$84 ? index$86 - $ceylontmp$end$83 <= 0L : index$86 - $ceylontmp$end$83 >= 0L; index$86 += $ceylontmp$incr$85) {
loop_7: for (long index$86 = $ceylontmp$first$82; $ceylontmp$increasing$84 ? index$86 - $ceylontmp$last$83 <= 0L : index$86 - $ceylontmp$last$83 >= 0L; index$86 += $ceylontmp$incr$85) {
final long index = index$86;
if (someBoolean) {
from$81 = index;
Expand Down Expand Up @@ -445,11 +445,11 @@ final class bug1227_ifThrow_specifiedElse_opt_ {
final boolean someBoolean = ((.ceylon.language.Boolean).ceylon.language.nothing_.get_()).booleanValue();
final long from;
long from$102 = 0L;
final long $ceylontmp$start$103 = 1L;
final long $ceylontmp$end$104 = 10L;
final boolean $ceylontmp$increasing$105 = .ceylon.language.Integer.offset($ceylontmp$end$104, $ceylontmp$start$103) >= 0;
final long $ceylontmp$first$103 = 1L;
final long $ceylontmp$last$104 = 10L;
final boolean $ceylontmp$increasing$105 = .ceylon.language.Integer.offset($ceylontmp$last$104, $ceylontmp$first$103) >= 0;
final long $ceylontmp$incr$106 = $ceylontmp$increasing$105 ? 1L : -1L;
loop_9: for (long index$107 = $ceylontmp$start$103; $ceylontmp$increasing$105 ? index$107 - $ceylontmp$end$104 <= 0L : index$107 - $ceylontmp$end$104 >= 0L; index$107 += $ceylontmp$incr$106) {
loop_9: for (long index$107 = $ceylontmp$first$103; $ceylontmp$increasing$105 ? index$107 - $ceylontmp$last$104 <= 0L : index$107 - $ceylontmp$last$104 >= 0L; index$107 += $ceylontmp$incr$106) {
final long index = index$107;
if (someBoolean) {
from$102 = index;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ public final class bug1438_ {
foo = "if";
} else {
boolean doforelse$2 = true;
final long $ceylontmp$start$3 = 0L;
final long $ceylontmp$end$4 = 10L;
final boolean $ceylontmp$increasing$5 = .ceylon.language.Integer.offset($ceylontmp$end$4, $ceylontmp$start$3) >= 0;
final long $ceylontmp$first$3 = 0L;
final long $ceylontmp$last$4 = 10L;
final boolean $ceylontmp$increasing$5 = .ceylon.language.Integer.offset($ceylontmp$last$4, $ceylontmp$first$3) >= 0;
final long $ceylontmp$incr$6 = $ceylontmp$increasing$5 ? 1L : -1L;
loop_0: for (long i$7 = $ceylontmp$start$3; $ceylontmp$increasing$5 ? i$7 - $ceylontmp$end$4 <= 0L : i$7 - $ceylontmp$end$4 >= 0L; i$7 += $ceylontmp$incr$6) {
loop_0: for (long i$7 = $ceylontmp$first$3; $ceylontmp$increasing$5 ? i$7 - $ceylontmp$last$4 <= 0L : i$7 - $ceylontmp$last$4 >= 0L; i$7 += $ceylontmp$incr$6) {
final long i = i$7;
if (.ceylon.language.system_.get_().getMilliseconds() % 2L == 0L) {
foo$0 = "break";
Expand Down Expand Up @@ -49,11 +49,11 @@ public final class bug1438_2_ {
.java.lang.String foo$11 = null;
if (.ceylon.language.system_.get_().getMilliseconds() % 2L == 0L) {
boolean doforelse$13 = true;
final long $ceylontmp$start$14 = 0L;
final long $ceylontmp$end$15 = 10L;
final boolean $ceylontmp$increasing$16 = .ceylon.language.Integer.offset($ceylontmp$end$15, $ceylontmp$start$14) >= 0;
final long $ceylontmp$first$14 = 0L;
final long $ceylontmp$last$15 = 10L;
final boolean $ceylontmp$increasing$16 = .ceylon.language.Integer.offset($ceylontmp$last$15, $ceylontmp$first$14) >= 0;
final long $ceylontmp$incr$17 = $ceylontmp$increasing$16 ? 1L : -1L;
loop_1: for (long i$18 = $ceylontmp$start$14; $ceylontmp$increasing$16 ? i$18 - $ceylontmp$end$15 <= 0L : i$18 - $ceylontmp$end$15 >= 0L; i$18 += $ceylontmp$incr$17) {
loop_1: for (long i$18 = $ceylontmp$first$14; $ceylontmp$increasing$16 ? i$18 - $ceylontmp$last$15 <= 0L : i$18 - $ceylontmp$last$15 >= 0L; i$18 += $ceylontmp$incr$17) {
final long i = i$18;
if (.ceylon.language.system_.get_().getMilliseconds() % 2L == 0L) {
foo$11 = "break";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ final class bug1507_ {
i = new .com.redhat.ceylon.compiler.java.test.issues.bug15xx.Bug1507IntWrapper(2L);
} else {
boolean doforelse$2 = true;
final long $ceylontmp$start$3 = 0L;
final long $ceylontmp$end$4 = new .java.util.Random().nextInt(.com.redhat.ceylon.compiler.java.Util.toInt(10L));
final boolean $ceylontmp$increasing$5 = .ceylon.language.Integer.offset($ceylontmp$end$4, $ceylontmp$start$3) >= 0;
final long $ceylontmp$first$3 = 0L;
final long $ceylontmp$last$4 = new .java.util.Random().nextInt(.com.redhat.ceylon.compiler.java.Util.toInt(10L));
final boolean $ceylontmp$increasing$5 = .ceylon.language.Integer.offset($ceylontmp$last$4, $ceylontmp$first$3) >= 0;
final long $ceylontmp$incr$6 = $ceylontmp$increasing$5 ? 1L : -1L;
loop_0: for (long j$7 = $ceylontmp$start$3; $ceylontmp$increasing$5 ? j$7 - $ceylontmp$end$4 <= 0L : j$7 - $ceylontmp$end$4 >= 0L; j$7 += $ceylontmp$incr$6) {
loop_0: for (long j$7 = $ceylontmp$first$3; $ceylontmp$increasing$5 ? j$7 - $ceylontmp$last$4 <= 0L : j$7 - $ceylontmp$last$4 >= 0L; j$7 += $ceylontmp$incr$6) {
final long j = j$7;
.java.lang.Object k$9;
if ((k$9 = .com.redhat.ceylon.compiler.java.test.issues.bug15xx.bug1507generateInt_.bug1507generateInt(j == 0L)) != null) {
Expand Down Expand Up @@ -239,11 +239,11 @@ final class bug1507test6_ {
final boolean found;
boolean found$50 = false;
boolean doforelse$51 = true;
final long $ceylontmp$start$52 = 1L;
final long $ceylontmp$end$53 = 2L;
final boolean $ceylontmp$increasing$54 = .ceylon.language.Integer.offset($ceylontmp$end$53, $ceylontmp$start$52) >= 0;
final long $ceylontmp$first$52 = 1L;
final long $ceylontmp$last$53 = 2L;
final boolean $ceylontmp$increasing$54 = .ceylon.language.Integer.offset($ceylontmp$last$53, $ceylontmp$first$52) >= 0;
final long $ceylontmp$incr$55 = $ceylontmp$increasing$54 ? 1L : -1L;
loop_6: for (long i$56 = $ceylontmp$start$52; $ceylontmp$increasing$54 ? i$56 - $ceylontmp$end$53 <= 0L : i$56 - $ceylontmp$end$53 >= 0L; i$56 += $ceylontmp$incr$55) {
loop_6: for (long i$56 = $ceylontmp$first$52; $ceylontmp$increasing$54 ? i$56 - $ceylontmp$last$53 <= 0L : i$56 - $ceylontmp$last$53 >= 0L; i$56 += $ceylontmp$incr$55) {
final long i = i$56;
if (i == 0L) {
found$50 = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ final class keywordInForLoop_ {
}

static void keywordInForLoop(final .ceylon.language.Sequence<? extends .ceylon.language.Integer> seq) {
final long $ceylontmp$start$0 = 1L;
final long $ceylontmp$end$1 = 10L;
final boolean $ceylontmp$increasing$2 = .ceylon.language.Integer.offset($ceylontmp$end$1, $ceylontmp$start$0) >= 0;
final long $ceylontmp$first$0 = 1L;
final long $ceylontmp$last$1 = 10L;
final boolean $ceylontmp$increasing$2 = .ceylon.language.Integer.offset($ceylontmp$last$1, $ceylontmp$first$0) >= 0;
final long $ceylontmp$incr$3 = $ceylontmp$increasing$2 ? 1L : -1L;
loop_0: for (long byte$4 = $ceylontmp$start$0; $ceylontmp$increasing$2 ? byte$4 - $ceylontmp$end$1 <= 0L : byte$4 - $ceylontmp$end$1 >= 0L; byte$4 += $ceylontmp$incr$3) {
loop_0: for (long byte$4 = $ceylontmp$first$0; $ceylontmp$increasing$2 ? byte$4 - $ceylontmp$last$1 <= 0L : byte$4 - $ceylontmp$last$1 >= 0L; byte$4 += $ceylontmp$incr$3) {
final long $byte = byte$4;
if ($byte > 5L) {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ final class bug1878A_ {
}

static boolean bug1878A() {
final long $ceylontmp$start$0 = 1L;
final long $ceylontmp$end$1 = 1L;
final boolean $ceylontmp$increasing$2 = .ceylon.language.Integer.offset($ceylontmp$end$1, $ceylontmp$start$0) >= 0;
final long $ceylontmp$first$0 = 1L;
final long $ceylontmp$last$1 = 1L;
final boolean $ceylontmp$increasing$2 = .ceylon.language.Integer.offset($ceylontmp$last$1, $ceylontmp$first$0) >= 0;
final long $ceylontmp$incr$3 = $ceylontmp$increasing$2 ? 1L : -1L;
loop_0: for (long _$4 = $ceylontmp$start$0; $ceylontmp$increasing$2 ? _$4 - $ceylontmp$end$1 <= 0L : _$4 - $ceylontmp$end$1 >= 0L; _$4 += $ceylontmp$incr$3) {
loop_0: for (long _$4 = $ceylontmp$first$0; $ceylontmp$increasing$2 ? _$4 - $ceylontmp$last$1 <= 0L : _$4 - $ceylontmp$last$1 >= 0L; _$4 += $ceylontmp$incr$3) {
final long _ = _$4;
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ final class bug1878Init_ {

@.com.redhat.ceylon.compiler.java.metadata.TypeInfo("ceylon.language::Anything")
static void bug1878Init() {
final long $ceylontmp$start$0 = 1L;
final long $ceylontmp$end$1 = 1L;
final boolean $ceylontmp$increasing$2 = .ceylon.language.Integer.offset($ceylontmp$end$1, $ceylontmp$start$0) >= 0;
final long $ceylontmp$first$0 = 1L;
final long $ceylontmp$last$1 = 1L;
final boolean $ceylontmp$increasing$2 = .ceylon.language.Integer.offset($ceylontmp$last$1, $ceylontmp$first$0) >= 0;
final long $ceylontmp$incr$3 = $ceylontmp$increasing$2 ? 1L : -1L;
loop_0: for (long _$4 = $ceylontmp$start$0; $ceylontmp$increasing$2 ? _$4 - $ceylontmp$end$1 <= 0L : _$4 - $ceylontmp$end$1 >= 0L; _$4 += $ceylontmp$incr$3) {
loop_0: for (long _$4 = $ceylontmp$first$0; $ceylontmp$increasing$2 ? _$4 - $ceylontmp$last$1 <= 0L : _$4 - $ceylontmp$last$1 >= 0L; _$4 += $ceylontmp$incr$3) {
final long _ = _$4;
.com.redhat.ceylon.compiler.java.test.statement.loop.bug1878_.set_(false);
}
Expand Down Expand Up @@ -54,11 +54,11 @@ class Bug1878 implements .com.redhat.ceylon.compiler.java.runtime.model.ReifiedT

@.com.redhat.ceylon.compiler.java.metadata.TypeInfo("ceylon.language::Anything")
private final void loopInit$priv$() {
final long $ceylontmp$start$5 = 1L;
final long $ceylontmp$end$6 = 1L;
final boolean $ceylontmp$increasing$7 = .ceylon.language.Integer.offset($ceylontmp$end$6, $ceylontmp$start$5) >= 0;
final long $ceylontmp$first$5 = 1L;
final long $ceylontmp$last$6 = 1L;
final boolean $ceylontmp$increasing$7 = .ceylon.language.Integer.offset($ceylontmp$last$6, $ceylontmp$first$5) >= 0;
final long $ceylontmp$incr$8 = $ceylontmp$increasing$7 ? 1L : -1L;
loop_1: for (long _$9 = $ceylontmp$start$5; $ceylontmp$increasing$7 ? _$9 - $ceylontmp$end$6 <= 0L : _$9 - $ceylontmp$end$6 >= 0L; _$9 += $ceylontmp$incr$8) {
loop_1: for (long _$9 = $ceylontmp$first$5; $ceylontmp$increasing$7 ? _$9 - $ceylontmp$last$6 <= 0L : _$9 - $ceylontmp$last$6 >= 0L; _$9 += $ceylontmp$incr$8) {
final long _ = _$9;
setFoo$priv$(false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ class MethodForRange implements .com.redhat.ceylon.compiler.java.runtime.model.R
}

public final void m() {
final long $ceylontmp$start$0 = 1L;
final long $ceylontmp$end$1 = 10L;
final boolean $ceylontmp$increasing$2 = .ceylon.language.Integer.offset($ceylontmp$end$1, $ceylontmp$start$0) >= 0;
final long $ceylontmp$first$0 = 1L;
final long $ceylontmp$last$1 = 10L;
final boolean $ceylontmp$increasing$2 = .ceylon.language.Integer.offset($ceylontmp$last$1, $ceylontmp$first$0) >= 0;
final long $ceylontmp$incr$3 = $ceylontmp$increasing$2 ? 1L : -1L;
loop_0: for (long i$4 = $ceylontmp$start$0; $ceylontmp$increasing$2 ? i$4 - $ceylontmp$end$1 <= 0L : i$4 - $ceylontmp$end$1 >= 0L; i$4 += $ceylontmp$incr$3) {
loop_0: for (long i$4 = $ceylontmp$first$0; $ceylontmp$increasing$2 ? i$4 - $ceylontmp$last$1 <= 0L : i$4 - $ceylontmp$last$1 >= 0L; i$4 += $ceylontmp$incr$3) {
final long i = i$4;
if (i > 5L) {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ class Bug1467 implements .com.redhat.ceylon.compiler.java.runtime.model.ReifiedT
@.com.redhat.ceylon.compiler.java.metadata.TypeInfo("ceylon.language::Anything")
public final void buffer() {
final long startTime = .ceylon.language.system_.get_().getNanoseconds();
final long $ceylontmp$start$3 = 1L;
final long $ceylontmp$end$4 = 100L;
final boolean $ceylontmp$increasing$5 = .ceylon.language.Integer.offset($ceylontmp$end$4, $ceylontmp$start$3) >= 0;
final long $ceylontmp$first$3 = 1L;
final long $ceylontmp$last$4 = 100L;
final boolean $ceylontmp$increasing$5 = .ceylon.language.Integer.offset($ceylontmp$last$4, $ceylontmp$first$3) >= 0;
final long $ceylontmp$incr$6 = $ceylontmp$increasing$5 ? 1L : -1L;
loop_1: for (long i$7 = $ceylontmp$start$3; $ceylontmp$increasing$5 ? i$7 - $ceylontmp$end$4 <= 0L : i$7 - $ceylontmp$end$4 >= 0L; i$7 += $ceylontmp$incr$6) {
loop_1: for (long i$7 = $ceylontmp$first$3; $ceylontmp$increasing$5 ? i$7 - $ceylontmp$last$4 <= 0L : i$7 - $ceylontmp$last$4 >= 0L; i$7 += $ceylontmp$incr$6) {
final long i = i$7;
bufferTest$priv$();
}
Expand Down
Loading

0 comments on commit be5d4bc

Please sign in to comment.