generator to the typecheck pass, so that it also works for platforms
that use the parentfpstruct way to handle accesses to nested frames
in case the array has been migrated to such a parentfpstruct
o additionally, the number of comparisons for such range checks
has been reduced from 3 (for signed indices) or 2 (for unsigned
indices) to 1 in all cases
o the range checking code is disabled for the JVM target, as the
JVM automatically range checks all array accesses itself anyway
git-svn-id: trunk@34034 -
all of their values, when kept in a bitpacked array, properly via
pass_typecheck rather than hacking location.size in pass_generate_code:
o the old fix was incomplete (it didn't handle non-constant indices)
o the old fix didn't work for llvm (since it uses defs rather than
location.size)
git-svn-id: trunk@33943 -
* extend tcallnode with the ability to pass a tspecializationcontext so that tcallcandidates can do a final specialization
* the final procdef is registered at the end of tcallnode.pass_typecheck
git-svn-id: trunk@31763 -
type-safe way (for LLVM, and also internal consistency checking between
the VMT as generated in nobj.pas and ncgvmt.pas)
o also converted the VMT validity checking to the node level
git-svn-id: trunk@30950 -
* create separate nodes for Objective-C in tloadvmtaddrnode.pass_1
instead of implicitly relying on the fact that the Objective-C
ISA field is at the same offset as the VMT of Object-Pascal
classes
o translate the resulting loads of ISA field into direct pointer
accesses, so that even on non-fragile ABI platforms we don't
go via an indirection (like clang/gcc)
git-svn-id: trunk@30947 -
Objective-C instance on AArch64, as the latter helper from the runtime
is a plain function call rather than an expensive message dispatch,
and moreover it also works for protocols (the "class" method is part
of NSObject, and protocols do not support it since there is no single
root class and hence they may represent an instance of a class that
does not derive from NSObject)
o also call it to get the "self" pointer when calling class methods for
protocols on AArch64 (fixes tobjc22a and tobjc22b on Darwin/AArch64)
o also call it to get the metaclass of a class on Darwin/AArch64 (fixes
tobjc25)
- removed special handling of getting the Objective-C (meta)class for
non-type nodes on other Darwin platforms, as this is also correctly
handled by the generic pass_generate_code
git-svn-id: trunk@30018 -
load a value from a nested context, or to pass a context to a nested
routine. In case a target uses both the stack and frame pointer, this
difference can matter.
git-svn-id: trunk@29937 -
specific descendent classes and moved the code that deals with this in the
code generator also to target-specific classes -> only ifdefs left in
pdecvar
git-svn-id: trunk@27379 -
o made all (non-abstract) tdef and tsym constructors virtual
o added c*def/c*sym classref types for every (non-abstract) t*def/t*sym
class
o added cpusym unit for every architecture that derives a tcpu*def/tcpu*sym
class from the base classes, and initialises the c*def/c*sym classes with
them. This is done so that the llvm target will be able to derive from
the tcpu*def/sym classes without umpteen ifdefs, and it also means that
the WPO can devirtualise everything because the c* variables are only
initialised with one class type
o replaced all t*def/t*sym constructor calls with c*def/c*sym constructor
calls
git-svn-id: trunk@27361 -
as the hidden parentfp parameter, passed to nested procs. On i8086 it is
always a near pointer, unlike voidpointer (which changes according to the
memory model). This fixes nested procs in i8086 far data memory models.
git-svn-id: trunk@26934 -
o support for the new codepage-aware ansistrings in the jvm branch
o empty ansistrings are now always represented by a nil pointer rather than
by an empty string, because an empty string also has a code page which
can confuse code (although this will make ansistrings harder to use
in Java code)
o more string helpers code shared between the general and jvm rtl
o support for indexbyte/word in the jvm rtl (warning: first parameter
is an open array rather than an untyped parameter there, so
indexchar(pcharvar^,10,0) will be equivalent to
indexchar[pcharvar^],10,0) there, which is different from what is
intended; changing it to an untyped parameter wouldn't help though)
o default() support is not yet complete
o calling fpcres is currently broken due to limitations in
sysutils.executeprocess() regarding handling unix quoting and
the compiler using the same command lines for scripts and directly
calling external programs
o compiling the Java compiler currently requires adding ALLOW_WARNINGS=1
to the make command line
git-svn-id: branches/jvmbackend@20887 -
0, just like gcc/clang. This results in more efficient code on
non-fragile ABI platforms and removes a dependency of the name
of the isa field in header translations
git-svn-id: trunk@20623 -
o allows converting indices to the proper type if required (such as
variant, mantis #20873)
o do not create temporary defs for this type checking anymore if not
necessary
o makes sure that errors are thrown in case of conversions considered
as invalid by the compiler rather than that wrong code is silently
generated (such as in mantis #20873 before this change)
git-svn-id: trunk@20108 -