o tobjectdef.jvm_full_typename() now gets an extra parameter to determine
whether or not the package name should be prepended, so it can be easily
used to generate the name of the .j file and of the class name inside it
git-svn-id: branches/jvmbackend@18384 -
to tasnode (like for regular Object Pascal classes)
* don't collect WPO information for Java classes in tloadvmtaddrnode.pass_1()
(devirtualization can't work for Java, since classes can always be loaded
at run time, except for final/sealed classes -- but that's not yet
implemented)
+ JVM is-node support, unified JVM type checking codegen for is- and as-nodes
git-svn-id: branches/jvmbackend@18383 -
tloadvmtaddrnode.pass_typecheck(), because tas/isnode().pass_typecheck()
checks codegenerror afterwards to determine whether an error occurred
git-svn-id: branches/jvmbackend@18382 -
o since the JVM does not support call-by-reference, setlength() works
by taking an argument pointing to the old array and one to the new
array (the latter is always created in advance on the caller side,
even if not strictly required, because we cannot easily create it
on the callee side in an efficient way). Then we copy parts of the
old array to the new array as necessary
o to represent creating a new dynamic array, the JVM target uses
an in_new_x tinlinenode
+ tasnode support for the JVM. Special: it can also be used to convert
java.lang.Object to dynamic arrays, and dynamic arrays of java.lang.Object
to dynamic arrays with more dimensions (arrays are special JVM objects,
and such support is required for the setlength support)
+ check whether explicit type conversions are valid, and if so, add the
necessary conversion code since we cannot simply reinterpret bit patterns
in most cases in the JVM:
o in case of class and/or dynamic array types, convert to an as-node
o in case of int-to-float or float-to-int, use java.lang.Float/Double
helpers (+ added the definitions of these helpers to the system unit)
git-svn-id: branches/jvmbackend@18378 -
for regular temps. This is required for targets that need special
handling of the temps depending on the type
* converted most gettemp() calls to gethltemp() calls
git-svn-id: branches/jvmbackend@18376 -
as-nodes (required for JVM target: bit pattern reinterpretations
have to be handled via conversion because of type safety reasons,
and as-nodes will also have to be able to handled class<->dynarray
checks/conversions)
git-svn-id: branches/jvmbackend@18375 -
generated from Pascal source code, but they will be generated by the
JVM backend to construct new array instances
git-svn-id: branches/jvmbackend@18374 -
do nothing for finalization, assign nil pointer for dynamic arrays
and refcounted strings (not required for JVM per se, but required
because programmer's may use them without initialising them first
and then they should be empty rather than invalid)
git-svn-id: branches/jvmbackend@18368 -
nutils.pas into virtual class methods of a new tnodeutils class defined
in ngenutil (global factory: cnodeutils), so they can be overridden by
architecture-specific implementations (required by the JVM backend)
git-svn-id: branches/jvmbackend@18364 -
(pushedparasize is already expressed in number of stackslots rather
than in bytes)
o when determining the number of stack slots to pop after calling a function
and not using its function result, round up the function result size to
the nearest multiple of 4 before determining the number os tack slots (to
correctly handle byte/word-sized results)
git-svn-id: branches/jvmbackend@18362 -
o self is encoded as "this" for javac compatibility
+ ait_jvar (for the above) and ait_jcatch (similar, for future try/catch
support) classes
+ support for smallset JVM type encoding (as int)
git-svn-id: branches/jvmbackend@18354 -
Jasmin assembler we use is a Java program, so the "assembler binary" is
java itself (which is a native program for the current host in any case)
git-svn-id: branches/jvmbackend@18350 -
o hlcgobj support in tcgsubscriptnode.pass_2 for JVM-required functionality
o slightly different handling for class fields for the JVM than for other
platforms: instead of adding a unit-level staticvarsym with a hidden name,
rename the original (unused) field and add the staticvarsym with the original
name to the object symtable. This is required because the JVM code generator
has to know the class the field belongs to, as well as its real name
o moved tprocdef.makejvmmangledcallname() functionality mostly to
jvmdef.jvmaddtypeownerprefix() because it's also required for mangling
field symbol names
* changed the interface of jvmdef from ansistring to shortstring because
all of its results are also used in shortstring contexts (and they're
unlikely to overflow the shortstring limit)
* "protected", "private" (without strict) and implementation-only symbols
now get "package" visibility instead of "public" visibility
git-svn-id: branches/jvmbackend@18349 -
since the definition-specific adorning of JVM mangled names is Jasmin-
specific, and such code has no place in symdef
* moved code to adorn JVM mangled names for Jasmin definitions to agjasmin
git-svn-id: branches/jvmbackend@18346 -
and skip comments (so it works again when -ar is used, because
tlhcgjvm.inc/decstack() insert comments in that case)
git-svn-id: branches/jvmbackend@18340 -
o changed type of opsize field of tcgcasenode from tcgsize into tdef,
and fixed compilation of other code generator units after this change
git-svn-id: branches/jvmbackend@18339 -
that's how these operations also work on other architectures
* fixed tjvmaddnode.second_generic_compare() for this new order
git-svn-id: branches/jvmbackend@18338 -
operation is 32 bit, not 64 bit (both in the compiler and in the
JVM)
* request a 64 rather than a 32 bit shift operation from tjvmshlshrnode
if the result is 64 bit (rather than in case shift value is 64 bit,
since as described above that never happens)
git-svn-id: branches/jvmbackend@18337 -