diff options
| author | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2011-08-20 08:00:50 +0000 |
|---|---|---|
| committer | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2011-08-20 08:00:50 +0000 |
| commit | a994084a3c1320f26011d6fbf885b5e665b6cc16 (patch) | |
| tree | 646190e6753a2718c650fc1d468462eec75d7bca /rtl/java/jrec.inc | |
| parent | 5b97fd0398586074ee621029240235e673d98e1d (diff) | |
| download | fpc-a994084a3c1320f26011d6fbf885b5e665b6cc16.tar.gz | |
+ support for (only named, for now) records in the JVM target:
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: http://svn.freepascal.org/svn/fpc/branches/jvmbackend@18450 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'rtl/java/jrec.inc')
| -rw-r--r-- | rtl/java/jrec.inc | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/rtl/java/jrec.inc b/rtl/java/jrec.inc new file mode 100644 index 0000000000..fce9183167 --- /dev/null +++ b/rtl/java/jrec.inc @@ -0,0 +1,32 @@ +{ + This file is part of the Free Pascal run time library. + Copyright (c) 2011 by Jonas Maebe, + members of the Free Pascal development team. + + This file implements support infrastructure for records under the JVM + + 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. + + **********************************************************************} + + constructor FpcBaseRecordType.create; + begin + end; + + + function FpcBaseRecordType.clone: JLObject; + begin + result:=inherited; + end; + + + function FpcBaseRecordType.newEmpty: FpcBaseRecordType; + begin + result:=FpcBaseRecordType(inherited clone); + end; + |
