Activity Not Available

Commits : Individual Commit

  Analyzed 3 months ago based on code collected 3 months ago.

Commit ID

Avatar Contributor: Jonas Maebe
as jonas
Files Modified: 401
Date: 26-April-2012 at 22:36 Lines Added: 91962
Repository: http://svn.freepascal.org/svn/fpc/trunk /trunk Lines Removed: 7030
Commit Comment: * merged the jvmbackend branch
General:
o support for Java/JVM and Android/JVM targets, with support for most
common language features (classes, records, all array types,
enumerations, signed and unsigned integers, currency, threadvar,
typed constants, generics, exceptions, ansistring, ...) and limited
support for others (such as pointers and formal var/out parameters).
See http://wiki.freepascal.org/FPC_JVM/Language for more details
o fpcjres utility to pack "resource files" (= any file specified via
{$r xxx}, without any processing) into jar files
o {$modeswitch unicodestrings} modeswitch that changes "string" into
"unicodestring", "char" unto "widechar" and "pchar" into "pwidechar".
Note that the latter two are achieved by automatically adding a unit
(uuchar) to the uses clause that overrides these types, so it does not
(yet) work for the system unit. If this modeswitch is enabled, {$H+/-}
switches between string=unicodestring and string=shortstring, but the
state of the {$H}-switch has no effect on the definition of char/pchar.
o {$namespace x.y.z} directive to set the package namespace of a unit
on the JVM target (does not do anything on other targets). Dotted unit
names do not yet influence the namespace of generated JVM classes
o javapp utility to create Pascal headers from Java class files

Compiler:
o new high level code generator in the compiler that uses high level type
information, including a wrapper that passes everything through to the
existing low level code generators for existing native targets
(hlcgobj.pas, hlcg2ll.pas, <arch>/hlcgcpu.pas). Several routines have
also migrated from ncgutil.pas to hlcgobj.pas
o quite a bit of code in ncg*.pas has been converted to use the new
high level code generator so that it works for both existing targets
and the new JVM target (mostly replacing tcgsize parameters with tdef
parameters, or adding some tdef size parameters) -- this one should
always be used in common code, tgobj.gettemp() should only be used in
architecture-specific code from now on
o new tgobj.gethltemp() routine that also specifies the tdef of the
requested temp for high level code generator use
o tcgpara now also contains the def of the parameter for use by the
high level code generator
o support for nested routines without making use of a framepointer, by
grouping variables accessed from nested routines into a record and
passing a pointer to this record to the nested routines (ncgnstld.pas,
ncgnstmm.pas)
o support for internally generating and parsing Pascal code in the
compiler for routine declarations and implementations (symcreat.pas)
o parsing a recorddef and an objectdef method declaration has been
factored out so this code can be reused by symcreat.pas
o support for duplicating and slightly modifying procdefs
(symdef.tprocdef.getcopy, symcreat.finish_copied_procdef)
o cchartype has been renamed into cansichartype
o new TSymStr type that is used as string type for symbols and mangled
names. The default is still pshortstring on all platforms, but for the
JVM targets it's ansistring because it sometimes needs symbols > 255
characters
o it is no longer allowed to use sysutils.executeprocess() from the
compiler, except via the the wrapper cfilutil.RequotedExecuteProcess()
so that the compiler can correctly deal with the
sysutils.executeprocess() limitation of only supporting double quotes
o new getpointerdef(def), getsingletonarraydef(def) and
getarraydef(def,count) helpers in symdef to create/get reusable pointer/
arraydefs for another def (mostly used for the JVM target currently)
o several parameter parsing helpers have been moved from pdecsub.pas to
pparautl.pas
o the type checking and firstpass for setlength() and copy() has been
moved from pinline.pas to ninl.pas so it can be overridden by target-
specific versions
o commented the ttempinfoflag values in nbas, and the ttemptype flags
in globtype
o new "reference" ttempcreatenode type, which can be used to create a
reference to (~ hold the address of) another node, even on targets that
do not support taking the address of an arbitrary memory location and
store it into a virtual register (such as the JVM target).
o secondpass no longer takes a var-parameter, since it doesn't change
the received node
o many routines from pmodules.pas and some from nutils.pas have been
moved to ngenutil.pas as virtual class methods so they can be
overridden with target-specific versions
o the code of a single JVM routine is limited to 64KB bytecode, which can
be fairly easily reached when having large array constants because they
have to be initialized element by element in the unit initialisation
code -> -CTcompactarrayinit switch to use alternate (slightly slower)
initialisation of arrays on the JVM targets that uses much less code
space
o it is now possible to override the individual typecheck helpers of
ttypeconvnode
o most of the code from ptconst.pas has moved to ngtcon.pas, and has been
turned into a class that splits most of the parsing and data/code
generation for typed constants into separate routines. Separate
implementations are now available that either generate initialised data
(native targets) or assignment nodes for explicit initialisation at
run time (JVM)

RTL:
o many extra ifdefs to common RTL include files to enable overriding
helpers with JVM-specific helpers
o some internal move-alternatives for the RTL that also can be overridden
by the JVM target to enable sharing more code between managed and
native targets

Tests:
o a number of JVM-specific tests have been added to tests/test/jvm.
They can be executed via the provided testall.sh/.bat scripts.
Because standard I/O is not yet available in the Java/Android RTL,
most regular tests can't be compiled yet.

Note: currently, compiling a JVM compiler requires adding ALLOW_WARNINGS=1
to the make command line
 

Changes by Language

Language Code Added Code Removed Comments Added Comment Removed Blanks Added Blanks Removed
  Pascal 58966 4282 5772 505 11086 167
  Make 7968 2076 6 0 0 0
  Java 5292 0 1818 0 680 0
  DOS batch script 238 0 0 0 1 0
  shell script 130 0 1 0 4 0

Changes by File

Showing page 1 of 41
File Language Code Added Code Removed Comments Added Comment Removed Blanks Added Blanks Removed
compiler/aasmbase.pas Pascal 6 6 0 0 0 0
compiler/aasmdata.pas Pascal 10 10 0 0 0 0
compiler/aasmtai.pas Pascal 116 9 20 0 24 0
compiler/agjasmin.pas Pascal 1021 0 91 0 124 0
compiler/arm/hlcgcpu.pas Pascal 13 0 18 0 14 0
compiler/arm/narmset.pas Pascal 13 9 0 0 0 0
compiler/assemble.pas Pascal 3 3 0 0 0 0
compiler/avr/hlcgcpu.pas Pascal 13 0 18 0 14 0
compiler/cclasses.pas Pascal 68 54 18 0 2 0
compiler/cfileutl.pas Pascal 260 4 3 0 27 0
 
 
 

Creative Commons License Copyright © 2013 Black Duck Software, Inc. and its contributors, Some Rights Reserved. Unless otherwise marked, this work is licensed under a Creative Commons Attribution 3.0 Unported License . Ohloh ® and the Ohloh logo are trademarks of Black Duck Software, Inc. in the United States and/or other jurisdictions. All other trademarks are the property of their respective holders.