|
@@ -10456,9 +10456,9 @@ begin
|
|
'rtl.recNewT($mod, "TBigRec", function () {',
|
|
'rtl.recNewT($mod, "TBigRec", function () {',
|
|
' this.Int = 0;',
|
|
' this.Int = 0;',
|
|
' this.D = 0.0;',
|
|
' this.D = 0.0;',
|
|
- ' this.Arr = [];',
|
|
|
|
' this.$new = function () {',
|
|
' this.$new = function () {',
|
|
' var r = Object.create(this);',
|
|
' var r = Object.create(this);',
|
|
|
|
+ ' r.Arr = [];',
|
|
' r.Arr2 = rtl.arraySetLength(null, 0, 2);',
|
|
' r.Arr2 = rtl.arraySetLength(null, 0, 2);',
|
|
' r.Small = $mod.TSmallRec.$new();',
|
|
' r.Small = $mod.TSmallRec.$new();',
|
|
' r.Enums = {};',
|
|
' r.Enums = {};',
|
|
@@ -10470,7 +10470,7 @@ begin
|
|
' this.$assign = function (s) {',
|
|
' this.$assign = function (s) {',
|
|
' this.Int = s.Int;',
|
|
' this.Int = s.Int;',
|
|
' this.D = s.D;',
|
|
' this.D = s.D;',
|
|
- ' this.Arr = s.Arr;',
|
|
|
|
|
|
+ ' this.Arr = rtl.arrayRef(s.Arr);',
|
|
' this.Arr2 = s.Arr2.slice(0);',
|
|
' this.Arr2 = s.Arr2.slice(0);',
|
|
' this.Small.$assign(s.Small);',
|
|
' this.Small.$assign(s.Small);',
|
|
' this.Enums = rtl.refSet(s.Enums);',
|
|
' this.Enums = rtl.refSet(s.Enums);',
|
|
@@ -10925,9 +10925,9 @@ begin
|
|
CheckSource('TestRecord_FieldArray',
|
|
CheckSource('TestRecord_FieldArray',
|
|
LinesToStr([ // statements
|
|
LinesToStr([ // statements
|
|
'rtl.recNewT($mod, "TRec", function () {',
|
|
'rtl.recNewT($mod, "TRec", function () {',
|
|
- ' this.a = [];',
|
|
|
|
' this.$new = function () {',
|
|
' this.$new = function () {',
|
|
' var r = Object.create(this);',
|
|
' var r = Object.create(this);',
|
|
|
|
+ ' r.a = [];',
|
|
' r.s = rtl.arraySetLength(null, 0, 2);',
|
|
' r.s = rtl.arraySetLength(null, 0, 2);',
|
|
' r.m = rtl.arraySetLength(null, 0, 2, 2);',
|
|
' r.m = rtl.arraySetLength(null, 0, 2, 2);',
|
|
' r.o = rtl.arraySetLength(null, 0, 2);',
|
|
' r.o = rtl.arraySetLength(null, 0, 2);',
|
|
@@ -10937,7 +10937,7 @@ begin
|
|
' 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);',
|
|
' };',
|
|
' };',
|
|
' this.$assign = function (s) {',
|
|
' this.$assign = function (s) {',
|
|
- ' this.a = s.a;',
|
|
|
|
|
|
+ ' this.a = rtl.arrayRef(s.a);',
|
|
' this.s = s.s.slice(0);',
|
|
' this.s = s.s.slice(0);',
|
|
' this.m = s.m.slice(0);',
|
|
' this.m = s.m.slice(0);',
|
|
' this.o = s.o.slice(0);',
|
|
' this.o = s.o.slice(0);',
|
|
@@ -10991,9 +10991,9 @@ begin
|
|
'});',
|
|
'});',
|
|
'rtl.recNewT($mod, "TRec", function () {',
|
|
'rtl.recNewT($mod, "TRec", function () {',
|
|
' this.i = 0;',
|
|
' this.i = 0;',
|
|
- ' this.a = [];',
|
|
|
|
' this.$new = function () {',
|
|
' this.$new = function () {',
|
|
' var r = Object.create(this);',
|
|
' var r = Object.create(this);',
|
|
|
|
+ ' r.a = [];',
|
|
' r.s = rtl.arraySetLength(null, 0, 2);',
|
|
' r.s = rtl.arraySetLength(null, 0, 2);',
|
|
' r.m = rtl.arraySetLength(null, 0, 2, 2);',
|
|
' r.m = rtl.arraySetLength(null, 0, 2, 2);',
|
|
' r.p = $mod.TPoint.$new();',
|
|
' r.p = $mod.TPoint.$new();',
|
|
@@ -11004,7 +11004,7 @@ begin
|
|
' };',
|
|
' };',
|
|
' this.$assign = function (s) {',
|
|
' this.$assign = function (s) {',
|
|
' this.i = s.i;',
|
|
' this.i = s.i;',
|
|
- ' this.a = s.a;',
|
|
|
|
|
|
+ ' this.a = rtl.arrayRef(s.a);',
|
|
' this.s = s.s.slice(0);',
|
|
' this.s = s.s.slice(0);',
|
|
' this.m = s.m.slice(0);',
|
|
' this.m = s.m.slice(0);',
|
|
' this.p.$assign(s.p);',
|
|
' this.p.$assign(s.p);',
|
|
@@ -11400,9 +11400,9 @@ begin
|
|
'}, true);',
|
|
'}, true);',
|
|
'rtl.recNewT($mod, "TRec", function () {',
|
|
'rtl.recNewT($mod, "TRec", function () {',
|
|
' this.i = 0;',
|
|
' this.i = 0;',
|
|
- ' this.a = [];',
|
|
|
|
' this.$new = function () {',
|
|
' this.$new = function () {',
|
|
' var r = Object.create(this);',
|
|
' var r = Object.create(this);',
|
|
|
|
+ ' r.a = [];',
|
|
' r.s = rtl.arraySetLength(null, 0, 2);',
|
|
' r.s = rtl.arraySetLength(null, 0, 2);',
|
|
' r.m = rtl.arraySetLength(null, 0, 2, 2);',
|
|
' r.m = rtl.arraySetLength(null, 0, 2, 2);',
|
|
' r.p = $mod.TPoint.$new();',
|
|
' r.p = $mod.TPoint.$new();',
|
|
@@ -11413,7 +11413,7 @@ begin
|
|
' };',
|
|
' };',
|
|
' this.$assign = function (s) {',
|
|
' this.$assign = function (s) {',
|
|
' this.i = s.i;',
|
|
' this.i = s.i;',
|
|
- ' this.a = s.a;',
|
|
|
|
|
|
+ ' this.a = rtl.arrayRef(s.a);',
|
|
' this.s = s.s.slice(0);',
|
|
' this.s = s.s.slice(0);',
|
|
' this.m = s.m.slice(0);',
|
|
' this.m = s.m.slice(0);',
|
|
' this.p.$assign(s.p);',
|
|
' this.p.$assign(s.p);',
|
|
@@ -28683,14 +28683,18 @@ begin
|
|
CheckSource('TestRTTI_Record',
|
|
CheckSource('TestRTTI_Record',
|
|
LinesToStr([ // statements
|
|
LinesToStr([ // statements
|
|
'rtl.recNewT($mod, "TFloatRec", function () {',
|
|
'rtl.recNewT($mod, "TFloatRec", function () {',
|
|
- ' this.c = [];',
|
|
|
|
- ' this.d = [];',
|
|
|
|
|
|
+ ' this.$new = function () {',
|
|
|
|
+ ' var r = Object.create(this);',
|
|
|
|
+ ' r.c = [];',
|
|
|
|
+ ' r.d = [];',
|
|
|
|
+ ' return r;',
|
|
|
|
+ ' };',
|
|
' this.$eq = function (b) {',
|
|
' this.$eq = function (b) {',
|
|
' return (this.c === b.c) && (this.d === b.d);',
|
|
' return (this.c === b.c) && (this.d === b.d);',
|
|
' };',
|
|
' };',
|
|
' this.$assign = function (s) {',
|
|
' this.$assign = function (s) {',
|
|
- ' this.c = s.c;',
|
|
|
|
- ' this.d = s.d;',
|
|
|
|
|
|
+ ' this.c = rtl.arrayRef(s.c);',
|
|
|
|
+ ' this.d = rtl.arrayRef(s.d);',
|
|
' return this;',
|
|
' return this;',
|
|
' };',
|
|
' };',
|
|
' $mod.$rtti.$DynArray("TFloatRec.d$a", {',
|
|
' $mod.$rtti.$DynArray("TFloatRec.d$a", {',
|