Jonas Maebe
b60e50b2b0
- reverted 679f3968901f0d565644d59e046eb25d5402f027, because it requires
...
support for concat_multi for ansistrings to prevent compilation
problems there
git-svn-id: branches/jvmbackend@18545 -
2011-08-20 08:09:10 +00:00
Jonas Maebe
54bb881a1b
* print an error for invalid type conversions
...
git-svn-id: branches/jvmbackend@18544 -
2011-08-20 08:09:05 +00:00
Jonas Maebe
63962043a5
* fixed fake nested procedures support
...
git-svn-id: branches/jvmbackend@18543 -
2011-08-20 08:09:00 +00:00
Jonas Maebe
000c502c9c
+ fake shortstring temp support
...
git-svn-id: branches/jvmbackend@18542 -
2011-08-20 08:08:54 +00:00
Jonas Maebe
1c1fe26ebd
* refactored isstringconv/isrecordconv
...
* fixed checking of array element compatibility (also have to check
for both strings/records)
git-svn-id: branches/jvmbackend@18541 -
2011-08-20 08:08:49 +00:00
Jonas Maebe
8ec1ba797d
* put single quotes around identifiers so they cannot be confused with
...
opcodes by Jasmin
git-svn-id: branches/jvmbackend@18540 -
2011-08-20 08:08:44 +00:00
Jonas Maebe
4dfdcfd139
* fixed uninitialised var-parameters in isstringconv
...
git-svn-id: branches/jvmbackend@18539 -
2011-08-20 08:08:39 +00:00
Jonas Maebe
bdb6cf5561
* fixed uninitialised var-parameters in isrecordconv
...
git-svn-id: branches/jvmbackend@18538 -
2011-08-20 08:08:34 +00:00
Jonas Maebe
278a581666
+ jdk15 unit with jdk 1.5 header translation
...
git-svn-id: branches/jvmbackend@18537 -
2011-08-20 08:08:21 +00:00
Jonas Maebe
4cd9908339
* don't mangle local variable and parameter names using the method name,
...
since those names are only used for debug info. Only the names of
staticvarsyms in local symtables (typed constants, variable initialisers)
have to be mangled like that since they'll become fields in the global
scope
git-svn-id: branches/jvmbackend@18536 -
2011-08-20 08:08:10 +00:00
Jonas Maebe
e403ddca0c
* enabled generic multi-string concatenation optimization now that var
...
parameters for strings work (although they're not as efficient as
function results for the JVM target)
git-svn-id: branches/jvmbackend@18535 -
2011-08-20 08:08:05 +00:00
Jonas Maebe
1795eff237
+ support for emiting "signature" attributes for fields and methods; these
...
are JVM annotations used by Java's generics support. They cannot be used
for FPC's generics support, but they are useful in other cases
* emit classrefdefs as java.lang.Class, with a signature annotation that
indicates which class they actually refer to
git-svn-id: branches/jvmbackend@18534 -
2011-08-20 08:08:00 +00:00
Jonas Maebe
2610cea230
- removed orphan helpers
...
git-svn-id: branches/jvmbackend@18533 -
2011-08-20 08:07:54 +00:00
Jonas Maebe
6614f3220c
* check implementedinterfaces also when going from a Java class to
...
a Java interface
git-svn-id: branches/jvmbackend@18532 -
2011-08-20 08:07:50 +00:00
Jonas Maebe
cd42bdc42f
* load implementedinterfaces for odt_javaclass
...
git-svn-id: branches/jvmbackend@18531 -
2011-08-20 08:07:45 +00:00
Jonas Maebe
4298992619
* fixed checkcast operations for unicodestrings: replace the definition
...
with java_jlstring in that case, because we have to insert the type
without L prefix and ; suffix for that opcode (which is not done for
objectdefs/recorddefs)
git-svn-id: branches/jvmbackend@18530 -
2011-08-20 08:07:40 +00:00
Jonas Maebe
b8f6c42ec7
* don't insert checkcast operations for types that are considered to be
...
te_equal
git-svn-id: branches/jvmbackend@18529 -
2011-08-20 08:07:35 +00:00
Jonas Maebe
e8ec2c45af
* fixed invokeinterface usage: must also specify the number of stack
...
slots used by the call
git-svn-id: branches/jvmbackend@18528 -
2011-08-20 08:07:30 +00:00
Jonas Maebe
c9537e3347
+ support for non-array/record var parameter on the JVM target using
...
copy-in/out
git-svn-id: branches/jvmbackend@18527 -
2011-08-20 08:07:24 +00:00
Jonas Maebe
e7eb34e3a6
* make current_except_loc also valid while processing the default exception
...
block, since it can contain an anonymous "raise" statement to reraise
the exception
git-svn-id: branches/jvmbackend@18526 -
2011-08-20 08:07:17 +00:00
Jonas Maebe
f75a5895d8
* fixed crash for global constants after previous change
...
git-svn-id: branches/jvmbackend@18525 -
2011-08-20 08:07:12 +00:00
Jonas Maebe
a6e196bfd6
* don't write local constants of procedures, because their names may clash
...
(the JVM doesn't have a concept of local constants, so they were made
global)
git-svn-id: branches/jvmbackend@18524 -
2011-08-20 08:07:07 +00:00
Jonas Maebe
845f50448c
+ support for qword div/mod via helper (the JVM only supports signed
...
64 bit division natively)
git-svn-id: branches/jvmbackend@18523 -
2011-08-20 08:07:02 +00:00
Jonas Maebe
be1ff9ff92
* fixed handling of OP_SHL,OP_SHR,OP_SAR in op_ref_stack (second operand
...
is always a 32 bit int)
git-svn-id: branches/jvmbackend@18522 -
2011-08-20 08:06:57 +00:00
Jonas Maebe
2bb13723ae
* don't use raw bitcasts for tc_int_2_real type conversions
...
git-svn-id: branches/jvmbackend@18521 -
2011-08-20 08:06:49 +00:00
Jonas Maebe
6a6ab5beac
* converted SAR code to hlcgobj
...
git-svn-id: branches/jvmbackend@18520 -
2011-08-20 08:06:44 +00:00
Jonas Maebe
dbaaf1c3cd
* fixed copy/paste errors in a_op_reg_ref() from a_op_ref_reg()
...
git-svn-id: branches/jvmbackend@18519 -
2011-08-20 08:06:39 +00:00
Jonas Maebe
3e5b70d80d
* cpu64bitaddr -> cpu64bitalu check to determine whether we need special
...
handling for 64 add-nodes
* call the generic ordinal handler for 64 add nodes on the JVM
git-svn-id: branches/jvmbackend@18518 -
2011-08-20 08:06:35 +00:00
Jonas Maebe
bd69e52451
* fixed writing string constants > 255 characters
...
git-svn-id: branches/jvmbackend@18517 -
2011-08-20 08:06:30 +00:00
Jonas Maebe
6e0b73ad88
* handle string/jlstring/jlobject typecasts properly again after the reworked
...
typeconversion handling
+ support for class reference types in the JVM (although without class virtual
methods, they're not that useful)
git-svn-id: branches/jvmbackend@18516 -
2011-08-20 08:06:25 +00:00
Jonas Maebe
10a7532968
* differentiate between typecasts on the assignment side or not, because we
...
cannot insert typecasting checks on the assignment side, only on the
values that are being assigned
o since valid_for_assignment() is called in tassignmentnode.typecheckpass()
after typecheckpassing left and right, moved the conversion of the
typecheck nodes into JVM-specific constructs from typecheckpass to
pass_1, so that they can use the information whether they are on
the assignment side or not
* forbid casting a child type to a parent type on the assignment side on
managed platforms, because that circumvents the type checking
git-svn-id: branches/jvmbackend@18515 -
2011-08-20 08:06:20 +00:00
Jonas Maebe
77707a447e
* fixed fake ansistring length() support
...
git-svn-id: branches/jvmbackend@18514 -
2011-08-20 08:06:14 +00:00
Jonas Maebe
50dd6489c4
* support default properties for Java classes
...
git-svn-id: branches/jvmbackend@18513 -
2011-08-20 08:06:09 +00:00
Jonas Maebe
80a63197e3
+ support for unaryminus for the JVM target (integer via generic code, float
...
JVM-specific code)
git-svn-id: branches/jvmbackend@18512 -
2011-08-20 08:06:05 +00:00
Jonas Maebe
f764a72d85
* fixed evaluation stack height count for OP_NEG and non-64 bit opertions
...
git-svn-id: branches/jvmbackend@18511 -
2011-08-20 08:06:00 +00:00
Jonas Maebe
694ccf3df3
+ dummy support for untyped var/const/out parameters on the JVM target
...
o includes basic "auto-boxing" infrastructure to support Delphi.NET-
compatible untyped parameters as described at
http://hallvards.blogspot.com/2007/10/dn4dp24-net-vs-win32-untyped-parameters.html
git-svn-id: branches/jvmbackend@18510 -
2011-08-20 08:05:54 +00:00
Jonas Maebe
4c152ccb7d
* converted tcgnotnode.second_integer() to hlcg
...
git-svn-id: branches/jvmbackend@18509 -
2011-08-20 08:05:48 +00:00
Jonas Maebe
3259eae110
* fixed typecasting checks from/to arrays of records
...
git-svn-id: branches/jvmbackend@18508 -
2011-08-20 08:05:43 +00:00
Jonas Maebe
739c654e3a
+ support for main programs for the JVM target
...
o moved several routines from pmodules to ngenutil and overrode them
in njvmutil (for unit initialisation tables, resource strings, ...)
o force the evaluation stack size to at least 1 for the main program,
because the unit initialisation triggers are inserted there afterwards
and they require one stack slot
git-svn-id: branches/jvmbackend@18507 -
2011-08-20 08:05:38 +00:00
Jonas Maebe
e775e2d9ae
* moved gen_entry_code/gen_exit_code from ncgutil to hlcgobj,
...
and overrode both with empty stubs for the JVM
git-svn-id: branches/jvmbackend@18506 -
2011-08-20 08:05:33 +00:00
Jonas Maebe
f20e347c7e
* dummy support for copying arrays of variant/set
...
git-svn-id: branches/jvmbackend@18505 -
2011-08-20 08:05:28 +00:00
Jonas Maebe
7a5d334951
+ support for copy(dynarray)
...
git-svn-id: branches/jvmbackend@18504 -
2011-08-20 08:05:23 +00:00
Jonas Maebe
ecba07c6a8
* greatly simplified dynamic array handling by making use of the
...
java.lang.reflect functionality
git-svn-id: branches/jvmbackend@18503 -
2011-08-20 08:05:17 +00:00
Jonas Maebe
6c35ea202b
+ added several reflection classes for use in array processing
...
git-svn-id: branches/jvmbackend@18502 -
2011-08-20 08:05:12 +00:00
Jonas Maebe
49de6346ce
* replaced manual array copy loops with calls to JLSystem.arraycopy(); still
...
separate helper per array element type because there is no generic array
type, and we need to get the length of the arrays
git-svn-id: branches/jvmbackend@18501 -
2011-08-20 08:05:07 +00:00
Jonas Maebe
622107c605
* moved support for copy() from pinline to ninl, so it can be (partially)
...
overridden for targets that require it
git-svn-id: branches/jvmbackend@18500 -
2011-08-20 08:05:02 +00:00
Jonas Maebe
c75246706d
+ stubbed ansistring support (using ansistrings compiles, but does not
...
generate working code)
git-svn-id: branches/jvmbackend@18499 -
2011-08-20 08:04:57 +00:00
Jonas Maebe
d1a1d30e04
* unless compiled with -dnounsupported, the compiler will now accept not
...
only JVM constructs that are already implemented, but also ones that
will be supported in the future but that aren't implemented yet (to
make it easier to already adapt code to the future changes)
git-svn-id: branches/jvmbackend@18498 -
2011-08-20 08:04:51 +00:00
Jonas Maebe
4491dafd48
* exit once we've found a target-specific handler for a type
...
conversion node so later checks won't try to further convert it
git-svn-id: branches/jvmbackend@18497 -
2011-08-20 08:04:45 +00:00
Jonas Maebe
a729201e37
* map normal sets to R_ADDRESSREGISTER
...
git-svn-id: branches/jvmbackend@18496 -
2011-08-20 08:04:40 +00:00