Commit Graph

181 Commits

Author SHA1 Message Date
Jonas Maebe
c3233b21e8 * fixed reference/register types for thlcgobj.a_bit_test_*
git-svn-id: trunk@30717 -
2015-04-25 15:51:22 +00:00
Jonas Maebe
5418978415 * fixed types in thlcgobj.location_get_data_ref
git-svn-id: trunk@30710 -
2015-04-25 15:51:01 +00:00
Jonas Maebe
61e4a1b811 + added tasmlist parameter to getintparaloc() (needed for llvm)
git-svn-id: trunk@30429 -
2015-04-04 14:29:16 +00:00
Jonas Maebe
bd203a5b57 * synchronised with trunk till r30240
git-svn-id: branches/hlcgllvm@30241 -
2015-03-15 19:44:58 +00:00
Jeppe Johansen
914e9e7b49 Merged from trunk
git-svn-id: branches/laksen/armiw@30146 -
2015-03-08 12:33:46 +00:00
Jonas Maebe
67b8aceaee * synchronized with privatetrunk till r30095
git-svn-id: branches/hlcgllvm@30101 -
2015-03-05 20:32:15 +00:00
Jonas Maebe
2ab7f5c35d * moved x86-specific requirements from the generic bsr/bsf code to the
x86 code generator (register size constraints)

git-svn-id: trunk@29984 -
2015-02-23 22:57:18 +00:00
Jonas Maebe
edb3124ae8 * copy arrays passed by value to cdecl routines on the callee side even on
platforms that normally must copy value parameters on the caller side,
    because
   o if we copy them on the caller side, then the behaviour will be different
     compared to other platforms if the called routine is implemented in C
     (since they are passed by reference, changes to the array contents will
      be visible on other platforms, while they wouldn't be visible if the
      copy is made on the caller side)
   o if we don't copy them on the caller nor on the callee side, then behaviour
     will be different compared to other platforms if the called routine is
     implemented in Pascal and modifies the array (since then changes won't be
     visible on the caller side, except on platforms that normally perform
     the copy on the caller side)

git-svn-id: trunk@29873 -
2015-02-23 22:50:29 +00:00
Jonas Maebe
2dbfbd40ab * unified hlcg.g_copyvalueparas and ncgutil.copyvalueparas, they have the
same functionality in the mean time

git-svn-id: trunk@29872 -
2015-02-23 22:50:26 +00:00
Jonas Maebe
6e12ad817f * don't make copies of arrays passed as value parameters to cdecl routines
(since C compilers don't copy such arrays either, as they're implciitly
     pointers)

git-svn-id: trunk@29871 -
2015-02-23 22:50:23 +00:00
Jonas Maebe
c6ba0bb6fb + support for targets that require by-reference value parameters to be
be copied on the caller instead of callee side
   o mark Darwin/Aarch64 as such a target (any AArch64 target will be like
     that normally, as its ABI specifies this behaviour)
   o don't mark by-reference value parameters on such targets as
     vo_has_local_copy, since a) they don't have one (the copy is on the
     caller side), and b) this ensures that all code handling such
     parameters automatically knows that they are still by reference
     after the init code has run
   o when making the copies on the caller side, don't increase the
     reference count for managed types except for variants, just like
     is done when making the copies on the callee side. This is because
     the reference count increasing code on the callee side only runs
     for non-assembler functions, and we cannot know 100% certain on the
     caller side whether the called function is assembler or not (e.g. in
     case of externally declared functions)
   o maybe over time we can reuse the Pascal code in
     tcallparanode.copy_value_by_ref_para to replace the equivalent code
     in hlcgobj and ncgutil also on the caller side for other targets

git-svn-id: trunk@29870 -
2015-02-23 22:50:20 +00:00
Jeppe Johansen
47dbec3111 Rebase to trunk revision
git-svn-id: branches/laksen/armiw@29708 -
2015-02-15 16:08:18 +00:00
Jonas Maebe
fde6448063 * don't directly add something to ref.index in get_bit_reg_ref_sref, as it
may be scaled

git-svn-id: trunk@29583 -
2015-01-30 19:31:18 +00:00
florian
69ac7dd7ef * limit initialization to register variables which really need to be initialized
git-svn-id: trunk@29569 -
2015-01-27 21:51:29 +00:00
Jeppe Johansen
6976af8365 Change .thumb_func to be an ait_directive instead of it's own tai type.
git-svn-id: branches/laksen/armiw@29334 -
2014-12-26 23:13:14 +00:00
Jonas Maebe
cc596225fa + thlcg.g_ptrtypecast_reg/ref() to typecast a pointer in a register, or the
pointer type describing a reference, to another pointer type

git-svn-id: branches/hlcgllvm@28781 -
2014-10-06 20:54:33 +00:00
Jonas Maebe
b745dcc64c * moved g_external_wrapper() to the hlcg, and also g_intf_wrapper() because
for some platforms it depends on that routine

git-svn-id: branches/hlcgllvm@28492 -
2014-08-19 20:22:54 +00:00
Jonas Maebe
0fbaa9e924 * record the alignment of temps, and set it when creating a reference based
on a temp instead of assuming it's always aligned to a multiple of
    the stackpointer size

git-svn-id: branches/hlcgllvm@28490 -
2014-08-19 20:22:48 +00:00
Jonas Maebe
830952cc3b * moved creating a reference based on a ttemprecord to a new virtual method
called temp_to_ref()

git-svn-id: branches/hlcgllvm@28487 -
2014-08-19 20:22:40 +00:00
Jonas Maebe
344acef9b5 * separate tracking the def of a temp and whether or not it needs to be
finalised (for llvm, we always keep track of the def)

git-svn-id: branches/hlcgllvm@28485 -
2014-08-19 20:22:34 +00:00
Jonas Maebe
a637fbe596 * moved all g_exception_*() methods to hlcgobj and cleaned them up (no more
hardcoded registers for the most part)
  + added extra g_exception_discard_reason() that can be called when we only
    want to get rid of the currently pushed exception reason, and don't have
    to load it (so it can do nothing on platforms that don't use push/pop)

git-svn-id: branches/hlcgllvm@28481 -
2014-08-19 20:22:24 +00:00
Jonas Maebe
9a683a0288 * converted new_exception to hlcgobj
o also gets rid of the ifdefs

git-svn-id: branches/hlcgllvm@28377 -
2014-08-10 19:40:32 +00:00
Jonas Maebe
a64897ddee + thlcgobj.a_loadfpu/mm_loc_ref()
git-svn-id: branches/hlcgllvm@28372 -
2014-08-10 19:40:19 +00:00
Jonas Maebe
4f2b77bc96 + support floating point reference -> integer parameter transfer in
thlcgobj.a_loadfpu_ref_cgpara()

git-svn-id: branches/hlcgllvm@28358 -
2014-08-10 13:19:37 +00:00
Jonas Maebe
8e3062b1b6 * fixed the type specified to reference_reset_base() in
thlcgobj.paravarsym_set_initialloc_to_paraloc(): it has to be the type of
    pointer in the base register, not the type of the variable (and since this
    is a parameter on the stack, use voidstackpointertype rather than
    getpointerdef() for i8086 compatibility)

git-svn-id: branches/hlcgllvm@28351 -
2014-08-10 13:18:34 +00:00
Jonas Maebe
2dfbee45b1 * generate the callerside para/return location info in g_call_system_proc,
so that platform-specific versions of g_call_system_proc_intern() don't
    have to take care of this (since these methods call random routines from
    the system unit, this info may not yet be available)

git-svn-id: branches/hlcgllvm@28203 -
2014-07-12 22:14:02 +00:00
Jonas Maebe
650fd162ea * fixed missing bracket in comment
git-svn-id: branches/hlcgllvm@28153 -
2014-07-04 19:24:17 +00:00
Jonas Maebe
1516661249 + new chlcgobj class reference variable that can be used to call thlcg*
virtual methods even when hlcg doesn't contain a valid instance

git-svn-id: branches/hlcgllvm@28143 -
2014-07-03 22:28:31 +00:00
Jonas Maebe
bf617cb389 * changed hlcgobj.def2reg() into a class method so it can also be called
when there's no instantiated tlhcg

git-svn-id: branches/hlcgllvm@28115 -
2014-07-01 16:30:30 +00:00
Jonas Maebe
0082d3e008 * use hlcgobj methods in maybe_change_load_node_reg
git-svn-id: branches/hlcgllvm@28107 -
2014-07-01 16:30:05 +00:00
Jonas Maebe
bacd303208 * synchronized with trunk up to r27758
git-svn-id: branches/hlcgllvm@27779 -
2014-05-12 16:12:34 +00:00
nickysn
9758a53fa6 - rm the ifdef cpu16bitalu and cpu64bitalu from thlcgobj.a_load_ref_cgpara,
because they:
  - worsen readability (especially if we add cpu8bitalu as well, for
    completeness)
  - are not needed, because the else clause of the previous if ensures that we
    have (sizeleft<=sizeof(aint)) and sizeof(aint) follows the target cpu alu
    size

git-svn-id: trunk@27664 -
2014-04-26 13:46:36 +00:00
sergei
1ec5026465 * Call fpc_shortstr_to_shortstr instead of fpc_shortstr_assign. It is the same procedure with different order of parameters (suited for generation from node level). Now fpc_shortstr_assign remains needed only for bootstrapping.
git-svn-id: trunk@27618 -
2014-04-20 19:27:05 +00:00
svenbarth
5c1b8fdad9 Fix for Mantis #19697. For this we need to have the internal static var symbol know that it came from a static field var symbol so that we can check that for generic or not.
symsym.pas, tfieldvarsym:
  + add new field fieldvarsym which holds a reference to a tfieldvarsym if the static sym was created based on such a symbol
  + add necessary methods and code to correctly load from and store to PPU
  + add new constructor create_from_fieldvar
symcreat.pas, make_field_static: 
  * use new create_from_fieldvar constructor instead of the default one
hlcgobj.pas, finalize_static_data:
  * check whether the static var is based on a generic's class var
ppu.pas:
  * increase PPU version

+ added test

git-svn-id: trunk@27466 -
2014-04-04 16:15:41 +00:00
nickysn
26b53607f8 + added method reference_reset_base with support for different pointer types to
the high level code generator. All hlcg code, except for the jvm code
  generator, updated to use the new method. I didn't update jvm (it still uses
  the method from cgutils), because I'm not familiar with that platform, so I
  might get the types wrong.

git-svn-id: trunk@27309 -
2014-03-28 00:01:18 +00:00
florian
303e8c609d * internalerror unified
git-svn-id: trunk@27222 -
2014-03-21 16:31:17 +00:00
Jonas Maebe
73a3f5ced4 * moved ncgutil.maybechangeloadnodereg() to hlcg.maybe_change_load_node_reg()
and moved ifdef'd jvm code to overridden method

git-svn-id: trunk@27153 -
2014-03-16 11:24:40 +00:00
Jonas Maebe
4065483a50 * completed thlcgobj.location_force_fpureg(), use it everywhere and removed
ncgutil/thlcg2ll.location_force_fpureg()

git-svn-id: trunk@27071 -
2014-03-10 09:01:05 +00:00
Jonas Maebe
d3c11ca8b3 + support for MMREGISTER -> FPUREGISTER transfers in hlcgobj
git-svn-id: branches/hlcgllvm@27018 -
2014-03-06 21:42:31 +00:00
Jonas Maebe
f36848c243 * separate virtual method for loading the function result para (needed by
llvm)

git-svn-id: branches/hlcgllvm@27011 -
2014-03-06 21:42:07 +00:00
Jonas Maebe
81427523ab * pass a list of (pointers to) the paralocs to hlcgobj.a_call/g_call*, as
required for the LLVM support (LLVM parameter support is not yet
    included)
  * always return the function return loc from a_call*, again as required
    for the LLVM support

git-svn-id: branches/hlcgllvm@26992 -
2014-03-06 21:40:57 +00:00
Jonas Maebe
e9268a0a14 * synchronised with trunk up till r26975
git-svn-id: branches/hlcgllvm@26976 -
2014-03-06 21:36:58 +00:00
florian
150363c09e * thlcgobj.a_load_regconst_subsetreg_intern takes care if the whole register is modified
git-svn-id: trunk@26799 -
2014-02-16 15:13:43 +00:00
sergei
ed1555b918 * Moved generation of .ent/.end directives out of generic code generator.
* Generation of .ent/.end directives for Alpha is dropped, but that target has more important issues to solve.

git-svn-id: trunk@26757 -
2014-02-12 17:30:48 +00:00
yury
56b3287e29 + Added compiler support for mipsel-android target.
git-svn-id: trunk@26686 -
2014-02-06 17:02:43 +00:00
sergei
9c1f917e3a * a_call_ref functionality cannot be implemented efficiently at code generator level, because references need specific preparations at earlier points. Moved this support to tcgcallnode and its x86 descendants, and got rid of all ifdef's around.
+ x86 targets now directly call procedure variables located in references.
- a_call_ref method removed from tcg and thlcgobj.

git-svn-id: trunk@26666 -
2014-02-03 13:28:56 +00:00
florian
4d5119bf1c * fixes several issues which cause warnings by the dfa code when using it to detect uninitialized variables
git-svn-id: trunk@26161 -
2013-12-01 17:02:08 +00:00
Jonas Maebe
d14ce7817f * factored out setlocalloc and the code to set the initial paravarsym
location from ncgutil into hlcgobj, and override/implement it for llvm
    (use the symbolic parameter names)

git-svn-id: branches/hlcgllvm@26052 -
2013-11-11 11:16:16 +00:00
Jonas Maebe
1df3039424 + LLVM temp allocator based on new R_TEMPREGISTER register class. For every
temp we allocate, we set the base register to a newly allocated
    R_TEMPREGISTER. This allows for uniquely identifying a temp even if its
    offset is modified.

git-svn-id: branches/hlcgllvm@26033 -
2013-11-11 11:14:59 +00:00
Jonas Maebe
9e6764e443 * converted program termination to compilerproc/hlcg
git-svn-id: branches/hlcgllvm@26029 -
2013-11-11 11:14:43 +00:00
Jonas Maebe
cd92791d09 * converted unit initialization to compilerproc/hlcg
git-svn-id: branches/hlcgllvm@26028 -
2013-11-11 11:14:38 +00:00
Jonas Maebe
8d1fb0ee1c * added a safety check to gen_load_cgpara_loc()
git-svn-id: trunk@26024 -
2013-11-10 23:27:05 +00:00
Jonas Maebe
7b97752d0b - removed commented out duplicate thlcg.getmmregister()
git-svn-id: trunk@25887 -
2013-10-31 12:30:53 +00:00
florian
d4968e054b + arm: tsettings.instructionset
* the selected instruction set is now independent from the cpu type: e.g. armv7-a can perfectly execute thumb(2) code

git-svn-id: trunk@25370 -
2013-08-25 21:56:12 +00:00
sergei
bfcdf6b825 * Replaced tai_ent and tai_ent_end classes with tai_directive subtypes. Having separate classes for them is unnecessary complication.
git-svn-id: trunk@25338 -
2013-08-23 12:38:49 +00:00
Jonas Maebe
109317e460 + full support for parameter passing in the high level code generator
(equivalent to what exists in tcgobj)
   o unfortunately it can't be generally enabled for all existing targets
     by overriding/disabling the tcgobj equivalents, because several targets
     call these methods inside other tcgcpu methods and we can't call the high
     level code generator methods from the low level code generator (so right
     now there's quite a bit of code duplication)

git-svn-id: trunk@24763 -
2013-06-02 10:24:13 +00:00
Jonas Maebe
7d9f98e516 + def_cgmmsize() that returns a vector tcgsize for arraydefs (as generated
for certain parameter locations in the x86-64 parameter manager)
  * full support for vector types in the high level code generator by
    translating arraydefs passed to a_*mm*() methods into vector tcgsizes

git-svn-id: trunk@24762 -
2013-06-02 10:24:08 +00:00
Jonas Maebe
4e210e57c2 * use the correct type (pointer to object type) when loading the function
result of a TP-style object constructor

git-svn-id: trunk@24758 -
2013-06-02 10:23:40 +00:00
Jonas Maebe
2dd75e707e * renamed thlcgobj.tcgsize2orddef to defutil.cgsize_orddef
git-svn-id: trunk@24743 -
2013-06-01 18:28:15 +00:00
Jonas Maebe
5051453806 + support for LOC_(C)MMREGISTER in hlcg
o migrated location_force_mmregister_scalar from ncgutil to hlcgobj

git-svn-id: trunk@24661 -
2013-05-31 12:05:14 +00:00
florian
d4c7afbfe8 + generate thumb_func directives for thumb as well
git-svn-id: trunk@24377 -
2013-04-29 18:23:01 +00:00
nickysn
57777945a8 * fixed bug in thlcgobj.g_array_rtti_helper introduced in the previous commit
git-svn-id: branches/i8086@24284 -
2013-04-21 13:34:49 +00:00
nickysn
a5c5b05362 * initial support for system procs that use calling conventions that push left to right on i8086 or i386
git-svn-id: branches/i8086@24282 -
2013-04-21 13:26:12 +00:00
nickysn
a03f0d84ea high level code generator: const types changed from aint to tcgint to avoid problems on < 32-bit cpus; ppcjvm should also be updated, but isn't yet
git-svn-id: branches/i8086@23761 -
2013-03-09 22:16:03 +00:00
paul
51825b6f2e compiler: change ret_in_param to accept tabstractprocdef instead of tproccalloption to allow check more options (required for record constructor implementation)
git-svn-id: trunk@23394 -
2013-01-16 01:14:23 +00:00
Jonas Maebe
69c29a415f * pass the procdef to getintparaloc instead of only the proccalloption, so
that the type of the parameters can be determined automatically
   o added compilerproc declarations for all helpers called in the compiler
     via their assembler name, so we can look up the corresponding procdef

git-svn-id: trunk@23325 -
2013-01-06 15:05:40 +00:00
Jonas Maebe
1a8128fa72 * initialize ovloc.loc in a_op*checkoverflow
git-svn-id: trunk@22804 -
2012-10-21 17:56:07 +00:00
florian
ca5fabda6d * cleanup some unused units from uses clauses
git-svn-id: trunk@22433 -
2012-09-21 18:53:46 +00:00
florian
67744ef46e * fix methodpointers in registers on big endian targets
git-svn-id: trunk@22362 -
2012-09-09 17:54:35 +00:00
florian
d8161c185c + track usage of flags by using a new register RS_/NR_DEFAULTFLAGS
git-svn-id: trunk@22179 -
2012-08-22 19:37:51 +00:00
Jonas Maebe
288d1ec74a * support referencing "result" in nostackframe pure assembler routines if
the result location is a simple location (a single register/reference)
    (mantis #22490)
  * print an error when accessing "result" in a nostack pure assembler routine
    if the result location is not simple

git-svn-id: trunk@22166 -
2012-08-21 19:51:40 +00:00
Jonas Maebe
0a1157da38 * fixed memory leaks in the compiler introduced in r21862 by marking and
releasing temporarily created function result locations

git-svn-id: trunk@21953 -
2012-07-23 13:49:29 +00:00
Jonas Maebe
7717e43929 * moved setting the call result to a separate method, so it can still be
used across multiple levels of inheritance such as on MIPS (and the code
    has to be reusable for a_call_ref/reeg in the future anyway)

git-svn-id: trunk@21906 -
2012-07-12 20:56:25 +00:00
Jonas Maebe
be8f8fec76 * converted tcg.g_releasevaluepara_openarray() to thlcg
git-svn-id: trunk@21879 -
2012-07-11 15:23:18 +00:00
Jonas Maebe
9197ce100e * converted tcg.g_copyvaluepara_openarray() to thlcg
git-svn-id: trunk@21878 -
2012-07-11 15:23:08 +00:00
Jonas Maebe
1955255dda * let thlcg.a_call_name() return the tcgpara representing the function
result location (NR_FUNCTION_RESULT_REG is not valid on all platforms)
   o this requires passing the forced function result type (if any) to this
     method
   o a generic, basic thlcg.a_call_name() is now available that sets the
     function result location; can be called by descendants
  * the availability under all circumstances of the correct function return
    type enables g_call_system_proc() on the JVM platform to now determine
    by itself how many stack slots are removed by the call -> do so, instead
    of manually counting them (or forgetting to do so and messing up the
    maximum evaluation stack height calculations)

git-svn-id: trunk@21862 -
2012-07-11 08:25:58 +00:00
Jonas Maebe
aba6923187 * moved g_test_self() from cgobj to hlcgobj
git-svn-id: trunk@21861 -
2012-07-11 08:25:51 +00:00
pierre
024bde8875 Create .ent/.end pair for mips/mipsel and alpha
git-svn-id: trunk@21787 -
2012-07-04 16:38:57 +00:00
Jonas Maebe
7c21cba1e2 * migrated g_copyshortstring, g_incrrefcount and g_array_rtti_helper to thlcg
git-svn-id: trunk@21699 -
2012-06-24 21:36:28 +00:00
Jonas Maebe
60aedb19d6 * removed superfluous (de)allocallcpuregisters calls
git-svn-id: trunk@21698 -
2012-06-24 21:36:15 +00:00
Jonas Maebe
7a0ae38700 + also specify the parameter def when allocating a parameter via
getintparaloc + adapted all call sites of getintparaloc. This
    led to a number of additional, related changes:
   o corrected the type information for some getintparaloc parameters
   o don't allocate some intparalocs in cases they aren't used
   o changed "const tvardata" parameter into "constref tvardata" for
     fpc_variant_copy_overwrite to make pass-by-reference semantics
     explicit
   o moved a number of routines that now have to call find_system_type()
     from cgobj to hlcgobj so that cgobj doesn't have to start depending
     on the symtable unit
   o added versions of the cpureg alloc/dealloc methods to hlcgobj that
     call through to their cgobj counter parts, so we can call save/restore
     the cpu registers before/after calling system helpers from hlcgobj
     (not implemented in hlcgobj itself, because all basic register
      allocator functionality is still part of cgobj/cgcpu)

git-svn-id: trunk@21696 -
2012-06-24 15:02:12 +00:00
Jonas Maebe
325c60866f * use tcgpara.def instead of extra size parameters
git-svn-id: trunk@21694 -
2012-06-24 15:01:59 +00:00
Jonas Maebe
512351043c * properly handle loading a value from a larger to a smaller subsetreg
if the source value comes from a bit position > sizeof(smaller subsetreg)
    (fixes internalerror 68991 when compiling fpcompactimg.inc for ppc64)

git-svn-id: trunk@21675 -
2012-06-21 17:05:38 +00:00
Jonas Maebe
baa8fa39a8 * converted code to trash variables (-gt) to operate at the node tree level,
and also use this code to trash local variables in inlined routines
   o fixes mantis #22088
   o makes it possible to also implement it for the jvm target in the future

git-svn-id: trunk@21393 -
2012-05-26 11:32:39 +00:00
Jonas Maebe
f2c82e32cd - removed g_indirect_sym_load() from hlcgobj/hlcg2ll because this cgobj
method is only used anymore internally in cgobj.tcg and its descendants
  * made tcg.g_indirect_sym_load() protected to ensure it stays that way

git-svn-id: trunk@21392 -
2012-05-26 11:32:33 +00:00
Jonas Maebe
0037de6ac9 * disable range/overflow checking for subsetreg/ref code, to prevent
spurious errors when calculating masks (was also the case for the old
    code in cgobj)

git-svn-id: trunk@21380 -
2012-05-24 15:33:49 +00:00
Jonas Maebe
9d860904fe * merged AIX changes from ncgutil.gen_proc_symbol_end() into
hlcgobj.gen_proc_symbol_end() and removed the routine from ncgutil (it's
    not used anymore)

git-svn-id: trunk@21337 -
2012-05-19 14:39:12 +00:00
Jonas Maebe
08784aca44 * fixed compilation for high level code generator targets after r21287
git-svn-id: trunk@21302 -
2012-05-15 13:05:27 +00:00
Jonas Maebe
4f396735f4 * support LOC_(C)SUBSETREG/REF in thlcgobj.a_load_loc_ref() (should fix
mantis #22029)

git-svn-id: trunk@21300 -
2012-05-15 12:13:10 +00:00
Jonas Maebe
edd42aa42a * moved subsetref/reg and bit_set/test support from cgobj to hlcgobj for
future use by high level code generator targets
   o this in turn required that all a_load*_loc* methods are called via
     hlcg rather than via cg, since a location can be a subsetref/reg and
     and those are no longer handled in tcg
   o that then required moving several force_location_* routines into
     thlcg because they use a_load_loc*, but did not take tdef size
     parameters (which are required by the thlcg a_load_loc* routines)
   o the only practical consequence is that from now on, you have to
     use hlcg.location_force_mem/reg() (fpureg not yet) and
     hlcg.gen_load_loc_cgpara() instead of the removed versions from ncgutil,
     and hlcg.a_load*loc*() instead of cg.a_load*loc* if a subsetref/reg
     might be involved

git-svn-id: trunk@21287 -
2012-05-13 12:33:10 +00:00
Jonas Maebe
641b259aed * adjusted thlcg.g_rangecheck() implementation so it can be used for all
targets and removed (the almost identical) tcg.g_rangecheck()

git-svn-id: trunk@21262 -
2012-05-08 20:02:36 +00:00
Jonas Maebe
1345b7d107 * changed ref parameter of thlcgobj.a_call_ref() into a const parameter
git-svn-id: trunk@21115 -
2012-04-29 13:13:42 +00:00
Jonas Maebe
4fced5d142 + generic implementation of thlcgobj.a_call_ref()
* override thlcg.a_call_reg() in JVM hlcgcpu with dummy that calls
    internalerror

git-svn-id: trunk@21099 -
2012-04-28 14:27:45 +00:00
Jonas Maebe
aee5380ae0 * merged trunk up to r20882
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 -
2012-04-15 15:54:10 +00:00
Jonas Maebe
3916a32f9e * created generic version of thlcgobj.g_reference_loc() and only override
JVM-specific case (needed for future trunk marge to prevent abstract
    method warning)

git-svn-id: branches/jvmbackend@20387 -
2012-02-20 11:28:50 +00:00
Jonas Maebe
9fb06fcb8f * support g_call_system_proc() inside the system unit for routines whose
implementation hasn't been parsed yet

git-svn-id: branches/jvmbackend@18876 -
2011-08-28 19:21:29 +00:00
Jonas Maebe
c648cade1a * prevent internal errors when calling location_force_mem() for
dynamic or open arrays on the JVM target

git-svn-id: branches/jvmbackend@18757 -
2011-08-20 08:33:20 +00:00
Jonas Maebe
7f22a2f223 + support for range checking calculations with hlcgobj
* 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 -
2011-08-20 08:32:31 +00:00
Jonas Maebe
40cf2cefa0 * when the user calls initialize(), force initialization to happen on the
JVM platform (normally it's not necessary because all types are
    automatically initialized)

git-svn-id: branches/jvmbackend@18672 -
2011-08-20 08:23:16 +00:00
Jonas Maebe
16cb75a5da * also free the regular code generator when freeing the hl code generator
git-svn-id: branches/jvmbackend@18600 -
2011-08-20 08:14:05 +00:00