copied before funcretnode because it may contain tempdeletenodes
that turn a temp to "delete on next use", with the use in the
funcretnode)
git-svn-id: branches/jvmbackend@20141 -
of the jdk15 unit in that case)
* adjusted testall.sh script so it can also be used to test class
files compiled for Android (still with the JVM though)
git-svn-id: branches/jvmbackend@19835 -
(= Android 4.0) java headers: java.*, javax.*, org.*, junit.*, android.*).
The RTL can also be used to target earlier versions of the Android
platform, but you manually have to take care of not using APIs that
weren't available yet. Adding separate units for separate platform
versions would only partly solve the problem, because some of the
classes used inside the system unit have also changed across
versions.
Use -Tandroid while compiling to select the Android OS as target
platform.
git-svn-id: branches/jvmbackend@19830 -
their upper bound is lower than 127/32767: not necessary, and in case
of booleans not even allowed for Dalvik (because the "and" operation
turns the boolean into an integer as far as Dalvik is concerned)
git-svn-id: branches/jvmbackend@19825 -
classes, interfaces, dynamic arrays, ...) as "array of JLObject",
but instead as an array of the actual pointed-to type. The reason
for the previous behaviour was mainly that the JVM threadvar
implementation internally stores all threadvars that are
such double pointer types into an "array of JLObject". Type casting
this array to e.g. an "array of array of byte" causes an exception
even if it only contains "array of byte" instances (since the outer
array type is different). This is now solved by first taking the
element of the array and then typecasting it to the destination
type (so dynarrbyte(arr[0]) instead of pdynarrbyte(arr)^[0]).
The reason for the new (more accurate) behaviour is because the
old one caused type errors in case a double pointer field was
internally created for the nestedfpstruct support (see added
test)
git-svn-id: branches/jvmbackend@19821 -
(previously, only the .j file for the unit itself was deleted,
and the ones for classes/interfaces remained behind)
git-svn-id: branches/jvmbackend@19750 -
on unix platforms, so that $ is not interpreted as the start of a
variable name (several jvm assembler file names include $ signs)
-- note: the behaviour of that code depended and still depends on
on the platform for which the compiler was compiled, instead
on the platform for which the script is generated. That still
needs to be fixed
git-svn-id: branches/jvmbackend@19749 -
make CPU_TARGET=jvm OS_TARGET=java all
("make install" does not yet fully work: the classes under
rtl/units/jvm-java/org/freepascal/rtl aren't installed yet)
git-svn-id: branches/jvmbackend@19747 -
verifier when -Cpjvmdalvik is used (including debug information). Using
-Cpjvmdalvik changes the semantics at the language-level in one case:
boolean(bytevar) will no longer return a boolean that contains the same
value as bytevar did, but will map the value to 0/1 (that also means that
such expressions cannot be passed to var-parameters in case of
-Cpjvmdalvik). Code compiled with -Cpjvmdalvik will also work fine on
the regular JVM, but it may be somewhat slower (it won't necessarily
be slower on Dalvik, because the .class -> .dex transformation
applies many optimizations itself)
git-svn-id: branches/jvmbackend@19743 -
those are also supported by the Java language (intftype.class) and required
in equivalent Pascal expressions (such as JLClass(intftype))
git-svn-id: branches/jvmbackend@19742 -
implicit pointer types into the nestedfpstruct, so that the original
parameter is properly changed when updated from inside nested routines
git-svn-id: branches/jvmbackend@19645 -
+ -CTcompactintarrayinit command line option to change the code generation
for typed array of some kind of integer-type initialization so that it
takes up less space in the bytecode (because the bytecode for all
routines, including the class initialization code that contains the
typed constant init code, is limited 64kb, large array or multiple
array constants could fairly easily bump into that limit)
git-svn-id: branches/jvmbackend@19638 -
set the external name of the underlying class type to the internal name
instead of to an (invalid) empty string
git-svn-id: branches/jvmbackend@19555 -
the JVM, because those are always cross-compilations and the utilities
involved (such as the java binary) don't have a prefix. That's also why
the JVM snapshots contain their own fpc.cfg file, because fpc.cfg files
from current releases obviously don't contain a special case for the JVM
target.
git-svn-id: branches/jvmbackend@19233 -
are used to implement procvar types, and add a constructor to the procvar
types that accept an instance implementing this interface -> much easier
and more natural to use procvar types from Java code
git-svn-id: branches/jvmbackend@19216 -
routine at the same or a higher nesting level in case the current
nested routine's framepointer was not part of the nestedfpstruct
(because it doesn't have nested routines itself, or because those
don't access any data in parent routines) on targets with explicit
parentfpstruct management (JVM) + adapted test
git-svn-id: branches/jvmbackend@19164 -
or published, because interface methods are always public and
hence mapping them to a private/protected method increases the
visibility of the underlying method (error on JVM target because
the JVM doesn't like that, warning on other platforms)
git-svn-id: branches/jvmbackend@19156 -
var-parameters on the JVM target for changes to the value passed
as var-parameter during the function call (because they are handled
via copy-in/copy-out, this may indicate unexpected bahviour later on).
out-parameters are checked in the same way, except if the out-parameter
is a local variable because then reading it before the call may result
in a bytecode verification error (since the variable may not yet be
initialized)
git-svn-id: branches/jvmbackend@19153 -
on the JVM target, because the generated code was invalid and I can't think
of a generic way to solve it (see added comments in njvmcal.pas)
git-svn-id: branches/jvmbackend@19055 -
o don't try to create .class files for generic types
o still generate all JVM-specific wrappers for generic types even though they
won't be written out, because when specializing all the defid's have to
match exactly
o add synthetic routine implementations after generating the specializations,
so that the synthetic routines for those specializations are also generated
(we don't specialize generic versions of the synthetic generic routines
because it's not easy or even always possible to create valid generic
versions of synthetic routines)
o Note: these are Pascal-style generics, not Java-style generics. The generic
types nor their specializations are usable from Java code (specializations
may become usable in the future)
git-svn-id: branches/jvmbackend@19047 -
call a procvar (includes virtual constructors and virtual class methods),
and raise its getCause() so that the original exception is propagated to
the caller
git-svn-id: branches/jvmbackend@19030 -
r18906 from byte into sizeint (copy/paste error from the similar shortstring
helper, where both source and destination are shortstrings)
git-svn-id: branches/jvmbackend@18939 -