Commit Graph

4 Commits

Author SHA1 Message Date
Jonas Maebe
254636ab84 * don't create (useless) temporary array/record/... for the result
of functions at the caller side, since these will already be allocated
    at the callee side
  * added comment to cpupara explaining why we never allocate the function
    result on the caller side and then pass it as an invisible parameter,
    but instead always let the callee allocate it

git-svn-id: branches/jvmbackend@18420 -
2011-08-20 07:58:09 +00:00
Jonas Maebe
2c313e397e + support for regular arrays and open arrays
o support for copying value parameters at the callee side if they were
     passed by reference in hlcg
   o JVM g_concatcopy() implementation for arrays
   o moved code to get length of an array from njvminl to hlcgcpu so it can
     be reused elsewhere as well
   o export array copy helpers from system unit for use when assigning one
     array to another
   o some generic support for types that are normally not implicit pointers,
     but which are for the JVM target (such as normal arrays)
  * handle assigning nil to a dynamic array by generating a setlength(x,0)
    node instead of by hardcoding a call to fpc_dynarray_clear, so
    target-specific code can handle it if required
  * hook up gethltemp() for JVM ttgjvm so array temps are properly
    allocated

git-svn-id: branches/jvmbackend@18388 -
2011-08-20 07:55:27 +00:00
Jonas Maebe
c17d022a87 * allow overriding tparamanager.is_stack_paraloc() and let it always
return true for the JVM target (it uses the evaluation stack to
    pass all parameters)

git-svn-id: branches/jvmbackend@18324 -
2011-08-20 07:46:17 +00:00
Jonas Maebe
72fc911dcf + jvm parameter manager: on the caller side, all arguments are pushed
on the evaluation stack, while on the callee side they are placed
    in local variables 1..n
   o the jvm only supports call-by-value. call-by-reference parameters
     will have to be emulated at a higher level
   o similarly, ret_in_param() always returns false
   o all function results are returned on the evaluation stack (both
     on the caller and callee side)

git-svn-id: branches/jvmbackend@18306 -
2011-08-20 07:37:12 +00:00