Commit Graph

10 Commits

Author SHA1 Message Date
Jonas Maebe
cf9596421b * fixed crashes on platforms using parentfpstructs with generic routines
that contain nested functions (when specialised, procedures don't have
    the main function of the unit/program as parent procinfo)

git-svn-id: trunk@42063 -
2019-05-14 19:19:14 +00:00
Jonas Maebe
281b3ad276 * fix case completeness and unreachable code warnings in compiler that would
be introduced by the next commit

git-svn-id: trunk@42046 -
2019-05-12 14:29:03 +00:00
Jonas Maebe
91d5457b38 * moved around/replaced the following procedures to stop nflw from depending
on pdecsub (node units should not depend on parser units):
   o maybe_add_public_default_java_constructor()
   o handle_calling_convention()
   o create_finalizer_procdef() (replaced with create_outline_procdef())
   o insert_record_hidden_paras()
   o handle_calling_convention()
   o proc_add_definition()
   o build_parentfpstruct()
   o maybe_guarantee_record_typesym()
   o get_first_proc_str()
  * factored out the creation of a procinfo for a nested procdef based on a
    subnodetree of the current procdef into tprocinfo.create_for_outlining()

git-svn-id: trunk@40773 -
2019-01-05 16:26:33 +00:00
Jonas Maebe
3ccc3e329b * prevent calling firstpass multiple times for a node (such as when
transforming inc/dec to an addn/subn in case of range checking) from
    triggering the transformation logic for accessing nested variables
    on LLVM/JVM multiple times
  * also prevent it from triggering errors during inlining, in case a
    parameter to a nested routine gets replaced by a local variable
    from a parent routine (in that case, it does not need to be
    accessed via the parentfpstruct, as we are being inlined in the
    parent) -> don't duplicate the check from pass_typecheck in pass_1,
    but check whether it needs to be accessed via the parentfpstruct
    by verifying that tloadnode.left is assigned (which pass_typecheck
    will ensure if needed)

git-svn-id: trunk@40630 -
2018-12-24 22:09:52 +00:00
nickysn
3318703ece * moved nf_typedaddr to addrnodeflags (anf_typedaddr)
git-svn-id: trunk@38671 -
2018-04-03 16:41:01 +00:00
Jonas Maebe
96698994f3 * ensure that we don't firstpass a tcgnestloadnode twice, as it
changes left (should be solved in a cleaner way, by transforming
    the whole load node into an equivalent construct)

git-svn-id: trunk@32780 -
2015-12-28 15:06:36 +00:00
Jonas Maebe
95927665ce - removed variable notification support, it's not used and superceded by
DFA

git-svn-id: trunk@31916 -
2015-10-02 17:00:25 +00:00
Jonas Maebe
4dee36b64b * copy the implicit pointer rather than the contents of var/out/constref
implicit pointer types into the nestedfpstruct, so that the original
    parameter is properly changed when updated from inside nested routines

git-svn-id: branches/jvmbackend@19645 -
2011-11-18 21:09:38 +00:00
Jonas Maebe
ff37507bca * save/result nestsym to ppufile for inline routines
git-svn-id: branches/jvmbackend@18670 -
2011-08-20 08:23:04 +00:00
Jonas Maebe
8fa42c206f + support for nested procedures for the JVM target
o since the JVM target has no stack/framepointer that can be passed
     on to nested routines, all local variables and parameters accessed
     from nested routines are grouped into a local record whose address
     is passed to nested routines. The same technique is also required
     for LLVM in the future

git-svn-id: branches/jvmbackend@18588 -
2011-08-20 08:12:59 +00:00