[M3commit] [modula3/cm3] 36cdd4: Refactor CopyOpenArray for call site use.

GitHub noreply at github.com
Thu Oct 5 00:17:05 CEST 2017


  Branch: refs/heads/master
  Home:   https://github.com/modula3/cm3
  Commit: 36cdd49c1075cccf847148b3d44d29ccda5274a2
      https://github.com/modula3/cm3/commit/36cdd49c1075cccf847148b3d44d29ccda5274a2
  Author: Rodney Bates <rodney.m.bates at acm.org>
  Date:   2017-10-04 (Wed, 04 Oct 2017)

  Changed paths:
    M m3-sys/m3front/src/misc/CG.m3
    M m3-sys/m3front/src/types/OpenArrayType.m3
    M m3-sys/m3front/src/values/Formal.m3
    M m3-sys/m3front/src/values/Variable.m3

  Log Message:
  -----------
  Refactor CopyOpenArray for call site use.

Variable.CopyOpenArray generates prolog code to copy an open array
passed by VALUE.  Such copies are also needed at call sites for an
open array passed READONLY that is not a designator and/or not the
same type as the formal.

Change CopyOpenArray so it uses values on the stack rather than a
Variable.T, passed in.  This is so it can be used at call sites,
where no Variable.T is necessarily available.

This change does not add call site copying.  It is pure refactor
and generates identical CG intermediate code for the prolog copy.




More information about the M3commit mailing list