mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-07-23 17:56:06 +02:00

implemented via classes, all descending from system.FpcBaseRecordType (records are also considered to be "related" to system.FpcBaseRecordType on the JVM target) * several routines are auto-generated for all record-classes: apart from a default constructor (if there is none), also clone (which returns a new instance containing a deep copy of the current instance) and deepCopy (which copies all fields of one instance into another one) o added new field "synthetickind" to tprocdef that indicates what kind of synthetically generated method it is (if any), and mark such methods also as "synthetic" in the JVM assembler code o split off the JVM-specific parser code (e.g., to add default constructors) into pjvm.pas git-svn-id: branches/jvmbackend@18450 -
51 lines
1.6 KiB
PHP
51 lines
1.6 KiB
PHP
{
|
|
This file is part of the Free Pascal run time library.
|
|
Copyright (c) 2011 by Jonas Maebe
|
|
member of the Free Pascal development team
|
|
|
|
See the file COPYING.FPC, included in this distribution,
|
|
for details about the copyright.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
**********************************************************************}
|
|
|
|
procedure fpc_initialize_array_dynarr_intern(arr: TJObjectArray; normalarrdim: longint); external name 'fpc_initialize_array_dynarr';
|
|
|
|
procedure fpc_initialize_array_dynarr(arr: TJObjectArray; normalarrdim: longint);compilerproc;
|
|
var
|
|
i: longint;
|
|
begin
|
|
if normalarrdim > 0 then
|
|
begin
|
|
for i:=low(arr) to high(arr) do
|
|
fpc_initialize_array_dynarr_intern(TJObjectArray(arr[i]),normalarrdim-1);
|
|
end
|
|
else
|
|
begin
|
|
for i:=low(arr) to high(arr) do
|
|
arr[i]:=nil;
|
|
end;
|
|
end;
|
|
|
|
procedure fpc_initialize_array_record_intern(arr: TJObjectArray; normalarrdim: longint; inst: FpcBaseRecordType); external name 'fpc_initialize_array_record';
|
|
|
|
procedure fpc_initialize_array_record(arr: TJObjectArray; normalarrdim: longint; inst: FpcBaseRecordType);compilerproc;
|
|
var
|
|
i: longint;
|
|
begin
|
|
if normalarrdim > 0 then
|
|
begin
|
|
for i:=low(arr) to high(arr) do
|
|
fpc_initialize_array_record_intern(TJObjectArray(arr[i]),normalarrdim-1,inst);
|
|
end
|
|
else
|
|
begin
|
|
for i:=low(arr) to high(arr) do
|
|
arr[i]:=inst.clone;
|
|
end;
|
|
end;
|
|
|