also handle non-formal parameters
* do not copy in the original value in handleformalcopyoutpara() if it's
an out parameter
git-svn-id: branches/jvmbackend@18772 -
can be added to typecast them to pchars)
* fixed array-of-char to ansistring conversion in case of zero-based
array and an embedded #0 (didn't stop at the embedded #0)
git-svn-id: branches/jvmbackend@18766 -
respectively to 0 and 255 (both generally require one memory load);
the setconstn complexity of 255 also caused the node cse to replace
them with temprefn in some cases, which wreaked havoc with the JVM
practice of determining whether in-expressions can be handled by
the generic code generator or not
git-svn-id: branches/jvmbackend@18756 -
variables, class/record fields and arrays with enumtype(0) on
creation, so that using them without explicitly initializing them
doesn't cause a null-pointer exception. If enumtype(0) is not a
valid enum, they are not initialized (and since they wouldn't have
a valid value on native targets either in that case, an exception
on use is acceptable)
git-svn-id: branches/jvmbackend@18755 -
constructors, inherited virtual class methods) when deciding which
overloaded version of a routine to call. Otherwise they can change
which variant is called compared to code on platforms where such
implicit methods are not added
git-svn-id: branches/jvmbackend@18752 -
valid_for_assign() if that routine returns true (in some cases,
it's used to simply check whether we could possibly put it on
the assignment side)
git-svn-id: branches/jvmbackend@18751 -
* added runerror number to JVM FpcRunTimeError exceptions
* enabled calling errorproc when a run time error occurs on the
JVM target
git-svn-id: branches/jvmbackend@18749 -
cpu64bitaddr is not defined rather than if cpu64bitalu is not
defined, because whether or not operations should be 64 bit by
default depends on cpu64bitaddr, and even if a cpu can perform
64 bit alu operations, 32 bit ones are likely faster
git-svn-id: branches/jvmbackend@18748 -
in the system unit for easier debugging)
* disabled a bunch more feature flags by default for the JVM target
* incorporate modified version of inc/systemh.inc (split into two parts:
jsystemh_types.inc and jsystemh.inc, because some of the types are
required for the declaration of the shortstring/ansistring/set/...
classes, which in turn are required for the routine declarations) and
inc/system.inc (as jsystem.inc)
o moved some routines around from old to new locations based on where
they appear in the common files
o added a number of defines that allow skipping more common implementations
in case a platform-specific one is already available
* all base classes (AnsistringClass etc) are now descendants of
JLObject rather than TObject, because their declaration is now parsed
before TObject is known (and there's no need for them to inherit from
TObject)
* incorporate modified version of inc/system.inc
* use the common version of generic.inc, currh.inc, gencurr.inc and
genmath.inc (with small modification to those files)
+ addition of quite a bit of system unit functionality (halt, runerror,
random, round, str() for integer types, abs, odd, endian swapping helpers,
bit scanning, trigonometric functions, ln, exp, ...)
o round()/trunc() for comp-types has been renamed trunc_comp() on the
JVM target because their JVM signature conflicts with trunc(currency)
o the unsigned versions of swapendian() and other endian helpers are not
available on the JVM target because of JVM signature conflicts
git-svn-id: branches/jvmbackend@18746 -
+ include mathh.inc in the system unit, implement most routines based
on java.lang.Math, and use (an unmodified!) genmath for the rest
- removed now obsolete jmathh.inc (was partial copy of mathh.inc)
- removed commented out overrides for several math routines in
njvminl (doesn't make sense to handle them inline in the compiler)
git-svn-id: branches/jvmbackend@18742 -
with wrapper calls, because the parameter nodes are already bound to the
paravarsyms of the current procdef so simply replacing the procsym and
procdef is not enough
git-svn-id: branches/jvmbackend@18739 -
visibility can change. However, simply call the inherited version in
those rather than re-adding the complete dispatching code again
git-svn-id: branches/jvmbackend@18737 -
types involved to determine whether or not the comparison is
unsigned (they don't always match due to bugs in the compiler,
and the sign of the comparison operation is what's used in
other code generators too)
git-svn-id: branches/jvmbackend@18734 -
* catch java.lang.NoSuchMethodException exceptions when resolving a procvar,
because java.lang.Class.getDeclaredMethod() only searches that particular
class itself and not its parents -> in case we get the address of a method
that's not overridden in the current class, also search the parent classes
git-svn-id: branches/jvmbackend@18730 -
in the JVM means "accessible to subclasses *and* to classes in the same
package" (and all classes in the same unit are by definition also in the
same package) -- before, such fields were declared as "package" which means
that they could not be accessed by subclasses in other packages
git-svn-id: branches/jvmbackend@18728 -
type is a forward-defined class whose full definition hasn't been parsed
yet and if the full definition changes the external name of the class
git-svn-id: branches/jvmbackend@18727 -
methods as "virtual" anymore (since they're not virtual, and the
compiler now handles virtual class methods differently)
git-svn-id: branches/jvmbackend@18725 -
on the JVM target (at the Pascal level), by automatically generating
getters/setters of the same visibility as the property that are used
instead of directly accessing the fields when translating the property
git-svn-id: branches/jvmbackend@18724 -
(make_field_static() ) and replaced semi-duplicates of that
code with calls to this routine
* made the handling of static fields for the JVM target more
similar to that on the other targets, so that class properties
now also work there (-> updated JVM-specific code in several
places to deal with this new handling)
git-svn-id: branches/jvmbackend@18723 -