|
@@ -2703,7 +2703,7 @@ begin
|
|
'$mod.vB = $mod.vA + $mod.vA;',
|
|
'$mod.vB = $mod.vA + $mod.vA;',
|
|
'$mod.vB = Math.floor($mod.vA / $mod.vB);',
|
|
'$mod.vB = Math.floor($mod.vA / $mod.vB);',
|
|
'$mod.vB = $mod.vA % $mod.vB;',
|
|
'$mod.vB = $mod.vA % $mod.vB;',
|
|
- '$mod.vB = ($mod.vA + ($mod.vA * $mod.vB)) + Math.floor($mod.vA / $mod.vB);',
|
|
|
|
|
|
+ '$mod.vB = $mod.vA + ($mod.vA * $mod.vB) + Math.floor($mod.vA / $mod.vB);',
|
|
'$mod.vC = -$mod.vA;',
|
|
'$mod.vC = -$mod.vA;',
|
|
'$mod.vA = $mod.vA - $mod.vB;',
|
|
'$mod.vA = $mod.vA - $mod.vB;',
|
|
'$mod.vB = $mod.vA;',
|
|
'$mod.vB = $mod.vA;',
|
|
@@ -2916,13 +2916,13 @@ begin
|
|
' function Nesty(pA) {',
|
|
' function Nesty(pA) {',
|
|
' var Result$1 = 0;',
|
|
' var Result$1 = 0;',
|
|
' var vB = 0;',
|
|
' var vB = 0;',
|
|
- ' Result$1 = (((pA + vB) + vC) + pD) + $mod.vInUnit;',
|
|
|
|
|
|
+ ' Result$1 = pA + vB + vC + pD + $mod.vInUnit;',
|
|
' Result$1 = 3;',
|
|
' Result$1 = 3;',
|
|
' Result = 4;',
|
|
' Result = 4;',
|
|
' return Result$1;',
|
|
' return Result$1;',
|
|
' return Result$1;',
|
|
' return Result$1;',
|
|
' };',
|
|
' };',
|
|
- ' Result = (pA + vB) + vC;',
|
|
|
|
|
|
+ ' Result = pA + vB + vC;',
|
|
' Result = 6;',
|
|
' Result = 6;',
|
|
' return Result;',
|
|
' return Result;',
|
|
' return Result;',
|
|
' return Result;',
|
|
@@ -3852,7 +3852,7 @@ begin
|
|
'this.B = 3 + 1;',
|
|
'this.B = 3 + 1;',
|
|
'var C = 3 + 1;',
|
|
'var C = 3 + 1;',
|
|
'var D = 4 + 1;',
|
|
'var D = 4 + 1;',
|
|
- 'var E = ((5 + 4) + 4) + 3;',
|
|
|
|
|
|
+ 'var E = 5 + 4 + 4 + 3;',
|
|
'this.DoIt = function () {',
|
|
'this.DoIt = function () {',
|
|
'};',
|
|
'};',
|
|
'']),
|
|
'']),
|
|
@@ -5647,9 +5647,9 @@ begin
|
|
'this.DoIt = function () {',
|
|
'this.DoIt = function () {',
|
|
' function Sub() {',
|
|
' function Sub() {',
|
|
' cB$1 = cB$1 + 3;',
|
|
' cB$1 = cB$1 + 3;',
|
|
- ' cA = (cA + 3) + 5;',
|
|
|
|
|
|
+ ' cA = cA + 3 + 5;',
|
|
' };',
|
|
' };',
|
|
- ' cA = (cA + 2) + 6;',
|
|
|
|
|
|
+ ' cA = cA + 2 + 6;',
|
|
'};'
|
|
'};'
|
|
]),
|
|
]),
|
|
LinesToStr([
|
|
LinesToStr([
|
|
@@ -6605,11 +6605,11 @@ begin
|
|
'$mod.s = ""+$mod.b;',
|
|
'$mod.s = ""+$mod.b;',
|
|
'$mod.s = ""+$mod.i;',
|
|
'$mod.s = ""+$mod.i;',
|
|
'$mod.s = rtl.floatToStr($mod.d);',
|
|
'$mod.s = rtl.floatToStr($mod.d);',
|
|
- '$mod.s = (""+$mod.i)+$mod.i;',
|
|
|
|
|
|
+ '$mod.s = ""+$mod.i+$mod.i;',
|
|
'$mod.s = rtl.spaceLeft(""+$mod.i,3);',
|
|
'$mod.s = rtl.spaceLeft(""+$mod.i,3);',
|
|
'$mod.s = rtl.floatToStr($mod.d,3,2);',
|
|
'$mod.s = rtl.floatToStr($mod.d,3,2);',
|
|
'$mod.s = rtl.spaceLeft("" + $mod.i, 4) + $mod.i;',
|
|
'$mod.s = rtl.spaceLeft("" + $mod.i, 4) + $mod.i;',
|
|
- '$mod.s = ("" + $mod.i) + rtl.spaceLeft("" + $mod.i, 5);',
|
|
|
|
|
|
+ '$mod.s = "" + $mod.i + rtl.spaceLeft("" + $mod.i, 5);',
|
|
'$mod.s = rtl.spaceLeft("" + $mod.i, 4) + rtl.spaceLeft("" + $mod.i, 5);',
|
|
'$mod.s = rtl.spaceLeft("" + $mod.i, 4) + rtl.spaceLeft("" + $mod.i, 5);',
|
|
'$mod.s = $mod.s + $mod.s;',
|
|
'$mod.s = $mod.s + $mod.s;',
|
|
'$mod.s = $mod.s + "foo";',
|
|
'$mod.s = $mod.s + "foo";',
|
|
@@ -7490,7 +7490,7 @@ begin
|
|
'var $tmp1 = $mod.s;',
|
|
'var $tmp1 = $mod.s;',
|
|
'if ($tmp1 === "foo") {',
|
|
'if ($tmp1 === "foo") {',
|
|
' $mod.s = $mod.h}',
|
|
' $mod.s = $mod.h}',
|
|
- ' else if (($tmp1.length === 1) && (($tmp1 >= "a") && ($tmp1 <= "z"))) $mod.h = $mod.s;',
|
|
|
|
|
|
+ ' else if (($tmp1.length === 1) && ($tmp1 >= "a") && ($tmp1 <= "z")) $mod.h = $mod.s;',
|
|
'']));
|
|
'']));
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -7953,7 +7953,7 @@ begin
|
|
'this.Arr = rtl.arraySetLength(null, $mod.TRec, 2);',
|
|
'this.Arr = rtl.arraySetLength(null, $mod.TRec, 2);',
|
|
'']),
|
|
'']),
|
|
LinesToStr([ // $mod.$main
|
|
LinesToStr([ // $mod.$main
|
|
- '$mod.Arr[0].Int = (2 + 1) + 2;']));
|
|
|
|
|
|
+ '$mod.Arr[0].Int = 2 + 1 + 2;']));
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure TTestModule.TestArrayOfSet;
|
|
procedure TTestModule.TestArrayOfSet;
|
|
@@ -8402,7 +8402,7 @@ begin
|
|
' var s = "";',
|
|
' var s = "";',
|
|
' for (var $l1 = 0, $end2 = rtl.length(a) - 1; $l1 <= $end2; $l1++) {',
|
|
' for (var $l1 = 0, $end2 = rtl.length(a) - 1; $l1 <= $end2; $l1++) {',
|
|
' i = $l1;',
|
|
' i = $l1;',
|
|
- ' s = a[(rtl.length(a) - i) - 1];',
|
|
|
|
|
|
+ ' s = a[rtl.length(a) - i - 1];',
|
|
' };',
|
|
' };',
|
|
'};',
|
|
'};',
|
|
'this.s = "";',
|
|
'this.s = "";',
|
|
@@ -8687,7 +8687,7 @@ begin
|
|
'this.OneStr = [7];',
|
|
'this.OneStr = [7];',
|
|
'this.Chars = ["a", "o", "c"];',
|
|
'this.Chars = ["a", "o", "c"];',
|
|
'this.Names = ["a", "foo"];',
|
|
'this.Names = ["a", "foo"];',
|
|
- 'this.NameCount = (0 + (rtl.length($mod.Names) - 1)) + rtl.length($mod.Names);',
|
|
|
|
|
|
+ 'this.NameCount = 0 + (rtl.length($mod.Names) - 1) + rtl.length($mod.Names);',
|
|
'this.i = 0;',
|
|
'this.i = 0;',
|
|
'']),
|
|
'']),
|
|
LinesToStr([ // $mod.$main
|
|
LinesToStr([ // $mod.$main
|
|
@@ -8733,7 +8733,7 @@ begin
|
|
'this.OneStr = rtl.arrayConcatN([7],[8]);',
|
|
'this.OneStr = rtl.arrayConcatN([7],[8]);',
|
|
'this.Chars = ["a", "o", "c"];',
|
|
'this.Chars = ["a", "o", "c"];',
|
|
'this.Names = ["a", "a"];',
|
|
'this.Names = ["a", "a"];',
|
|
- 'this.NameCount = (0 + (rtl.length($mod.Names) - 1)) + rtl.length($mod.Names);',
|
|
|
|
|
|
+ 'this.NameCount = 0 + (rtl.length($mod.Names) - 1) + rtl.length($mod.Names);',
|
|
'']),
|
|
'']),
|
|
LinesToStr([ // $mod.$main
|
|
LinesToStr([ // $mod.$main
|
|
'']));
|
|
'']));
|
|
@@ -9234,9 +9234,9 @@ begin
|
|
' this.Enums = {};',
|
|
' this.Enums = {};',
|
|
' };',
|
|
' };',
|
|
' this.$equal = function (b) {',
|
|
' this.$equal = function (b) {',
|
|
- ' return (this.Int === b.Int) && ((this.D === b.D) && ((this.Arr === b.Arr)',
|
|
|
|
- ' && (rtl.arrayEq(this.Arr2, b.Arr2)',
|
|
|
|
- ' && (this.Small.$equal(b.Small) && rtl.eqSet(this.Enums, b.Enums)))));',
|
|
|
|
|
|
+ ' return (this.Int === b.Int) && (this.D === b.D) && (this.Arr === b.Arr)',
|
|
|
|
+ ' && rtl.arrayEq(this.Arr2, b.Arr2)',
|
|
|
|
+ ' && this.Small.$equal(b.Small) && rtl.eqSet(this.Enums, b.Enums);',
|
|
' };',
|
|
' };',
|
|
'};',
|
|
'};',
|
|
'this.r = new $mod.TBigRec();',
|
|
'this.r = new $mod.TBigRec();',
|
|
@@ -9557,7 +9557,7 @@ begin
|
|
' this.f = {};',
|
|
' this.f = {};',
|
|
' };',
|
|
' };',
|
|
' this.$equal = function (b) {',
|
|
' this.$equal = function (b) {',
|
|
- ' return (this.i === b.i) && (rtl.eqCallback(this.Event, b.Event) && rtl.eqSet(this.f, b.f));',
|
|
|
|
|
|
+ ' return (this.i === b.i) && rtl.eqCallback(this.Event, b.Event) && rtl.eqSet(this.f, b.f);',
|
|
' };',
|
|
' };',
|
|
'};',
|
|
'};',
|
|
'this.TNested = function (s) {',
|
|
'this.TNested = function (s) {',
|
|
@@ -9659,7 +9659,7 @@ begin
|
|
' this.o = rtl.arraySetLength(null, 0, 2);',
|
|
' this.o = rtl.arraySetLength(null, 0, 2);',
|
|
' };',
|
|
' };',
|
|
' this.$equal = function (b) {',
|
|
' this.$equal = function (b) {',
|
|
- ' return (this.a === b.a) && (rtl.arrayEq(this.s, b.s) && (rtl.arrayEq(this.m, b.m) && rtl.arrayEq(this.o, b.o)));',
|
|
|
|
|
|
+ ' return (this.a === b.a) && rtl.arrayEq(this.s, b.s) && rtl.arrayEq(this.m, b.m) && rtl.arrayEq(this.o, b.o);',
|
|
' };',
|
|
' };',
|
|
'};',
|
|
'};',
|
|
'']),
|
|
'']),
|
|
@@ -9722,7 +9722,7 @@ begin
|
|
' this.p = new $mod.TPoint();',
|
|
' this.p = new $mod.TPoint();',
|
|
' };',
|
|
' };',
|
|
' this.$equal = function (b) {',
|
|
' this.$equal = function (b) {',
|
|
- ' return (this.i === b.i) && ((this.a === b.a) && (rtl.arrayEq(this.s, b.s) && (rtl.arrayEq(this.m, b.m) && this.p.$equal(b.p))));',
|
|
|
|
|
|
+ ' return (this.i === b.i) && (this.a === b.a) && rtl.arrayEq(this.s, b.s) && rtl.arrayEq(this.m, b.m) && this.p.$equal(b.p);',
|
|
' };',
|
|
' };',
|
|
'};',
|
|
'};',
|
|
'this.r = new $mod.TRec({',
|
|
'this.r = new $mod.TRec({',
|
|
@@ -17295,7 +17295,7 @@ begin
|
|
' this.D4 = 0;',
|
|
' this.D4 = 0;',
|
|
' };',
|
|
' };',
|
|
' this.$equal = function (b) {',
|
|
' this.$equal = function (b) {',
|
|
- ' return (this.D1 === b.D1) && ((this.D2 === b.D2) && ((this.D3 === b.D3) && (this.D4 === b.D4)));',
|
|
|
|
|
|
+ ' return (this.D1 === b.D1) && (this.D2 === b.D2) && (this.D3 === b.D3) && (this.D4 === b.D4);',
|
|
' };',
|
|
' };',
|
|
'};',
|
|
'};',
|
|
'this.DoConstGUIDIt = function (g) {',
|
|
'this.DoConstGUIDIt = function (g) {',
|
|
@@ -17410,7 +17410,7 @@ begin
|
|
' this.D4 = 0;',
|
|
' this.D4 = 0;',
|
|
' };',
|
|
' };',
|
|
' this.$equal = function (b) {',
|
|
' this.$equal = function (b) {',
|
|
- ' return (this.D1 === b.D1) && ((this.D2 === b.D2) && ((this.D3 === b.D3) && (this.D4 === b.D4)));',
|
|
|
|
|
|
+ ' return (this.D1 === b.D1) && (this.D2 === b.D2) && (this.D3 === b.D3) && (this.D4 === b.D4);',
|
|
' };',
|
|
' };',
|
|
'};',
|
|
'};',
|
|
'rtl.createClass($mod, "TObject", null, function () {',
|
|
'rtl.createClass($mod, "TObject", null, function () {',
|