Import GNU Modula-2 from GNU Savannah into GCC.

2021-07-07  Gaius Mulley   <gaius.mulley@southwales.ac.uk>

/
	* gm2tools: New directory.
	* gm2tools/ChangeLog: New file.
	* libgm2: New directory.
	* libgm2/ChangeLog: New file.
	* Makefile.def (host_modules) includes gm2tools.
	(target_modules): Includes libgm2.
	(GM2_FOR_TARGET): Added.
	(GM2FLAGS_FOR_TARGET): Added.
	(dependencies): all-gm2tools on all-target-libgm2.
	(dependencies): configure-target-libgm2 on all-target-libstdc++-v3.
	(dependencies): all-target-libgm2 on all-target-libatomic.
	(languages): m2 define gcc-check-target as check-m2,
	define lib-check-target as check-target-libgm2 and
	lib-check-target as check-gm2tools.
	* Makefile.tpl: Assign GM2,
	GM2_FOR_BUILD, GM2_FOR_TARGET and GM2FLAGS.
	Pass variables to make.
	* configure.ac (GM2_FOR_TARGET): Added.
	Request build driver program gm2.
	(libgm2) option added.
	(GCC_TARGET_TOOL): define gm2 and how it is invoked.
	(compare_exclusions) includes SYSTEM and M2Version.

libgm2/
	* Makefile.am: New file.
	* Makefile.in: New file.
	* aclocal.m4: New file.
	* autogen.sh: New file.
	* config.h.in: New file.
	* configure: New file.
	* configure.ac: New file.
	* libm2cor/KeyBoardLEDs.c: New file.
	* libm2cor/Makefile.am: New file.
	* libm2cor/Makefile.in: New file.
	* libm2iso/ChanConsts.h: New file.
	* libm2iso/ErrnoCategory.c: New file.
	* libm2iso/Makefile.am: New file.
	* libm2iso/Makefile.in: New file.
	* libm2iso/RTco.c: New file.
	* libm2iso/wrapsock.c: New file.
	* libm2iso/wraptime.c: New file.
	* libm2log/Break.c: New file.
	* libm2log/Makefile.am: New file.
	* libm2log/Makefile.in: New file.
	* libm2min/Makefile.am: New file.
	* libm2min/Makefile.in: New file.
	* libm2min/libc.c: New file.
	* libm2pim/Makefile.am: New file.
	* libm2pim/Makefile.in: New file.
	* libm2pim/Selective.c: New file.
	* libm2pim/SysExceptions.c: New file.
	* libm2pim/UnixArgs.c: New file.
	* libm2pim/cgetopt.c: New file.
	* libm2pim/dtoa.c: New file.
	* libm2pim/errno.c: New file.
	* libm2pim/ldtoa.c: New file.
	* libm2pim/sckt.c: New file.
	* libm2pim/target.c: New file.
	* libm2pim/termios.c: New file.
	* libm2pim/wrapc.c: New file.

gm2tools/
	* Makefile.am: New file.
	* Makefile.in: New file.
	* aclocal.m4: New file.
	* autogen.sh: New file.
	* configure: New file.
	* configure.ac: New file.
	* errors.c: New file.
	* gm2l.1: New file.
	* gm2lcc.1: New file.
	* gm2lgen.1: New file.
	* gm2lorder.1: New file.
	* m2color.c: New file.

gcc/
	* m2: New directory.
	* m2/ChangeLog: New file.
	* doc/gm2.texi: New file.
	* doc/install.texi (m2): Add Modula-2 as a recognized front end
	language.  (--disable-libgm2) Add entry.  (check-m2) Add reference
	to run the Modula-2 regression tests.
	* doc/sourcebuild.texi (gm2tools): Added top level directory additions.
	(libgm2) Added top level directory entry.  (m2) Added reference for
	a new language subdirectory.
	* gcc/c-family/cppspec.c (lang_register_spec_functions): Added.
	* gcc/c/gccspec.c (lang_register_spec_functions): Added.
	* gcc/cp/g++spec.c (lang_register_spec_functions): Added.
	* gcc/d/d-spec.cc (lang_register_spec_functions): Added.
	* gcc/fortran/gfortranspec.c(lang_register_spec_functions): Added.
	* gcc/gcc.c (allow_linker): Global variable to disable
	linker by the front end.  (xputenv) available externally.
	(xgetenv) New function.  (save_switch) available externally.
	(fe_add_linker_option) New function.  (handle_OPT_B) New function.
	(fe_add_infile) New function.  (fe_mark_compiled) New function.
	(driver_handle_option) call handle_OPT_B.  (print_option) New
	function.  (print_options) New function.  (dbg_options) New function.
	(fe_add_spec_function) New function.  (lookup_spec_function)
	checks front end registered functions.
	(driver::set_up_specs):  call lang_register_spec_functions.
	(maybe_run_linker): Check allow_linker before running the linker.
	* gcc/gcc.h (fe_save_switch): Prototype.
	(handle_OPT_B) Prototype.  (fe_add_infile) Prototype.
	(fe_add_linker_option) Prototype.  (fe_add_spec_function) Prototype.
	(xputenv) Prototype.  (xgetenv) Prototype.  (print_options) Prototype.
	(print_option) Prototype.  (dbg_options) Prototype.
	(lang_register_spec_functions) Prototype.
	(allow_linker): Extern.
	* gcc/go/gospec.c (lang_register_spec_functions): Added.

gcc/m2/
	* COPYING.FDL: New file.
	* COPYING.RUNTIME: New file.
	* COPYING3: New file.
	* COPYING3.LIB: New file.
	* ChangeLog-2001: New file.
	* ChangeLog-2002: New file.
	* ChangeLog-2003: New file.
	* ChangeLog-2004: New file.
	* ChangeLog-2005: New file.
	* ChangeLog-2006: New file.
	* ChangeLog-2007: New file.
	* ChangeLog-2008: New file.
	* ChangeLog-2009: New file.
	* ChangeLog-2010: New file.
	* ChangeLog-2011: New file.
	* ChangeLog-2012: New file.
	* ChangeLog-2013: New file.
	* ChangeLog-2014: New file.
	* ChangeLog-2015: New file.
	* ChangeLog-2016: New file.
	* ChangeLog-2017: New file.
	* ChangeLog-2018: New file.
	* ChangeLog-2019: New file.
	* ChangeLog-2020: New file.
	* Make-lang.in: New file.
	* NEWS: New file.
	* README: New file.
	* aclocal.m4: New file.
	* bnf/README: New file.
	* bnf/gm2l.bnf: New file.
	* bnf/gm2m.bnf: New file.
	* bnf/m2-1.bnf: New file.
	* bnf/m2-2.bnf: New file.
	* bnf/m2-3.bnf: New file.
	* bnf/m2-c.bnf: New file.
	* bnf/m2-h.bnf: New file.
	* bnf/m2.bnf: New file.
	* bnf/mc-1.bnf: New file.
	* bnf/mc-2.bnf: New file.
	* bnf/mc-3.bnf: New file.
	* bnf/mc-4.bnf: New file.
	* bnf/mc-5.bnf: New file.
	* config-lang.in: New file.
	* config-make.in: New file.
	* configure: New file.
	* configure.ac: New file.
	* el/gm2-mode.el: New file.
	* gm2-compiler/CLexBuf.def: New file.
	* gm2-compiler/CLexBuf.mod: New file.
	* gm2-compiler/FifoQueue.def: New file.
	* gm2-compiler/FifoQueue.mod: New file.
	* gm2-compiler/Lists.def: New file.
	* gm2-compiler/Lists.mod: New file.
	* gm2-compiler/M2ALU.def: New file.
	* gm2-compiler/M2ALU.mod: New file.
	* gm2-compiler/M2AsmUtil.def: New file.
	* gm2-compiler/M2AsmUtil.mod: New file.
	* gm2-compiler/M2Base.def: New file.
	* gm2-compiler/M2Base.mod: New file.
	* gm2-compiler/M2BasicBlock.def: New file.
	* gm2-compiler/M2BasicBlock.mod: New file.
	* gm2-compiler/M2Batch.def: New file.
	* gm2-compiler/M2Batch.mod: New file.
	* gm2-compiler/M2Bitset.def: New file.
	* gm2-compiler/M2Bitset.mod: New file.
	* gm2-compiler/M2CaseList.def: New file.
	* gm2-compiler/M2CaseList.mod: New file.
	* gm2-compiler/M2Check.def: New file.
	* gm2-compiler/M2Check.mod: New file.
	* gm2-compiler/M2Code.def: New file.
	* gm2-compiler/M2Code.mod: New file.
	* gm2-compiler/M2ColorString.def: New file.
	* gm2-compiler/M2ColorString.mod: New file.
	* gm2-compiler/M2Comp.def: New file.
	* gm2-compiler/M2Comp.mod: New file.
	* gm2-compiler/M2Configure.def: New file.
	* gm2-compiler/M2Configure.mod: New file.
	* gm2-compiler/M2Const.def: New file.
	* gm2-compiler/M2Const.mod: New file.
	* gm2-compiler/M2Debug.def: New file.
	* gm2-compiler/M2Debug.mod: New file.
	* gm2-compiler/M2DebugStack.def: New file.
	* gm2-compiler/M2DebugStack.mod: New file.
	* gm2-compiler/M2Defaults.def: New file.
	* gm2-compiler/M2Defaults.mod: New file.
	* gm2-compiler/M2Depth.def: New file.
	* gm2-compiler/M2Depth.mod: New file.
	* gm2-compiler/M2DriverOptions.def: New file.
	* gm2-compiler/M2DriverOptions.mod: New file.
	* gm2-compiler/M2Emit.def: New file.
	* gm2-compiler/M2Emit.mod: New file.
	* gm2-compiler/M2Error.def: New file.
	* gm2-compiler/M2Error.mod: New file.
	* gm2-compiler/M2EvalSym.def: New file.
	* gm2-compiler/M2FileName.def: New file.
	* gm2-compiler/M2FileName.mod: New file.
	* gm2-compiler/M2GCCDeclare.def: New file.
	* gm2-compiler/M2GCCDeclare.mod: New file.
	* gm2-compiler/M2GenGCC.def: New file.
	* gm2-compiler/M2GenGCC.mod: New file.
	* gm2-compiler/M2Lex.def: New file.
	* gm2-compiler/M2Lex.mod: New file.
	* gm2-compiler/M2LexBuf.def: New file.
	* gm2-compiler/M2LexBuf.mod: New file.
	* gm2-compiler/M2MetaError.def: New file.
	* gm2-compiler/M2MetaError.mod: New file.
	* gm2-compiler/M2Optimize.def: New file.
	* gm2-compiler/M2Optimize.mod: New file.
	* gm2-compiler/M2Options.def: New file.
	* gm2-compiler/M2Options.mod: New file.
	* gm2-compiler/M2Pass.def: New file.
	* gm2-compiler/M2Pass.mod: New file.
	* gm2-compiler/M2Preprocess.def: New file.
	* gm2-compiler/M2Preprocess.mod: New file.
	* gm2-compiler/M2Printf.def: New file.
	* gm2-compiler/M2Printf.mod: New file.
	* gm2-compiler/M2Quads.def: New file.
	* gm2-compiler/M2Quads.mod: New file.
	* gm2-compiler/M2Quiet.def: New file.
	* gm2-compiler/M2Quiet.mod: New file.
	* gm2-compiler/M2Range.def: New file.
	* gm2-compiler/M2Range.mod: New file.
	* gm2-compiler/M2Reserved.def: New file.
	* gm2-compiler/M2Reserved.mod: New file.
	* gm2-compiler/M2SSA.def: New file.
	* gm2-compiler/M2SSA.mod: New file.
	* gm2-compiler/M2Scope.def: New file.
	* gm2-compiler/M2Scope.mod: New file.
	* gm2-compiler/M2Search.def: New file.
	* gm2-compiler/M2Search.mod: New file.
	* gm2-compiler/M2Size.def: New file.
	* gm2-compiler/M2Size.mod: New file.
	* gm2-compiler/M2StackAddress.def: New file.
	* gm2-compiler/M2StackAddress.mod: New file.
	* gm2-compiler/M2StackWord.def: New file.
	* gm2-compiler/M2StackWord.mod: New file.
	* gm2-compiler/M2Students.def: New file.
	* gm2-compiler/M2Students.mod: New file.
	* gm2-compiler/M2Swig.def: New file.
	* gm2-compiler/M2Swig.mod: New file.
	* gm2-compiler/M2System.def: New file.
	* gm2-compiler/M2System.mod: New file.
	* gm2-compiler/M2Version.def: New file.
	* gm2-compiler/NameKey.def: New file.
	* gm2-compiler/NameKey.mod: New file.
	* gm2-compiler/ObjectFiles.def: New file.
	* gm2-compiler/ObjectFiles.mod: New file.
	* gm2-compiler/P0SymBuild.def: New file.
	* gm2-compiler/P0SymBuild.mod: New file.
	* gm2-compiler/P0SyntaxCheck.def: New file.
	* gm2-compiler/P1Build.def: New file.
	* gm2-compiler/P1SymBuild.def: New file.
	* gm2-compiler/P1SymBuild.mod: New file.
	* gm2-compiler/P2Build.def: New file.
	* gm2-compiler/P2SymBuild.def: New file.
	* gm2-compiler/P2SymBuild.mod: New file.
	* gm2-compiler/P3Build.def: New file.
	* gm2-compiler/P3SymBuild.def: New file.
	* gm2-compiler/P3SymBuild.mod: New file.
	* gm2-compiler/PCBuild.def: New file.
	* gm2-compiler/PCSymBuild.def: New file.
	* gm2-compiler/PCSymBuild.mod: New file.
	* gm2-compiler/PHBuild.def: New file.
	* gm2-compiler/README: New file.
	* gm2-compiler/Sets.def: New file.
	* gm2-compiler/Sets.mod: New file.
	* gm2-compiler/SymbolConversion.def: New file.
	* gm2-compiler/SymbolConversion.mod: New file.
	* gm2-compiler/SymbolKey.def: New file.
	* gm2-compiler/SymbolKey.mod: New file.
	* gm2-compiler/SymbolTable.def: New file.
	* gm2-compiler/SymbolTable.mod: New file.
	* gm2-compiler/bnflex.def: New file.
	* gm2-compiler/bnflex.mod: New file.
	* gm2-compiler/cflex.def: New file.
	* gm2-compiler/gm2.mod: New file.
	* gm2-compiler/gm2lcc.mod: New file.
	* gm2-compiler/gm2lgen.mod: New file.
	* gm2-compiler/gm2lorder.mod: New file.
	* gm2-compiler/m2flex.def: New file.
	* gm2-compiler/ppg.mod: New file.
	* gm2-gcc/README: New file.
	* gm2-gcc/dynamicstrings.h: New file.
	* gm2-gcc/gcc-consolidation.h: New file.
	* gm2-gcc/init.c: New file.
	* gm2-gcc/init.def: New file.
	* gm2-gcc/init.h: New file.
	* gm2-gcc/m2assert.c: New file.
	* gm2-gcc/m2assert.h: New file.
	* gm2-gcc/m2block.c: New file.
	* gm2-gcc/m2block.def: New file.
	* gm2-gcc/m2block.h: New file.
	* gm2-gcc/m2builtins.c: New file.
	* gm2-gcc/m2builtins.def: New file.
	* gm2-gcc/m2builtins.h: New file.
	* gm2-gcc/m2color.c: New file.
	* gm2-gcc/m2color.def: New file.
	* gm2-gcc/m2color.h: New file.
	* gm2-gcc/m2convert.c: New file.
	* gm2-gcc/m2convert.def: New file.
	* gm2-gcc/m2convert.h: New file.
	* gm2-gcc/m2decl.c: New file.
	* gm2-gcc/m2decl.def: New file.
	* gm2-gcc/m2decl.h: New file.
	* gm2-gcc/m2except.c: New file.
	* gm2-gcc/m2except.def: New file.
	* gm2-gcc/m2except.h: New file.
	* gm2-gcc/m2expr.c: New file.
	* gm2-gcc/m2expr.def: New file.
	* gm2-gcc/m2expr.h: New file.
	* gm2-gcc/m2linemap.c: New file.
	* gm2-gcc/m2linemap.def: New file.
	* gm2-gcc/m2linemap.h: New file.
	* gm2-gcc/m2misc.c: New file.
	* gm2-gcc/m2misc.def: New file.
	* gm2-gcc/m2misc.h: New file.
	* gm2-gcc/m2options.h: New file.
	* gm2-gcc/m2range.h: New file.
	* gm2-gcc/m2search.h: New file.
	* gm2-gcc/m2statement.c: New file.
	* gm2-gcc/m2statement.def: New file.
	* gm2-gcc/m2statement.h: New file.
	* gm2-gcc/m2top.c: New file.
	* gm2-gcc/m2top.def: New file.
	* gm2-gcc/m2top.h: New file.
	* gm2-gcc/m2tree.c: New file.
	* gm2-gcc/m2tree.def: New file.
	* gm2-gcc/m2tree.h: New file.
	* gm2-gcc/m2treelib.c: New file.
	* gm2-gcc/m2treelib.def: New file.
	* gm2-gcc/m2treelib.h: New file.
	* gm2-gcc/m2type.c: New file.
	* gm2-gcc/m2type.def: New file.
	* gm2-gcc/m2type.h: New file.
	* gm2-gcc/rtegraph.c: New file.
	* gm2-gcc/rtegraph.h: New file.
	* gm2-ici/M2Emit.mod: New file.
	* gm2-ici/README: New file.
	* gm2-ici/m2linemap.c: New file.
	* gm2-internals.texi: New file.
	* gm2-lang.c: New file.
	* gm2-lang.h: New file.
	* gm2-libiberty/README: New file.
	* gm2-libiberty/choosetemp.def: New file.
	* gm2-libiberty/pexecute.def: New file.
	* gm2-libs-ch/README: New file.
	* gm2-libs-ch/RTcodummy.c: New file.
	* gm2-libs-ch/RTintdummy.c: New file.
	* gm2-libs-ch/Selective.c: New file.
	* gm2-libs-ch/SysExceptions.c: New file.
	* gm2-libs-ch/UnixArgs.c: New file.
	* gm2-libs-ch/cgetopt.c: New file.
	* gm2-libs-ch/choosetemp.c: New file.
	* gm2-libs-ch/dtoa.c: New file.
	* gm2-libs-ch/errno.c: New file.
	* gm2-libs-ch/host.c: New file.
	* gm2-libs-ch/ldtoa.c: New file.
	* gm2-libs-ch/pthdummy.c: New file.
	* gm2-libs-ch/termios.c: New file.
	* gm2-libs-ch/tools.c: New file.
	* gm2-libs-ch/wrapc.c: New file.
	* gm2-libs-ch/xlibc.c: New file.
	* gm2-libs-coroutines/Debug.def: New file.
	* gm2-libs-coroutines/Debug.mod: New file.
	* gm2-libs-coroutines/Executive.def: New file.
	* gm2-libs-coroutines/Executive.mod: New file.
	* gm2-libs-coroutines/KeyBoardLEDs.def: New file.
	* gm2-libs-coroutines/README.texi: New file.
	* gm2-libs-coroutines/SYSTEM.def: New file.
	* gm2-libs-coroutines/SYSTEM.mod: New file.
	* gm2-libs-coroutines/TimerHandler.def: New file.
	* gm2-libs-coroutines/TimerHandler.mod: New file.
	* gm2-libs-iso/COROUTINES.def: New file.
	* gm2-libs-iso/COROUTINES.mod: New file.
	* gm2-libs-iso/ChanConsts.def: New file.
	* gm2-libs-iso/ChanConsts.h: New file.
	* gm2-libs-iso/ChanConsts.mod: New file.
	* gm2-libs-iso/CharClass.def: New file.
	* gm2-libs-iso/CharClass.mod: New file.
	* gm2-libs-iso/ClientSocket.def: New file.
	* gm2-libs-iso/ClientSocket.mod: New file.
	* gm2-libs-iso/ComplexMath.def: New file.
	* gm2-libs-iso/ComplexMath.mod: New file.
	* gm2-libs-iso/ConvStringLong.def: New file.
	* gm2-libs-iso/ConvStringLong.mod: New file.
	* gm2-libs-iso/ConvStringReal.def: New file.
	* gm2-libs-iso/ConvStringReal.mod: New file.
	* gm2-libs-iso/ConvTypes.def: New file.
	* gm2-libs-iso/ConvTypes.mod: New file.
	* gm2-libs-iso/EXCEPTIONS.def: New file.
	* gm2-libs-iso/EXCEPTIONS.mod: New file.
	* gm2-libs-iso/ErrnoCategory.c: New file.
	* gm2-libs-iso/ErrnoCategory.def: New file.
	* gm2-libs-iso/GeneralUserExceptions.def: New file.
	* gm2-libs-iso/GeneralUserExceptions.mod: New file.
	* gm2-libs-iso/IOChan.def: New file.
	* gm2-libs-iso/IOChan.mod: New file.
	* gm2-libs-iso/IOConsts.def: New file.
	* gm2-libs-iso/IOConsts.mod: New file.
	* gm2-libs-iso/IOLink.def: New file.
	* gm2-libs-iso/IOLink.mod: New file.
	* gm2-libs-iso/IOResult.def: New file.
	* gm2-libs-iso/IOResult.mod: New file.
	* gm2-libs-iso/LongComplexMath.def: New file.
	* gm2-libs-iso/LongComplexMath.mod: New file.
	* gm2-libs-iso/LongConv.def: New file.
	* gm2-libs-iso/LongConv.mod: New file.
	* gm2-libs-iso/LongIO.def: New file.
	* gm2-libs-iso/LongIO.mod: New file.
	* gm2-libs-iso/LongMath.def: New file.
	* gm2-libs-iso/LongMath.mod: New file.
	* gm2-libs-iso/LongStr.def: New file.
	* gm2-libs-iso/LongStr.mod: New file.
	* gm2-libs-iso/LongWholeIO.def: New file.
	* gm2-libs-iso/LongWholeIO.mod: New file.
	* gm2-libs-iso/LowLong.def: New file.
	* gm2-libs-iso/LowLong.mod: New file.
	* gm2-libs-iso/LowReal.def: New file.
	* gm2-libs-iso/LowReal.mod: New file.
	* gm2-libs-iso/LowShort.def: New file.
	* gm2-libs-iso/LowShort.mod: New file.
	* gm2-libs-iso/M2EXCEPTION.def: New file.
	* gm2-libs-iso/M2EXCEPTION.mod: New file.
	* gm2-libs-iso/M2RTS.def: New file.
	* gm2-libs-iso/M2RTS.mod: New file.
	* gm2-libs-iso/MemStream.def: New file.
	* gm2-libs-iso/MemStream.mod: New file.
	* gm2-libs-iso/Preemptive.def: New file.
	* gm2-libs-iso/Preemptive.mod: New file.
	* gm2-libs-iso/Processes.def: New file.
	* gm2-libs-iso/Processes.mod: New file.
	* gm2-libs-iso/ProgramArgs.def: New file.
	* gm2-libs-iso/ProgramArgs.mod: New file.
	* gm2-libs-iso/README.texi: New file.
	* gm2-libs-iso/RTco.def: New file.
	* gm2-libs-iso/RTdata.def: New file.
	* gm2-libs-iso/RTdata.mod: New file.
	* gm2-libs-iso/RTentity.def: New file.
	* gm2-libs-iso/RTentity.mod: New file.
	* gm2-libs-iso/RTfio.def: New file.
	* gm2-libs-iso/RTfio.mod: New file.
	* gm2-libs-iso/RTgen.def: New file.
	* gm2-libs-iso/RTgen.mod: New file.
	* gm2-libs-iso/RTgenif.def: New file.
	* gm2-libs-iso/RTgenif.mod: New file.
	* gm2-libs-iso/RTio.def: New file.
	* gm2-libs-iso/RTio.mod: New file.
	* gm2-libs-iso/RandomNumber.def: New file.
	* gm2-libs-iso/RandomNumber.mod: New file.
	* gm2-libs-iso/RawIO.def: New file.
	* gm2-libs-iso/RawIO.mod: New file.
	* gm2-libs-iso/RealConv.def: New file.
	* gm2-libs-iso/RealConv.mod: New file.
	* gm2-libs-iso/RealIO.def: New file.
	* gm2-libs-iso/RealIO.mod: New file.
	* gm2-libs-iso/RealMath.def: New file.
	* gm2-libs-iso/RealMath.mod: New file.
	* gm2-libs-iso/RealStr.def: New file.
	* gm2-libs-iso/RealStr.mod: New file.
	* gm2-libs-iso/RndFile.def: New file.
	* gm2-libs-iso/RndFile.mod: New file.
	* gm2-libs-iso/SIOResult.def: New file.
	* gm2-libs-iso/SIOResult.mod: New file.
	* gm2-libs-iso/SLongIO.def: New file.
	* gm2-libs-iso/SLongIO.mod: New file.
	* gm2-libs-iso/SLongWholeIO.def: New file.
	* gm2-libs-iso/SLongWholeIO.mod: New file.
	* gm2-libs-iso/SRawIO.def: New file.
	* gm2-libs-iso/SRawIO.mod: New file.
	* gm2-libs-iso/SRealIO.def: New file.
	* gm2-libs-iso/SRealIO.mod: New file.
	* gm2-libs-iso/SShortIO.def: New file.
	* gm2-libs-iso/SShortIO.mod: New file.
	* gm2-libs-iso/SShortWholeIO.def: New file.
	* gm2-libs-iso/SShortWholeIO.mod: New file.
	* gm2-libs-iso/STextIO.def: New file.
	* gm2-libs-iso/STextIO.mod: New file.
	* gm2-libs-iso/SWholeIO.def: New file.
	* gm2-libs-iso/SWholeIO.mod: New file.
	* gm2-libs-iso/SYSTEM.def: New file.
	* gm2-libs-iso/SYSTEM.mod: New file.
	* gm2-libs-iso/Semaphores.def: New file.
	* gm2-libs-iso/Semaphores.mod: New file.
	* gm2-libs-iso/SeqFile.def: New file.
	* gm2-libs-iso/SeqFile.mod: New file.
	* gm2-libs-iso/ServerSocket.def: New file.
	* gm2-libs-iso/ServerSocket.mod: New file.
	* gm2-libs-iso/ShortComplexMath.def: New file.
	* gm2-libs-iso/ShortComplexMath.mod: New file.
	* gm2-libs-iso/ShortIO.def: New file.
	* gm2-libs-iso/ShortIO.mod: New file.
	* gm2-libs-iso/ShortWholeIO.def: New file.
	* gm2-libs-iso/ShortWholeIO.mod: New file.
	* gm2-libs-iso/SimpleCipher.def: New file.
	* gm2-libs-iso/SimpleCipher.mod: New file.
	* gm2-libs-iso/StdChans.def: New file.
	* gm2-libs-iso/StdChans.mod: New file.
	* gm2-libs-iso/Storage.def: New file.
	* gm2-libs-iso/Storage.mod: New file.
	* gm2-libs-iso/StreamFile.def: New file.
	* gm2-libs-iso/StreamFile.mod: New file.
	* gm2-libs-iso/StringChan.def: New file.
	* gm2-libs-iso/StringChan.mod: New file.
	* gm2-libs-iso/Strings.def: New file.
	* gm2-libs-iso/Strings.mod: New file.
	* gm2-libs-iso/SysClock.def: New file.
	* gm2-libs-iso/SysClock.mod: New file.
	* gm2-libs-iso/TERMINATION.def: New file.
	* gm2-libs-iso/TERMINATION.mod: New file.
	* gm2-libs-iso/TermFile.def: New file.
	* gm2-libs-iso/TermFile.mod: New file.
	* gm2-libs-iso/TextIO.def: New file.
	* gm2-libs-iso/TextIO.mod: New file.
	* gm2-libs-iso/WholeConv.def: New file.
	* gm2-libs-iso/WholeConv.mod: New file.
	* gm2-libs-iso/WholeIO.def: New file.
	* gm2-libs-iso/WholeIO.mod: New file.
	* gm2-libs-iso/WholeStr.def: New file.
	* gm2-libs-iso/WholeStr.mod: New file.
	* gm2-libs-iso/wrapsock.c: New file.
	* gm2-libs-iso/wrapsock.def: New file.
	* gm2-libs-iso/wraptime.c: New file.
	* gm2-libs-iso/wraptime.def: New file.
	* gm2-libs-min/M2RTS.def: New file.
	* gm2-libs-min/M2RTS.mod: New file.
	* gm2-libs-min/SYSTEM.def: New file.
	* gm2-libs-min/SYSTEM.mod: New file.
	* gm2-libs-min/libc.c: New file.
	* gm2-libs-min/libc.def: New file.
	* gm2-libs-pim/BitBlockOps.def: New file.
	* gm2-libs-pim/BitBlockOps.mod: New file.
	* gm2-libs-pim/BitByteOps.def: New file.
	* gm2-libs-pim/BitByteOps.mod: New file.
	* gm2-libs-pim/BitWordOps.def: New file.
	* gm2-libs-pim/BitWordOps.mod: New file.
	* gm2-libs-pim/BlockOps.def: New file.
	* gm2-libs-pim/BlockOps.mod: New file.
	* gm2-libs-pim/Break.c: New file.
	* gm2-libs-pim/Break.def: New file.
	* gm2-libs-pim/CardinalIO.def: New file.
	* gm2-libs-pim/CardinalIO.mod: New file.
	* gm2-libs-pim/Conversions.def: New file.
	* gm2-libs-pim/Conversions.mod: New file.
	* gm2-libs-pim/DebugPMD.def: New file.
	* gm2-libs-pim/DebugPMD.mod: New file.
	* gm2-libs-pim/DebugTrace.def: New file.
	* gm2-libs-pim/DebugTrace.mod: New file.
	* gm2-libs-pim/Delay.def: New file.
	* gm2-libs-pim/Delay.mod: New file.
	* gm2-libs-pim/Display.def: New file.
	* gm2-libs-pim/Display.mod: New file.
	* gm2-libs-pim/ErrorCode.def: New file.
	* gm2-libs-pim/ErrorCode.mod: New file.
	* gm2-libs-pim/FileSystem.def: New file.
	* gm2-libs-pim/FileSystem.mod: New file.
	* gm2-libs-pim/FloatingUtilities.def: New file.
	* gm2-libs-pim/FloatingUtilities.mod: New file.
	* gm2-libs-pim/InOut.def: New file.
	* gm2-libs-pim/InOut.mod: New file.
	* gm2-libs-pim/Keyboard.def: New file.
	* gm2-libs-pim/Keyboard.mod: New file.
	* gm2-libs-pim/LongIO.def: New file.
	* gm2-libs-pim/LongIO.mod: New file.
	* gm2-libs-pim/NumberConversion.def: New file.
	* gm2-libs-pim/NumberConversion.mod: New file.
	* gm2-libs-pim/README.texi: New file.
	* gm2-libs-pim/Random.def: New file.
	* gm2-libs-pim/Random.mod: New file.
	* gm2-libs-pim/RealConversions.def: New file.
	* gm2-libs-pim/RealConversions.mod: New file.
	* gm2-libs-pim/RealInOut.def: New file.
	* gm2-libs-pim/RealInOut.mod: New file.
	* gm2-libs-pim/Strings.def: New file.
	* gm2-libs-pim/Strings.mod: New file.
	* gm2-libs-pim/Termbase.def: New file.
	* gm2-libs-pim/Termbase.mod: New file.
	* gm2-libs-pim/Terminal.def: New file.
	* gm2-libs-pim/Terminal.mod: New file.
	* gm2-libs-pim/TimeDate.def: New file.
	* gm2-libs-pim/TimeDate.mod: New file.
	* gm2-libs/ASCII.def: New file.
	* gm2-libs/ASCII.mod: New file.
	* gm2-libs/Args.def: New file.
	* gm2-libs/Args.mod: New file.
	* gm2-libs/Assertion.def: New file.
	* gm2-libs/Assertion.mod: New file.
	* gm2-libs/Break.def: New file.
	* gm2-libs/Break.mod: New file.
	* gm2-libs/Builtins.def: New file.
	* gm2-libs/Builtins.mod: New file.
	* gm2-libs/COROUTINES.def: New file.
	* gm2-libs/COROUTINES.mod: New file.
	* gm2-libs/CmdArgs.def: New file.
	* gm2-libs/CmdArgs.mod: New file.
	* gm2-libs/Debug.def: New file.
	* gm2-libs/Debug.mod: New file.
	* gm2-libs/DynamicStrings.def: New file.
	* gm2-libs/DynamicStrings.mod: New file.
	* gm2-libs/Environment.def: New file.
	* gm2-libs/Environment.mod: New file.
	* gm2-libs/FIO.def: New file.
	* gm2-libs/FIO.mod: New file.
	* gm2-libs/FormatStrings.def: New file.
	* gm2-libs/FormatStrings.mod: New file.
	* gm2-libs/FpuIO.def: New file.
	* gm2-libs/FpuIO.mod: New file.
	* gm2-libs/GetOpt.def: New file.
	* gm2-libs/GetOpt.mod: New file.
	* gm2-libs/IO.def: New file.
	* gm2-libs/IO.mod: New file.
	* gm2-libs/Indexing.def: New file.
	* gm2-libs/Indexing.mod: New file.
	* gm2-libs/LMathLib0.def: New file.
	* gm2-libs/LMathLib0.mod: New file.
	* gm2-libs/LegacyReal.def: New file.
	* gm2-libs/LegacyReal.mod: New file.
	* gm2-libs/M2EXCEPTION.def: New file.
	* gm2-libs/M2EXCEPTION.mod: New file.
	* gm2-libs/M2RTS.def: New file.
	* gm2-libs/M2RTS.mod: New file.
	* gm2-libs/MathLib0.def: New file.
	* gm2-libs/MathLib0.mod: New file.
	* gm2-libs/MemUtils.def: New file.
	* gm2-libs/MemUtils.mod: New file.
	* gm2-libs/NumberIO.def: New file.
	* gm2-libs/NumberIO.mod: New file.
	* gm2-libs/OptLib.def: New file.
	* gm2-libs/OptLib.mod: New file.
	* gm2-libs/PushBackInput.def: New file.
	* gm2-libs/PushBackInput.mod: New file.
	* gm2-libs/README.texi: New file.
	* gm2-libs/RTExceptions.def: New file.
	* gm2-libs/RTExceptions.mod: New file.
	* gm2-libs/RTint.def: New file.
	* gm2-libs/RTint.mod: New file.
	* gm2-libs/SArgs.def: New file.
	* gm2-libs/SArgs.mod: New file.
	* gm2-libs/SCmdArgs.def: New file.
	* gm2-libs/SCmdArgs.mod: New file.
	* gm2-libs/SEnvironment.def: New file.
	* gm2-libs/SEnvironment.mod: New file.
	* gm2-libs/SFIO.def: New file.
	* gm2-libs/SFIO.mod: New file.
	* gm2-libs/SMathLib0.def: New file.
	* gm2-libs/SMathLib0.mod: New file.
	* gm2-libs/SYSTEM.def: New file.
	* gm2-libs/SYSTEM.mod: New file.
	* gm2-libs/Scan.def: New file.
	* gm2-libs/Scan.mod: New file.
	* gm2-libs/Selective.def: New file.
	* gm2-libs/StdIO.def: New file.
	* gm2-libs/StdIO.mod: New file.
	* gm2-libs/Storage.def: New file.
	* gm2-libs/Storage.mod: New file.
	* gm2-libs/StrCase.def: New file.
	* gm2-libs/StrCase.mod: New file.
	* gm2-libs/StrIO.def: New file.
	* gm2-libs/StrIO.mod: New file.
	* gm2-libs/StrLib.def: New file.
	* gm2-libs/StrLib.mod: New file.
	* gm2-libs/StringConvert.def: New file.
	* gm2-libs/StringConvert.mod: New file.
	* gm2-libs/SysExceptions.def: New file.
	* gm2-libs/SysStorage.def: New file.
	* gm2-libs/SysStorage.mod: New file.
	* gm2-libs/TimeString.def: New file.
	* gm2-libs/TimeString.mod: New file.
	* gm2-libs/UnixArgs.def: New file.
	* gm2-libs/cbuiltin.def: New file.
	* gm2-libs/cgetopt.def: New file.
	* gm2-libs/config-host: New file.
	* gm2-libs/config-host.in: New file.
	* gm2-libs/cxxabi.def: New file.
	* gm2-libs/dtoa.def: New file.
	* gm2-libs/errno.def: New file.
	* gm2-libs/gdbif.def: New file.
	* gm2-libs/gdbif.mod: New file.
	* gm2-libs/gm2-libs-host.h.in: New file.
	* gm2-libs/ldtoa.def: New file.
	* gm2-libs/libc.def: New file.
	* gm2-libs/libm.def: New file.
	* gm2-libs/sckt.def: New file.
	* gm2-libs/termios.def: New file.
	* gm2-libs/wrapc.def: New file.
	* gm2config.h.in: New file.
	* gm2spec.c: New file.
	* gm2version.h: New file.
	* images/LICENSE.IMG: New file.
	* images/gnu.eps: New file.
	* images/gnupng: New file.
	* init/README: New file.
	* init/gm2-gccinit: New file.
	* init/gm2lccinit: New file.
	* init/gm2lgeninit: New file.
	* init/gm2linit: New file.
	* init/gm2lorderinit: New file.
	* init/gm2minit: New file.
	* init/mcinit: New file.
	* init/ppginit: New file.
	* lang-options.h: New file.
	* lang-specs.h: New file.
	* lang.opt: New file.
	* m2-link-support.h: New file.
	* m2-tree.def: New file.
	* m2-tree.h: New file.
	* m2.flex: New file.
	* m2pp.c: New file.
	* m2pp.h: New file.
	* mc-boot-ch/GBuiltins.c: New file.
	* mc-boot-ch/GRTco.c: New file.
	* mc-boot-ch/GSYSTEM.c: New file.
	* mc-boot-ch/GSelective.c: New file.
	* mc-boot-ch/GSysExceptions.c: New file.
	* mc-boot-ch/GUnixArgs.c: New file.
	* mc-boot-ch/Gcbuiltin.c: New file.
	* mc-boot-ch/Gdtoa.c: New file.
	* mc-boot-ch/Gerrno.c: New file.
	* mc-boot-ch/Gldtoa.c: New file.
	* mc-boot-ch/Glibc.c: New file.
	* mc-boot-ch/Glibm.c: New file.
	* mc-boot-ch/Gmcrts.c: New file.
	* mc-boot-ch/Gmcrts.h: New file.
	* mc-boot-ch/Gnetwork.h: New file.
	* mc-boot-ch/Gpth.c: New file.
	* mc-boot-ch/Gtermios.c: New file.
	* mc-boot-ch/Gwrapc.c: New file.
	* mc-boot-ch/README: New file.
	* mc-boot-ch/network.c: New file.
	* mc-boot/GASCII.c: New file.
	* mc-boot/GASCII.h: New file.
	* mc-boot/GArgs.c: New file.
	* mc-boot/GArgs.h: New file.
	* mc-boot/GAssertion.c: New file.
	* mc-boot/GAssertion.h: New file.
	* mc-boot/GBreak.c: New file.
	* mc-boot/GBreak.h: New file.
	* mc-boot/GCOROUTINES.h: New file.
	* mc-boot/GCmdArgs.c: New file.
	* mc-boot/GCmdArgs.h: New file.
	* mc-boot/GDebug.c: New file.
	* mc-boot/GDebug.h: New file.
	* mc-boot/GDynamicStrings.c: New file.
	* mc-boot/GDynamicStrings.h: New file.
	* mc-boot/GEnvironment.c: New file.
	* mc-boot/GEnvironment.h: New file.
	* mc-boot/GFIO.c: New file.
	* mc-boot/GFIO.h: New file.
	* mc-boot/GFormatStrings.c: New file.
	* mc-boot/GFormatStrings.h: New file.
	* mc-boot/GFpuIO.c: New file.
	* mc-boot/GFpuIO.h: New file.
	* mc-boot/GIO.c: New file.
	* mc-boot/GIO.h: New file.
	* mc-boot/GIndexing.c: New file.
	* mc-boot/GIndexing.h: New file.
	* mc-boot/GM2EXCEPTION.c: New file.
	* mc-boot/GM2EXCEPTION.h: New file.
	* mc-boot/GM2RTS.c: New file.
	* mc-boot/GM2RTS.h: New file.
	* mc-boot/GMemUtils.c: New file.
	* mc-boot/GMemUtils.h: New file.
	* mc-boot/GNumberIO.c: New file.
	* mc-boot/GNumberIO.h: New file.
	* mc-boot/GPushBackInput.c: New file.
	* mc-boot/GPushBackInput.h: New file.
	* mc-boot/GRTExceptions.c: New file.
	* mc-boot/GRTExceptions.h: New file.
	* mc-boot/GRTco.h: New file.
	* mc-boot/GRTint.c: New file.
	* mc-boot/GRTint.h: New file.
	* mc-boot/GSArgs.c: New file.
	* mc-boot/GSArgs.h: New file.
	* mc-boot/GSFIO.c: New file.
	* mc-boot/GSFIO.h: New file.
	* mc-boot/GSYSTEM.h: New file.
	* mc-boot/GSelective.h: New file.
	* mc-boot/GStdIO.c: New file.
	* mc-boot/GStdIO.h: New file.
	* mc-boot/GStorage.c: New file.
	* mc-boot/GStorage.h: New file.
	* mc-boot/GStrCase.c: New file.
	* mc-boot/GStrCase.h: New file.
	* mc-boot/GStrIO.c: New file.
	* mc-boot/GStrIO.h: New file.
	* mc-boot/GStrLib.c: New file.
	* mc-boot/GStrLib.h: New file.
	* mc-boot/GStringConvert.c: New file.
	* mc-boot/GStringConvert.h: New file.
	* mc-boot/GSysExceptions.h: New file.
	* mc-boot/GSysStorage.c: New file.
	* mc-boot/GSysStorage.h: New file.
	* mc-boot/GTimeString.c: New file.
	* mc-boot/GTimeString.h: New file.
	* mc-boot/GUnixArgs.h: New file.
	* mc-boot/Galists.c: New file.
	* mc-boot/Galists.h: New file.
	* mc-boot/Gdecl.c: New file.
	* mc-boot/Gdecl.h: New file.
	* mc-boot/Gdtoa.h: New file.
	* mc-boot/Gerrno.h: New file.
	* mc-boot/Gkeyc.c: New file.
	* mc-boot/Gkeyc.h: New file.
	* mc-boot/Gldtoa.h: New file.
	* mc-boot/Glibc.h: New file.
	* mc-boot/Glibm.h: New file.
	* mc-boot/Glists.c: New file.
	* mc-boot/Glists.h: New file.
	* mc-boot/GmcComment.c: New file.
	* mc-boot/GmcComment.h: New file.
	* mc-boot/GmcComp.c: New file.
	* mc-boot/GmcComp.h: New file.
	* mc-boot/GmcDebug.c: New file.
	* mc-boot/GmcDebug.h: New file.
	* mc-boot/GmcError.c: New file.
	* mc-boot/GmcError.h: New file.
	* mc-boot/GmcFileName.c: New file.
	* mc-boot/GmcFileName.h: New file.
	* mc-boot/GmcLexBuf.c: New file.
	* mc-boot/GmcLexBuf.h: New file.
	* mc-boot/GmcMetaError.c: New file.
	* mc-boot/GmcMetaError.h: New file.
	* mc-boot/GmcOptions.c: New file.
	* mc-boot/GmcOptions.h: New file.
	* mc-boot/GmcPreprocess.c: New file.
	* mc-boot/GmcPreprocess.h: New file.
	* mc-boot/GmcPretty.c: New file.
	* mc-boot/GmcPretty.h: New file.
	* mc-boot/GmcPrintf.c: New file.
	* mc-boot/GmcPrintf.h: New file.
	* mc-boot/GmcQuiet.c: New file.
	* mc-boot/GmcQuiet.h: New file.
	* mc-boot/GmcReserved.c: New file.
	* mc-boot/GmcReserved.h: New file.
	* mc-boot/GmcSearch.c: New file.
	* mc-boot/GmcSearch.h: New file.
	* mc-boot/GmcStack.c: New file.
	* mc-boot/GmcStack.h: New file.
	* mc-boot/GmcStream.c: New file.
	* mc-boot/GmcStream.h: New file.
	* mc-boot/Gmcflex.h: New file.
	* mc-boot/Gmcp1.c: New file.
	* mc-boot/Gmcp1.h: New file.
	* mc-boot/Gmcp2.c: New file.
	* mc-boot/Gmcp2.h: New file.
	* mc-boot/Gmcp3.c: New file.
	* mc-boot/Gmcp3.h: New file.
	* mc-boot/Gmcp4.c: New file.
	* mc-boot/Gmcp4.h: New file.
	* mc-boot/Gmcp5.c: New file.
	* mc-boot/Gmcp5.h: New file.
	* mc-boot/GnameKey.c: New file.
	* mc-boot/GnameKey.h: New file.
	* mc-boot/Gpth.h: New file.
	* mc-boot/GsymbolKey.c: New file.
	* mc-boot/GsymbolKey.h: New file.
	* mc-boot/Gtermios.h: New file.
	* mc-boot/Gtop.c: New file.
	* mc-boot/Gvarargs.c: New file.
	* mc-boot/Gvarargs.h: New file.
	* mc-boot/Gwlists.c: New file.
	* mc-boot/Gwlists.h: New file.
	* mc-boot/Gwrapc.h: New file.
	* mc-boot/README: New file.
	* mc/Indexing.def: New file.
	* mc/Indexing.mod: New file.
	* mc/README: New file.
	* mc/alists.def: New file.
	* mc/alists.mod: New file.
	* mc/decl.def: New file.
	* mc/decl.mod: New file.
	* mc/decl.mod-extra: New file.
	* mc/keyc.def: New file.
	* mc/keyc.mod: New file.
	* mc/lists.def: New file.
	* mc/lists.mod: New file.
	* mc/m2flex.def: New file.
	* mc/mc.flex: New file.
	* mc/mcComment.def: New file.
	* mc/mcComment.h: New file.
	* mc/mcComment.mod: New file.
	* mc/mcComp.def: New file.
	* mc/mcComp.mod: New file.
	* mc/mcDebug.def: New file.
	* mc/mcDebug.mod: New file.
	* mc/mcError.def: New file.
	* mc/mcError.mod: New file.
	* mc/mcFileName.def: New file.
	* mc/mcFileName.mod: New file.
	* mc/mcLexBuf.def: New file.
	* mc/mcLexBuf.h: New file.
	* mc/mcLexBuf.mod: New file.
	* mc/mcMetaError.def: New file.
	* mc/mcMetaError.mod: New file.
	* mc/mcOptions.def: New file.
	* mc/mcOptions.mod: New file.
	* mc/mcPreprocess.def: New file.
	* mc/mcPreprocess.mod: New file.
	* mc/mcPretty.def: New file.
	* mc/mcPretty.mod: New file.
	* mc/mcPrintf.def: New file.
	* mc/mcPrintf.mod: New file.
	* mc/mcQuiet.def: New file.
	* mc/mcQuiet.mod: New file.
	* mc/mcReserved.def: New file.
	* mc/mcReserved.h: New file.
	* mc/mcReserved.mod: New file.
	* mc/mcSearch.def: New file.
	* mc/mcSearch.mod: New file.
	* mc/mcStack.def: New file.
	* mc/mcStack.mod: New file.
	* mc/mcStream.def: New file.
	* mc/mcStream.mod: New file.
	* mc/mcflex.def: New file.
	* mc/mcp1.def: New file.
	* mc/mcp2.def: New file.
	* mc/mcp3.def: New file.
	* mc/mcp4.def: New file.
	* mc/mcp5.def: New file.
	* mc/nameKey.def: New file.
	* mc/nameKey.mod: New file.
	* mc/symbolKey.def: New file.
	* mc/symbolKey.mod: New file.
	* mc/top.mod: New file.
	* mc/varargs.def: New file.
	* mc/varargs.mod: New file.
	* mc/wlists.def: New file.
	* mc/wlists.mod: New file.
	* patches/gcc/11.1.0/01-patches: New file.
	* patches/gcc/11.1.0/02-patches: New file.
	* patches/gcc/11.1.0/03-patches: New file.
	* patches/gcc/11.1.0/04-patches: New file.
	* patches/gcc/11.1.0/05-patches: New file.
	* patches/gcc/11.1.0/06-patches: New file.
	* patches/gcc/11.1.0/07-patches: New file.
	* patches/gcc/11.1.0/08-patches: New file.
	* patches/gcc/11.1.0/09-patches: New file.
	* patches/gcc/11.1.0/10-patches: New file.
	* patches/gcc/11.1.0/11-patches: New file.
	* patches/gcc/11.1.0/12-patches: New file.
	* patches/gcc/11.1.0/13-patches: New file.
	* patches/gcc/11.1.0/14-patches: New file.
	* patches/gcc/11.1.0/15-patches: New file.
	* patches/gcc/11.1.0/16-patches: New file.
	* patches/gcc/11.1.0/17-patches: New file.
	* patches/gcc/11.1.0/18-patches: New file.
	* patches/gcc/11.1.0/19-patches: New file.
	* patches/gcc/11.1.0/20-patches: New file.
	* patches/gcc/11.1.0/21-patches: New file.
	* patches/gcc/11.1.0/22-patches: New file.
	* patches/gcc/11.1.0/23-patches: New file.
	* patches/gcc/3.3.6/01.waldek_patch_gcc: New file.
	* patches/gcc/3.3.6/02.gaius_patch_gcc: New file.
	* patches/gcc/4.1.0/01.gaius_patch_gcc: New file.
	* patches/gcc/4.1.1/01.gaius_patch_gcc: New file.
	* patches/gcc/4.1.2/01-patches: New file.
	* patches/gcc/4.1.2/02-patches: New file.
	* patches/gcc/4.1.2/ChangeLog: New file.
	* patches/gcc/4.1.2/old/01.gaius_patch_gcc: New file.
	* patches/gcc/4.1.2/old/02.gaius_rs6000_lang: New file.
	* patches/gcc/4.1.2/old/03.michael_i386: New file.
	* patches/gcc/4.1.2/old/04.gaius_patch_gcc: New file.
	* patches/gcc/4.1.2/old/05.gaius_patch_gcc: New file.
	* patches/gcc/4.1.2/old/06.gaius_patch_tree: New file.
	* patches/gcc/4.1.2/old/07.michael_i386: New file.
	* patches/gcc/4.1.2/old/08.gaius_ipa_type_escape.c: New file.
	* patches/gcc/4.1.2/old/09.gaius_patch_config: New file.
	* patches/gcc/4.1.2/old/10.michael_snowleopard1: New file.
	* patches/gcc/4.1.2/old/11.michael_snowleopard2: New file.
	* patches/gcc/4.1.2/old/12.gaius_patch_tree_flow_inline_h: New file.
	* patches/gcc/4.7.1/01-patches: New file.
	* patches/gcc/4.7.1/02-patches: New file.
	* patches/gcc/4.7.3/01-patches: New file.
	* patches/gcc/4.7.3/02-patches: New file.
	* patches/gcc/4.7.3/03-patches: New file.
	* patches/gcc/4.7.3/04-patches: New file.
	* patches/gcc/4.7.3/05-patches: New file.
	* patches/gcc/4.7.3/06-patches: New file.
	* patches/gcc/4.7.3/07-patches: New file.
	* patches/gcc/4.7.3/08-patches: New file.
	* patches/gcc/4.7.3/09-patches: New file.
	* patches/gcc/4.7.3/10-patches: New file.
	* patches/gcc/4.7.3/11-patches: New file.
	* patches/gcc/4.7.3/12-patches: New file.
	* patches/gcc/4.7.4/01-patches: New file.
	* patches/gcc/4.7.4/02-patches: New file.
	* patches/gcc/4.7.4/03-patches: New file.
	* patches/gcc/4.7.4/04-patches: New file.
	* patches/gcc/4.7.4/05-patches: New file.
	* patches/gcc/4.7.4/06-patches: New file.
	* patches/gcc/4.7.4/07-patches: New file.
	* patches/gcc/4.7.4/08-patches: New file.
	* patches/gcc/4.7.4/09-patches: New file.
	* patches/gcc/4.7.4/10-patches: New file.
	* patches/gcc/4.7.4/11-patches: New file.
	* patches/gcc/4.7.4/12-patches: New file.
	* patches/gcc/5.2.0/01-patches: New file.
	* patches/gcc/5.2.0/02-patches: New file.
	* patches/gcc/5.2.0/03-patches: New file.
	* patches/gcc/5.2.0/04-patches: New file.
	* patches/gcc/5.2.0/05-patches: New file.
	* patches/gcc/5.2.0/06-patches: New file.
	* patches/gcc/5.2.0/07-patches: New file.
	* patches/gcc/5.2.0/08-patches: New file.
	* patches/gcc/5.2.0/09-patches: New file.
	* patches/gcc/5.2.0/10-patches: New file.
	* patches/gcc/5.2.0/11-patches: New file.
	* patches/gcc/5.2.0/12-patches: New file.
	* patches/gcc/6.4.0/01-patches: New file.
	* patches/gcc/6.4.0/02-patches: New file.
	* patches/gcc/6.4.0/03-patches: New file.
	* patches/gcc/6.4.0/04-patches: New file.
	* patches/gcc/6.4.0/05-patches: New file.
	* patches/gcc/6.4.0/06-patches: New file.
	* patches/gcc/6.4.0/07-patches: New file.
	* patches/gcc/6.4.0/08-patches: New file.
	* patches/gcc/6.4.0/09-patches: New file.
	* patches/gcc/6.4.0/10-patches: New file.
	* patches/gcc/6.4.0/11-patches: New file.
	* patches/gcc/trunc/01-patches: New file.
	* patches/gcc/trunc/02-patches: New file.
	* patches/gcc/trunc/03-patches: New file.
	* patches/gcc/trunc/04-patches: New file.
	* patches/gcc/trunc/05-patches: New file.
	* patches/gcc/trunc/06-patches: New file.
	* patches/gcc/trunc/07-patches: New file.
	* patches/gcc/trunc/08-patches: New file.
	* patches/gcc/trunc/09-patches: New file.
	* patches/gcc/trunc/10-patches: New file.
	* patches/gcc/trunc/11-patches: New file.
	* patches/gcc/trunk/01-patches: New file.
	* patches/gcc/trunk/02-patches: New file.
	* patches/gcc/trunk/03-patches: New file.
	* patches/gcc/trunk/04-patches: New file.
	* patches/gcc/trunk/05-patches: New file.
	* patches/gcc/trunk/06-patches: New file.
	* patches/gcc/trunk/07-patches: New file.
	* patches/gcc/trunk/08-patches: New file.
	* patches/gcc/trunk/09-patches: New file.
	* patches/gcc/trunk/10-patches: New file.
	* patches/gcc/trunk/11-patches: New file.
	* patches/gcc/trunk/12-patches: New file.
	* patches/gcc/trunk/13-patches: New file.
	* patches/gcc/trunk/15-patches: New file.
	* patches/gcc/trunk/23-patches: New file.
	* patches/gcc/trunk/24-patches: New file.
	* patches/gcc/trunk/25-patches: New file.
	* patches/gdb/6.3/01.waldek_patch_gdb: New file.
	* patches/gdb/6.3/02.gaius_patch_gdb: New file.
	* plugin/README: New file.
	* plugin/m2rte.c: New file.
	* tools-src/README: New file.
	* tools-src/array2index.py: New file.
	* tools-src/boilerplate.py: New file.
	* tools-src/buildpg: New file.
	* tools-src/buildsyntax: New file.
	* tools-src/calcpath: New file.
	* tools-src/createUlmSys: New file.
	* tools-src/def2texi.py: New file.
	* tools-src/gensum.py: New file.
	* tools-src/incfile: New file.
	* tools-src/makeSystem: New file.
	* tools-src/makeconfigure: New file.
	* tools-src/makeversion: New file.
	* tools-src/mklink.c: New file.
	* tools-src/tidydates.py: New file.
	* version.c: New file.
	* www/Makefile.in: New file.
	* www/README: New file.
	* www/gm2-logo.ms: New file.
	* www/gm2.css: New file.
	* www/tools/createhtml.py: New file.
	* www/tools/texi2tr/html/about.tpl: New file.
	* www/tools/texi2tr/html/community.html: New file.
	* www/tools/texi2tr/html/community.tpl: New file.
	* www/tools/texi2tr/html/development.html: New file.
	* www/tools/texi2tr/html/development.tpl: New file.
	* www/tools/texi2tr/html/download.tpl: New file.
	* www/tools/texi2tr/html/footer.ht: New file.
	* www/tools/texi2tr/html/header.ht: New file.
	* www/tools/texi2tr/html/heading.ht: New file.
	* www/tools/texi2tr/html/homepage.tpl: New file.
	* www/tools/texi2tr/html/index.html: New file.
	* www/tools/texi2tr/html/license.tpl: New file.
	* www/tools/texi2tr/html/news.html: New file.
	* www/tools/texi2tr/html/news.tpl: New file.
	* www/tools/texi2tr/html/platforms.tpl: New file.
	* www/tools/texi2tr/html/release.tpl: New file.
	* www/tools/texi2tr/html/texi2tr.css: New file.
	* www/tools/texi2tr/html/title.ht: New file.
	* www/tools/texi2tr/html/users.tpl: New file.
	* www/tools/texi2tr/png/200px-Heckert_GNU_white.png: New file.
	* www/tools/texi2tr/png/debian-swirl48x48.png: New file.
	* www/tools/texi2tr/png/develop.png: New file.
	* www/tools/texi2tr/png/install.png: New file.
	* www/tools/texi2tr/png/library.png: New file.
	* www/tools/texi2tr/png/menu-left-tab.png: New file.
	* www/tools/texi2tr/png/menu-right-tab.png: New file.
	* www/tools/texi2tr/png/menu-selected-left-tab.png: New file.
	* www/tools/texi2tr/png/menu-selected-right-tab.png: New file.
	* www/tools/texi2tr/png/next.png: New file.
	* www/tools/texi2tr/png/note.png: New file.
	* www/tools/texi2tr/png/prev.png: New file.
	* www/tools/texi2tr/png/release.png: New file.
	* www/tools/texi2tr/png/snapshot.png: New file.
	* www/tools/texi2tr/png/terminal.png: New file.
	* www/tools/texi2tr/png/users.png: New file.
	* www/tools/texi2tr/src/config.py: New file.
	* www/tools/texi2tr/src/navigation.py: New file.
	* www/tools/texi2tr/src/outputdev.py: New file.
	* www/tools/texi2tr/src/texi2tr.py: New file.

gcc/testsuite/
	* gm2: New directory.
	* gm2/ChangeLog: New file.
	* lib/gm2-dg.exp: New file.
	* lib/gm2-simple.exp: New file.
	* lib/gm2-torture.exp: New file.
	* lib/gm2.exp: New file.

gcc/testsuite/gm2/
	* calling-c/datatypes/unbounded/run/pass/c.c: New file.
	* calling-c/datatypes/unbounded/run/pass/c.def: New file.
	* calling-c/datatypes/unbounded/run/pass/gm2.exp: New file.
	* calling-c/datatypes/unbounded/run/pass/m.mod: New file.
	* case/pass/gm2.exp: New file.
	* case/pass/testcase1.mod: New file.
	* case/pass/testcase2.mod: New file.
	* case/pass/testcase3.mod: New file.
	* case/pass/testcase4.mod: New file.
	* complex/fail/var1.mod: New file.
	* complex/pass/arith.mod: New file.
	* complex/pass/arith2.mod: New file.
	* complex/pass/arith3.mod: New file.
	* complex/pass/arith4.mod: New file.
	* complex/pass/arith5.mod: New file.
	* complex/pass/arith6.mod: New file.
	* complex/pass/consts.mod: New file.
	* complex/pass/consts2.mod: New file.
	* complex/pass/consts3.mod: New file.
	* complex/pass/gm2.exp: New file.
	* complex/pass/tinycabs.mod: New file.
	* complex/pass/var1.mod: New file.
	* complex/pass/var2.mod: New file.
	* complex/pass/var3.mod: New file.
	* complex/pass/var4.mod: New file.
	* complex/pass/var5.mod: New file.
	* complex/pass/var6.mod: New file.
	* complex/pass/var7.mod: New file.
	* complex/pass/var8.mod: New file.
	* complex/run/pass/arith3.mod: New file.
	* complex/run/pass/arith4.mod: New file.
	* complex/run/pass/arith5.mod: New file.
	* complex/run/pass/arith6.mod: New file.
	* complex/run/pass/arith7.mod: New file.
	* complex/run/pass/arith8.mod: New file.
	* complex/run/pass/gm2.exp: New file.
	* coroutines/pim/run/pass/gm2.exp: New file.
	* coroutines/pim/run/pass/testiotransfer.mod: New file.
	* coroutines/pim/run/pass/testtransfer.mod: New file.
	* cpp/fail/another.h: New file.
	* cpp/fail/fail1.mod: New file.
	* cpp/fail/ignore: New file.
	* cpp/fail/ignorem2f: New file.
	* cpp/fail/mustfail: New file.
	* cpp/longcard2.mod: New file.
	* cpp/longstrimp.mod: New file.
	* cpp/pass/arrayhuge.mod: New file.
	* cpp/pass/arrayhuge2.mod: New file.
	* cpp/pass/cpp.mod: New file.
	* cpp/pass/cpph.mod: New file.
	* cpp/pass/gm2.exp: New file.
	* cpp/pass/subaddr.mod: New file.
	* cpp/pass/testcpp.mod: New file.
	* cpp/pass/testcpp2.mod: New file.
	* cpp/setchar2.mod: New file.
	* cpp/setchar6.mod: New file.
	* cse/fail/gm2.exp: New file.
	* cse/fail/testcse38.mod: New file.
	* cse/pass/gm2.exp: New file.
	* cse/pass/m2t.c: New file.
	* cse/pass/testb.mod: New file.
	* cse/pass/testbuiltin.def: New file.
	* cse/pass/testbuiltin.mod: New file.
	* cse/pass/testcse.def: New file.
	* cse/pass/testcse.mod: New file.
	* cse/pass/testcse10.mod: New file.
	* cse/pass/testcse11.mod: New file.
	* cse/pass/testcse12.mod: New file.
	* cse/pass/testcse13.mod: New file.
	* cse/pass/testcse14.mod: New file.
	* cse/pass/testcse15.mod: New file.
	* cse/pass/testcse16.mod: New file.
	* cse/pass/testcse17.mod: New file.
	* cse/pass/testcse18.mod: New file.
	* cse/pass/testcse19.mod: New file.
	* cse/pass/testcse2.mod: New file.
	* cse/pass/testcse20.mod: New file.
	* cse/pass/testcse21.mod: New file.
	* cse/pass/testcse22.mod: New file.
	* cse/pass/testcse23.mod: New file.
	* cse/pass/testcse24.mod: New file.
	* cse/pass/testcse25.mod: New file.
	* cse/pass/testcse26.mod: New file.
	* cse/pass/testcse27.mod: New file.
	* cse/pass/testcse28.mod: New file.
	* cse/pass/testcse29.mod: New file.
	* cse/pass/testcse3.mod: New file.
	* cse/pass/testcse31.mod: New file.
	* cse/pass/testcse32.mod: New file.
	* cse/pass/testcse33.mod: New file.
	* cse/pass/testcse34.mod: New file.
	* cse/pass/testcse35.mod: New file.
	* cse/pass/testcse36.mod: New file.
	* cse/pass/testcse37.mod: New file.
	* cse/pass/testcse39.mod: New file.
	* cse/pass/testcse4.c: New file.
	* cse/pass/testcse4.mod: New file.
	* cse/pass/testcse40.mod: New file.
	* cse/pass/testcse41.mod: New file.
	* cse/pass/testcse42.mod: New file.
	* cse/pass/testcse43.mod: New file.
	* cse/pass/testcse44.mod: New file.
	* cse/pass/testcse45.mod: New file.
	* cse/pass/testcse46.mod: New file.
	* cse/pass/testcse47.mod: New file.
	* cse/pass/testcse48.mod: New file.
	* cse/pass/testcse49.mod: New file.
	* cse/pass/testcse5.c: New file.
	* cse/pass/testcse5.mod: New file.
	* cse/pass/testcse50.def: New file.
	* cse/pass/testcse50.mod: New file.
	* cse/pass/testcse51.mod: New file.
	* cse/pass/testcse52.def: New file.
	* cse/pass/testcse52.mod: New file.
	* cse/pass/testcse53.def: New file.
	* cse/pass/testcse53.mod: New file.
	* cse/pass/testcse6.c: New file.
	* cse/pass/testcse6.mod: New file.
	* cse/pass/testcse7.c: New file.
	* cse/pass/testcse7.mod: New file.
	* cse/pass/testcse8.c: New file.
	* cse/pass/testcse8.mod: New file.
	* cse/pass/testcse9.c: New file.
	* cse/pass/testsize.mod: New file.
	* dynamic/pass/add.mod: New file.
	* dynamic/pass/gm2.exp: New file.
	* dynamic/pass/prog21.mod: New file.
	* dynamic/pass/testarray.mod: New file.
	* dynamic/pass/testarray2.mod: New file.
	* dynamic/pass/testarray3.mod: New file.
	* dynamic/pass/testarray4.mod: New file.
	* dynamic/pass/testarray6.mod: New file.
	* dynamic/pass/testbec.mod: New file.
	* dynamic/pass/testbec10.mod: New file.
	* dynamic/pass/testbec11.mod: New file.
	* dynamic/pass/testbec12.mod: New file.
	* dynamic/pass/testbec13.mod: New file.
	* dynamic/pass/testbec14.mod: New file.
	* dynamic/pass/testbec15.mod: New file.
	* dynamic/pass/testbec16.mod: New file.
	* dynamic/pass/testbec17.mod: New file.
	* dynamic/pass/testbec18.mod: New file.
	* dynamic/pass/testbec19.mod: New file.
	* dynamic/pass/testbec2.mod: New file.
	* dynamic/pass/testbec20.mod: New file.
	* dynamic/pass/testbec21.mod: New file.
	* dynamic/pass/testbec22.mod: New file.
	* dynamic/pass/testbec23.mod: New file.
	* dynamic/pass/testbec24.mod: New file.
	* dynamic/pass/testbec25.mod: New file.
	* dynamic/pass/testbec26.mod: New file.
	* dynamic/pass/testbec27.mod: New file.
	* dynamic/pass/testbec28.mod: New file.
	* dynamic/pass/testbec29.mod: New file.
	* dynamic/pass/testbec3.mod: New file.
	* dynamic/pass/testbec30.mod: New file.
	* dynamic/pass/testbec31.mod: New file.
	* dynamic/pass/testbec32.mod: New file.
	* dynamic/pass/testbec33.mod: New file.
	* dynamic/pass/testbec34.mod: New file.
	* dynamic/pass/testbec35.mod: New file.
	* dynamic/pass/testbec36.mod: New file.
	* dynamic/pass/testbec37.mod: New file.
	* dynamic/pass/testbec38.mod: New file.
	* dynamic/pass/testbec39.mod: New file.
	* dynamic/pass/testbec4.mod: New file.
	* dynamic/pass/testbec40.mod: New file.
	* dynamic/pass/testbec41.mod: New file.
	* dynamic/pass/testbec42.mod: New file.
	* dynamic/pass/testbec43.mod: New file.
	* dynamic/pass/testbec44.mod: New file.
	* dynamic/pass/testbec45.mod: New file.
	* dynamic/pass/testbec5.mod: New file.
	* dynamic/pass/testbec6.mod: New file.
	* dynamic/pass/testbec7.mod: New file.
	* dynamic/pass/testbec8.mod: New file.
	* dynamic/pass/testbec9.mod: New file.
	* dynamic/pass/testdavid.mod: New file.
	* dynamic/pass/testdiv.mod: New file.
	* dynamic/pass/testexp.mod: New file.
	* dynamic/pass/testfor.mod: New file.
	* dynamic/pass/testfor2.mod: New file.
	* dynamic/pass/testfunc.mod: New file.
	* dynamic/pass/testfunc2.mod: New file.
	* dynamic/pass/testfunc3.mod: New file.
	* dynamic/pass/testfunc4.mod: New file.
	* dynamic/pass/testfunc5.mod: New file.
	* dynamic/pass/testfunc6.mod: New file.
	* dynamic/pass/testif.mod: New file.
	* dynamic/pass/testit.mod: New file.
	* dynamic/pass/testloop.mod: New file.
	* dynamic/pass/testloop2.mod: New file.
	* dynamic/pass/testloop3.mod: New file.
	* dynamic/pass/testloop4.mod: New file.
	* dynamic/pass/testloop5.mod: New file.
	* dynamic/pass/testmin.mod: New file.
	* dynamic/pass/testnum4.mod: New file.
	* dynamic/pass/testord.mod: New file.
	* dynamic/pass/testparam.mod: New file.
	* dynamic/pass/testparam2.mod: New file.
	* dynamic/pass/testproc.mod: New file.
	* dynamic/pass/testproc2.c: New file.
	* dynamic/pass/testproc2.def: New file.
	* dynamic/pass/testproc2.mod: New file.
	* dynamic/pass/testscn.mod: New file.
	* dynamic/pass/testset.mod: New file.
	* dynamic/pass/testset2.mod: New file.
	* dynamic/pass/testset3.mod: New file.
	* dynamic/pass/teststr.c: New file.
	* dynamic/pass/teststr.mod: New file.
	* dynamic/pass/teststr2.mod: New file.
	* dynamic/pass/teststring.mod: New file.
	* dynamic/pass/testunbounded.mod: New file.
	* dynamic/pass/testwith.mod: New file.
	* dynamic/pass/testzero.mod: New file.
	* dynamic/pass/wc.mod: New file.
	* embedded/pass/gm2.exp: New file.
	* embedded/pass/varataddress.mod: New file.
	* embedded/pass/varataddress1.mod: New file.
	* embedded/pass/varataddress2.mod: New file.
	* embedded/pass/varataddress3.mod: New file.
	* errors/Makefile.in: New file.
	* errors/fail/array1.mod: New file.
	* errors/fail/badfor.mod: New file.
	* errors/fail/badshift.mod: New file.
	* errors/fail/badsubexpradr.mod: New file.
	* errors/fail/end.mod: New file.
	* errors/fail/gm2.exp: New file.
	* errors/fail/mismatched.mod: New file.
	* errors/fail/mismatchedproc.mod: New file.
	* errors/fail/nestedproc4.mod: New file.
	* errors/fail/nomodule.mod: New file.
	* errors/fail/proctype.mod: New file.
	* errors/fail/prog110.mod: New file.
	* errors/fail/prog111.mod: New file.
	* errors/fail/prog113.mod: New file.
	* errors/fail/prog114.mod: New file.
	* errors/fail/testaddress.mod: New file.
	* errors/fail/testarray.mod: New file.
	* errors/fail/testbit.mod: New file.
	* errors/fail/testbit2.mod: New file.
	* errors/fail/testcase.mod: New file.
	* errors/fail/testcomment.mod: New file.
	* errors/fail/testcomment2.mod: New file.
	* errors/fail/testcomment3.mod: New file.
	* errors/fail/testconst.mod: New file.
	* errors/fail/testdyn.mod: New file.
	* errors/fail/testdyn2.mod: New file.
	* errors/fail/testdyn3.mod: New file.
	* errors/fail/testexp.mod: New file.
	* errors/fail/testfio.mod: New file.
	* errors/fail/testimport.mod: New file.
	* errors/fail/testimport2.def: New file.
	* errors/fail/testimport2.mod: New file.
	* errors/fail/testinit.mod: New file.
	* errors/fail/testmodule.mod: New file.
	* errors/fail/testnil.mod: New file.
	* errors/fail/testnil2.mod: New file.
	* errors/fail/testparam.mod: New file.
	* errors/fail/testproc.mod: New file.
	* errors/fail/testproc2.mod: New file.
	* errors/fail/testsize.mod: New file.
	* errors/fail/teststring.mod: New file.
	* errors/fail/testsub3.mod: New file.
	* errors/fail/testsub4.mod: New file.
	* errors/fail/testtype.mod: New file.
	* errors/fail/testvar.mod: New file.
	* errors/fail/testwith.mod: New file.
	* errors/fail/testwrite.mod: New file.
	* errors/fail/type.mod: New file.
	* errors/mustfail: New file.
	* errors/options: New file.
	* errors/testchar.mod: New file.
	* errors/testsub2.mod: New file.
	* examples/callingC/pass/gm2.exp: New file.
	* examples/callingC/pass/hello.mod: New file.
	* examples/callingC/pass/libprintf.def: New file.
	* examples/callingC/run/pass/c.c: New file.
	* examples/callingC/run/pass/c.def: New file.
	* examples/callingC/run/pass/gm2.exp: New file.
	* examples/callingC/run/pass/hello.mod: New file.
	* examples/callingC/run/pass/libprintf.def: New file.
	* examples/callingC/run/pass/m.mod: New file.
	* examples/cpp/pass/gm2.exp: New file.
	* examples/cpp/pass/hello.mod: New file.
	* examples/cppDef/pass/a.def: New file.
	* examples/cppDef/pass/a.mod: New file.
	* examples/cppDef/pass/b.mod: New file.
	* examples/cppDef/pass/gm2.exp: New file.
	* examples/cppDef/pass/libprintf.def: New file.
	* examples/hello/pass/gm2.exp: New file.
	* examples/hello/pass/hello.mod: New file.
	* examples/map/pass/AdvMap.def: New file.
	* examples/map/pass/AdvMap.mod: New file.
	* examples/map/pass/BoxMap.def: New file.
	* examples/map/pass/BoxMap.mod: New file.
	* examples/map/pass/Chance.def: New file.
	* examples/map/pass/Chance.mod: New file.
	* examples/map/pass/Find.def: New file.
	* examples/map/pass/Find.mod: New file.
	* examples/map/pass/Geometry.def: New file.
	* examples/map/pass/Geometry.mod: New file.
	* examples/map/pass/MakeBoxes.def: New file.
	* examples/map/pass/MakeBoxes.mod: New file.
	* examples/map/pass/Makefile.in: New file.
	* examples/map/pass/Map.mod: New file.
	* examples/map/pass/RoomMap.def: New file.
	* examples/map/pass/RoomMap.mod: New file.
	* examples/map/pass/Semantic.mod: New file.
	* examples/map/pass/StoreCoord.def: New file.
	* examples/map/pass/StoreCoord.mod: New file.
	* examples/map/pass/StoreCoords.def: New file.
	* examples/map/pass/StoreCoords.mod: New file.
	* examples/map/pass/WriteMap.def: New file.
	* examples/map/pass/WriteMap.mod: New file.
	* examples/map/pass/gm2.exp: New file.
	* examples/map/pass/makemaps: New file.
	* examples/map/pass/testch2.mod: New file.
	* examples/map/pass/testchan.mod: New file.
	* examples/map/pass/testcoor.mod: New file.
	* examples/map/pass/testmaps: New file.
	* exceptions/run/pass/cpp.cpp: New file.
	* exceptions/run/pass/cpp.def: New file.
	* exceptions/run/pass/gm2.exp: New file.
	* exceptions/run/pass/libexcept.mod: New file.
	* exceptions/run/pass/m2test.def: New file.
	* exceptions/run/pass/m2test.mod: New file.
	* exceptions/run/pass/mycpp.cpp: New file.
	* exceptions/run/pass/mycpp.def: New file.
	* exceptions/run/pass/mym2.mod: New file.
	* exceptions/run/pass/mym2a.mod: New file.
	* extensions/pass/align.mod: New file.
	* extensions/pass/align2.mod: New file.
	* extensions/pass/card16p.mod: New file.
	* extensions/pass/card32p.mod: New file.
	* extensions/pass/card64p.mod: New file.
	* extensions/pass/card8p.mod: New file.
	* extensions/pass/co.def: New file.
	* extensions/pass/co.mod: New file.
	* extensions/pass/frame.mod: New file.
	* extensions/pass/gm2.exp: New file.
	* extensions/pass/hello.mod: New file.
	* extensions/pass/int16p.mod: New file.
	* extensions/pass/int32p.mod: New file.
	* extensions/pass/int64p.mod: New file.
	* extensions/pass/int8p.mod: New file.
	* extensions/pass/intsize8.mod: New file.
	* extensions/pass/jmp.mod: New file.
	* extensions/pass/libc.def: New file.
	* extensions/pass/optparam.mod: New file.
	* extensions/pass/optparam2.mod: New file.
	* extensions/pass/return.mod: New file.
	* extensions/pass/set8.mod: New file.
	* extensions/pass/set8a.mod: New file.
	* extensions/pass/set8b.mod: New file.
	* extensions/pass/testco.mod: New file.
	* extensions/run/fail/gm2.exp: New file.
	* extensions/run/fail/intsize8.mod: New file.
	* extensions/run/pass/align3.mod: New file.
	* extensions/run/pass/align4.mod: New file.
	* extensions/run/pass/align5.mod: New file.
	* extensions/run/pass/align6.mod: New file.
	* extensions/run/pass/align7.mod: New file.
	* extensions/run/pass/callingc.mod: New file.
	* extensions/run/pass/card16p.mod: New file.
	* extensions/run/pass/card32p.mod: New file.
	* extensions/run/pass/card64p.mod: New file.
	* extensions/run/pass/card8p.mod: New file.
	* extensions/run/pass/column.mod: New file.
	* extensions/run/pass/cvararg.c: New file.
	* extensions/run/pass/cvararg.def: New file.
	* extensions/run/pass/gm2.exp: New file.
	* extensions/run/pass/int16p.mod: New file.
	* extensions/run/pass/int32p.mod: New file.
	* extensions/run/pass/int64p.mod: New file.
	* extensions/run/pass/int8field.mod: New file.
	* extensions/run/pass/int8p.mod: New file.
	* extensions/run/pass/packedrecord.mod: New file.
	* extensions/run/pass/packedrecord2.mod: New file.
	* extensions/run/pass/real32.mod: New file.
	* extensions/run/pass/real32a.mod: New file.
	* extensions/run/pass/record.mod: New file.
	* extensions/run/pass/testopen.mod: New file.
	* extensions/run/pass/vararg.mod: New file.
	* extensions/run/pass/vararg2.mod: New file.
	* extensions/run/pass/vararg3.mod: New file.
	* fpu/pass/five.mod: New file.
	* fpu/pass/fp.def: New file.
	* fpu/pass/fp.mod: New file.
	* fpu/pass/gm2.exp: New file.
	* fpu/pass/one.mod: New file.
	* fpu/pass/r1.mod: New file.
	* fpu/pass/realconst.mod: New file.
	* fpu/pass/testfp.mod: New file.
	* fpu/pass/testfp2.mod: New file.
	* fpu/pass/testfpu1.mod: New file.
	* fpu/pass/testfpu2.mod: New file.
	* fpu/pass/testfpu3.mod: New file.
	* fpu/pass/testsin.mod: New file.
	* imports/run/pass/c.def: New file.
	* imports/run/pass/c.mod: New file.
	* imports/run/pass/gm2.exp: New file.
	* imports/run/pass/innermods.mod: New file.
	* imports/run/pass/innermods2.mod: New file.
	* imports/run/pass/innermods3.mod: New file.
	* imports/run/pass/innermods4.mod: New file.
	* imports/run/pass/innermods5.def: New file.
	* imports/run/pass/innermods5.mod: New file.
	* imports/run/pass/innermods6.mod: New file.
	* integer/div.mod: New file.
	* integer/expr.mod: New file.
	* integer/mod.mod: New file.
	* integer/mod2.mod: New file.
	* integer/mustrunandpass: New file.
	* integer/one.mod: New file.
	* integer/options: New file.
	* integer/zero.mod: New file.
	* iso/analysis/fail/Makefile: New file.
	* iso/analysis/fail/arithoverflow.mod: New file.
	* iso/analysis/fail/arithoverflow2.mod: New file.
	* iso/analysis/fail/arithsubcard.mod: New file.
	* iso/analysis/fail/arrayrange.mod: New file.
	* iso/analysis/fail/assignvalue.mod: New file.
	* iso/analysis/fail/callassignment.mod: New file.
	* iso/analysis/fail/callassignment2.mod: New file.
	* iso/analysis/fail/callassignment3.mod: New file.
	* iso/analysis/fail/callassignment4.mod: New file.
	* iso/analysis/fail/caserange.mod: New file.
	* iso/analysis/fail/decvalue.mod: New file.
	* iso/analysis/fail/forloop.mod: New file.
	* iso/analysis/fail/gm2.exp: New file.
	* iso/analysis/fail/incvalue.mod: New file.
	* iso/analysis/fail/noreturn.mod: New file.
	* iso/analysis/fail/returnvalue.mod: New file.
	* iso/analysis/fail/staticarray.mod: New file.
	* iso/check/fail/gm2.exp: New file.
	* iso/check/fail/modulusoverflow.mod: New file.
	* iso/fail/bug10.mod: New file.
	* iso/fail/bug8.mod: New file.
	* iso/fail/bug9.mod: New file.
	* iso/fail/case.mod: New file.
	* iso/fail/case2.mod: New file.
	* iso/fail/case3.mod: New file.
	* iso/fail/const1.mod: New file.
	* iso/fail/constprocedure.mod: New file.
	* iso/fail/constsubrange.mod: New file.
	* iso/fail/constsubrange2.mod: New file.
	* iso/fail/constsubrange3.mod: New file.
	* iso/fail/defa.def: New file.
	* iso/fail/defa.mod: New file.
	* iso/fail/defb.def: New file.
	* iso/fail/defb.mod: New file.
	* iso/fail/defc.def: New file.
	* iso/fail/defc.mod: New file.
	* iso/fail/except.mod: New file.
	* iso/fail/except2.mod: New file.
	* iso/fail/gm2.exp: New file.
	* iso/fail/isoa.def: New file.
	* iso/fail/isoa.mod: New file.
	* iso/fail/lengthsubexpr.mod: New file.
	* iso/fail/proc.mod: New file.
	* iso/fail/realbitscast.mod: New file.
	* iso/fail/varient.mod: New file.
	* iso/fail/varient2.mod: New file.
	* iso/future/builtinlj.mod: New file.
	* iso/pass/ChanConsts.def: New file.
	* iso/pass/ChanConsts.mod: New file.
	* iso/pass/ConvTypes.def: New file.
	* iso/pass/ConvTypes.mod: New file.
	* iso/pass/addadr1.mod: New file.
	* iso/pass/bits32c.mod: New file.
	* iso/pass/callwraptime.mod: New file.
	* iso/pass/caseiso.mod: New file.
	* iso/pass/caseiso2.mod: New file.
	* iso/pass/cast.mod: New file.
	* iso/pass/cast3.mod: New file.
	* iso/pass/castiso.mod: New file.
	* iso/pass/const1.mod: New file.
	* iso/pass/constreal.mod: New file.
	* iso/pass/constructor1.mod: New file.
	* iso/pass/constructor2.mod: New file.
	* iso/pass/constructor3.mod: New file.
	* iso/pass/constructor4.mod: New file.
	* iso/pass/constructor5.mod: New file.
	* iso/pass/constructor6.mod: New file.
	* iso/pass/constsize4.mod: New file.
	* iso/pass/delim.mod: New file.
	* iso/pass/delim2.mod: New file.
	* iso/pass/enummodule.mod: New file.
	* iso/pass/except1.mod: New file.
	* iso/pass/expproc.mod: New file.
	* iso/pass/expproc2.mod: New file.
	* iso/pass/gm2.exp: New file.
	* iso/pass/isob.def: New file.
	* iso/pass/isob.mod: New file.
	* iso/pass/isobitset.mod: New file.
	* iso/pass/isobitset2.mod: New file.
	* iso/pass/longm.mod: New file.
	* iso/pass/m.mod: New file.
	* iso/pass/proccast.mod: New file.
	* iso/pass/realbitscast.mod: New file.
	* iso/pass/set12.mod: New file.
	* iso/pass/stringchar.mod: New file.
	* iso/pass/subassign.mod: New file.
	* iso/pass/testaddindr.mod: New file.
	* iso/pass/testconv.def: New file.
	* iso/pass/testconv.mod: New file.
	* iso/pass/testconv2.def: New file.
	* iso/pass/testconv2.mod: New file.
	* iso/pass/testconv3.mod: New file.
	* iso/pass/testconv4.mod: New file.
	* iso/pass/testconv5.mod: New file.
	* iso/pass/testconv6.mod: New file.
	* iso/pass/testconv7.mod: New file.
	* iso/pass/testconv8.mod: New file.
	* iso/pass/testconv9.mod: New file.
	* iso/pass/testiso.mod: New file.
	* iso/pass/testiso2.mod: New file.
	* iso/pass/testisosize.mod: New file.
	* iso/pass/testlength.mod: New file.
	* iso/pass/testlength2.mod: New file.
	* iso/pass/testlength3.mod: New file.
	* iso/pass/testlength4.mod: New file.
	* iso/pass/testlength5.mod: New file.
	* iso/pass/unbounded.mod: New file.
	* iso/pass/unbounded2.mod: New file.
	* iso/run/pass/adraddress.mod: New file.
	* iso/run/pass/adrunbounded3.mod: New file.
	* iso/run/pass/baseimport.mod: New file.
	* iso/run/pass/compsize.mod: New file.
	* iso/run/pass/concurrentstore.mod: New file.
	* iso/run/pass/constprocedure.mod: New file.
	* iso/run/pass/constructor1.mod: New file.
	* iso/run/pass/constructor2.mod: New file.
	* iso/run/pass/conststrarray.mod: New file.
	* iso/run/pass/contimer.mod: New file.
	* iso/run/pass/except.c: New file.
	* iso/run/pass/except2.mod: New file.
	* iso/run/pass/except3.cpp: New file.
	* iso/run/pass/except4.mod: New file.
	* iso/run/pass/except5.cpp: New file.
	* iso/run/pass/except5.mod: New file.
	* iso/run/pass/except6.cpp: New file.
	* iso/run/pass/except7.mod: New file.
	* iso/run/pass/except8.mod: New file.
	* iso/run/pass/fileio.def: New file.
	* iso/run/pass/fileio.mod: New file.
	* iso/run/pass/gm2.exp: New file.
	* iso/run/pass/hello.mod: New file.
	* iso/run/pass/int8field.mod: New file.
	* iso/run/pass/long.mod: New file.
	* iso/run/pass/long2.mod: New file.
	* iso/run/pass/long3.mod: New file.
	* iso/run/pass/long4.c: New file.
	* iso/run/pass/long4.mod: New file.
	* iso/run/pass/minmax.mod: New file.
	* iso/run/pass/modulus.mod: New file.
	* iso/run/pass/nestediso.mod: New file.
	* iso/run/pass/nestedrecord.mod: New file.
	* iso/run/pass/onebyte.mod: New file.
	* iso/run/pass/onebyte2.mod: New file.
	* iso/run/pass/onebyte3.mod: New file.
	* iso/run/pass/packed.mod: New file.
	* iso/run/pass/proc.c: New file.
	* iso/run/pass/proc.mod: New file.
	* iso/run/pass/proc2.mod: New file.
	* iso/run/pass/returnrecord.mod: New file.
	* iso/run/pass/shift.mod: New file.
	* iso/run/pass/shift2.mod: New file.
	* iso/run/pass/shift3.mod: New file.
	* iso/run/pass/shift4.mod: New file.
	* iso/run/pass/simple: New file.
	* iso/run/pass/simplelarge.mod: New file.
	* iso/run/pass/strcons.mod: New file.
	* iso/run/pass/strcons2.mod: New file.
	* iso/run/pass/t.cpp: New file.
	* iso/run/pass/t1.cpp: New file.
	* iso/run/pass/testLength.mod: New file.
	* iso/run/pass/testarray.mod: New file.
	* iso/run/pass/testgeneric.mod: New file.
	* iso/run/pass/testlarge.mod: New file.
	* iso/run/pass/testsystem.mod: New file.
	* iso/run/pass/tinyconst.mod: New file.
	* iso/run/pass/tinyconst2.mod: New file.
	* iso/run/pass/tinyconst3.mod: New file.
	* iso/run/pass/tinyconst4.mod: New file.
	* iso/run/pass/tinyconst5.mod: New file.
	* iso/run/pass/tinytimer.mod: New file.
	* iso/run/pass/trivialmodulus.mod: New file.
	* iso/run/pass/tsize.mod: New file.
	* iso/run/pass/tsize2.mod: New file.
	* iso/run/pass/tstLength.mod: New file.
	* iso/run/pass/unbounded.mod: New file.
	* iso/run/pass/unbounded2.mod: New file.
	* iso/run/pass/unbounded3.mod: New file.
	* iso/run/pass/unbounded4.mod: New file.
	* iso/run/pass/unbounded5.mod: New file.
	* iso/run/pass/unbounded6.mod: New file.
	* iso/run/pass/unbounded7.mod: New file.
	* iso/run/pass/unbounded8.mod: New file.
	* isocoroutines/run/pass/coroutine.mod: New file.
	* isocoroutines/run/pass/gm2.exp: New file.
	* isolib/run/pass/arraycons.mod: New file.
	* isolib/run/pass/arraycons2.mod: New file.
	* isolib/run/pass/arraycons3.mod: New file.
	* isolib/run/pass/arraycons5.mod: New file.
	* isolib/run/pass/arraycons6.mod: New file.
	* isolib/run/pass/arraycons7.mod: New file.
	* isolib/run/pass/arrayconst8.mod: New file.
	* isolib/run/pass/exceptiontest.mod: New file.
	* isolib/run/pass/filepos.mod: New file.
	* isolib/run/pass/gm2.exp: New file.
	* isolib/run/pass/hello.mod: New file.
	* isolib/run/pass/insert.mod: New file.
	* isolib/run/pass/intconv.mod: New file.
	* isolib/run/pass/longstr.mod: New file.
	* isolib/run/pass/openlibc.mod: New file.
	* isolib/run/pass/raise.mod: New file.
	* isolib/run/pass/raise2.mod: New file.
	* isolib/run/pass/readreal.mod: New file.
	* isolib/run/pass/real1.mod: New file.
	* isolib/run/pass/real2.mod: New file.
	* isolib/run/pass/real3.mod: New file.
	* isolib/run/pass/realconv.mod: New file.
	* isolib/run/pass/realconv2.mod: New file.
	* isolib/run/pass/realstr.mod: New file.
	* isolib/run/pass/sigfig.mod: New file.
	* isolib/run/pass/stringreal2.mod: New file.
	* isolib/run/pass/termfile.mod-disabled: New file.
	* isolib/run/pass/testappend.mod: New file.
	* isolib/run/pass/testinput: New file.
	* isolib/run/pass/testio.mod: New file.
	* isolib/run/pass/testio2.mod: New file.
	* isolib/run/pass/testmem.mod: New file.
	* isolib/run/pass/testmem2.mod: New file.
	* isolib/run/pass/testnumber: New file.
	* isolib/run/pass/tiny.mod: New file.
	* isolib/run/pass/tiny2.mod: New file.
	* isolib/run/pass/tiny3.mod: New file.
	* isolib/run/pass/tiny4.mod: New file.
	* isolib/run/pass/tiny5.mod: New file.
	* libs/a.def: New file.
	* libs/a.mod: New file.
	* libs/b.def: New file.
	* libs/b.mod: New file.
	* libs/testraw.mod: New file.
	* link/pim/fail/gm2.exp: New file.
	* link/pim/fail/import.mod: New file.
	* link/pim/pass/gm2.exp: New file.
	* linking/libarchive/pass/c.c: New file.
	* linking/libarchive/pass/c.def: New file.
	* linking/libarchive/pass/d.def: New file.
	* linking/libarchive/pass/e.def: New file.
	* linking/libarchive/pass/gm2.exp: New file.
	* linking/libarchive/pass/m.mod: New file.
	* linking/verbose/pass/gm2.exp: New file.
	* linking/verbose/pass/hello.mod: New file.
	* pim/fail/TestLong3.mod: New file.
	* pim/fail/TestLong4.mod: New file.
	* pim/fail/TestLong6.mod: New file.
	* pim/fail/a.def: New file.
	* pim/fail/assignbounds.mod: New file.
	* pim/fail/assignsubrange.mod: New file.
	* pim/fail/assignsubrange2.mod: New file.
	* pim/fail/b.def: New file.
	* pim/fail/bad.def: New file.
	* pim/fail/badconst.mod: New file.
	* pim/fail/badfunc.mod: New file.
	* pim/fail/badfunc.mod.x: New file.
	* pim/fail/badparam.mod: New file.
	* pim/fail/badparam2.mod: New file.
	* pim/fail/badtype.mod: New file.
	* pim/fail/badtypes.mod: New file.
	* pim/fail/bits.mod: New file.
	* pim/fail/bits2.mod: New file.
	* pim/fail/bits3.mod: New file.
	* pim/fail/bits4.mod: New file.
	* pim/fail/cardword.mod: New file.
	* pim/fail/constbec.mod: New file.
	* pim/fail/constsize3.mod: New file.
	* pim/fail/constvar.mod: New file.
	* pim/fail/convert5.mod: New file.
	* pim/fail/dupconst.mod: New file.
	* pim/fail/dupenum.mod: New file.
	* pim/fail/dupfield.mod: New file.
	* pim/fail/duptype.mod: New file.
	* pim/fail/dupvar.mod: New file.
	* pim/fail/expression.mod: New file.
	* pim/fail/expression2.mod: New file.
	* pim/fail/expression3.mod: New file.
	* pim/fail/func.mod: New file.
	* pim/fail/gm2.exp: New file.
	* pim/fail/good.def: New file.
	* pim/fail/good.mod: New file.
	* pim/fail/import.mod: New file.
	* pim/fail/inserttok.def: New file.
	* pim/fail/inserttok.mod: New file.
	* pim/fail/integer.mod: New file.
	* pim/fail/keyword.mod: New file.
	* pim/fail/longtypes2.mod: New file.
	* pim/fail/longtypes3.mod: New file.
	* pim/fail/multisetf.mod: New file.
	* pim/fail/nested3.mod: New file.
	* pim/fail/opaque.mod: New file.
	* pim/fail/opaque2.mod: New file.
	* pim/fail/opasfail.mod: New file.
	* pim/fail/opcpfail.mod: New file.
	* pim/fail/procmod.mod: New file.
	* pim/fail/rotate.mod: New file.
	* pim/fail/rotate2.mod: New file.
	* pim/fail/setbec.mod: New file.
	* pim/fail/setequiv.mod: New file.
	* pim/fail/setsnulf.mod: New file.
	* pim/fail/settype.mod: New file.
	* pim/fail/shift.mod: New file.
	* pim/fail/shift2.mod: New file.
	* pim/fail/subrange7.mod: New file.
	* pim/fail/unary.mod: New file.
	* pim/fail/undeclared.mod: New file.
	* pim/fail/val.mod: New file.
	* pim/fail/val2.mod: New file.
	* pim/fail/wordconst.mod: New file.
	* pim/no-options/run/pass/gm2.exp: New file.
	* pim/no-options/run/pass/integer.mod: New file.
	* pim/options/bounds/fail/IdentifierBug.mod: New file.
	* pim/options/bounds/fail/gm2.exp: New file.
	* pim/options/optimize/run/pass/addition.def: New file.
	* pim/options/optimize/run/pass/addition.mod: New file.
	* pim/options/optimize/run/pass/concat.mod: New file.
	* pim/options/optimize/run/pass/gm2.exp: New file.
	* pim/options/optimize/run/pass/testadd.mod: New file.
	* pim/pass/ABSBug.mod: New file.
	* pim/pass/TestLong7.mod: New file.
	* pim/pass/TestLong8.mod: New file.
	* pim/pass/TestLong9.mod: New file.
	* pim/pass/another.mod: New file.
	* pim/pass/aochar.mod: New file.
	* pim/pass/array.mod: New file.
	* pim/pass/array2.mod: New file.
	* pim/pass/array3.mod: New file.
	* pim/pass/array4.mod: New file.
	* pim/pass/array5.mod: New file.
	* pim/pass/array6.mod: New file.
	* pim/pass/arraybool.mod: New file.
	* pim/pass/arraychar.mod: New file.
	* pim/pass/arraychar2.mod: New file.
	* pim/pass/arraychar3.mod: New file.
	* pim/pass/arrayconst1.mod: New file.
	* pim/pass/arrayconst2.mod: New file.
	* pim/pass/arrayconst3.mod: New file.
	* pim/pass/arraydecl.mod: New file.
	* pim/pass/arraydim.mod: New file.
	* pim/pass/arraydyn.mod: New file.
	* pim/pass/arrayeqiv.mod: New file.
	* pim/pass/arrayfio.mod: New file.
	* pim/pass/arrayhuge.mod: New file.
	* pim/pass/arrayhuge2.mod: New file.
	* pim/pass/arrayindex.mod: New file.
	* pim/pass/arrayindirect.mod: New file.
	* pim/pass/arrayinproc.mod: New file.
	* pim/pass/arrayint.mod: New file.
	* pim/pass/arrayofbyte.mod: New file.
	* pim/pass/arrayofcard.mod: New file.
	* pim/pass/arrayptr.mod: New file.
	* pim/pass/arrayptr2.mod: New file.
	* pim/pass/arrayptr3.mod: New file.
	* pim/pass/arrayptr4.mod: New file.
	* pim/pass/arrayptr5.mod: New file.
	* pim/pass/arrayptr6.mod: New file.
	* pim/pass/arrayrecord.mod: New file.
	* pim/pass/arraytiny.c: New file.
	* pim/pass/arraytiny.mod: New file.
	* pim/pass/arraytype.mod: New file.
	* pim/pass/arraytype2.mod: New file.
	* pim/pass/arraytype3.mod: New file.
	* pim/pass/arraytype4.mod: New file.
	* pim/pass/assignment.mod: New file.
	* pim/pass/assignment2.mod: New file.
	* pim/pass/assignment3.mod: New file.
	* pim/pass/assignment4.mod: New file.
	* pim/pass/badpointer.mod: New file.
	* pim/pass/bits32.def: New file.
	* pim/pass/bits32.mod: New file.
	* pim/pass/bits32i.mod: New file.
	* pim/pass/bitset.mod: New file.
	* pim/pass/bitset2.mod: New file.
	* pim/pass/bitset3.mod: New file.
	* pim/pass/bitset4.mod: New file.
	* pim/pass/bitset5.mod: New file.
	* pim/pass/bitsetfunc.mod: New file.
	* pim/pass/block.mod: New file.
	* pim/pass/blockindirect.mod: New file.
	* pim/pass/builtin.def: New file.
	* pim/pass/builtin.mod: New file.
	* pim/pass/builtin2.mod: New file.
	* pim/pass/builtinconst.mod: New file.
	* pim/pass/bytearray.mod: New file.
	* pim/pass/card.mod: New file.
	* pim/pass/card2.mod: New file.
	* pim/pass/char.mod: New file.
	* pim/pass/char2.mod: New file.
	* pim/pass/charproc.mod: New file.
	* pim/pass/charset.mod: New file.
	* pim/pass/charset2.mod: New file.
	* pim/pass/charset3.mod: New file.
	* pim/pass/checkparm.def: New file.
	* pim/pass/checkparm.mod: New file.
	* pim/pass/colour.mod: New file.
	* pim/pass/comment1.mod: New file.
	* pim/pass/complexarray.mod: New file.
	* pim/pass/complextypes.mod: New file.
	* pim/pass/constcast.mod: New file.
	* pim/pass/constmax.mod: New file.
	* pim/pass/constset.mod: New file.
	* pim/pass/constset2.mod: New file.
	* pim/pass/constset3.mod: New file.
	* pim/pass/constsize.mod: New file.
	* pim/pass/constsize2.mod: New file.
	* pim/pass/convert.mod: New file.
	* pim/pass/convert2.mod: New file.
	* pim/pass/convert3.mod: New file.
	* pim/pass/convert4.mod: New file.
	* pim/pass/danglingelse.mod: New file.
	* pim/pass/debug: New file.
	* pim/pass/defset.def: New file.
	* pim/pass/defset.mod: New file.
	* pim/pass/deftype.mod: New file.
	* pim/pass/divaddr.mod: New file.
	* pim/pass/enum.mod: New file.
	* pim/pass/enum2.mod: New file.
	* pim/pass/enum3.mod: New file.
	* pim/pass/file.mod: New file.
	* pim/pass/filesystem.mod: New file.
	* pim/pass/foo.mod: New file.
	* pim/pass/foo2.mod: New file.
	* pim/pass/for1.mod: New file.
	* pim/pass/function.mod: New file.
	* pim/pass/function2.mod: New file.
	* pim/pass/gcd.def: New file.
	* pim/pass/gcd.mod: New file.
	* pim/pass/getconst.mod: New file.
	* pim/pass/gm2.exp: New file.
	* pim/pass/hello.mod: New file.
	* pim/pass/impa.mod: New file.
	* pim/pass/impb.def: New file.
	* pim/pass/impb.mod: New file.
	* pim/pass/impc.def: New file.
	* pim/pass/impc.mod: New file.
	* pim/pass/impd.mod: New file.
	* pim/pass/impe.mod: New file.
	* pim/pass/impf.mod: New file.
	* pim/pass/impg.mod: New file.
	* pim/pass/imph.mod: New file.
	* pim/pass/impi.mod: New file.
	* pim/pass/impj.mod: New file.
	* pim/pass/impk.mod: New file.
	* pim/pass/impl.mod: New file.
	* pim/pass/impm.mod: New file.
	* pim/pass/impn.def: New file.
	* pim/pass/impn.mod: New file.
	* pim/pass/impo.mod: New file.
	* pim/pass/imports.mod: New file.
	* pim/pass/impp.def: New file.
	* pim/pass/impp.mod: New file.
	* pim/pass/impq.def: New file.
	* pim/pass/impq.mod: New file.
	* pim/pass/incompsets.mod: New file.
	* pim/pass/index.mod: New file.
	* pim/pass/index2.mod: New file.
	* pim/pass/indirect.mod: New file.
	* pim/pass/inner.mod: New file.
	* pim/pass/inner2.mod: New file.
	* pim/pass/int.mod: New file.
	* pim/pass/largeset.mod: New file.
	* pim/pass/largeset1.mod: New file.
	* pim/pass/largeset2.mod: New file.
	* pim/pass/largeset3.mod: New file.
	* pim/pass/largeset4.mod: New file.
	* pim/pass/largeset5.mod: New file.
	* pim/pass/largeset6.mod: New file.
	* pim/pass/largeset7.mod: New file.
	* pim/pass/localmod.mod: New file.
	* pim/pass/localproc.mod: New file.
	* pim/pass/localvar.mod: New file.
	* pim/pass/log: New file.
	* pim/pass/longint.mod: New file.
	* pim/pass/longint2.mod: New file.
	* pim/pass/longmm.mod: New file.
	* pim/pass/longreal.mod: New file.
	* pim/pass/longtypes.mod: New file.
	* pim/pass/longtypes3.mod: New file.
	* pim/pass/longtypes4.mod: New file.
	* pim/pass/longtypes5.mod: New file.
	* pim/pass/longtypes6.mod: New file.
	* pim/pass/loopexit.mod: New file.
	* pim/pass/math.mod: New file.
	* pim/pass/maxlongint.mod: New file.
	* pim/pass/maxreal.mod: New file.
	* pim/pass/maxreal2.mod: New file.
	* pim/pass/minmaxconst.mod: New file.
	* pim/pass/minmaxconst2.mod: New file.
	* pim/pass/modaddr.mod: New file.
	* pim/pass/multaddr.mod: New file.
	* pim/pass/multiple.mod: New file.
	* pim/pass/multiset.mod: New file.
	* pim/pass/multtypes.mod: New file.
	* pim/pass/mydef.def: New file.
	* pim/pass/negatives.def: New file.
	* pim/pass/negatives.mod: New file.
	* pim/pass/nested.mod: New file.
	* pim/pass/nested2.mod: New file.
	* pim/pass/nested3.mod: New file.
	* pim/pass/nested4.mod: New file.
	* pim/pass/nested5.mod: New file.
	* pim/pass/nested6.mod: New file.
	* pim/pass/nested7.mod: New file.
	* pim/pass/nestedfor.mod: New file.
	* pim/pass/nestedif.mod: New file.
	* pim/pass/nestedset.mod: New file.
	* pim/pass/onezero.mod: New file.
	* pim/pass/opaque.def: New file.
	* pim/pass/opaque.mod: New file.
	* pim/pass/opaque2.mod: New file.
	* pim/pass/opaquetype.def: New file.
	* pim/pass/opaquetype.mod: New file.
	* pim/pass/param.mod: New file.
	* pim/pass/param2.mod: New file.
	* pim/pass/param3.mod: New file.
	* pim/pass/parambool.mod: New file.
	* pim/pass/paramreal.mod: New file.
	* pim/pass/pimimp.mod: New file.
	* pim/pass/pointer.mod: New file.
	* pim/pass/procadr.mod: New file.
	* pim/pass/procconv.mod: New file.
	* pim/pass/procconv2.mod: New file.
	* pim/pass/procedure1.mod: New file.
	* pim/pass/procedure2.mod: New file.
	* pim/pass/procindirect.mod: New file.
	* pim/pass/procmod.mod: New file.
	* pim/pass/procmod2.mod: New file.
	* pim/pass/procmod3.mod: New file.
	* pim/pass/procmod31.mod: New file.
	* pim/pass/procmod4.mod: New file.
	* pim/pass/procmod5.mod: New file.
	* pim/pass/procmod6.def: New file.
	* pim/pass/procmod6.mod: New file.
	* pim/pass/procmod7.mod: New file.
	* pim/pass/procmod8.mod: New file.
	* pim/pass/procmod9.mod: New file.
	* pim/pass/proctype.mod: New file.
	* pim/pass/proctype2.def: New file.
	* pim/pass/proctype3.mod: New file.
	* pim/pass/proctype4.mod: New file.
	* pim/pass/program.mod: New file.
	* pim/pass/program2.mod: New file.
	* pim/pass/ptrarray.mod: New file.
	* pim/pass/ptrarray2.mod: New file.
	* pim/pass/ptrarray3.mod: New file.
	* pim/pass/ptrcard.mod: New file.
	* pim/pass/quads.def: New file.
	* pim/pass/quads.mod: New file.
	* pim/pass/real.mod: New file.
	* pim/pass/real2.mod: New file.
	* pim/pass/real3.mod: New file.
	* pim/pass/realconst.mod: New file.
	* pim/pass/realneg.mod: New file.
	* pim/pass/realneg2.mod: New file.
	* pim/pass/realone.mod: New file.
	* pim/pass/realsize.mod: New file.
	* pim/pass/record1.mod: New file.
	* pim/pass/record10.mod: New file.
	* pim/pass/record11.mod: New file.
	* pim/pass/record12.def: New file.
	* pim/pass/record13.def: New file.
	* pim/pass/record14.def: New file.
	* pim/pass/record15.def: New file.
	* pim/pass/record16.def: New file.
	* pim/pass/record2.mod: New file.
	* pim/pass/record3.mod: New file.
	* pim/pass/record4.mod: New file.
	* pim/pass/record5.mod: New file.
	* pim/pass/record6.mod: New file.
	* pim/pass/record7.mod: New file.
	* pim/pass/record8.mod: New file.
	* pim/pass/record9.mod: New file.
	* pim/pass/recordarray.c: New file.
	* pim/pass/recordarray.mod: New file.
	* pim/pass/recordarray2.mod: New file.
	* pim/pass/redef.mod: New file.
	* pim/pass/set10.mod: New file.
	* pim/pass/set11.def: New file.
	* pim/pass/set11.mod: New file.
	* pim/pass/set12.mod: New file.
	* pim/pass/set4.mod: New file.
	* pim/pass/set5.mod: New file.
	* pim/pass/set6.mod: New file.
	* pim/pass/set7.mod: New file.
	* pim/pass/set8.mod: New file.
	* pim/pass/set9.mod: New file.
	* pim/pass/setchar.mod: New file.
	* pim/pass/setchar10.mod: New file.
	* pim/pass/setchar11.mod: New file.
	* pim/pass/setchar3.mod: New file.
	* pim/pass/setchar4.mod: New file.
	* pim/pass/setchar5.mod: New file.
	* pim/pass/setchar7.mod: New file.
	* pim/pass/setchar8.mod: New file.
	* pim/pass/setchar9.mod: New file.
	* pim/pass/setconst.mod: New file.
	* pim/pass/setconst2.mod: New file.
	* pim/pass/setconst3.mod: New file.
	* pim/pass/setenum.mod: New file.
	* pim/pass/setimp.mod: New file.
	* pim/pass/setimp2.mod: New file.
	* pim/pass/setofchar.mod: New file.
	* pim/pass/setoverflow.mod: New file.
	* pim/pass/sets.mod: New file.
	* pim/pass/sets2.mod: New file.
	* pim/pass/sets3.mod: New file.
	* pim/pass/sets4.mod: New file.
	* pim/pass/sets5.mod: New file.
	* pim/pass/sets6.mod: New file.
	* pim/pass/setsnul.mod: New file.
	* pim/pass/settest1.mod: New file.
	* pim/pass/settest2.mod: New file.
	* pim/pass/settest3.mod: New file.
	* pim/pass/simpleproc.mod: New file.
	* pim/pass/sizes.mod: New file.
	* pim/pass/sizetype.mod: New file.
	* pim/pass/smallset1.mod: New file.
	* pim/pass/smallset2.mod: New file.
	* pim/pass/smallset3.mod: New file.
	* pim/pass/smallset4.mod: New file.
	* pim/pass/smallset5.mod: New file.
	* pim/pass/smallset6.mod: New file.
	* pim/pass/smallset7.mod: New file.
	* pim/pass/stabs.mod: New file.
	* pim/pass/stdio.mod: New file.
	* pim/pass/str1.mod: New file.
	* pim/pass/str2.mod: New file.
	* pim/pass/str3.mod: New file.
	* pim/pass/str4.mod: New file.
	* pim/pass/str5.mod: New file.
	* pim/pass/stressset.mod: New file.
	* pim/pass/stringassign.mod: New file.
	* pim/pass/stringopaq.mod: New file.
	* pim/pass/strings.mod: New file.
	* pim/pass/strparam.def: New file.
	* pim/pass/strparam.mod: New file.
	* pim/pass/subrange.mod: New file.
	* pim/pass/subrange10.mod: New file.
	* pim/pass/subrange11.mod: New file.
	* pim/pass/subrange12.mod: New file.
	* pim/pass/subrange14.mod: New file.
	* pim/pass/subrange15.mod: New file.
	* pim/pass/subrange16.mod: New file.
	* pim/pass/subrange17.mod: New file.
	* pim/pass/subrange2.mod: New file.
	* pim/pass/subrange3.mod: New file.
	* pim/pass/subrange4.mod: New file.
	* pim/pass/subrange5.mod: New file.
	* pim/pass/subrange6.mod: New file.
	* pim/pass/subrange7.mod: New file.
	* pim/pass/subrange8.mod: New file.
	* pim/pass/subrange9.mod: New file.
	* pim/pass/test2recursive.mod: New file.
	* pim/pass/testabs.mod: New file.
	* pim/pass/testbuiltin.mod: New file.
	* pim/pass/testbuiltin2.mod: New file.
	* pim/pass/testbuiltstr.mod: New file.
	* pim/pass/testcap.mod: New file.
	* pim/pass/testcap2.mod: New file.
	* pim/pass/testcard.mod: New file.
	* pim/pass/testcard2.mod: New file.
	* pim/pass/testcard3.mod: New file.
	* pim/pass/testcard4.mod: New file.
	* pim/pass/testcard5.mod: New file.
	* pim/pass/testcase.mod: New file.
	* pim/pass/testcase2.mod: New file.
	* pim/pass/testcase3.mod: New file.
	* pim/pass/testcase4.mod: New file.
	* pim/pass/testchar.mod: New file.
	* pim/pass/testfloat.mod: New file.
	* pim/pass/testfloat2.mod: New file.
	* pim/pass/testfloat3.mod: New file.
	* pim/pass/testfloat4.mod: New file.
	* pim/pass/testfor.mod: New file.
	* pim/pass/testimpvar.mod: New file.
	* pim/pass/testlong3.mod: New file.
	* pim/pass/testmod.mod: New file.
	* pim/pass/testmod2.mod: New file.
	* pim/pass/testodd.mod: New file.
	* pim/pass/testopaque.mod: New file.
	* pim/pass/testopaque2.mod: New file.
	* pim/pass/testopaque3.mod: New file.
	* pim/pass/testord.mod: New file.
	* pim/pass/testparam.mod: New file.
	* pim/pass/testparam2.mod: New file.
	* pim/pass/testparam3.mod: New file.
	* pim/pass/testpimsize.mod: New file.
	* pim/pass/testrecursive.def: New file.
	* pim/pass/testrecursive.mod: New file.
	* pim/pass/testreturnstr.mod: New file.
	* pim/pass/testset.mod: New file.
	* pim/pass/testshort.mod: New file.
	* pim/pass/testsinf.mod: New file.
	* pim/pass/testsinl.mod: New file.
	* pim/pass/testsize.mod: New file.
	* pim/pass/testvar.mod: New file.
	* pim/pass/testvarin.mod: New file.
	* pim/pass/timeio.mod: New file.
	* pim/pass/timeio2.mod: New file.
	* pim/pass/timeio3.mod: New file.
	* pim/pass/timeio4.mod: New file.
	* pim/pass/timeio5.mod: New file.
	* pim/pass/timeio6.mod: New file.
	* pim/pass/timeio7.mod: New file.
	* pim/pass/timeio8.mod: New file.
	* pim/pass/timeio9.mod: New file.
	* pim/pass/tinyalloc.mod: New file.
	* pim/pass/tinyarray.mod: New file.
	* pim/pass/tinyarray2.mod: New file.
	* pim/pass/tinyarray3.mod: New file.
	* pim/pass/tinyarray4.mod: New file.
	* pim/pass/tinyarray5.mod: New file.
	* pim/pass/tinyarray6.mod: New file.
	* pim/pass/tinyassign.def: New file.
	* pim/pass/tinyassign.mod: New file.
	* pim/pass/tinyassign2.mod: New file.
	* pim/pass/tinyassign3.mod: New file.
	* pim/pass/tinyassign4.mod: New file.
	* pim/pass/tinyassign5.mod: New file.
	* pim/pass/tinybitset.mod: New file.
	* pim/pass/tinyelse.mod: New file.
	* pim/pass/tinyenum.mod: New file.
	* pim/pass/tinyfor.mod: New file.
	* pim/pass/tinyfor2.mod: New file.
	* pim/pass/tinyfor3.mod: New file.
	* pim/pass/tinyhalt.mod: New file.
	* pim/pass/tinyhello.mod: New file.
	* pim/pass/tinyif.mod: New file.
	* pim/pass/tinyif2.mod: New file.
	* pim/pass/tinyif3.mod: New file.
	* pim/pass/tinyif4.mod: New file.
	* pim/pass/tinyif5.mod: New file.
	* pim/pass/tinyif6.mod: New file.
	* pim/pass/tinyif7.mod: New file.
	* pim/pass/tinyif8.mod: New file.
	* pim/pass/tinyimp.mod: New file.
	* pim/pass/tinylit.mod: New file.
	* pim/pass/tinylit2.mod: New file.
	* pim/pass/tinymax.mod: New file.
	* pim/pass/tinymod.mod: New file.
	* pim/pass/tinynode.mod: New file.
	* pim/pass/tinyparam.mod: New file.
	* pim/pass/tinyparam2.mod: New file.
	* pim/pass/tinyplus.mod: New file.
	* pim/pass/tinyproc.mod: New file.
	* pim/pass/tinyproc2.mod: New file.
	* pim/pass/tinyproc3.mod: New file.
	* pim/pass/tinyproc4.mod: New file.
	* pim/pass/tinyproc5.mod: New file.
	* pim/pass/tinyproc6.mod: New file.
	* pim/pass/tinyptr.mod: New file.
	* pim/pass/tinyreal.mod: New file.
	* pim/pass/tinyrecord.mod: New file.
	* pim/pass/tinyrepeat.mod: New file.
	* pim/pass/tinyset6.mod: New file.
	* pim/pass/tinyset7.mod: New file.
	* pim/pass/tinystate.mod: New file.
	* pim/pass/tinysub.def: New file.
	* pim/pass/tinytest.mod: New file.
	* pim/pass/tinytrue.mod: New file.
	* pim/pass/tinyvar.mod: New file.
	* pim/pass/tinyvar2.mod: New file.
	* pim/pass/tinyvar3.mod: New file.
	* pim/pass/tinyvar4.mod: New file.
	* pim/pass/tinyvar5.mod: New file.
	* pim/pass/tinyvarient.mod: New file.
	* pim/pass/tinyvarient2.mod: New file.
	* pim/pass/tinyvarient3.def: New file.
	* pim/pass/tinyvarient3.mod: New file.
	* pim/pass/tinyvarient4.mod: New file.
	* pim/pass/tinyvarient5.mod: New file.
	* pim/pass/tinyvarient6.mod: New file.
	* pim/pass/tinywhile.mod: New file.
	* pim/pass/tinywith.mod: New file.
	* pim/pass/tinywith2.mod: New file.
	* pim/pass/tinywith3.mod: New file.
	* pim/pass/tinywith4.mod: New file.
	* pim/pass/tinywith5.mod: New file.
	* pim/pass/tinywith6.mod: New file.
	* pim/pass/trunc.mod: New file.
	* pim/pass/try: New file.
	* pim/pass/typeequiv.mod: New file.
	* pim/pass/typeequiv2.mod: New file.
	* pim/pass/typeequiv3.mod: New file.
	* pim/pass/typeonly.def: New file.
	* pim/pass/typeonly.mod: New file.
	* pim/pass/typesize.mod: New file.
	* pim/pass/unbounded.mod: New file.
	* pim/pass/unbounded2.mod: New file.
	* pim/pass/unbounded3.mod: New file.
	* pim/pass/v.def: New file.
	* pim/pass/varaddress.mod: New file.
	* pim/pass/varaddress2.mod: New file.
	* pim/pass/varaddress3.mod: New file.
	* pim/pass/varcard.mod: New file.
	* pim/pass/variant9.mod: New file.
	* pim/pass/varient.mod: New file.
	* pim/pass/varient2.mod: New file.
	* pim/pass/varient3.mod: New file.
	* pim/pass/varient4.mod: New file.
	* pim/pass/varient5.mod: New file.
	* pim/pass/varient6.mod: New file.
	* pim/pass/varient7.mod: New file.
	* pim/pass/varient8.mod: New file.
	* pim/pass/varin.def: New file.
	* pim/pass/varin.mod: New file.
	* pim/pass/varint.mod: New file.
	* pim/pass/wincat.mod: New file.
	* pim/pass/with.mod: New file.
	* pim/pass/wordconst.mod: New file.
	* pim/run/fail/case.mod: New file.
	* pim/run/fail/gm2.exp: New file.
	* pim/run/fail/nil.mod: New file.
	* pim/run/pass/Countdown.mod: New file.
	* pim/run/pass/EndFor.def: New file.
	* pim/run/pass/EndFor.mod: New file.
	* pim/run/pass/EnumTest.mod: New file.
	* pim/run/pass/For1.mod: New file.
	* pim/run/pass/For10.mod: New file.
	* pim/run/pass/For11.mod: New file.
	* pim/run/pass/For12.mod: New file.
	* pim/run/pass/For2.mod: New file.
	* pim/run/pass/For3.mod: New file.
	* pim/run/pass/For4.mod: New file.
	* pim/run/pass/For5.mod: New file.
	* pim/run/pass/For6.mod: New file.
	* pim/run/pass/For7.mod: New file.
	* pim/run/pass/For8.mod: New file.
	* pim/run/pass/For9.mod: New file.
	* pim/run/pass/FpuIOBug.mod: New file.
	* pim/run/pass/MaxReal.mod: New file.
	* pim/run/pass/MaxReal2.mod: New file.
	* pim/run/pass/TestLong.mod: New file.
	* pim/run/pass/TestLong2.mod: New file.
	* pim/run/pass/TestLong4.mod: New file.
	* pim/run/pass/TestLong5.mod: New file.
	* pim/run/pass/addrarray.mod: New file.
	* pim/run/pass/arraychar.mod: New file.
	* pim/run/pass/arraychar2.mod: New file.
	* pim/run/pass/arrayrecord.mod: New file.
	* pim/run/pass/bitsettest.def: New file.
	* pim/run/pass/bitsettest.mod: New file.
	* pim/run/pass/bytearray.mod: New file.
	* pim/run/pass/constdynstr.mod: New file.
	* pim/run/pass/conststr.mod: New file.
	* pim/run/pass/conststr2.mod: New file.
	* pim/run/pass/cycles.mod: New file.
	* pim/run/pass/dec.mod: New file.
	* pim/run/pass/enums.mod: New file.
	* pim/run/pass/gm2.exp: New file.
	* pim/run/pass/incsubrange.def: New file.
	* pim/run/pass/incsubrange.mod: New file.
	* pim/run/pass/index3.mod: New file.
	* pim/run/pass/int16.mod: New file.
	* pim/run/pass/int32.mod: New file.
	* pim/run/pass/int8.mod: New file.
	* pim/run/pass/line.mod: New file.
	* pim/run/pass/long.mod: New file.
	* pim/run/pass/longfor.mod: New file.
	* pim/run/pass/longtypes10.mod: New file.
	* pim/run/pass/longtypes7.mod: New file.
	* pim/run/pass/longtypes8.mod: New file.
	* pim/run/pass/longtypes9.mod: New file.
	* pim/run/pass/math.mod: New file.
	* pim/run/pass/math2.mod: New file.
	* pim/run/pass/mathconst.mod: New file.
	* pim/run/pass/minimal.mod: New file.
	* pim/run/pass/nestedproc.mod: New file.
	* pim/run/pass/nestedproc2.mod: New file.
	* pim/run/pass/nestedproc3.mod: New file.
	* pim/run/pass/nestedproc4.mod: New file.
	* pim/run/pass/nestedproc5.mod: New file.
	* pim/run/pass/nestedproc6.mod: New file.
	* pim/run/pass/nestedproc7.mod: New file.
	* pim/run/pass/nestedwith.mod: New file.
	* pim/run/pass/nestedwith2.mod: New file.
	* pim/run/pass/nestedwith3.mod: New file.
	* pim/run/pass/nothing.mod: New file.
	* pim/run/pass/prog31ex.mod: New file.
	* pim/run/pass/rts.mod: New file.
	* pim/run/pass/setcritical.mod: New file.
	* pim/run/pass/setequiv.mod: New file.
	* pim/run/pass/str6.mod: New file.
	* pim/run/pass/stringaddr.mod: New file.
	* pim/run/pass/stringaddr2.def: New file.
	* pim/run/pass/stringaddr2.mod: New file.
	* pim/run/pass/stripped.mod: New file.
	* pim/run/pass/sys.def: New file.
	* pim/run/pass/sys.mod: New file.
	* pim/run/pass/t.def: New file.
	* pim/run/pass/testaddr.mod: New file.
	* pim/run/pass/testaddr2.mod: New file.
	* pim/run/pass/testaddr3.mod: New file.
	* pim/run/pass/testarray.mod: New file.
	* pim/run/pass/testarray2.mod: New file.
	* pim/run/pass/testarray3.mod: New file.
	* pim/run/pass/testarray4.mod: New file.
	* pim/run/pass/testarray5.mod: New file.
	* pim/run/pass/testavail.mod: New file.
	* pim/run/pass/testdiv.mod: New file.
	* pim/run/pass/testfpufunc.mod: New file.
	* pim/run/pass/testfpufunc2.mod: New file.
	* pim/run/pass/testlarge.mod: New file.
	* pim/run/pass/testlarge2.mod: New file.
	* pim/run/pass/testnextproc.mod: New file.
	* pim/run/pass/testparam.mod: New file.
	* pim/run/pass/testpound.mod: New file.
	* pim/run/pass/testreturnstr.mod: New file.
	* pim/run/pass/testreturnstr2.mod: New file.
	* pim/run/pass/testreturnstr3.def: New file.
	* pim/run/pass/testreturnstr3.mod: New file.
	* pim/run/pass/testsize.mod: New file.
	* pim/run/pass/testsize2.mod: New file.
	* pim/run/pass/testsize3.mod: New file.
	* pim/run/pass/tinywith.mod: New file.
	* pim/run/pass/unbounded.mod: New file.
	* pim/run/pass/varaddress3.mod: New file.
	* pim/run/pass/varparam2.mod: New file.
	* pim/run/pass/varparam3.mod: New file.
	* pim/run/pass/varparm.mod: New file.
	* pim/run/pass/wr.mod: New file.
	* pimcoroutines/pass/gm2.exp: New file.
	* pimcoroutines/pass/imports.mod: New file.
	* pimcoroutines/pass/imports2.mod: New file.
	* pimcoroutines/run/pass/gm2.exp: New file.
	* pimcoroutines/run/pass/testtime.mod: New file.
	* pimlib/base/run/pass/FIO.mod: New file.
	* pimlib/base/run/pass/StrLib.mod: New file.
	* pimlib/base/run/pass/gm2.exp: New file.
	* pimlib/base/run/pass/testconvert.mod: New file.
	* pimlib/coroutines/pass/gm2.exp: New file.
	* pimlib/coroutines/pass/priority.mod: New file.
	* pimlib/coroutines/pass/priority2.mod: New file.
	* pimlib/coroutines/pass/priority3.def: New file.
	* pimlib/coroutines/pass/priority3.mod: New file.
	* pimlib/logitech/pass/LogitechLong.mod: New file.
	* pimlib/logitech/pass/gm2.exp: New file.
	* pimlib/logitech/pass/hello.mod: New file.
	* pimlib/logitech/run/pass/bbits.mod: New file.
	* pimlib/logitech/run/pass/gm2.exp: New file.
	* pimlib/logitech/run/pass/hello.mod: New file.
	* pimlib/logitech/run/pass/helloinout.mod: New file.
	* pimlib/logitech/run/pass/intb.mod: New file.
	* pimlib/logitech/run/pass/realconv.mod: New file.
	* pimlib/logitech/run/pass/realinput.mod: New file.
	* pimlib/logitech/run/pass/realinput2.mod: New file.
	* pimlib/logitech/run/pass/realinput3.mod: New file.
	* pimlib/logitech/run/pass/rename.mod: New file.
	* pimlib/logitech/run/pass/timedate.mod: New file.
	* pimlib/logitech/run/pass/writeoct.mod: New file.
	* pimlib/pass/gm2.exp: New file.
	* pimlib/run/pass/format.mod: New file.
	* pimlib/run/pass/gm2.exp: New file.
	* pimlib/run/pass/limittests.c: New file.
	* pimlib/run/pass/limittests.mod: New file.
	* pimlib/run/pass/longreal.mod: New file.
	* pimlib/run/pass/test.c: New file.
	* pimlib/run/pass/testreal.mod: New file.
	* pimlib/run/pass/testreal2.mod: New file.
	* pimlib/run/pass/testreal4.mod: New file.
	* quads/run/pass/becomes.mod: New file.
	* quads/run/pass/gm2.exp: New file.
	* quads/run/pass/param.mod: New file.
	* quads/run/pass/return.mod: New file.
	* recover/begin.mod: New file.
	* recover/end2.mod: New file.
	* recover/of.mod: New file.
	* recover/rsbra.mod: New file.
	* recover/semi.mod: New file.
	* run/Makefile.in: New file.
	* run/fail/Makefile.in: New file.
	* run/fail/list.mod: New file.
	* run/fail/mustrunandfail: New file.
	* run/fail/options: New file.
	* run/fail/testdec.mod: New file.
	* run/fail/testfunc.mod: New file.
	* run/pass/Makefile.in: New file.
	* run/pass/cycles.mod: New file.
	* run/pass/line.mod: New file.
	* run/pass/mustrunandpass: New file.
	* run/pass/nestedproc.mod: New file.
	* run/pass/nestedproc2.mod: New file.
	* run/pass/nestedproc3.mod: New file.
	* run/pass/nestedproc5.mod: New file.
	* run/pass/nestedset.mod: New file.
	* run/pass/nothing.mod: New file.
	* run/pass/options: New file.
	* run/pass/prog31ex.mod: New file.
	* run/pass/rts.mod: New file.
	* run/pass/stripped.mod: New file.
	* run/pass/testavail.mod: New file.
	* run/pass/testfpufunc.mod: New file.
	* run/pass/testfpufunc2.mod: New file.
	* run/pass/testnextproc.mod: New file.
	* run/pass/testparam.mod: New file.
	* run/pass/testpound.mod: New file.
	* run/pass/testsize.mod: New file.
	* run/pass/testsize2.mod: New file.
	* run/pass/testsize3.mod: New file.
	* run/pass/wr.mod: New file.
	* scripts/addit: New file.
	* scripts/comp: New file.
	* scripts/compile: New file.
	* scripts/compileiso: New file.
	* scripts/link: New file.
	* scripts/regression: New file.
	* scripts/subit: New file.
	* sets/run/pass/gm2.exp: New file.
	* sets/run/pass/multisetarith.mod: New file.
	* sets/run/pass/multisetarith2.mod: New file.
	* sets/run/pass/multisetarith3.mod: New file.
	* sets/run/pass/multisetarith4.mod: New file.
	* sets/run/pass/multisetrotate.mod: New file.
	* sets/run/pass/multisetrotate2.mod: New file.
	* sets/run/pass/multisetrotate3.mod: New file.
	* sets/run/pass/multisetrotate4.mod: New file.
	* sets/run/pass/multisetshift.mod: New file.
	* sets/run/pass/multisetshift2.mod: New file.
	* sets/run/pass/multisimple.mod: New file.
	* sets/run/pass/multisimple2.mod: New file.
	* sets/run/pass/multisimple3.mod: New file.
	* sets/run/pass/multisimple4.mod: New file.
	* sets/run/pass/multisimple5.mod: New file.
	* sets/run/pass/multisimple6.mod: New file.
	* sets/run/pass/multisimple7.mod: New file.
	* sets/run/pass/setarith.mod: New file.
	* sets/run/pass/setarith2.mod: New file.
	* sets/run/pass/setarith3.mod: New file.
	* sets/run/pass/setarith4.mod: New file.
	* sets/run/pass/setrotate.mod: New file.
	* sets/run/pass/setrotate2.mod: New file.
	* sets/run/pass/setrotate3.mod: New file.
	* sets/run/pass/setrotate4.mod: New file.
	* sets/run/pass/setshift.mod: New file.
	* sets/run/pass/setshift2.mod: New file.
	* sets/run/pass/simple.mod: New file.
	* sets/run/pass/simple2.mod: New file.
	* sets/run/pass/simple3.mod: New file.
	* sets/run/pass/simple4.mod: New file.
	* sets/run/pass/simple5.mod: New file.
	* sets/run/pass/simple6.mod: New file.
	* sets/run/pass/simple7.mod: New file.
	* switches/auto-init/fail/gm2.exp: New file.
	* switches/auto-init/fail/uninitptr.mod: New file.
	* switches/auto-init/fail/uninitptr2.mod: New file.
	* switches/check-all/pim2/fail/gm2.exp: New file.
	* switches/check-all/pim2/fail/overflow.mod: New file.
	* switches/check-all/pim2/fail/overflow2.mod: New file.
	* switches/check-all/pim2/fail/overflowdiv1.mod: New file.
	* switches/check-all/plugin/iso/fail/divceilposneg.mod: New file.
	* switches/check-all/plugin/iso/fail/divceilposneg2.mod: New file.
	* switches/check-all/plugin/iso/fail/divceilposnegcall.mod: New file.
	* switches/check-all/plugin/iso/fail/divceilposnegcall2.mod: New file.
	* switches/check-all/plugin/iso/fail/divfloornegpos.mod: New file.
	* switches/check-all/plugin/iso/fail/divfloorpospos.mod: New file.
	* switches/check-all/plugin/iso/fail/gm2.exp: New file.
	* switches/check-all/plugin/iso/fail/lowdiv.mod: New file.
	* switches/check-all/plugin/pim2/fail/divceil.mod: New file.
	* switches/check-all/plugin/pim2/fail/gm2.exp: New file.
	* switches/check-all/plugin/pim2/fail/highdiv.mod: New file.
	* switches/check-all/plugin/pim2/fail/modulus.mod: New file.
	* switches/check-all/plugin/pim2/fail/plugin1.mod: New file.
	* switches/check-all/plugin/pim2/fail/plugin3.mod: New file.
	* switches/check-all/plugin/pim2/fail/plugin4.def: New file.
	* switches/check-all/plugin/pim2/fail/plugin4.mod: New file.
	* switches/check-all/plugin/pim2/fail/plugin5.def: New file.
	* switches/check-all/plugin/pim2/fail/plugin5.mod: New file.
	* switches/check-all/plugin/pim2/fail/plugin6.def: New file.
	* switches/check-all/plugin/pim2/fail/plugin6.mod: New file.
	* switches/check-all/plugin/pim2/fail/plugin7.def: New file.
	* switches/check-all/plugin/pim2/fail/plugin7.mod: New file.
	* switches/check-all/plugin/pim2/fail/plugin8.def: New file.
	* switches/check-all/plugin/pim2/fail/plugin8.mod: New file.
	* switches/check-all/plugin/pim2/fail/plugin9.mod: New file.
	* switches/check-all/run/fail/cardrange.mod: New file.
	* switches/check-all/run/fail/cardrange2.mod: New file.
	* switches/check-all/run/fail/cardrange3.mod: New file.
	* switches/check-all/run/fail/gm2.exp: New file.
	* switches/check-all/run/fail/intrange.mod: New file.
	* switches/check-all/run/fail/intrange2.mod: New file.
	* switches/check-all/run/fail/intrange3.mod: New file.
	* switches/check-all/run/fail/intrange4.mod: New file.
	* switches/check-all/run/fail/intrange5.mod: New file.
	* switches/check-all/run/fail/multint1.mod: New file.
	* switches/check-all/run/fail/multint2.mod: New file.
	* switches/check-all/run/fail/multint3.mod: New file.
	* switches/check-all/run/fail/rangesupport.def: New file.
	* switches/check-all/run/fail/rangesupport.mod: New file.
	* switches/check-all/run/fail/realrange.mod: New file.
	* switches/check-all/run/fail/subrange.mod: New file.
	* switches/check-all/run/pass/cardrange.mod: New file.
	* switches/check-all/run/pass/forcheck.mod: New file.
	* switches/check-all/run/pass/gm2.exp: New file.
	* switches/check-all/run/pass/subrange.mod: New file.
	* switches/extended-opaque/fail/a.def: New file.
	* switches/extended-opaque/fail/a.mod: New file.
	* switches/extended-opaque/fail/gm2.exp: New file.
	* switches/extended-opaque/pass/a.def: New file.
	* switches/extended-opaque/pass/a.mod: New file.
	* switches/extended-opaque/pass/b.mod: New file.
	* switches/extended-opaque/pass/gm2.exp: New file.
	* switches/iso/run/pass/gm2.exp: New file.
	* switches/iso/run/pass/modulus.mod: New file.
	* switches/iso/run/pass/modulus4.mod: New file.
	* switches/makeall/fail/gm2.exp: New file.
	* switches/makeall/fail/test.def: New file.
	* switches/makeall/fail/test.mod: New file.
	* switches/makeall/pass/gm2.exp: New file.
	* switches/makeall/pass/test.def: New file.
	* switches/makeall/pass/test.mod: New file.
	* switches/none/run/pass/gm2-none.exp: New file.
	* switches/none/run/pass/hello.mod: New file.
	* switches/optimization/run/pass/fact.mod: New file.
	* switches/optimization/run/pass/gm2.exp: New file.
	* switches/pedantic-params/fail/a.def: New file.
	* switches/pedantic-params/fail/a.mod: New file.
	* switches/pedantic-params/fail/gm2.exp: New file.
	* switches/pedantic-params/pass/Strings.def: New file.
	* switches/pedantic-params/pass/Strings.mod: New file.
	* switches/pedantic-params/pass/Strings2.def: New file.
	* switches/pedantic-params/pass/Strings2.mod: New file.
	* switches/pedantic-params/pass/gm2.exp: New file.
	* switches/pedantic/fail/onlywrite.mod: New file.
	* switches/pedantic/fail/readb4.mod: New file.
	* switches/pic/run/pass/func.c: New file.
	* switches/pic/run/pass/func.mod: New file.
	* switches/pic/run/pass/func2.c: New file.
	* switches/pic/run/pass/func2.mod: New file.
	* switches/pic/run/pass/gm2.exp: New file.
	* switches/pim2/run/pass/gm2.exp: New file.
	* switches/pim2/run/pass/modulus.mod: New file.
	* switches/pim3/run/pass/gm2.exp: New file.
	* switches/pim3/run/pass/modulus.mod: New file.
	* switches/pim4/run/pass/FpuIOBug.mod: New file.
	* switches/pim4/run/pass/InOutBug.mod: New file.
	* switches/pim4/run/pass/NumberIOBug.mod: New file.
	* switches/pim4/run/pass/gm2.exp: New file.
	* switches/pim4/run/pass/modulus.mod: New file.
	* switches/pim4/run/pass/modulus2.mod: New file.
	* switches/whole-program/pass/run/gm2.exp: New file.
	* switches/whole-program/pass/run/tiny.mod: New file.
	* switches/whole-program/pass/run/tiny2.mod: New file.
	* types/Makefile.in: New file.
	* types/bitset.mod: New file.
	* types/bitset2.mod: New file.
	* types/bitset3.mod: New file.
	* types/charset.mod: New file.
	* types/const.mod: New file.
	* types/prog35.mod: New file.
	* types/real.mod: New file.
	* types/run/pass/d.c: New file.
	* types/run/pass/d.def: New file.
	* types/run/pass/gm2.exp: New file.
	* types/run/pass/varient4.mod: New file.
	* types/run/pass/varient5.mod: New file.
	* types/string.mod: New file.
	* types/type1.mod: New file.
	* types/type2.mod: New file.
	* types/type3.mod: New file.
	* types/type4.mod: New file.
	* types/varient.mod: New file.
	* types/word.mod: New file.
	* ulmlib/pass/gm2.exp: New file.
	* ulmlib/std/pass/gm2.exp: New file.
	* ulmlib/sys/pass/gm2.exp: New file.
	* warnings/Makefile.in: New file.
	* warnings/todo/nestedproc6.mod: New file.
	* warnings/todo/options: New file.
	* warnings/todo/testfor.mod: New file.
	* warnings/todo/testfor2.mod: New file.
	* warnings/todo/testfor3.mod: New file.
	* warnings/todo/testkeywords.mod: New file.
	* warnings/todo/testloop.mod: New file.
	* warnings/todo/testscope.mod: New file.
	* warnings/todo/testscope2.mod: New file.
	* x86-asm/asm.mod: New file.
	* x86-asm/asm2.mod: New file.

Signed-off-by: Gaius Mulley <gaius.mulley@southwales.ac.uk>
This commit is contained in:
Gaius Mulley 2021-07-07 20:23:23 +01:00
parent 6b096c1731
commit 7401123f97
2674 changed files with 533419 additions and 63 deletions

View File

@ -140,6 +140,7 @@ host_modules= { module= lto-plugin; bootstrap=true;
extra_configure_flags='--enable-shared @extra_linker_plugin_flags@ @extra_linker_plugin_configure_flags@';
extra_make_flags='@extra_linker_plugin_flags@'; };
host_modules= { module= libcc1; extra_configure_flags=--enable-shared; };
host_modules= { module= gm2tools; };
host_modules= { module= gotools; };
host_modules= { module= libctf; bootstrap=true; };
@ -179,6 +180,7 @@ target_modules = { module= libffi; no_install=true; };
target_modules = { module= zlib; };
target_modules = { module= rda; };
target_modules = { module= libada; };
target_modules = { module= libgm2; lib_path=.libs; };
target_modules = { module= libgomp; bootstrap= true; lib_path=.libs; };
target_modules = { module= libitm; lib_path=.libs; };
target_modules = { module= libatomic; lib_path=.libs; };
@ -298,6 +300,8 @@ flags_to_pass = { flag= GOC_FOR_TARGET ; };
flags_to_pass = { flag= GOCFLAGS_FOR_TARGET ; };
flags_to_pass = { flag= GDC_FOR_TARGET ; };
flags_to_pass = { flag= GDCFLAGS_FOR_TARGET ; };
flags_to_pass = { flag= GM2_FOR_TARGET ; };
flags_to_pass = { flag= GM2FLAGS_FOR_TARGET ; };
flags_to_pass = { flag= LD_FOR_TARGET ; };
flags_to_pass = { flag= LIPO_FOR_TARGET ; };
flags_to_pass = { flag= LDFLAGS_FOR_TARGET ; };
@ -394,6 +398,8 @@ dependencies = { module=all-libcc1; on=all-gcc; };
// we want version.o from gcc, and implicitly depend on libcody
dependencies = { module=all-c++tools; on=all-gcc; };
dependencies = { module=all-gotools; on=all-target-libgo; };
dependencies = { module=all-gm2tools; on=all-target-libgm2; };
dependencies = { module=all-gm2tools; on=all-target-libstdc++-v3; };
dependencies = { module=all-utils; on=all-libiberty; };
@ -594,6 +600,8 @@ dependencies = { module=configure-target-libgo; on=all-target-libstdc++-v3; };
dependencies = { module=all-target-libgo; on=all-target-libbacktrace; };
dependencies = { module=all-target-libgo; on=all-target-libffi; };
dependencies = { module=all-target-libgo; on=all-target-libatomic; };
dependencies = { module=configure-target-libgm2; on=all-target-libstdc++-v3; };
dependencies = { module=all-target-libgm2; on=all-target-libatomic; };
dependencies = { module=configure-target-libphobos; on=configure-target-libbacktrace; };
dependencies = { module=configure-target-libphobos; on=configure-target-zlib; };
dependencies = { module=all-target-libphobos; on=all-target-libbacktrace; };
@ -652,6 +660,9 @@ languages = { language=obj-c++; gcc-check-target=check-obj-c++; };
languages = { language=go; gcc-check-target=check-go;
lib-check-target=check-target-libgo;
lib-check-target=check-gotools; };
languages = { language=m2; gcc-check-target=check-m2;
lib-check-target=check-target-libgm2;
lib-check-target=check-gm2tools; };
languages = { language=d; gcc-check-target=check-d;
lib-check-target=check-target-libphobos; };

File diff suppressed because it is too large Load Diff

View File

@ -161,6 +161,7 @@ BUILD_EXPORTS = \
GOCFLAGS="$(GOCFLAGS_FOR_BUILD)"; export GOCFLAGS; \
GDC="$(GDC_FOR_BUILD)"; export GDC; \
GDCFLAGS="$(GDCFLAGS_FOR_BUILD)"; export GDCFLAGS; \
GM2="$(GM2_FOR_BUILD)"; export GM2; \
DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
DSYMUTIL="$(DSYMUTIL_FOR_BUILD)"; export DSYMUTIL; \
LD="$(LD_FOR_BUILD)"; export LD; \
@ -199,6 +200,7 @@ HOST_EXPORTS = \
GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \
GOC="$(GOC)"; export GOC; \
GDC="$(GDC)"; export GDC; \
GM2="$(GM2)"; export GM2; \
AR="$(AR)"; export AR; \
AS="$(AS)"; export AS; \
CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
@ -299,6 +301,7 @@ BASE_TARGET_EXPORTS = \
GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \
GOC="$(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GOC; \
GDC="$(GDC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GDC; \
GM2="$(GM2_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GM2; \
DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
DSYMUTIL="$(DSYMUTIL_FOR_TARGET)"; export DSYMUTIL; \
LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
@ -367,6 +370,7 @@ DSYMUTIL_FOR_BUILD = @DSYMUTIL_FOR_BUILD@
GFORTRAN_FOR_BUILD = @GFORTRAN_FOR_BUILD@
GOC_FOR_BUILD = @GOC_FOR_BUILD@
GDC_FOR_BUILD = @GDC_FOR_BUILD@
GM2_FOR_BUILD = @GM2_FOR_BUILD@
LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
LD_FOR_BUILD = @LD_FOR_BUILD@
NM_FOR_BUILD = @NM_FOR_BUILD@
@ -437,6 +441,7 @@ CXXFLAGS = @CXXFLAGS@
LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
GOCFLAGS = $(CFLAGS)
GDCFLAGS = $(CFLAGS)
GM2FLAGS = $(CFLAGS)
CREATE_GCOV = create_gcov
@ -524,6 +529,7 @@ RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@
GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@
GOC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GOC_FOR_TARGET@
GDC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GDC_FOR_TARGET@
GM2_FOR_TARGET=$(STAGE_CC_WRAPPER) @GM2_FOR_TARGET@
DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
DSYMUTIL_FOR_TARGET=@DSYMUTIL_FOR_TARGET@
LD_FOR_TARGET=@LD_FOR_TARGET@
@ -549,6 +555,7 @@ CXXFLAGS_FOR_TARGET = @CXXFLAGS_FOR_TARGET@
LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
LDFLAGS_FOR_TARGET = @LDFLAGS_FOR_TARGET@
GM2FLAGS_FOR_TARGET = -O2 -g
GOCFLAGS_FOR_TARGET = -O2 -g
GDCFLAGS_FOR_TARGET = -O2 -g
@ -655,6 +662,7 @@ EXTRA_HOST_FLAGS = \
'GFORTRAN=$(GFORTRAN)' \
'GOC=$(GOC)' \
'GDC=$(GDC)' \
'GM2=$(GM2)' \
'LD=$(LD)' \
'LIPO=$(LIPO)' \
'NM=$(NM)' \
@ -681,6 +689,7 @@ POSTSTAGE1_FLAGS_TO_PASS = \
CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
CXX="$${CXX}" CXX_FOR_BUILD="$${CXX_FOR_BUILD}" \
GDC="$${GDC}" GDC_FOR_BUILD="$${GDC_FOR_BUILD}" \
GM2="$${GM2}" GM2_FOR_BUILD="$${GM2_FOR_BUILD}" \
GNATBIND="$${GNATBIND}" \
LDFLAGS="$${LDFLAGS}" \
HOST_LIBS="$${HOST_LIBS}" \
@ -716,6 +725,8 @@ EXTRA_TARGET_FLAGS = \
'GOCFLAGS=$$(GOCFLAGS_FOR_TARGET)' \
'GDC=$$(GDC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
'GDCFLAGS=$$(GDCFLAGS_FOR_TARGET)' \
'GM2=$$(GM2_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
'GM2FLAGS=$$(GM2FLAGS_FOR_TARGET)' \
'LD=$(COMPILER_LD_FOR_TARGET)' \
'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
@ -742,6 +753,7 @@ TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
# cross-building scheme.
EXTRA_GCC_FLAGS = \
"GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
"GM2_FOR_TARGET=$(GM2_FOR_TARGET)" \
"`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
"`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
@ -873,7 +885,7 @@ local-distclean:
-rm -f texinfo/doc/Makefile texinfo/po/POTFILES
-rmdir texinfo/doc texinfo/info texinfo/intl texinfo/lib 2>/dev/null
-rmdir texinfo/makeinfo texinfo/po texinfo/util 2>/dev/null
-rmdir c++tools fastjar gcc gnattools gotools 2>/dev/null
-rmdir c++tools fastjar gcc gnattools gm2tools gotools 2>/dev/null
-rmdir libcc1 libiberty texinfo zlib 2>/dev/null
-find . -name config.cache -exec rm -f {} \; \; 2>/dev/null

242
configure vendored
View File

@ -613,6 +613,7 @@ DSYMUTIL_FOR_TARGET
DLLTOOL_FOR_TARGET
AS_FOR_TARGET
AR_FOR_TARGET
GM2_FOR_TARGET
GDC_FOR_TARGET
GOC_FOR_TARGET
GFORTRAN_FOR_TARGET
@ -759,6 +760,7 @@ infodir
docdir
oldincludedir
includedir
runstatedir
localstatedir
sharedstatedir
sysconfdir
@ -796,6 +798,7 @@ enable_compressed_debug_sections
enable_libquadmath
enable_libquadmath_support
enable_libada
enable_libgm2
enable_libssp
enable_libstdcxx
enable_liboffloadmic
@ -875,6 +878,7 @@ GCC_FOR_TARGET
GFORTRAN_FOR_TARGET
GOC_FOR_TARGET
GDC_FOR_TARGET
GM2_FOR_TARGET
AR_FOR_TARGET
AS_FOR_TARGET
DLLTOOL_FOR_TARGET
@ -928,6 +932,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE}'
@ -1180,6 +1185,15 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
-runstatedir | --runstatedir | --runstatedi | --runstated \
| --runstate | --runstat | --runsta | --runst | --runs \
| --run | --ru | --r)
ac_prev=runstatedir ;;
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
| --run=* | --ru=* | --r=*)
runstatedir=$ac_optarg ;;
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@ -1317,7 +1331,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir
libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@ -1477,6 +1491,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@ -1535,6 +1550,7 @@ Optional Features:
--disable-libquadmath-support
disable libquadmath support for Fortran
--enable-libada build libada directory
--enable-libgm2 build libgm2 directory
--enable-libssp build libssp directory
--disable-libstdcxx do not build libstdc++-v3 directory
--enable-liboffloadmic=ARG
@ -1671,6 +1687,8 @@ Some influential environment variables:
GOC for the target
GDC_FOR_TARGET
GDC for the target
GM2_FOR_TARGET
GM2 for the target
AR_FOR_TARGET
AR for the target
AS_FOR_TARGET
@ -2809,7 +2827,7 @@ host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktr
# binutils, gas and ld appear in that order because it makes sense to run
# "make check" in that particular order.
# If --enable-gold is used, "gold" may replace "ld".
host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gdbserver gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gotools c++tools"
host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gdbserver gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gm2tools gotools c++tools"
# these libraries are built for the target environment, and are built after
# the host libraries and the host tools (which may be a cross compiler)
@ -2831,6 +2849,7 @@ target_libraries="target-libgcc \
target-libffi \
target-libobjc \
target-libada \
target-libgm2 \
target-libgo \
target-libphobos \
target-zlib"
@ -3168,6 +3187,17 @@ if test "${ENABLE_LIBADA}" != "yes" ; then
noconfigdirs="$noconfigdirs gnattools"
fi
# Check whether --enable-libgm2 was given.
if test "${enable_libgm2+set}" = set; then :
enableval=$enable_libgm2; ENABLE_LIBGM2=$enableval
else
ENABLE_LIBGM2=no
fi
if test "${ENABLE_LIBGM2}" != "yes" ; then
noconfigdirs="$noconfigdirs gm2tools"
fi
# Check whether --enable-libssp was given.
if test "${enable_libssp+set}" = set; then :
enableval=$enable_libssp; ENABLE_LIBSSP=$enableval
@ -13566,6 +13596,167 @@ fi
if test -n "$GM2_FOR_TARGET"; then
ac_cv_prog_GM2_FOR_TARGET=$GM2_FOR_TARGET
elif test -n "$ac_cv_prog_GM2_FOR_TARGET"; then
GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
fi
if test -n "$ac_cv_prog_GM2_FOR_TARGET"; then
for ncn_progname in gm2; do
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_GM2_FOR_TARGET+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$GM2_FOR_TARGET"; then
ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_GM2_FOR_TARGET="${ncn_progname}"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
if test -n "$GM2_FOR_TARGET"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5
$as_echo "$GM2_FOR_TARGET" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
done
fi
if test -z "$ac_cv_prog_GM2_FOR_TARGET" && test -n "$with_build_time_tools"; then
for ncn_progname in gm2; do
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_GM2_FOR_TARGET=$with_build_time_tools/${ncn_progname}
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
break
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
done
fi
if test -z "$ac_cv_prog_GM2_FOR_TARGET"; then
for ncn_progname in gm2; do
if test -n "$ncn_target_tool_prefix"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_GM2_FOR_TARGET+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$GM2_FOR_TARGET"; then
ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_GM2_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
if test -n "$GM2_FOR_TARGET"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5
$as_echo "$GM2_FOR_TARGET" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
if test -z "$ac_cv_prog_GM2_FOR_TARGET" && test $build = $target ; then
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_GM2_FOR_TARGET+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$GM2_FOR_TARGET"; then
ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_GM2_FOR_TARGET="${ncn_progname}"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
if test -n "$GM2_FOR_TARGET"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5
$as_echo "$GM2_FOR_TARGET" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
test -n "$ac_cv_prog_GM2_FOR_TARGET" && break
done
fi
if test -z "$ac_cv_prog_GM2_FOR_TARGET" ; then
set dummy gm2
if test $build = $target ; then
GM2_FOR_TARGET="$2"
else
GM2_FOR_TARGET="${ncn_target_tool_prefix}$2"
fi
else
GM2_FOR_TARGET="$ac_cv_prog_GM2_FOR_TARGET"
fi
cat > conftest.c << \EOF
#ifdef __GNUC__
gcc_yay;
@ -17498,6 +17689,51 @@ $as_echo "pre-installed" >&6; }
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target gm2" >&5
$as_echo_n "checking where to find the target gm2... " >&6; }
if test "x${build}" != "x${host}" ; then
if expr "x$GM2_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
ac_dir=`dirname $GM2_FOR_TARGET`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
$as_echo "pre-installed in $ac_dir" >&6; }
else
# Canadian cross, just use what we found
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
$as_echo "pre-installed" >&6; }
fi
else
ok=yes
case " ${configdirs} " in
*" gcc "*) ;;
*) ok=no ;;
esac
case ,${enable_languages}, in
*,m2,*) ;;
*) ok=no ;;
esac
if test $ok = yes; then
# An in-tree tool is available and we can use it
GM2_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gm2 -B$$r/$(HOST_SUBDIR)/gcc/'
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
$as_echo "just compiled" >&6; }
elif expr "x$GM2_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
ac_dir=`dirname $GM2_FOR_TARGET`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
$as_echo "pre-installed in $ac_dir" >&6; }
elif test "x$target" = "x$host"; then
# We can use an host tool
GM2_FOR_TARGET='$(GM2)'
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
$as_echo "host tool" >&6; }
else
# We need a cross tool
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
$as_echo "pre-installed" >&6; }
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target ld" >&5
$as_echo_n "checking where to find the target ld... " >&6; }
if test "x${build}" != "x${host}" ; then
@ -18059,6 +18295,8 @@ fi
# Specify what files to not compare during bootstrap.
compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*"
compare_exclusions="$compare_exclusions | gcc/m2/gm2-compiler-boot/M2Version*"
compare_exclusions="$compare_exclusions | gcc/m2/gm2-compiler-boot/SYSTEM*"
case "$target" in
hppa*64*-*-hpux*) ;;
hppa*-*-hpux*) compare_exclusions="$compare_exclusions | */libgcc/lib2funcs* | gcc/function-tests.o" ;;

View File

@ -140,7 +140,7 @@ host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktr
# binutils, gas and ld appear in that order because it makes sense to run
# "make check" in that particular order.
# If --enable-gold is used, "gold" may replace "ld".
host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gdbserver gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gotools c++tools"
host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gdbserver gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gm2tools gotools c++tools"
# these libraries are built for the target environment, and are built after
# the host libraries and the host tools (which may be a cross compiler)
@ -162,6 +162,7 @@ target_libraries="target-libgcc \
target-libffi \
target-libobjc \
target-libada \
target-libgm2 \
target-libgo \
target-libphobos \
target-zlib"
@ -459,6 +460,14 @@ if test "${ENABLE_LIBADA}" != "yes" ; then
noconfigdirs="$noconfigdirs gnattools"
fi
AC_ARG_ENABLE(libgm2,
[AS_HELP_STRING([--enable-libgm2], [build libgm2 directory])],
ENABLE_LIBGM2=$enableval,
ENABLE_LIBGM2=no)
if test "${ENABLE_LIBGM2}" != "yes" ; then
noconfigdirs="$noconfigdirs gm2tools"
fi
AC_ARG_ENABLE(libssp,
[AS_HELP_STRING([--enable-libssp], [build libssp directory])],
ENABLE_LIBSSP=$enableval,
@ -3498,6 +3507,7 @@ NCN_STRICT_CHECK_TARGET_TOOLS(GCC_FOR_TARGET, gcc, ${CC_FOR_TARGET})
NCN_STRICT_CHECK_TARGET_TOOLS(GFORTRAN_FOR_TARGET, gfortran)
NCN_STRICT_CHECK_TARGET_TOOLS(GOC_FOR_TARGET, gccgo)
NCN_STRICT_CHECK_TARGET_TOOLS(GDC_FOR_TARGET, gdc)
NCN_STRICT_CHECK_TARGET_TOOLS(GM2_FOR_TARGET, gm2)
ACX_CHECK_INSTALLED_TARGET_TOOL(AR_FOR_TARGET, ar)
ACX_CHECK_INSTALLED_TARGET_TOOL(AS_FOR_TARGET, as)
@ -3536,6 +3546,8 @@ GCC_TARGET_TOOL(gccgo, GOC_FOR_TARGET, GOC,
[gcc/gccgo -B$$r/$(HOST_SUBDIR)/gcc/], go)
GCC_TARGET_TOOL(gdc, GDC_FOR_TARGET, GDC,
[gcc/gdc -B$$r/$(HOST_SUBDIR)/gcc/], d)
GCC_TARGET_TOOL(gm2, GM2_FOR_TARGET, GM2,
[gcc/gm2 -B$$r/$(HOST_SUBDIR)/gcc/], m2)
GCC_TARGET_TOOL(ld, LD_FOR_TARGET, LD, [ld/ld-new])
GCC_TARGET_TOOL(lipo, LIPO_FOR_TARGET, LIPO)
GCC_TARGET_TOOL(nm, NM_FOR_TARGET, NM, [binutils/nm-new])
@ -3662,6 +3674,8 @@ AC_SUBST(stage2_werror_flag)
# Specify what files to not compare during bootstrap.
compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*"
compare_exclusions="$compare_exclusions | gcc/m2/gm2-compiler-boot/M2Version*"
compare_exclusions="$compare_exclusions | gcc/m2/gm2-compiler-boot/SYSTEM*"
case "$target" in
hppa*64*-*-hpux*) ;;
hppa*-*-hpux*) compare_exclusions="$compare_exclusions | */libgcc/lib2funcs* | gcc/function-tests.o" ;;

View File

@ -198,3 +198,9 @@ int lang_specific_pre_link (void)
/* Number of extra output files that lang_specific_pre_link may generate. */
int lang_specific_extra_outfiles = 0; /* Not used for cpp. */
/* lang_register_spec_functions. Not used for cpp. */
void
lang_register_spec_functions (void)
{
}

View File

@ -105,3 +105,9 @@ lang_specific_pre_link (void)
/* Number of extra output files that lang_specific_pre_link may generate. */
int lang_specific_extra_outfiles = 0; /* Not used for C. */
/* lang_register_spec_functions. Not used for C. */
void
lang_register_spec_functions (void)
{
}

View File

@ -434,3 +434,9 @@ int lang_specific_pre_link (void) /* Not used for C++. */
/* Number of extra output files that lang_specific_pre_link may generate. */
int lang_specific_extra_outfiles = 0; /* Not used for C++. */
/* lang_register_spec_functions. Not used for C++. */
void
lang_register_spec_functions (void)
{
}

View File

@ -490,3 +490,10 @@ lang_specific_pre_link (void)
int lang_specific_extra_outfiles = 0; /* Not used for D. */
/* lang_register_spec_functions register the D associated spec
functions. Not used for D. */
void
lang_register_spec_functions (void)
{
}

2953
gcc/doc/gm2.texi Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1781,18 +1781,19 @@ their runtime libraries should be built. For a list of valid values for
@smallexample
grep ^language= */config-lang.in
@end smallexample
Currently, you can use any of the following:
@code{all}, @code{default}, @code{ada}, @code{c}, @code{c++}, @code{d},
@code{fortran}, @code{go}, @code{jit}, @code{lto}, @code{objc}, @code{obj-c++}.
Building the Ada compiler has special requirements, see below.
If you do not pass this flag, or specify the option @code{default}, then the
default languages available in the @file{gcc} sub-tree will be configured.
Ada, D, Go, Jit, and Objective-C++ are not default languages. LTO is not a
default language, but is built by default because @option{--enable-lto} is
enabled by default. The other languages are default languages. If
@code{all} is specified, then all available languages are built. An
exception is @code{jit} language, which requires
@option{--enable-host-shared} to be included with @code{all}.
Currently, you can use any of the following: @code{all},
@code{default}, @code{ada}, @code{c}, @code{c++}, @code{d},
@code{fortran}, @code{go}, @code{jit}, @code{lto}, @code{m2},
@code{objc}, @code{obj-c++}. Building the Ada compiler has special
requirements, see below. If you do not pass this flag, or specify the
option @code{default}, then the default languages available in the
@file{gcc} sub-tree will be configured. Ada, D, Go, Jit,
Objective-C++ and Modula-2 are not default languages. LTO is not a
default language, but is built by default because
@option{--enable-lto} is enabled by default. The other languages are
default languages. If @code{all} is specified, then all available
languages are built. An exception is @code{jit} language, which
requires @option{--enable-host-shared} to be included with @code{all}.
@item --enable-stage1-languages=@var{lang1},@var{lang2},@dots{}
Specify that a particular subset of compilers and their runtime
@ -1815,6 +1816,10 @@ be built. This can be useful for debugging, or for compatibility with
previous Ada build procedures, when it was required to explicitly
do a @samp{make -C gcc gnatlib_and_tools}.
@item --disable-libgm2
Specify that the run-time libraries and tools used by Modula-2 should not
be built. This can be useful for debugging.
@item --disable-libsanitizer
Specify that the run-time libraries for the various sanitizers should
not be built.
@ -3074,10 +3079,10 @@ on a simulator as described at @uref{http://gcc.gnu.org/simtest-howto.html}.
In order to run sets of tests selectively, there are targets
@samp{make check-gcc} and language specific @samp{make check-c},
@samp{make check-c++}, @samp{make check-d} @samp{make check-fortran},
@samp{make check-ada}, @samp{make check-objc}, @samp{make check-obj-c++},
@samp{make check-lto}
in the @file{gcc} subdirectory of the object directory. You can also
just run @samp{make check} in a subdirectory of the object directory.
@samp{make check-ada}, @samp{make check-m2}, @samp{make check-objc},
@samp{make check-obj-c++}, @samp{make check-lto} in the @file{gcc}
subdirectory of the object directory. You can also just run
@samp{make check} in a subdirectory of the object directory.
A more selective way to just run all @command{gcc} execute tests in the

View File

@ -52,6 +52,9 @@ including optimizers, support for different target architectures,
language front ends, and testsuites. @xref{gcc Directory, , The
@file{gcc} Subdirectory}, for details.
@item gm2tools
Support tools for Modula-2.
@item gnattools
Support tools for GNAT.
@ -84,6 +87,9 @@ The GCC runtime library.
@item libgfortran
The Fortran runtime library.
@item libgm2
The Modula-2 runtime library.
@item libgo
The Go runtime library. The bulk of this library is mirrored from the
@uref{https://github.com/@/golang/go, master Go repository}.
@ -163,13 +169,12 @@ The @file{gcc} directory contains the following subdirectories:
@item @var{language}
Subdirectories for various languages. Directories containing a file
@file{config-lang.in} are language subdirectories. The contents of
the subdirectories @file{c} (for C), @file{cp} (for C++),
@file{objc} (for Objective-C), @file{objcp} (for Objective-C++),
and @file{lto} (for LTO) are documented in this
manual (@pxref{Passes, , Passes and Files of the Compiler});
those for other languages are not. @xref{Front End, ,
Anatomy of a Language Front End}, for details of the files in these
directories.
the subdirectories @file{c} (for C), @file{cp} (for C++), @file{m2}
(for Modula-2), @file{objc} (for Objective-C), @file{objcp} (for
Objective-C++), and @file{lto} (for LTO) are documented in this manual
(@pxref{Passes, , Passes and Files of the Compiler}); those for other
languages are not. @xref{Front End, , Anatomy of a Language Front
End}, for details of the files in these directories.
@item common
Source files shared between the compiler drivers (such as

View File

@ -447,4 +447,12 @@ lang_specific_pre_link (void)
}
/* Number of extra output files that lang_specific_pre_link may generate. */
int lang_specific_extra_outfiles = 0; /* Not used for F77. */
int lang_specific_extra_outfiles = 0; /* Not used for Fortran. */
/* lang_register_spec_functions register the Fortran associated spec
functions. */
void
lang_register_spec_functions (void)
{
}

212
gcc/gcc.c
View File

@ -334,6 +334,10 @@ static const char *cross_compile = "1";
static const char *cross_compile = "0";
#endif
/* The lang specs might wish to override the default linker.
*/
int allow_linker = 1;
/* Greatest exit code of sub-processes that has been encountered up to
now. */
static int greatest_status = 1;
@ -362,7 +366,6 @@ static void set_spec (const char *, const char *, bool);
static struct compiler *lookup_compiler (const char *, size_t, const char *);
static char *build_search_list (const struct path_prefix *, const char *,
bool, bool);
static void xputenv (const char *);
static void putenv_from_prefixes (const struct path_prefix *, const char *,
bool);
static int access_check (const char *, int);
@ -1148,6 +1151,7 @@ proper position among the other output files. */
/* We pass any -flto flags on to the linker, which is expected
to understand them. In practice, this means it had better be collect2. */
/* %{e*} includes -export-dynamic; see comment in common.opt. */
#ifndef LINK_COMMAND_SPEC
#define LINK_COMMAND_SPEC "\
%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
@ -1781,6 +1785,10 @@ static const struct spec_function static_spec_functions[] =
{ 0, 0 }
};
/* front end registered spec functions */
static struct spec_function *lang_spec_functions = NULL;
static unsigned int lang_spec_functions_length = 0;
static int processing_spec_function;
/* Add appropriate libgcc specs to OBSTACK, taking into account
@ -2943,12 +2951,20 @@ add_to_obstack (char *path, void *data)
/* Add or change the value of an environment variable, outputting the
change to standard error if in verbose mode. */
static void
void
xputenv (const char *string)
{
env.xput (string);
}
/* Get the environment variable through the managed env. */
const char *
xgetenv (const char *key)
{
return env.get (key);
}
/* Build a list of search directories from PATHS.
PREFIX is a string to prepend to the list.
If CHECK_DIR_P is true we ensure the directory exists.
@ -3883,7 +3899,7 @@ alloc_switch (void)
/* Save an option OPT with N_ARGS arguments in array ARGS, marking it
as validated if VALIDATED and KNOWN if it is an internal switch. */
static void
void
save_switch (const char *opt, size_t n_args, const char *const *args,
bool validated, bool known)
{
@ -3928,6 +3944,66 @@ set_source_date_epoch_envvar ()
setenv ("SOURCE_DATE_EPOCH", source_date_epoch, 0);
}
void
fe_add_linker_option (const char *option)
{
add_linker_option (option, strlen (option));
}
/* Handle the -B option by adding the prefix to exec, startfile and
include search paths. */
void
handle_OPT_B (const char *arg)
{
size_t len = strlen (arg);
/* Catch the case where the user has forgotten to append a
directory separator to the path. Note, they may be using
-B to add an executable name prefix, eg "i386-elf-", in
order to distinguish between multiple installations of
GCC in the same directory. Hence we must check to see
if appending a directory separator actually makes a
valid directory name. */
if (!IS_DIR_SEPARATOR (arg[len - 1])
&& is_directory (arg, false))
{
char *tmp = XNEWVEC (char, len + 2);
strcpy (tmp, arg);
tmp[len] = DIR_SEPARATOR;
tmp[++len] = 0;
arg = tmp;
}
add_prefix (&exec_prefixes, arg, NULL,
PREFIX_PRIORITY_B_OPT, 0, 0);
add_prefix (&startfile_prefixes, arg, NULL,
PREFIX_PRIORITY_B_OPT, 0, 0);
add_prefix (&include_prefixes, arg, NULL,
PREFIX_PRIORITY_B_OPT, 0, 0);
}
/* Save the infile. */
void
fe_add_infile (const char *infile, const char *lang)
{
add_infile (infile, lang);
}
/* Mark a file as compiled. */
void
fe_mark_compiled (const char *name)
{
int max = n_infiles + lang_specific_extra_outfiles;
int i;
for (i = 0; i < max; i++)
if (filename_cmp (name, infiles[i].name) == 0)
infiles[i].compiled = true;
}
/* Handle an option DECODED that is unknown to the option-processing
machinery. */
@ -4498,33 +4574,7 @@ driver_handle_option (struct gcc_options *opts,
break;
case OPT_B:
{
size_t len = strlen (arg);
/* Catch the case where the user has forgotten to append a
directory separator to the path. Note, they may be using
-B to add an executable name prefix, eg "i386-elf-", in
order to distinguish between multiple installations of
GCC in the same directory. Hence we must check to see
if appending a directory separator actually makes a
valid directory name. */
if (!IS_DIR_SEPARATOR (arg[len - 1])
&& is_directory (arg, false))
{
char *tmp = XNEWVEC (char, len + 2);
strcpy (tmp, arg);
tmp[len] = DIR_SEPARATOR;
tmp[++len] = 0;
arg = tmp;
}
add_prefix (&exec_prefixes, arg, NULL,
PREFIX_PRIORITY_B_OPT, 0, 0);
add_prefix (&startfile_prefixes, arg, NULL,
PREFIX_PRIORITY_B_OPT, 0, 0);
add_prefix (&include_prefixes, arg, NULL,
PREFIX_PRIORITY_B_OPT, 0, 0);
}
handle_OPT_B (arg);
validated = true;
break;
@ -4655,6 +4705,69 @@ single_input_file_index ()
return ret;
}
/* print_option a debugging routine to display option i with a leading desc
string. */
void
print_option (const char *desc, unsigned int i,
struct cl_decoded_option *in_decoded_options)
{
printf (desc);
printf (" [%d]", i);
switch (in_decoded_options[i].opt_index)
{
case N_OPTS:
break;
case OPT_SPECIAL_unknown:
printf (" flag <unknown>");
break;
case OPT_SPECIAL_ignore:
printf (" flag <ignore>");
break;
case OPT_SPECIAL_program_name:
printf (" flag <program name>");
break;
case OPT_SPECIAL_input_file:
printf (" flag <input file name>");
break;
default:
printf (" flag [%s]",
cl_options[in_decoded_options[i].opt_index].opt_text);
}
if (in_decoded_options[i].arg == NULL)
printf (" no arg");
else
printf (" arg [%s]", in_decoded_options[i].arg);
printf (" orig text [%s]",
in_decoded_options[i].orig_option_with_args_text);
/* On some hosts value is declared as a long long int. */
printf (" value [%ld]", (long int)in_decoded_options[i].value);
printf (" error [%d]\n", in_decoded_options[i].errors);
}
/* print_options display all options with a leading string desc. */
void
print_options (const char *desc,
unsigned int in_decoded_options_count,
struct cl_decoded_option *in_decoded_options)
{
for (unsigned int i = 0; i < in_decoded_options_count; i++)
print_option (desc, i, in_decoded_options);
}
/* dbg_options display all options. */
void
dbg_options (unsigned int in_decoded_options_count,
struct cl_decoded_option *in_decoded_options)
{
print_options ("dbg_options", in_decoded_options_count,
in_decoded_options);
}
/* Create the vector `switches' and its contents.
Store its length in `n_switches'. */
@ -6809,6 +6922,33 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
return 0;
}
/* Allow the front end to register a spec function. */
void fe_add_spec_function (const char *name, const char *(*func) (int, const char **))
{
const struct spec_function *f = lookup_spec_function (name);
struct spec_function *fl;
unsigned int i;
if (f != NULL)
fatal_error (input_location, "spec function (%s) already registered", name);
if (lang_spec_functions == NULL)
lang_spec_functions_length = 1;
lang_spec_functions_length++;
fl = (struct spec_function *) xmalloc (sizeof (const struct spec_function)*lang_spec_functions_length);
for (i=0; i<lang_spec_functions_length-2; i++)
fl[i] = lang_spec_functions[i];
free (lang_spec_functions);
lang_spec_functions = fl;
lang_spec_functions[lang_spec_functions_length-2].name = name;
lang_spec_functions[lang_spec_functions_length-2].func = func;
lang_spec_functions[lang_spec_functions_length-1].name = NULL;
lang_spec_functions[lang_spec_functions_length-1].func = NULL;
}
/* Look up a spec function. */
static const struct spec_function *
@ -6820,6 +6960,11 @@ lookup_spec_function (const char *name)
if (strcmp (sf->name, name) == 0)
return sf;
if (lang_spec_functions != NULL)
for (sf = lang_spec_functions; sf->name != NULL; sf++)
if (strcmp (sf->name, name) == 0)
return sf;
return NULL;
}
@ -8306,6 +8451,8 @@ driver::set_up_specs () const
accel_dir_suffix, dir_separator_str, NULL);
just_machine_suffix = concat (spec_machine, dir_separator_str, NULL);
lang_register_spec_functions ();
specs_file = find_a_file (&startfile_prefixes, "specs", R_OK, true);
/* Read the specs file unless it is a default one. */
if (specs_file != 0 && strcmp (specs_file, "specs"))
@ -9038,7 +9185,8 @@ driver::maybe_run_linker (const char *argv0) const
/* Run ld to link all the compiler output files. */
if (num_linker_inputs > 0 && !seen_error () && print_subprocess_help < 2)
if (num_linker_inputs > 0 && !seen_error () && print_subprocess_help < 2
&& allow_linker)
{
int tmp = execution_count;
@ -9107,7 +9255,7 @@ driver::maybe_run_linker (const char *argv0) const
/* If options said don't run linker,
complain about input files to be given to the linker. */
if (! linker_was_run && !seen_error ())
if (! linker_was_run && !seen_error () && allow_linker)
for (i = 0; (int) i < n_infiles; i++)
if (explicit_link_files[i]
&& !(infiles[i].language && infiles[i].language[0] == '*'))

View File

@ -73,9 +73,28 @@ struct spec_function
extern int do_spec (const char *);
extern void record_temp_file (const char *, int, int);
extern void set_input (const char *);
extern void save_switch (const char *opt, size_t n_args,
const char *const *args,
bool validated, bool known);
extern void handle_OPT_B (const char *arg);
extern void fe_add_infile (const char *infile, const char *lang);
extern void fe_add_linker_option (const char *option);
extern void fe_add_spec_function (const char *name, const char *(*func) (int, const char **));
extern void xputenv (const char *value);
extern const char *xgetenv (const char *key);
extern void print_options (const char *desc,
unsigned int in_decoded_options_count,
struct cl_decoded_option *in_decoded_options);
extern void print_option (const char *desc, unsigned int i,
struct cl_decoded_option *in_decoded_options);
extern void dbg_options (unsigned int in_decoded_options_count,
struct cl_decoded_option *in_decoded_options);
/* Spec files linked with gcc.c must provide definitions for these. */
extern void lang_register_spec_functions (void);
/* Called before processing to change/add/remove arguments. */
extern void lang_specific_driver (struct cl_decoded_option **,
unsigned int *, int *);
@ -97,4 +116,8 @@ driver_get_configure_time_options (void (*cb)(const char *option,
void *user_data),
void *user_data);
/* Default setting is true, but can be overridden by the language
front end to prohibit the linker from being invoked. */
extern int allow_linker;
#endif /* ! GCC_GCC_H */

View File

@ -464,3 +464,9 @@ int lang_specific_pre_link (void) /* Not used for Go. */
/* Number of extra output files that lang_specific_pre_link may generate. */
int lang_specific_extra_outfiles = 0; /* Not used for Go. */
/* lang_register_spec_functions. Not used for Go. */
void
lang_register_spec_functions (void)
{
}

View File

@ -257,11 +257,14 @@ exact_log2 (unsigned HOST_WIDE_INT x)
(HOST_WIDE_INT_1U << (HOST_BITS_PER_WIDE_INT - 1))
#define HOST_WIDE_INT_MAX (~(HOST_WIDE_INT_MIN))
#ifndef __cplusplus
extern HOST_WIDE_INT abs_hwi (HOST_WIDE_INT);
extern unsigned HOST_WIDE_INT absu_hwi (HOST_WIDE_INT);
extern HOST_WIDE_INT gcd (HOST_WIDE_INT, HOST_WIDE_INT);
extern HOST_WIDE_INT pos_mul_hwi (HOST_WIDE_INT, HOST_WIDE_INT);
extern HOST_WIDE_INT mul_hwi (HOST_WIDE_INT, HOST_WIDE_INT);
#endif /* !cplusplus. */
extern HOST_WIDE_INT gcd (HOST_WIDE_INT, HOST_WIDE_INT);
extern HOST_WIDE_INT least_common_multiple (HOST_WIDE_INT, HOST_WIDE_INT);
/* Like ctz_hwi, except 0 when x == 0. */
@ -316,6 +319,7 @@ zext_hwi (unsigned HOST_WIDE_INT src, unsigned int prec)
}
}
#ifdef __cplusplus
/* Compute the absolute value of X. */
inline HOST_WIDE_INT
@ -374,5 +378,6 @@ mul_hwi (HOST_WIDE_INT a, HOST_WIDE_INT b, bool *overflow)
return result;
#endif
}
#endif /* ! __cplusplus */
#endif /* ! GCC_HWINT_H */

View File

@ -39,3 +39,9 @@ lang_specific_pre_link (void)
/* Number of extra output files that lang_specific_pre_link may generate. */
int lang_specific_extra_outfiles = 0; /* Not used for jit. */
/* lang_register_spec_functions. Not used for jit. */
void
lang_register_spec_functions (void)
{
}

397
gcc/m2/COPYING.FDL Normal file
View File

@ -0,0 +1,397 @@
GNU Free Documentation License
Version 1.2, November 2002
Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
0. PREAMBLE
The purpose of this License is to make a manual, textbook, or other
functional and useful document "free" in the sense of freedom: to
assure everyone the effective freedom to copy and redistribute it,
with or without modifying it, either commercially or noncommercially.
Secondarily, this License preserves for the author and publisher a way
to get credit for their work, while not being considered responsible
for modifications made by others.
This License is a kind of "copyleft", which means that derivative
works of the document must themselves be free in the same sense. It
complements the GNU General Public License, which is a copyleft
license designed for free software.
We have designed this License in order to use it for manuals for free
software, because free software needs free documentation: a free
program should come with manuals providing the same freedoms that the
software does. But this License is not limited to software manuals;
it can be used for any textual work, regardless of subject matter or
whether it is published as a printed book. We recommend this License
principally for works whose purpose is instruction or reference.
1. APPLICABILITY AND DEFINITIONS
This License applies to any manual or other work, in any medium, that
contains a notice placed by the copyright holder saying it can be
distributed under the terms of this License. Such a notice grants a
world-wide, royalty-free license, unlimited in duration, to use that
work under the conditions stated herein. The "Document", below,
refers to any such manual or work. Any member of the public is a
licensee, and is addressed as "you". You accept the license if you
copy, modify or distribute the work in a way requiring permission
under copyright law.
A "Modified Version" of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.
A "Secondary Section" is a named appendix or a front-matter section of
the Document that deals exclusively with the relationship of the
publishers or authors of the Document to the Document's overall subject
(or to related matters) and contains nothing that could fall directly
within that overall subject. (Thus, if the Document is in part a
textbook of mathematics, a Secondary Section may not explain any
mathematics.) The relationship could be a matter of historical
connection with the subject or with related matters, or of legal,
commercial, philosophical, ethical or political position regarding
them.
The "Invariant Sections" are certain Secondary Sections whose titles
are designated, as being those of Invariant Sections, in the notice
that says that the Document is released under this License. If a
section does not fit the above definition of Secondary then it is not
allowed to be designated as Invariant. The Document may contain zero
Invariant Sections. If the Document does not identify any Invariant
Sections then there are none.
The "Cover Texts" are certain short passages of text that are listed,
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
the Document is released under this License. A Front-Cover Text may
be at most 5 words, and a Back-Cover Text may be at most 25 words.
A "Transparent" copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the
general public, that is suitable for revising the document
straightforwardly with generic text editors or (for images composed of
pixels) generic paint programs or (for drawings) some widely available
drawing editor, and that is suitable for input to text formatters or
for automatic translation to a variety of formats suitable for input
to text formatters. A copy made in an otherwise Transparent file
format whose markup, or absence of markup, has been arranged to thwart
or discourage subsequent modification by readers is not Transparent.
An image format is not Transparent if used for any substantial amount
of text. A copy that is not "Transparent" is called "Opaque".
Examples of suitable formats for Transparent copies include plain
ASCII without markup, Texinfo input format, LaTeX input format, SGML
or XML using a publicly available DTD, and standard-conforming simple
HTML, PostScript or PDF designed for human modification. Examples of
transparent image formats include PNG, XCF and JPG. Opaque formats
include proprietary formats that can be read and edited only by
proprietary word processors, SGML or XML for which the DTD and/or
processing tools are not generally available, and the
machine-generated HTML, PostScript or PDF produced by some word
processors for output purposes only.
The "Title Page" means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the material
this License requires to appear in the title page. For works in
formats which do not have any title page as such, "Title Page" means
the text near the most prominent appearance of the work's title,
preceding the beginning of the body of the text.
A section "Entitled XYZ" means a named subunit of the Document whose
title either is precisely XYZ or contains XYZ in parentheses following
text that translates XYZ in another language. (Here XYZ stands for a
specific section name mentioned below, such as "Acknowledgements",
"Dedications", "Endorsements", or "History".) To "Preserve the Title"
of such a section when you modify the Document means that it remains a
section "Entitled XYZ" according to this definition.
The Document may include Warranty Disclaimers next to the notice which
states that this License applies to the Document. These Warranty
Disclaimers are considered to be included by reference in this
License, but only as regards disclaiming warranties: any other
implication that these Warranty Disclaimers may have is void and has
no effect on the meaning of this License.
2. VERBATIM COPYING
You may copy and distribute the Document in any medium, either
commercially or noncommercially, provided that this License, the
copyright notices, and the license notice saying this License applies
to the Document are reproduced in all copies, and that you add no other
conditions whatsoever to those of this License. You may not use
technical measures to obstruct or control the reading or further
copying of the copies you make or distribute. However, you may accept
compensation in exchange for copies. If you distribute a large enough
number of copies you must also follow the conditions in section 3.
You may also lend copies, under the same conditions stated above, and
you may publicly display copies.
3. COPYING IN QUANTITY
If you publish printed copies (or copies in media that commonly have
printed covers) of the Document, numbering more than 100, and the
Document's license notice requires Cover Texts, you must enclose the
copies in covers that carry, clearly and legibly, all these Cover
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
the back cover. Both covers must also clearly and legibly identify
you as the publisher of these copies. The front cover must present
the full title with all words of the title equally prominent and
visible. You may add other material on the covers in addition.
Copying with changes limited to the covers, as long as they preserve
the title of the Document and satisfy these conditions, can be treated
as verbatim copying in other respects.
If the required texts for either cover are too voluminous to fit
legibly, you should put the first ones listed (as many as fit
reasonably) on the actual cover, and continue the rest onto adjacent
pages.
If you publish or distribute Opaque copies of the Document numbering
more than 100, you must either include a machine-readable Transparent
copy along with each Opaque copy, or state in or with each Opaque copy
a computer-network location from which the general network-using
public has access to download using public-standard network protocols
a complete Transparent copy of the Document, free of added material.
If you use the latter option, you must take reasonably prudent steps,
when you begin distribution of Opaque copies in quantity, to ensure
that this Transparent copy will remain thus accessible at the stated
location until at least one year after the last time you distribute an
Opaque copy (directly or through your agents or retailers) of that
edition to the public.
It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to give
them a chance to provide you with an updated version of the Document.
4. MODIFICATIONS
You may copy and distribute a Modified Version of the Document under
the conditions of sections 2 and 3 above, provided that you release
the Modified Version under precisely this License, with the Modified
Version filling the role of the Document, thus licensing distribution
and modification of the Modified Version to whoever possesses a copy
of it. In addition, you must do these things in the Modified Version:
A. Use in the Title Page (and on the covers, if any) a title distinct
from that of the Document, and from those of previous versions
(which should, if there were any, be listed in the History section
of the Document). You may use the same title as a previous version
if the original publisher of that version gives permission.
B. List on the Title Page, as authors, one or more persons or entities
responsible for authorship of the modifications in the Modified
Version, together with at least five of the principal authors of the
Document (all of its principal authors, if it has fewer than five),
unless they release you from this requirement.
C. State on the Title page the name of the publisher of the
Modified Version, as the publisher.
D. Preserve all the copyright notices of the Document.
E. Add an appropriate copyright notice for your modifications
adjacent to the other copyright notices.
F. Include, immediately after the copyright notices, a license notice
giving the public permission to use the Modified Version under the
terms of this License, in the form shown in the Addendum below.
G. Preserve in that license notice the full lists of Invariant Sections
and required Cover Texts given in the Document's license notice.
H. Include an unaltered copy of this License.
I. Preserve the section Entitled "History", Preserve its Title, and add
to it an item stating at least the title, year, new authors, and
publisher of the Modified Version as given on the Title Page. If
there is no section Entitled "History" in the Document, create one
stating the title, year, authors, and publisher of the Document as
given on its Title Page, then add an item describing the Modified
Version as stated in the previous sentence.
J. Preserve the network location, if any, given in the Document for
public access to a Transparent copy of the Document, and likewise
the network locations given in the Document for previous versions
it was based on. These may be placed in the "History" section.
You may omit a network location for a work that was published at
least four years before the Document itself, or if the original
publisher of the version it refers to gives permission.
K. For any section Entitled "Acknowledgements" or "Dedications",
Preserve the Title of the section, and preserve in the section all
the substance and tone of each of the contributor acknowledgements
and/or dedications given therein.
L. Preserve all the Invariant Sections of the Document,
unaltered in their text and in their titles. Section numbers
or the equivalent are not considered part of the section titles.
M. Delete any section Entitled "Endorsements". Such a section
may not be included in the Modified Version.
N. Do not retitle any existing section to be Entitled "Endorsements"
or to conflict in title with any Invariant Section.
O. Preserve any Warranty Disclaimers.
If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no material
copied from the Document, you may at your option designate some or all
of these sections as invariant. To do this, add their titles to the
list of Invariant Sections in the Modified Version's license notice.
These titles must be distinct from any other section titles.
You may add a section Entitled "Endorsements", provided it contains
nothing but endorsements of your Modified Version by various
parties--for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a
standard.
You may add a passage of up to five words as a Front-Cover Text, and a
passage of up to 25 words as a Back-Cover Text, to the end of the list
of Cover Texts in the Modified Version. Only one passage of
Front-Cover Text and one of Back-Cover Text may be added by (or
through arrangements made by) any one entity. If the Document already
includes a cover text for the same cover, previously added by you or
by arrangement made by the same entity you are acting on behalf of,
you may not add another; but you may replace the old one, on explicit
permission from the previous publisher that added the old one.
The author(s) and publisher(s) of the Document do not by this License
give permission to use their names for publicity for or to assert or
imply endorsement of any Modified Version.
5. COMBINING DOCUMENTS
You may combine the Document with other documents released under this
License, under the terms defined in section 4 above for modified
versions, provided that you include in the combination all of the
Invariant Sections of all of the original documents, unmodified, and
list them all as Invariant Sections of your combined work in its
license notice, and that you preserve all their Warranty Disclaimers.
The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
copy. If there are multiple Invariant Sections with the same name but
different contents, make the title of each such section unique by
adding at the end of it, in parentheses, the name of the original
author or publisher of that section if known, or else a unique number.
Make the same adjustment to the section titles in the list of
Invariant Sections in the license notice of the combined work.
In the combination, you must combine any sections Entitled "History"
in the various original documents, forming one section Entitled
"History"; likewise combine any sections Entitled "Acknowledgements",
and any sections Entitled "Dedications". You must delete all sections
Entitled "Endorsements".
6. COLLECTIONS OF DOCUMENTS
You may make a collection consisting of the Document and other documents
released under this License, and replace the individual copies of this
License in the various documents with a single copy that is included in
the collection, provided that you follow the rules of this License for
verbatim copying of each of the documents in all other respects.
You may extract a single document from such a collection, and distribute
it individually under this License, provided you insert a copy of this
License into the extracted document, and follow this License in all
other respects regarding verbatim copying of that document.
7. AGGREGATION WITH INDEPENDENT WORKS
A compilation of the Document or its derivatives with other separate
and independent documents or works, in or on a volume of a storage or
distribution medium, is called an "aggregate" if the copyright
resulting from the compilation is not used to limit the legal rights
of the compilation's users beyond what the individual works permit.
When the Document is included in an aggregate, this License does not
apply to the other works in the aggregate which are not themselves
derivative works of the Document.
If the Cover Text requirement of section 3 is applicable to these
copies of the Document, then if the Document is less than one half of
the entire aggregate, the Document's Cover Texts may be placed on
covers that bracket the Document within the aggregate, or the
electronic equivalent of covers if the Document is in electronic form.
Otherwise they must appear on printed covers that bracket the whole
aggregate.
8. TRANSLATION
Translation is considered a kind of modification, so you may
distribute translations of the Document under the terms of section 4.
Replacing Invariant Sections with translations requires special
permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections. You may include a
translation of this License, and all the license notices in the
Document, and any Warranty Disclaimers, provided that you also include
the original English version of this License and the original versions
of those notices and disclaimers. In case of a disagreement between
the translation and the original version of this License or a notice
or disclaimer, the original version will prevail.
If a section in the Document is Entitled "Acknowledgements",
"Dedications", or "History", the requirement (section 4) to Preserve
its Title (section 1) will typically require changing the actual
title.
9. TERMINATION
You may not copy, modify, sublicense, or distribute the Document except
as expressly provided for under this License. Any other attempt to
copy, modify, sublicense or distribute the Document is void, and will
automatically terminate your rights under this License. However,
parties who have received copies, or rights, from you under this
License will not have their licenses terminated so long as such
parties remain in full compliance.
10. FUTURE REVISIONS OF THIS LICENSE
The Free Software Foundation may publish new, revised versions
of the GNU Free Documentation License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns. See
http://www.gnu.org/copyleft/.
Each version of the License is given a distinguishing version number.
If the Document specifies that a particular numbered version of this
License "or any later version" applies to it, you have the option of
following the terms and conditions either of that specified version or
of any later version that has been published (not as a draft) by the
Free Software Foundation. If the Document does not specify a version
number of this License, you may choose any version ever published (not
as a draft) by the Free Software Foundation.
ADDENDUM: How to use this License for your documents
To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and
license notices just after the title page:
Copyright (c) YEAR YOUR NAME.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU
Free Documentation License".
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
replace the "with...Texts." line with this:
with the Invariant Sections being LIST THEIR TITLES, with the
Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
If you have Invariant Sections without Cover Texts, or some other
combination of the three, merge those two alternatives to suit the
situation.
If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License,
to permit their use in free software.

73
gcc/m2/COPYING.RUNTIME Normal file
View File

@ -0,0 +1,73 @@
GCC RUNTIME LIBRARY EXCEPTION
Version 3.1, 31 March 2009
Copyright (C) 2009 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
This GCC Runtime Library Exception ("Exception") is an additional
permission under section 7 of the GNU General Public License, version
3 ("GPLv3"). It applies to a given file (the "Runtime Library") that
bears a notice placed by the copyright holder of the file stating that
the file is governed by GPLv3 along with this Exception.
When you use GCC to compile a program, GCC may combine portions of
certain GCC header files and runtime libraries with the compiled
program. The purpose of this Exception is to allow compilation of
non-GPL (including proprietary) programs to use, in this way, the
header files and runtime libraries covered by this Exception.
0. Definitions.
A file is an "Independent Module" if it either requires the Runtime
Library for execution after a Compilation Process, or makes use of an
interface provided by the Runtime Library, but is not otherwise based
on the Runtime Library.
"GCC" means a version of the GNU Compiler Collection, with or without
modifications, governed by version 3 (or a specified later version) of
the GNU General Public License (GPL) with the option of using any
subsequent versions published by the FSF.
"GPL-compatible Software" is software whose conditions of propagation,
modification and use would permit combination with GCC in accord with
the license of GCC.
"Target Code" refers to output from any compiler for a real or virtual
target processor architecture, in executable form or suitable for
input to an assembler, loader, linker and/or execution
phase. Notwithstanding that, Target Code does not include data in any
format that is used as a compiler intermediate representation, or used
for producing a compiler intermediate representation.
The "Compilation Process" transforms code entirely represented in
non-intermediate languages designed for human-written code, and/or in
Java Virtual Machine byte code, into Target Code. Thus, for example,
use of source code generators and preprocessors need not be considered
part of the Compilation Process, since the Compilation Process can be
understood as starting with the output of the generators or
preprocessors.
A Compilation Process is "Eligible" if it is done using GCC, alone or
with other GPL-compatible software, or if it is done without using any
work based on GCC. For example, using non-GPL-compatible Software to
optimize any GCC intermediate representations would not qualify as an
Eligible Compilation Process.
1. Grant of Additional Permission.
You have permission to propagate a work of Target Code formed by
combining the Runtime Library with Independent Modules, even if such
propagation would otherwise violate the terms of GPLv3, provided that
all Target Code was generated by Eligible Compilation Processes. You
may then convey such a combination under terms of your choice,
consistent with the licensing of the Independent Modules.
2. No Weakening of GCC Copyleft.
The availability of this Exception does not imply any general
presumption that third-party software is unaffected by the copyleft
requirements of the license of GCC.

675
gcc/m2/COPYING3 Normal file
View File

@ -0,0 +1,675 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

165
gcc/m2/COPYING3.LIB Normal file
View File

@ -0,0 +1,165 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

1082
gcc/m2/ChangeLog Normal file

File diff suppressed because it is too large Load Diff

68
gcc/m2/ChangeLog-2001 Normal file
View File

@ -0,0 +1,68 @@
2001-08-01 Gaius Mulley <gaius@glam.ac.uk>
* brought gm2 up to date with gcc-3.0
* fixed opaque handling in the new parser
* now using new parser by default
* rewritten NameKey.mod, removing any static limits on array
sizes by using dynamic data structures throughout.
* improved p2c so that it handles opaque types properly.
* modified Lists.def, SymbolKey.def to use opaque types.
2001-03-09 Gaius Mulley <gaius@glam.ac.uk>
* fixed bug in FpuIO.mod which failed to issue a '-' when emitting
real numbers.
* added many new tests to the regression directory (autotest).
* fixed bugs in the bnf descriptions. Compiler is now using
automatically generated parser for P1, P2 and P3. Just PH
remains hand built.
* Introduced a number of small regression tests following
Olivier's extensive bug report on (m2f). Fixed a number
of bugs reported, see gm2/m2/comp/BUGS for details.
* Fixed bug in M2Lexical.mod causing mismatch between
source line numbers and gdb information.
* Fixed + - / of constant sets.
* removed tests for the interim (they exist under
bitset3.mod.breaks and string.mod.breaks respectively)
* modifications to stop overflow on max CARDINAL when converting
numbers into strings (NumberIO.mod)
2001-02-28 Gaius Mulley <gaius@glam.ac.uk>
* using new parser P1SyntaxCheck.mod and P2Build.mod
P1SyntaxCheck.mod now inserts simple missing tokens.
* both automatically generated and provide better error
recovery
* improved some error messages
2001-01-23 Gaius Mulley <gaius@glam.ac.uk>
* brought gm2 up to date with gcc-20001204
* introduced configure and moved all makefiles to Makefile.in
* tidied up p2c a little, in an attempt to reduce the compile
time warnings
2000-12-02 Gaius Mulley <gaius@glam.ac.uk>
* brought gm2 up to date with gcc-20001120
* garbage collection now working in gm2
* introduced EXPORT UNQUALIFIED as a method for writing
definition modules as interfaces for C libraries
* altered link tools to reflect EXPORT UNQUALIFIED
* started work on preprocessing source when -Wcpp is supplied
* tidied up gccgm2.c
2000-09-25 Gaius Mulley <gaius@glam.ac.uk>
* added error messages to lang-spec.h. Issued if wrong combination
of -Wuselist -Wmodules -Wmakelist and -c are supplied.
2000-09-14 Matthias Kurz <mk@baerlap.north.de>
* Many makefile portability corrections (tests for symbol links).
Made makeversion more portable via guessing email address.
Added setenv emulation in libc.c.
Inserted missing Close(fo) to gm2lgen.mod.GenMain().
Improved README,
Added QUIAT to the makefiles.
Cast EOF to (char) inside mkfor.c mklink.c.

59
gcc/m2/ChangeLog-2002 Normal file
View File

@ -0,0 +1,59 @@
2002-12-20 Gaius Mulley <gaius@glam.ac.uk>
* added __ATTRIBUTE__ __BUILTIN__ ((Ident))
rules for obtaining target compiler constants
* fixed handling of recursive procedure type definitions
bug reported by Iztok Kobal
* improved base types to aid gdb in displaying data types
* checked in some sketchy initial ISO library implementation
modules
2002-11-03 Gaius Mulley <gaius@glam.ac.uk>
* GM2 Release 0.33
* implemented large sets
* implemented ISO complient sets
* definition modules no longer have to explicitly export
identifiers
2002-06-20 Gaius Mulley <gaius@glam.ac.uk>
* GM2 Release 0.32
* now supports building a cross compiler (strong-arm) tested
2002-06-09 Gaius Mulley <gaius@glam.ac.uk>
* brought gm2 up to date with gcc-3.2
* fixed the $(srcdir) in all Makefile.in's
* configuring and building gm2 is now recommended
to occur outside the source tree.
* many changes to gccgm2.c to reflect gcc-3.2
2002-05-04 Gaius Mulley <gaius@glam.ac.uk>
* implemented DEFINITION MODULE FOR "C"
* implemented -Wmakeall
* implemented varargs in "C" modules
* added gm2/examples directory
* updated documentation
* gm2m and gm2l are now built from ebnf descriptions
by ppg
2002-04-15 Gaius Mulley <gaius@glam.ac.uk>
* GM2 Release 0.21
* brought gm2 up to date with gcc-3.0.4
* make paranoid works on Debian GNU/Linux (Athlon)
* finally finished rewrite of a number of key modules
* Strings.mod used instead of StrLib.mod allowing for
dynamic arrays
* new flex built lexical analyser in use.
* cpp is run on all definition/implementation modules if
-Wcpp is used.
* gm2m rewritten
* gm2 and its utilities now use -I for path specification
rather than -M
* Makefiles much simplified, removed most recursive makes.
* all parsers are now mechanically generated using ppg.
* ppg built if required.

284
gcc/m2/ChangeLog-2003 Normal file
View File

@ -0,0 +1,284 @@
2003-12-26 Gaius Mulley <gaius@glam.ac.uk>
* increased the number of regression tests to 1332
* gm2 passes 1317 and fails 15
* many bug fixes..
* improved documentation, gm2.texi. Now contains
a ebnf description of GNU Modula-2 extracted from
bnf/m2.bnf.
* completed the optional final parameter argument.
* reimplemented the CAP standard function so that it
can be used within constant expressions.
2003-11-27 Gaius Mulley <gaius@glam.ac.uk>
* fixed a bug in the handling of the -Wcpp option so that it uses
-traditional-cpp
* integrated the gm2 and m2f regression tests into the GNU GCC
dejagnu format - all the m2f tests are now used to test gm2.
* started work on a minor extension to GNU Modula-2 which allows
the last parameter to be optional. In turn this allows a
Modula-2 implementation of the ISO module COROUTINES which is
in development.
2003-11-13 Gaius Mulley <gaius@glam.ac.uk>
* modified the generated .h files to be prefixed with `G' to avoid
name clashes which in turn allows gm2 to be built under a vfat
file system.
2003-11-07 Gaius Mulley <gaius@glam.ac.uk>
* changed the flag name -Wverbose to -Wsources
2003-11-07 Gaius Mulley <gaius@glam.ac.uk>
* improved array index type debugging description in gccgm2.c
which allows gdb to understand that arrays are declared ARRAY
[low..high] rather than ARRAY [0..high-low]
2003-11-04 Gaius Mulley <gaius@glam.ac.uk>
* fixed bug in procedure type declaration.
2003-11-03 Gaius Mulley <gaius@glam.ac.uk>
* modified ProcedureBlock rule in bnf/m2.bnf, bnf/m2-[23h].bnf
to comply with ISO syntax. The 'BEGIN' statement sequence is
optional.
* updated the gm2.texi to include a description about
the -Wextended-opaque option.
2003-10-23 Gaius Mulley <gaius@glam.ac.uk>
* fixes to opaque type (in)compatibility for expression and assignments.
2003-10-09 Gaius Mulley <gaius@glam.ac.uk>
* fixed gm2 build with ./configure --enable-checking
2003-10-07 Gaius Mulley <gaius@glam.ac.uk>
* introduced -Wextended-opaque which enables the GM2 extension
to opaque types. This allows opaque types to be non pointer
types, but requires that GM2 parse the corresponding
implementation module.
* modified GM2 to default to the standard opaque implementation
of using SYSTEM.ADDRESS as the `opaque type' outside the
module of its declaration.
* introduced -Wverbose to allow users see the source file names
for modules as they are being compiled.
2003-09-30 Gaius Mulley <gaius@glam.ac.uk>
* fixed bug in ADDADR as reported by Iztok
* fixed bug in exported type name clashes as reported by Iztok
* fixed bug with multiple type references to a SET
* fixed Min`basetype' to contain the type `basetype'
* tidied up IsReallyPointer in M2Quads.mod
2003-09-25 Gaius Mulley <gaius@glam.ac.uk>
* fixed -Wmakeall option.
* fixed CARDINAL type to have range 0..max(unsigned int)
rather than 0..max(integer) as reported by Iztok.
* fixed set type incomparability as reported by Iztok.
* fixed README note about make gm2.paranoid as reported by
Matthias Kurz.
* fixed many of the example programs which were broken during
the migration to gcc-3.3.1.
* fixed lang-specs.h to invoke new cpp.
* removed the M2PATH environment variable usage.
* added more modules to make gm2.paranoid.
* fixed gm2->gcc declaration of arrays.
* fixed infinite loop in M2GenGCC.mod and M2Optimize.mod
* added more regression tests.
* fixed Make-file.in as suggested by Matthias Kurz.
* fixed tools-src/makeversion and tools-src/buildpg to be
more portable as suggested by Matthias Kurz.
* fixed examples/pthread
2003-09-19 Gaius Mulley <gaius@glam.ac.uk>
* GM2 release 0.40
* brought GM2 up to date with gcc-3.3.1
* introduced new files gm2-common.h, gm2-common.c,
gm2-lang.h, gm2-tree.h to reflect the new garbage collection
mechanism.
* major changes to gccgm2.c to reflect migration from gcc-3.2 to
gcc-3.3.1
* introduced gm2-compiler/M2Scope.def, gm2-compiler/M2Scope.mod
to manage the quadruples which represent a particular scope
* major recoding of M2Code and the order that quadruples are coded
into GCC trees. This in turn fixes a very serious nested
procedure bug. (gm2/m2/comp/autotest/gm2/localproc.mod and
convert.mod).
* changes to M2GCCDeclare.mod, M2GenGCC.mod, M2BasicBlock.mod
to allow quadruples to be translated via outer scope to inner
scope ordering.
* M2Code.mod is much cleaner.
* fixed a number of uninitialised variable errors and bad pointer
errors. All caught by the extremely useful x86 utility valgrind.
In turn this fixes a Redhat 9.0 build problem.
* fixed bugs in DynamicStrings.mod, ppg.mod, SEnvironment.mod
* introduced the debian package files (gm2/debian) so that .deb
package (gm2) can be built.
* fixes to gm2 so that it can compile the University of Ulm's
system modules.
2003-06-01 Gaius Mulley <gaius@glam.ac.uk>
* added the LONGCARD data type.
* fixed subrange declarations so that they can be prefixed
by a qualident.
* fixed variant record for ISO syntax
(gm2/m2/comp/autotest/gm2/caseiso.mod).
* fixed importing of an enumerated element
(gm2/m2/comp/autotest/gm2/impm.mod).
2003-05-27 Gaius Mulley <gaius@glam.ac.uk>
* fixed bug reported by Iztok Kobal
(gm2/m2/comp/autotest/gm2/realbitscast.mod).
Fixed cast to copy data.
* enabled SIZE to be invoked from constant expressions.
2003-05-20 Gaius Mulley <gaius@glam.ac.uk>
* fixed bug reported by Iztok Kobal
(gm2/m2/comp/autotest/gm2/testlength3.mod)
LENGTH is now mapped onto M2RTS.Length if the parameter is
not a constant at compile time.
2003-05-16 Gaius Mulley <gaius@glam.ac.uk>
* fixed bug reported by Iztok Kobal
(gm2/m2/comp/autotest/gm2/longstrimp.mod)
and also (gm2/m2/comp/autotest/gm2/imp[deghij].mod)
2003-05-08 Gaius Mulley <gaius@glam.ac.uk>
* implemented the standard function LENGTH
* allowed standard functions to be called from constant expressions
* improved cyclic data type dependancy error messages
* SIZE is now only exported from SYSTEM if the switch -Wiso is absent
SIZE is declared as a standard procedure if -Wiso is present
2003-05-07 Gaius Mulley <gaius@glam.ac.uk>
* implemented ISO BITSET as a standard type which takes
effect when -Wiso is present on the command line.
* backed out garbage collection change to m2.lex
* fixed bugs reported by Iztok Kobal
(gm2/m2/comp/autotest/gm2/[testexit.mod, bitset3.mod bits32.mod])
2003-05-06 Gaius Mulley <gaius@glam.ac.uk>
* modified Storage and SysStorage modules so that the procedure
DEALLOCATE assigns the pointer to NIL
* fixed bug reported by Iztok Kobal
(gm2/m2/comp/autotest/gm2/bitset2.mod)
2003-05-05 Gaius Mulley <gaius@glam.ac.uk>
* fixed two bugs reported by Iztok Kobal.
* fixed bug in M2GCCDeclare.mod (BITSET's subrange was undeclared).
* added BITNUM, the subrange from which BITSET is constructed,
in SYSTEM.
* added regression test case for this bug.
* also modified c.lex to use xstrdup and not strdup.
2003-05-01 Gaius Mulley <gaius@glam.ac.uk>
* added pseudo functions, CAP, ODD, ABS
* removed gm2-libs/Math.def which defined ABS
2003-04-29 Gaius Mulley <gaius@glam.ac.uk>
* examples/pthreads cleaned up
* introduced ISO SYSTEM. Limitations, TSIZE only takes one parameter,
and SHIFT, ROTATE are not implemented yet
* renamed gm2-libs/Strings to gm2-libs/DynamicStrings to avoid name
clash with gm2-iso/Strings
* p2c modified to understand DEFINITION MODULE FOR "C"
* gm2-libs/libc.def modified to use DEFINITION MODULE FOR "C"
* gm2-iso/libc.def removed
* linking references to libc (in gm2/init/*init) removed
* gm2/tools-src/def2texi finished
* gm2/gm2-libs.texi built via gm2/tools-src/def2texi
* gm2/gm2.texi now contains library definition modules and index
* added -Wiso switch to gm2 driver
2003-04-12 Gaius Mulley <gaius@glam.ac.uk>
* first cut of h2def released
* examples/pthreads introduced
* examples/vga.def generated by h2def
* fixed bug in CodeBecomes
* fixed constant set bug in M2GenGCC.mod
* updated gm2.texi to reflect introduction of h2def
* build mechanism tidied up. p2c is now built from the top level
makefile.
* some portability features of p2c fixed, so that it builds
cleanly under Apple Darwin
* many internal changes made to ppg to handle recursive ebnf
rules.
* fixed automatic export of unqualified identifiers from a
DEFINITION MODULE FOR "C"
2003-02-02 Gaius Mulley <gaius@glam.ac.uk>
* fixed bug reported by Iztok Kobal, the gm2-iso/ChanConsts module
failed to compile. Added a regression test to catch this.
2003-02-01 Gaius Mulley <gaius@glam.ac.uk>
* bug fixes in error handling. In particular duplicate symbols
are better handled.
* development checkin of the h2def tool and subsidiary modules.
2003-01-20 Gaius Mulley <gaius@glam.ac.uk>
* bug fixes for gm2m and link-specs.h which allow libraries
to be added with the -Wmakeall option.
* fixed a number of built-in definitions in Builtin.def
* also added MathLib0.def and MathLib0.mod to the pim libraries.
* fixed svga example test
* added long double math built-ins
2003-01-17 Gaius Mulley <gaius@glam.ac.uk>
* bug fixes to the line numbering debugging info
which is passed to gcc. Resulting in better gdb support.
2003-01-14 Gaius Mulley <gaius@glam.ac.uk>
* added the C `double' math built-ins
* fixed path in Make-lang.in which caused `file not found
error' during build
* updated documentation to show correspondance between C and
M2 data types.
* fixed bug in M2SubExp.mod shown by indirect procedure calls
* fixed bug in M2Constants.mod
* introduced SHORTREAL data type and removed the pseudo module
MATH as built-ins are handled via gcc backend.
* removed corresponding gm2-compiler/M2Math module.
2003-01-11 Gaius Mulley <gaius@glam.ac.uk>
* changed ebnf to allow empty variant clauses in a case
statement. Now complies with ISO case statement syntax.
(Bug reported by Iztok Kobal)
2003-01-09 Gaius Mulley <gaius@glam.ac.uk>
* initial checkin of complete built-in function support
to obvious C functions.
* gm2-libs/libc.c, gm2-libs/libc.def:: modified reference
to cfree to free as suggested by John Calley
2003-01-02 Gaius Mulley <gaius@glam.ac.uk>
* fixed bug reported by Matthias Manhart
(procedure type).

396
gcc/m2/ChangeLog-2004 Normal file
View File

@ -0,0 +1,396 @@
2004-12-22 Gaius Mulley <gaius@glam.ac.uk>
* more fixes to enable to the Z type to work.
* introduced GetM2ZRealType which maps onto the largest
real type tree.
* 24 regression test failures out of 2148 on the Opteron LP64
9 fail within ulm libraries (Procedure/Module scope nesting).
15 fail with ISO import/export of enumeration types.
* exactly the same regression test failures on 32 bit i386
implementation.
* fixed regression test path, all tests are build and run
using gm2-harness-0.3
2004-11-29 Gaius Mulley <gaius@glam.ac.uk>
* internal changes to ordinal type which now use the Z
type (long_long_int) for internal calculations before
being converted into the actual ordinal type at assignment
to a variable or procedure parameter or return value.
* works on a 32 bit i386 but fails on the Opteron LP64 model.
2004-11-22 Gaius Mulley <gaius@glam.ac.uk>
* compiler now checks for overflow at compile time
when constructing constant expressions.
2004-11-17 Gaius Mulley <gaius@glam.ac.uk>
* fixed ppg to generate a comment for in-built rules when
producing the EBNF documentation within gm2.texi
* updated gm2/gm2.texi to reflect availability of the
gm2-harness which will build and test gm2 automatically.
2004-11-12 Gaius Mulley <gaius@glam.ac.uk>
* fixed bug reported by John B. Wallace, Jr <wallacjb@enter.net>
concerning negating a LONGINT constant
(see testsuite/gm2/pim/run/TestLong[34].mod).
* updated gm2/TODO list
* gm2/gccgm2.c added functions to determine the size necessary
for a Modula-2 constant.
* gm2/gm2.texi modified documentation to reflect the ISO rules
concerning importing enumerated types.
* gm2/gm2-compiler/SymbolTable.mod fixed possible buffer overflow
and integrated MakeConstLit with the changes to gccgm2.c.
* minor modifications made to gm2/gm2-libs-pim/README.texi
* moved a number of regression tests into pass/fail directories
to reflect the expected ISO enumeration behaviour. Note
that many of these now fail.
2004-11-05 Gaius Mulley <gaius@glam.ac.uk>
* fixed bug reported by John B. Wallace, Jr <wallacjb@enter.net>
concerning assignment of a constant to a LONGINT
(see testsuite/gm2/pim/run/TestLong.mod).
Creation of LONGINT and LONGCARD constant literals
was broken for values > MAX(INTEGER).
2004-10-29 John B. Wallace, Jr <wallacjb@enter.net>
* fixed infinite loop when calling StrToLongInt.
* contributed test code testsuite/gm2/pim/run/TestLong.mod
2004-10-26 Gaius Mulley <gaius@glam.ac.uk>
* fixed -Wpedantic-param-names option.
* added runtime tests and also parameter switch tests
* added testsuite/gm2/switches/pedantic-params
* added testsuite/gm2/pim/run and a number of old m2f tests
* made compiler check to see that opaque types are really
equivalent to a pointer type if -Wextended-opaque is absent.
* added testsuite/gm2/switches/extended-opaque/{pass,fail}
to stress this check.
2004-10-19 Gaius Mulley <gaius@glam.ac.uk>
* added -Wpedantic-param-names option to check that
parameters to procedures declared in definition modules
have identical names to their implementation module
procedure counterparts.
* fixed bug report by Iztok Kobal. The compiler would
crash when a constant was assigned to a procedure.
2004-10-18 Gaius Mulley <gaius@glam.ac.uk>
* modified gm2/lang-specs.h to make the front end run
with only the -S option. No longer requires -S -c.
Bug reported by john o goyo <jgoyo@ca.inter.net>.
2004-10-12 Diego Rodr=EDguez Rodr=EDguez <dieymir@yahoo.es>
* gm2/Make-lang.in introduced gm2.install rule so that
GNU Modula-2 can be installed without overwriting an
existing installation of gcc.
* gm2/README updated to explain how to only install gm2.
2004-10-12 Gaius Mulley <gaius@glam.ac.uk>
* fixed bug reported by John B. Wallace, Jr
<wallacjb@enter.net>. See testsuite/gm2/pim/run/pass/str6.mod.
2004-10-07 Gaius Mulley <gaius@glam.ac.uk>
* fixed bug reported by Iztok Kobal,
GNU Modula-2 now allows a RETURN statement in the
initialization section of the module.
* fixed another bug reported by Iztok Kobal,
binary and unary large set operators failed when
handling constant set values.
2004-09-20 Gaius Mulley <gaius@glam.ac.uk>
* fixed varient record bug as reported by John B. Wallace, Jr
<wallacjb@enter.net>. See testsuite/gm2/pim/pass/varient.mod.
2004-09-16 Gaius Mulley <gaius@glam.ac.uk>
* fixed bug in gm2/gm2-compiler/Indexing.mod which
occurred after the p2c translation.
* in turn this fixed a gm2m problem. The bug resulted in
touching memory which would not have been malloced so
this fix may have cured a number of problems.
2004-09-14 Gaius Mulley <gaius@glam.ac.uk>
* fixed the ncurses definition module and WindowDevice module.
* fixed M2RTS:Termination to call termination procedures in
reverse.
2004-09-07 Gaius Mulley <gaius@glam.ac.uk>
* tidied up gm2-compiler/M2Base.mod and introduced
compatability matrices which include all the base
types.
2004-09-03 Gaius Mulley <gaius@glam.ac.uk>
* introduced SHORTINT and SHORTCARD data types.
* added ncurses.def example in examples/ncurses
2004-08-31 Gaius Mulley <gaius@glam.ac.uk>
* modified SIZE handling so that SIZE is only available
from SYSTEM when -Wpim2 is present.
* fixed bug as reported by "John B. Wallace, Jr."
<wallacjb@enter.net>. A variable which when implicitly
imported via an IMPORT module; failed.
The variable was not being declared correctly by the
GNU Modula-2 front end to the GCC back end.
2004-08-27 Gaius Mulley <gaius@glam.ac.uk>
* added new switch -Wpim2 to stipulate the Modula-2 PIM-2
dialect.
* Made SIZE pervasive for ISO Modula-2 and PIM-[34] Modula-2
As reported by Diego Rodríguez Rodríguez <dieymir@yahoo.es>.
SIZE can be imported from SYSTEM when -Wpim2 is present.
* removed the association with ".def" and "@modula-2"
inside gm2/lang-specs.h as this conflicts with shared library
file extension .def used by gcc. Bug reported by Gerrit P. Haase
<gp@familiehaase.de>.
2004-08-26 Gaius Mulley <gaius@glam.ac.uk>
* implemented type PROCESS for SYSTEM in the pim library
directory (gm2/gm2-libs-coroutines).
* SYSTEM implements NEWPROCESS, TRANSFER, IOTRANSFER.
This is achieved by using the GNU pthread library context
mechanism.
* provided an Executive and TimerHandler module in
(gm2/examples/executive).
* many bug fixes and regression tests show that 3 ulm standard
library modules fail.
* implemented MAX(REAL), MIN(REAL) and also provided access to
three more gcc builtin functions: huge_val, huge_vall, huge_valf
* started work on a Logitech 3.0 compatible library.
2004-07-06 Gaius Mulley <gaius@glam.ac.uk>
* improved error handling of unknown objects in EXPORT lists.
* added regression test
* implemented a few procedures in the ISO libraries.
2004-07-02 Gaius Mulley <gaius@glam.ac.uk>
* fixed many IMPORT bugs in inner modules
2004-06-30 Gerrit Haase <gp@familiehaase.de>
* cygwin patch for gm2/Make-lang.in
2004-06-29 Gaius Mulley <gaius@glam.ac.uk>
* fixed EXPORT of an object from an inner module into an
implementation module which EXPORTs the same object.
* fixed EXPORT of a procedure from an inner module into an
outer module which is not exported but is assigned to a
variable.
2004-06-28 Gaius Mulley <gaius@glam.ac.uk>
* made flex lexical analysers ignore carriage return
* fixed bug in M2Quads.mod checking parameter of
a const var before value was known.
* fixed local MODULEs so that they can FROM mod IMPORT
* tidied up some ulm implementation modules in ulm-lib-gm2/std
2004-06-22 Gaius Mulley <gaius@glam.ac.uk>
* allowed LONGCARD compatibility with INTEGER
* allowed LONGINT compatibility with CARDINAL
* allowed LONGCARD compatibility with CARDINAL
* allowed LONGINT compatibility with INTEGER
2004-06-21 Gaius Mulley <gaius@glam.ac.uk>
* fixed bug in constant set declaration
(see ulm library ulm-lib-gm2/std/Calendar.mod and
testsuite/gm2/pim/pass/setconst.mod and
testsuite/gm2/pim/pass/setconst2.mod)
* all regression tests pass on the Opteron port of gm2.
2004-06-18 Gaius Mulley <gaius@glam.ac.uk>
* implemented nested module within procedures.
This allows a few more ulm library modules to compile.
2004-06-07 Gaius Mulley <gaius@glam.ac.uk>
* renamed the -Wunbounded-by-reference option to
-funbounded-by-reference as suggested by Waldek Hebisch.
* finished ISO SYSTEM implementation.
* ROTATE, SHIFT now work with smaller than WORD sized sets,
WORD sized sets and larger than WORD sized sets.
* gm2-iso/SYSTEM.mod is called by the back end if larger than
WORD sized sets are ROTATEd or SHIFTed.
* updated gm2.texi to include new sections describing ISO and PIM
versions of the SYSTEM module.
* renamed m2.lex as m2.flex, c.lex as c.flex to fix a bug
reported by Gerrit Haase while attempting the cygwin port.
* renamed gm2-compiler/m2lex.def as gm2-compiler/m2flex.def
* modified gm2-compiler/M2Comp to use m2flex
* modified Make-lang.in to use m2.flex and c.flex
* modified init/h2definit, init/gm2linit to use m2flex
2004-05-10 Gaius Mulley <gaius@glam.ac.uk>
* gm2 now builds on FreeBSD 5.2.1
* removed to_upper and to_lower in p2c
* made gm2/gm2-libs/configure and friends test for `strsignal'
* fixed initialization bug (missing memset)
in gm2/gm2-compiler/Indexing.mod
2004-05-06 Gaius Mulley <gaius@glam.ac.uk>
* added SHIFT and ROTATE into ISO SYSTEM and
made the compiler shift and rotate word and multi-word
set types. Multi-word set rotate and shifts are implemented
by calling ISO SYSTEM runtime procedures. Word sized sets or
smaller are implemented inline using shift/rotate instructions.
2004-05-05 Gaius Mulley <gaius@glam.ac.uk>
* fixed bug report by Paul Whittington <pwhittington@nitrodata.com>
(see testsuite/gm2/link/pim/fail/import.mod).
2004-04-30 Gaius Mulley <gaius@glam.ac.uk>
* updated gm2.texi to reflect new options and changes to the
run-time system.
2004-04-28 Gaius Mulley <gaius@glam.ac.uk>
* introduced -Wunbounded-by-reference option which will make a
reference to non VAR unbounded data providing it is not written to
within the callee procedure.
* introduced -Wverbose-unbounded option which displays names of
unbounded parameters which the compiler will implement as
references even though they were specified as non VAR parameters.
2004-04-27 Gaius Mulley <gaius@glam.ac.uk>
* introduced -Wcase, -Wnil runtime checks
* introduced -Wcheck-all to enable all runtime flags
* updated documentation to refect new options
2004-04-19 Gaius Mulley <gaius@glam.ac.uk>
* added more address regression tests
* fixed address arithmetic bugs as reported by Waldek Hebisch
* fixed record referencing bug as reported by Waldek Hebisch
2004-04-08 Gaius Mulley <gaius@glam.ac.uk>
* tagged CVS using gm2_0_43
2004-04-07 Gaius Mulley <gaius@glam.ac.uk>
* GM2 Release 0.43
* The opteron port is finally integrated into CVS
* fixed bug in vararg parameter declaration which in turn..
* fixed varargs within the opteron port
* checked in "work in progress" gm2/gm2-iso/COROUTINES.mod
2004-04-06 Gaius Mulley <gaius@glam.ac.uk>
* removed gm2-compiler/M2Stack.def gm2-compiler/M2Stack.mod
* made bnf/h2def.bnf 64 bit clean, but not fixed any bugs in h2def.
2004-04-05 Gaius Mulley <gaius@glam.ac.uk>
* fixed gm2.paranoid and all regression tests for the Opteron port
* checked in the opteron port which includes many changes
* int/word based types are now separated from pointer based types.
* modified p2c to use int for INTEGER and unsigned int for
CARDINAL rather than int and unsigned long.
* added gm2-compiler/M2StackWord and gm2-compiler/M2StackAddress
* added gm2-compiler/Indexing to handle arbitary sized arrays of
pointers.
* removed many INTEGER/CARDINAL <-> ADDRESS coersions
* fixed compiler to use new modules above (many changes)
* have moved away from M2Printf using WORD parameters to ARRAY OF
BYTE as this was not 64 bit clean
* fixed p2c to handle ARRAY OF BYTE correctly
* fixed gm2 to handle ARRAY OF BYTE correctly
2004-04-01 Gaius Mulley <gaius@glam.ac.uk>
* fixed record parameter equivalence bug as reported by Waldek
(see testsuite/gm2/pim/pass/record4.mod)
2004-03-26 Gaius Mulley <gaius@glam.ac.uk>
* fixed array type equivalence bug as reported by Waldek
(see testsuite/gm2/pim/pass/array2.mod)
2004-03-25 Gaius Mulley <gaius@glam.ac.uk>
* Implemented __FUNCTION__ keyword which is translated
into a string containing the name of the current visible
function.
* Retrofitted a function name into many of the runtime
procedures within M2RTS and added a new
procedure Halt to M2RTS.
2004-03-18 Gaius Mulley <gaius@glam.ac.uk>
* Implemented MIN and MAX for types LONGINT and LONGCARD
2004-03-17 Gaius Mulley <gaius@glam.ac.uk>
* GM2 Release 0.42
* MinGW cross compilation port entered into CVS
* added -Wtarget-ar to gm2lcc.mod, gm2specs.c lang-specs.h
* added gm2/configure and associated files to determine
the whereabouts of target `ar'.
* added gm2/gm2-libs/configure and associated files to
test for target libraries, header files and C functions.
Required to implement the gm2-libs.
2004-02-13 Gaius Mulley <gaius@glam.ac.uk>
* GM2 Release 0.41
* native sparc port passes make gm2.paranoid and make check-gm2
* native i386 port passes make gm2.paranoid and make check-gm2
* fixed bug in M2GenGCC.mod, coerced constant set parameter
values to correct set type.
* fixed bug in M2GenGCC.mod when assigning constant to an ISO WORD
2004-02-10 Gaius Mulley <gaius@glam.ac.uk>
* fixed bug in gccgm2.c CompareTrees should be tested for <= 0
when testing for small set sizes.
* fixed Make-lang.in so that we only link gm2-compiler-boot/clex.o
during stage1. This build error showed up during cross building.
2004-02-05 Gaius Mulley <gaius@glam.ac.uk>
* fixed bug as demonstrated in
testsuite/gm2/pim/pass/subrange4.mod
* all regression tests now pass on the *86 platform
under Debian Woody.
2004-02-05 Gaius Mulley <gaius@glam.ac.uk>
* fixed more constant subrange bugs.
* added new quad to delimit the start of declaration
scope of a procedure.
* regression test failures reduced from 9 to 3.
2004-01-03 Gaius Mulley <gaius@glam.ac.uk>
* fixed bugs in forward and previous references within gm2.texi
* fixed more constant set conversion bugs which reduces
the number of regression failures from 15 to 9.

535
gcc/m2/ChangeLog-2005 Normal file
View File

@ -0,0 +1,535 @@
2005-12-29 Gaius Mulley <gaius@glam.ac.uk>
* corrections made to gm2/gm2.texi
2005-12-24 Gaius Mulley <gaius@glam.ac.uk>
* joined lines in gm2/tools-src/createUlmSys as
requested by Christoph <modula2@myrealbox.com>
so that gm2 will build on netbsd 2.1.
* added time and tm to gm2/gm2-libs/libc.def.
* added partial implementation of
gm2/gm2-libs-pim/TimeDate.def
gm2/gm2-libs-pim/TimeDate.mod
2005-12-22 Gaius Mulley <gaius@glam.ac.uk>
* added gm2/gm2-libs-pim/Random.def and
gm2/gm2-libs-pim/Random.mod and
* modified gm2/Make-lang.in to install new module.
* remove Random from the TODO list.
2005-12-21 Gaius Mulley <gaius@glam.ac.uk>
* added gm2/gm2-libs-pim/Strings.def and
gm2/gm2-libs-pim/Strings.mod
* modified gm2/Make-lang.in to install new module.
2005-12-19 Gaius Mulley <gaius@glam.ac.uk>
* implemented logitech compatible library
gm2/gm2-libs-pim/RealConversions.def and
gm2/gm2-libs-pim/RealConversions.mod
* added regression test for RealConversions
testsuite/gm2/pimlib/logitech/run/pass/realconv.mod
* fixed regression test expect script to set the
library path correctly.
* updated gm2/gm2-libs.texi to reflect addition of
RealConversions.mods
* added gm2/gm2-libs-pim/FloatingUtilities.def
* added gm2/gm2-libs-pim/FloatingUtilities.mod
* increased number of builtin functions accessible to GNU Modula-2.
2005-12-13 Gaius Mulley <gaius@glam.ac.uk>
* gm2/gccgm2.c:default_conversion now checks the base type.
* gm2/gm2-compiler/M2GCCDeclare.mod: add Subrange types onto the
to do list, if they are not yet resolved.
2005-12-10 Gaius Mulley <gaius@glam.ac.uk>
* fixed Copyright in gm2/gm2-libs-pim library modules
* gm2/gm2-compiler/M2Quads.mod:BuildForToByDo allowed Z type by value.
* gm2/gm2-compiler/M2Quads.mod:BuildPseudoBy converted by value if type
is known.
* fixes a bug reported by: James V. Cox example given in
testsuite/gm2/pim/run/pass/EnumTest.mod
2005-12-10 Gaius Mulley <gaius@glam.ac.uk>
* fixed Copyright in gm2/gm2-libs-pim library modules
2005-12-06 Gaius Mulley <gaius@glam.ac.uk>
* fixed Copyright in University of Ulm modules and also p2c.
* heavily tidied up the p2c source tree.
2005-12-05 Peter P. Eiserloh <peter@eiserloh.org>
* contributed the gm2 manual page and associated Makefile
in the new subdirectory: gm2/man.
2005-11-29 Gaius Mulley <gaius@glam.ac.uk>
* fixed bug reported by John Wallace and Juan Reyes
concerning FOR loops with negative step values.
* added new runtime regression tests gm2/pim/run/pass/For[78].mod
to test these new changes.
* changes to gm2/gm2-compiler/M2Base.mod, gm2-compiler/M2Code.mod,
gm2/gm2-compiler/M2GenGCC.mod, gm2/gm2-compiler/M2Quads.mod
to ensure that the Negate operator works on large data types
LONGCARD contants are changed into LONGINT and overflow is
checked.
2005-11-22 Gaius Mulley <gaius@glam.ac.uk>
* modified ppg to take an extra parameter -f which emits the
Free Documentation License header when producing texinfo
ebnf rules.
* fixed many dates on source files.
2005-11-21 Gaius Mulley <gaius@glam.ac.uk>
* fixed many Copyright dates and GPL, LGPL and FDL license
issues.
* replaced gm2/ulm-lib-gm2/std/Storage.mod with an implementation
which uses malloc and free. This in turn fixes a runtime regression
test (hello world) now works with the Ulm libraries.
* fixed gm2/gm2.texi to include FDL notice and also fixed all
included texi files in the same way.
* added GPL, Modula-2 and Copyright notices to all gm2/tools-src
files.
2005-11-15 Gaius Mulley <gaius@glam.ac.uk>
* added more regression tests and
* completed the printing of set types within gdb
* completed the printing of array and subrange types within gdb
* made gdb print Modula-2 style CHARs and improved type printing
within gdb.
* rationalised the gdb and gcc patches within the gm2/patch
subdirectories.
* modified gm2-harness-0.6 to apply patches in order.
* minor fixes to gm2/gccgm2.c to give better type information.
* improved gdb section within gm2/gm2.texi
2005-11-11 Gaius Mulley <gaius@glam.ac.uk>
* fixed minor node bugs in gm2/gm2.texi, gm2/gpl.texi, gm2/gnu.texi
2005-11-10 Gaius Mulley <gaius@glam.ac.uk>
* added gm2/COPYING.LGPL
* changed all references of the old FSF address to the new address.
* fixed bugs reported by John Wallace (MAX(INTEGER), MAX(LONGINT),
MIN(INTEGER) and MIN(LONGINT)) were not correctly converted in
gm2/gm2-libs-pim/InOut.mod, gm2/gm2-libs/FpuIO.mod,
gm2/gm2-libs/NumberIO.mod.
* added new regression tests in
gm2/switches/pim4/run/pass/InOutBug.mod and
gm2/switches/pim4/run/pass/FpuIOBug.mod which perform regression
runtime tests.
2005-11-07 Gaius Mulley <gaius@glam.ac.uk>
* added gm2/COPYING and included licence information
inside gm2/gm2.texi
* added gm2/gnu.texi and gm2/gpl.texi and referenced
them from gm2/gm2.texi
2005-11-06 Gaius Mulley <gaius@glam.ac.uk>
* improved the gdb patches
2005-11-03 Gaius Mulley <gaius@glam.ac.uk>
* fixes to set types and subranges which in turn
when applied with the patches made to ../../gcc/dwarf2out.c
and also gdb/gdb/dwarf2read.c allow subranges and
set types to be debugged when using the dwarf2 format.
* included the patches to gcc-3.3.6 and gdb-6.3 under the
new directory gm2/patches
* fixed patch for gdb-6.3
* updated gm2/gm2.texi
* released gm2-harness-0.6 which will automatically patch
gcc-3.3.6 and gdb-6.3, build and install these components.
* fixed warnings from within the gcc patch
2005-10-14 Gaius Mulley <gaius@glam.ac.uk>
* fixed set type debugging information.
Many changes to gm2/gccgm2.c and
minor changes to gm2/gm2-compiler/M2GenGCC.mod.
Debugging set types with gdb now works if -gstabs
are used on the command line of gm2 and also the
modified gdb-6.3 is used.
2005-10-13 Gaius Mulley <gaius@glam.ac.uk>
* fixed call to ranlib in gm2/gm2-compiler/gm2lcc.mod
2005-10-10 Gaius Mulley <gaius@glam.ac.uk>
* introduced an invocation to ranlib after producing the
archive to fix a linking bug on MacOS OS 10.3.9 reported
by: Thomas Ahn <TAhnMaple@gmx.de>.
* propagated ranlib though the various subcomponents of
gm2: gm2/gm2spec.c gm2/lang-specs.h gm2/Make-lang.in
gm2/gm2-compiler/gm2lcc.mod gm2/gm2-compiler/M2Options.mod
2005-10-07 Gaius Mulley <gaius@glam.ac.uk>
* replaced MathLib.mod onto the list of ULM modules
which prior to installation.
* fixed ggc bug so that types are remembered and marked.
These types are declared in M2GCCDeclare.mod before
code generation takes place and do not experience the
`push_decl' function.
2005-10-03 Michael H Lambert <lambert@psc.edu>
* removed $(LIBS) from the dependancies of cc1gm2 in
stage1, stage2 and stage3.
2005-09-30 Gaius Mulley <gaius@glam.ac.uk>
* fixed bug in gm2/gm2-libs/FpuIO.mod so that the sign is
not prepended to the string if the number is positive.
* fixed gm2/gm2-libs-pim/Break.c to use HAVE_STDLIB_H and
HAVE_MALLOC_H as detected by the configure script.
* removed ulm-lib-gm2/std/MathLib.mod from the build
process as a temporary work around to get gm2 working
under opendarwin.
2005-09-27 Gaius Mulley <gaius@glam.ac.uk>
* finally fixed _toupper porting problem in p2c as reported
by Thomas Ahn <TAhnMaple@gmx.de>, Ed Smith-Rowland
<3dw4rd@verizon.net>, John o goyo <jgoyo@ca.inter.net>,
Eduardo Abela <eabela@mac.com>, John Calley
<calleys@iquest.net> and many others.
* finally fixed the linking problem when building under
opendarwin. I suspect this will fix the same problems
under MacOS.
2005-09-16 Gaius Mulley <gaius@glam.ac.uk>
* implemented -Wpositive-mod-floor-div option
* updated gm2/gm2.texi and added many switch testing
regression tests.
2005-09-13 Gaius Mulley <gaius@glam.ac.uk>
* implemented REM
* implemented MOD, DIV, / as per ISO, PIM2, PIM3, PIM4
* updated gm2/gm2.texi documentation to reflect the rules
2005-09-12 Gaius Mulley <gaius@glam.ac.uk>
* fixed bug reported by John B. Wallace, Jr <wallacjb@enter.net>
testsuite/gm2/pim/options/bounds/fail/IdentifierBug.mod
* fixed bug reported by John B. Wallace, Jr <wallacjb@enter.net>
testsuite/gm2/testsuite/gm2/pim/pass/ABSBug.mod
* fixed bug reported by John B. Wallace, Jr <wallacjb@enter.net>
testsuite/gm2/pim/run/pass/FpuIOBug.mod
2005-09-06 Gaius Mulley <gaius@glam.ac.uk>
* fixed bug reported by John B. Wallace, Jr <wallacjb@enter.net>
gm2-libs/StringConvert.mod incorrect assumption of negative valued
modulus operator.
* added testsuite/gm2/pimlib/{logitech, ulm} with tests to check
that programs can be linked against logitech and the ulm libraries.
* added testsuite/gm2/pim/run/pass/modulus.mod which tests for
various division and modulus cases.
2005-09-01 Gaius Mulley <gaius@glam.ac.uk>
* implemented -Wdef=extension and -Wmod=extension switches
into GNU Modula-2 compiler and subcomponents (gm2l and gm2m).
* documented the new switches in gm2/gm2.texi
2005-08-09 Gaius Mulley <gaius@glam.ac.uk>
* fixed nested WITH statement bug and added
* testsuite/gm2/pim/run/pass/nestedwith.mod to regressively
check the fix.
2005-08-08 Gaius Mulley <gaius@glam.ac.uk>
* fixed many bugs in gm2/gm2-libs-coroutines/SysVec.mod
* minor updates to gm2/gm2-libs-coroutines/TimerHandler.mod
2005-07-26 Gaius Mulley <gaius@glam.ac.uk>
* modified debian directory so that 0.49 can be built as
a debian package
2005-07-25 Michel Derosa <derosa@videotron.ca>
* fixed malloc.h include for BSD based systems in
gm2/gm2-libs-pim/Break.c
2005-07-21 Gaius Mulley <gaius@glam.ac.uk>
* moved gm2/examples/executive/Executive, TimerHandler, Debug,
SysVec to gm2/gm2-libs-coroutines and
* made gm2/Make-lang.in install these modules
* removed the -Wulm option and replaced it with -Wlibs=ulm
* added -Wlibs=logitech, -Wlibs=pim, -Wlibs=iso,
-Wlibs=pim-coroutine
* altered gm2/Make-lang.in so that the correct library modules
are placed into the correct directories during install.
2005-07-20 Gaius Mulley <gaius@glam.ac.uk>
* fixed bug exposed by: testsuite/gm2/pim/pass/maxlongint.mod
* modified IsMathType in gm2/gm2-compiler/M2Base.mod accordingly.
2005-07-18 Gaius Mulley <gaius@glam.ac.uk>
* updated gm2/gm2.texi and gm2/gm2-libs.texi
* introduced modules Delay, ErrorCode, DebugTrace
and Break into gm2/gm2-libs-pim
* modified gm2/Make-file.in so that these modules
are built and installed.
2005-07-14 Gaius Mulley <gaius@glam.ac.uk>
* GM2 Release 0.49
* tagged CVS using gm2_0_49
* introduced SHORTCARD into p2c
* added gm2/gm2-libs-pim/CardinalIO.def and
gm2/gm2-libs-pim/CardinalIO.mod
* added a number of procedures to implement CardinalIO.mod
in gm2/gm2-libs/StringConvert.mod
* improved gm2/gm2.texi
* modified gm2/Make-file.in so that the library modules
in gm2/gm2-libs-pim are also built and installed
2005-07-10 Gaius Mulley <gaius@glam.ac.uk>
* constant literal string array assignment of smaller sizes to
array variables and parameters.
2005-07-09 Gaius Mulley <gaius@glam.ac.uk>
* implemented MAX(ADDRESS) and MIN(ADDRESS)
2005-07-08 Gaius Mulley <gaius@glam.ac.uk>
* finally all ulm modules compile under GM2
* fixed negative integer bug which was exposed in the 32 bit port
of gm2 when compiling testsuite/gm2/pim/pass/setoverflow.mod
and also gm2/ulm-lib-gm2/std/TimeIO.mod
2005-07-06 Gaius Mulley <gaius@glam.ac.uk>
* fixed a number of bugs relating to gm2 failuring to compile
gm2/ulm-lib-gm2/std/TimeIO.mod. Nested modules within
procedures exporting variables.
* alterations include correct type declaration ahead of
variable creation.
* creating all variables in the outer most procedure scope
if these variables are exported from inner modules.
* also fixed gm2/gccgm2.c so that pointer to sets are cast
into a generic ptr
* also fixed offset into sets (which had assumed sets started
with an element value zero).
2005-06-22 Gaius Mulley <gaius@glam.ac.uk>
* fixed bug reported by John O Goyo <jgoyo@ca.inter.net>
multiple indexed arrays were internally defined incorrectly
and did not allow users to mix array indices by a[x,y,z] and
a[x][y,z] etc as per PIM and ISO specification.
see testsuite/gm2/pim/pass/index.mod and
testsuite/gm2/pim/pass/index2.mod and
testsuite/gm2/pim/run/pass/index3.mod
2005-06-20 Gaius Mulley <gaius@glam.ac.uk>
* added code to treat LOC as a system type in parameter
passing.
2005-06-17 Gaius Mulley <gaius@glam.ac.uk>
* fixed bug reported by John O Goyo <jgoyo@ca.inter.net>
CAST of different sized variables would fail.
* added new switch -Wpedantic-cast which warns if a cast
is converting a variable of a different size to the type.
2005-06-08 Gaius Mulley <gaius@glam.ac.uk>
* fixed bug which occurred if a constant set was created
in a procedure through the CONST construct.
* fixed a number of -Wextended-opaque issues in gm2/bnf/m2-h.bnf
* modified gm2/Make-lang.in to use -Wextended-opaque (for testing)
2005-06-07 Gaius Mulley <gaius@glam.ac.uk>
* fixed bug which occurred if an enumerated type field
was imported by another module.
(See testsuite/gm2/pim/pass/set10.mod)
* fixed circular dependancy bug in record generation.
2005-06-03 Gaius Mulley <gaius@glam.ac.uk>
* reverted some of the changes made to the ulm libraries
in the light of fixing arrays with huge indices.
* mofified gm2/bnf/m2-h.bnf so that expressions within
statement sequences are ignored.
2005-06-02 Gaius Mulley <gaius@glam.ac.uk>
* gm2/gccgm2.c fixed BuildArrayIndexType so that gm2 can build
arrays which have huge indices. This removes a failure from
the regression tests on systems which have a 32 bit long.
2005-06-01 Gaius Mulley <gaius@glam.ac.uk>
* gm2/Make-file.in altered grep -e to aid portability under
Solaris (as reported by john o goyo <jgoyo@ca.inter.net>).
* gm2/examples/server added example of a threaded server
which uses the executive, transfer and iotransfer.
* gm2/examples/executive/Executive added KillProcess.
* gm2/gm2-libs-coroutines/SysVec.mod fixed vector selection
bug.
2005-05-27 Gaius Mulley <gaius@glam.ac.uk>
* gm2/gccgm2.c fixed to detect array indices which exceed
sizetype.
* gm2/lang-specs.h fixed to propagate the -Wcpp flags though
to gm2 subcomponents.
2005-05-25 Michel Derosa <derosa@videotron.ca>
* applied patches to gm2/gm2.texi which describe FreeBSD
build instructions.
2005-05-19 Gaius Mulley <gaius@glam.ac.uk>
* rebuilt gm2/gm2-libs/configure
* gm2/gm2.texi added section heading for advice on building
GNU Modula-2 under FreeBSD 5.3
2005-05-19 Michel Derosa <derosa@videotron.ca>
* applied patches to make gm2 build on FreeBSD 5.3
* gm2/gm2-libs/configure.in test for signal.h and direct.h
* gm2/gm2-libs/gm2-libs-host.h.in test for signal.h and direct.h
* gm2/tools-src/createUlmSys test for signal.h and direct.h
2005-05-18 Gaius Mulley <gaius@glam.ac.uk>
* testsuite/gm2/types/run/pass/varient5.mod introduced to stress
variant records (equivalent to a C union for casting BYTES
into a CARDINAL). Based on an idea from Michel Derosa.
2005-05-17 Gaius Mulley <gaius@glam.ac.uk>
* gm2/gm2-compiler/M2Quads.mod modified to accept zero length strings
as compatible with type CHAR.
* gm2/gm2-compiler/M2GenGCC.mod many modifications/refactoring to enable
strings of 1 or 0 characters to be type compatible with CHAR.
* these fixes allow Iztok's ISO library to compile cleanly.
2005-05-16 Gaius Mulley <gaius@glam.ac.uk>
* gm2/gm2-compiler/M2GenGCC.mod fixed to allow HIGH(ch) where ch is
of type CHAR.
* gm2/gm2-compiler/M2GenGCC.mod fixed to allow comparison of literals
against subrange types.
* gm2/gm2-compiler/M2GenGCC.mod fixed to allow automatic conversion
of strings of 1 or 0 characters to be passed to a parameter of
type CHAR.
* these fixes allow more of the third party tests (from Iztok)
to pass.
2005-05-13 Gaius Mulley <gaius@glam.ac.uk>
* gm2/Make-lang.in shell invocation to use $(SHELL) and also
converted bashisms into pure sh as suggested by
Michel Derosa <derosa@videotron.ca>
2005-05-12 Gaius Mulley <gaius@glam.ac.uk>
* gm2/gm2-compiler/SymbolTable.mod and gm2/gm2-compiler/P2SymBuild.mod
modified to detect double declaration on import and produce useful
error messages.
* gm2/Make-lang.in fixes to the gm2.install rule.
* gm2/gm2-compiler/M2Quads.mod fixed BuildStaticArray to calculate
indices using INTEGER data type.
2005-05-11 Gaius Mulley <gaius@glam.ac.uk>
* P2SymBuild.mod added call to CheckForEnumerationInCurrentModule
to fix 5 regression tests and allow enumeration types to be
visible when aliased via TYPEs and later IMPORTed.
(see testsuite/gm2/pim/pass/impf.mod)
2005-05-10 Gaius Mulley <gaius@glam.ac.uk>
* major changes which now allow GM2 to compile nested varient records
(such as found in gm2/ulm-lib-gm2/std/RTErrors.def)
* added runtime regression test in testsuite/types/run/pass
* gm2/Make-lang.in modified to include RTErrors.mod to be built with
the ulm libraries. Grammer files are built without the -l option to pge.
* gm2/gccgm2.c new functions gccgm2_BuildOffset1 determinePenultimateField
which implement modifications to record/varient field calculation.
* gm2/gm2.texi contains gm2 internal documentation on how the front end
symbol table represents records, field and varient records.
* gm2/bnf/m2-2.bnf removed commented out code.
* gm2/examples/map/Makefile builds the utility semantic.
* gm2/gm2-compiler/M2Base.mod modifications to reflect change in PutFieldRecord
* gm2/gm2-compiler/M2GCCDeclare.mod added debugging procedures PrintVerbose
and PrintSymbol, which can be called interactively from gdb. Also fixed
varient record declaration.
* gm2/gm2-compiler/M2GenGCC.mod fixed varient record field calculation.
* gm2/gm2-compiler/M2Quads.mod changed operands to OffsetOp.
* gm2/gm2-compiler/M2SubExp.mod changes to reflect OffsetOp change.
* gm2/gm2-compiler/P2SymBuild.mod changed to allow nested varient records.
* gm2/gm2-compiler/SymbolTable.[def, mod] changes to varient record
representation. Fixed memory leak.
* gm2/gm2-compiler/gccgm2.def changed BuildOffset and added BuildOffset1
* gm2/ulm-lib-gm2/std/RTErrors.def changed parameter name to match
implementation module.
* gm2/ulm-lib-gm2/std/RTErrors.mod fixed pointer/integer constant type clash.
2005-04-11 Gaius Mulley <gaius@glam.ac.uk>
* fixed examples/executive
2005-03-24 Gaius Mulley <gaius@glam.ac.uk>
* included the keyword MODULE as an stop set element
in gm2m and gm2l.
2005-03-15 Gaius Mulley <gaius@glam.ac.uk>
* GM2 Release 0.44
* tagged CVS using gm2_0_44
2005-03-14 Gaius Mulley <gaius@glam.ac.uk>
* finished tools-src/createUlmSys which builds a SYSTEM.c
(from ./configure results) ULM library compatible interface.
* modified Make-lang.in to install the ULM libraries.
* added new switch -Wulm which modifies the default search
path so that the ULM libraries are included.
2005-01-05 Gaius Mulley <gaius@glam.ac.uk>
* fixed bug reported by john o goyo <jgoyo@ca.inter.net>.
(testsuite/gm2/pim/run/pass/Countdown.mod)
* for loops are now implemented as per ISO description.
GNU Modula-2 now calculates the last iteration value
before the start of a loop. It then initializes the
iteration value and works towards the final value,
rather than testing to see whether the iteration value
exceeds or preceeds the limit value (this fails when using
a CARDINAL iterator and stopping at 0).
* added a number of run tests to exercise these changes.

388
gcc/m2/ChangeLog-2006 Normal file
View File

@ -0,0 +1,388 @@
2006-12-25 Gaius Mulley <gaius@gnu.org>
* gm2/Make-file.in: fixed conditional building of library files.
Bug reported by Michael Lambert <lambert@psc.edu>.
2006-12-21 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: fixed manual page installation.
* gm2/lang-options.h: include -Wlibs=min option.
* gm2/gm2-libs-min/libc.c: added parameters to functions.
* gm2/gm2-libs-min/libc.def: added.
2006-12-20 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-libs-min: added
* gm2/gm2spec.c: modified to relect introduction of -Wlibs=min
* gm2/gm2.texi: document -Wlibs=min
* gm2/config-lang.in: include gm2cc to be installed
* GNU Modula-2 can be built as a cross compiler for the avr
microprocessor.
2006-12-18 Gaius Mulley <gaius@gnu.org>
* gm2/www/index.ms: updated web page to reflect G5 successful
make gm2.paranoid using gcc-3.3.6 and CVS
tag D2006.06.23.04.00.00
* gm2/gccgm2.c: use integer_type_node instead of boolean_type_node
as the size of boolean_type_node can differ from the
size of an integer_type_node.
* make gm2.paranoid works on LP64 opteron with a patched gcc-4.1.0
2006-12-17 Gaius Mulley <gaius@gnu.org>
* fixed line number debugging information at the end of a
function.
2006-12-05 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2Quads.mod: BuildCastFunction allow arrays
to be cast.
* testsuite/gm2/iso/stringchar.mod: fixed typos.
* gm2/gm2-compiler/M2Quads.mod: BuildDynamicArray,
BuildStaticArray, BuildDesignatorArray all SkipType to allow
type equivalence between arrays.
2006-11-02 Gaius Mulley <gaius@gnu.org>
* gm2/lang-specs.h: use gm2cc rather than the gcc driver.
* gm2/gm2-compiler/gm2lcc.mod: also use gm2cc rather
than gcc.
* gm2/gm2-compiler/gm2lcc.mod: corrected extern
declaration of exit.
* gm2/Make-lang.in: generate gm2cc from xgcc and install
it correcly.
* testsuite/gm2/pim/options/optimize/run/pass/gm2.exp: fixed
library module build.
2006-10-20 Gaius Mulley <gaius@gnu.org>
* gm2/gccgm2.c: fixed building of constants strings.
Constants are also placed into the global scope so
that they are not garbage collected.
* gm2/M2GenGCC.mod: CodeXIndr handle special case of
null string.
* gm2/Make-lang.in: add automatically generated modules
to the verify12 rule.
* added a string assignment regression test.
2006-10-19 Gaius Mulley <gaius@gnu.org>
* www/index.ms: updated gm2-harness release to 0.96.
* gm2/gm2-compiler/SymbolConversion.mod: Poison must
not check for gcc poisoning as it is called after a
function has been emitted and potentially poisoned.
2006-10-18 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-config.in: added.
* gm2/Make-lang.in: include gm2/gm2-config.
* gm2/configure.in: generate gm2/gm2-config.
* backed out above changes
2006-10-17 Gaius Mulley <gaius@gnu.org>
* gm2/aclocal.m4: added.
* gm2/configure: rebuilt.
2006-10-14 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: minor fixes to build manual pages.
2006-10-13 Gaius Mulley <gaius@gnu.org>
* gm2/gccgm2.c: call gimplify_function on all
functions.
* gm2/Make-lang.in: added ability to optionally build
the ulm libraries which matches gm2-harness-0.94.
2006-10-12 Gaius Mulley <gaius@gnu.org>
* gm2/patches/gcc/4.1.1/01.gaius_patch_gcc: added.
2006-10-07 Gaius Mulley <gaius@gnu.org>
* gm2/gccgm.2c: fixed conditional goto expressions.
2006-10-04 Gaius Mulley <gaius@gnu.org>
* gm2/gccgm.2c: added debugging stub.
2006-10-03 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2GenGCC.mod: fixed BuildEnd
to use IsProcedureGccNested in CodeKillLocalVar.
* gm2/gm2-compiler/M2GCCDeclare.def:
export IsProcedureGccNested.
2006-10-01 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2GenGCC.mod: modified BuildEnd
to taken an extra parameter, nested, and set it
accordingly.
2006-09-30 Waldek Hebisch <hebisch@math.uni.wroc.pl>
* gm2/gccgm2.c: (gccgm2_BuildEndFunctionCode) only
call gimplify_function_tree and cgraph_finalize_function
if the procedure is not nested.
2006-09-29 Gaius Mulley <gaius@gnu.org>
* removed execute permissions for source files.
* gm2/patches/gcc/4.1.0/01.gaius_patch_gcc: improved.
* gm2/gccgm2.c: fixed comment.
2006-09-20 Gaius Mulley <gaius@gnu.org>
* gm2/patches/4.1.0/01.gaius_patch_gcc: added.
2006-09-19 Gaius Mulley <gaius@gnu.org>
* huge amount of changes to bring gm2 up to gcc-4.1.0 and
also make it build with gcc-4.1.0.
* modified gm2/
Make-lang.in config-lang.in configure.in gccgm2.c
gm2-common.h gm2-lang.c gm2-lang.h gm2-tree.h gm2.texi
gm2builtins.c gm2spec.c lang-specs.h bnf/m2-3.bnf
examples/server/sckt.c examples/server/sckt.def
gm2-compiler/M2Comp.mod gm2-compiler/M2GCCDeclare.mod
gm2-compiler/M2GenGCC.mod gm2-compiler/M2Options.def
gm2-compiler/M2Options.mod gm2-compiler/M2Preprocess.mod
gm2-compiler/gccgm2.def gm2-compiler/gm2.mod
gm2-compiler/gm2lgen.mod gm2-libs/ASCII.def gm2-libs/ASCII.mod
gm2-libs/Args.def gm2-libs/Debug.def gm2-libs/IO.mod
gm2-libs/SYSTEM.mod gm2-libs/StdIO.mod gm2-libs/StrLib.mod
gm2-libs/StringConvert.def gm2-libs/libc.def
gm2-libs-coroutines/KeyBoardLEDs.c
gm2-libs-coroutines/Makefile gm2-libs-coroutines/SysVec.mod
gm2-libs-coroutines/TimerHandler.mod p2c/p2c.h
p2c/p2c-src/src/makeproto.c p2c/p2c-src/src/p2c-config.h
p2c/p2c-src/src/p2clib.c tools-src/mklink.c www/index.ms
* added files:
gm2/gm2-common.c gm2/gm2-tree.def gm2/lang.opt
2006-08-31 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-libs/ASCII.def: changed EOL to equal to nl rather
than cr.
2006-08-10 Gaius Mulley <gaius@gnu.org>
* fixed ASM statement.
* gm2/bnf/m2-3.bnf: fixed Pass3 and Pass2 const
* gm2/gccgm2.c: modified gccgm2_BuildAsm to use add_stmt
rather than expand_asm_expr.
2006-08-09 Gaius Mulley <gaius@gnu.org>
* GM2 Release 0.53
* changed release number in configure.in, gm2.texi, Make-lang.in
* builds with gcc-4.1.0
2006-08-08 Gaius Mulley <gaius@gnu.org>
* GM2 Release 0.52
* tagged CVS using gm2_0_52
* gm2/NEWS updated
* changed release number in configure.in, gm2.texi, Make-lang.in
* rebuilt configure
2006-08-07 Gaius Mulley <gaius@gnu.org>
* gm2/www/index.ms: updated to reflect release of gm2-harness-0.9
2006-06-23 Gaius Mulley <gaius@gnu.org>
* gm2/www/index.ms: updated to reflect release of gdb-6.5 which
contains enhanced Modula-2 language support. It also
documents that gm2-harness-0.8 has been released.
2006-05-22 Gaius Mulley <gaius@gnu.org>
* gm2/www/index.ms: updated to reflect sparc build success from
John O Goyo <jgoyo@ca.inter.net>
2006-05-04 Gaius Mulley <gaius@gnu.org>
* implemented __INLINE__
* gm2/gccgm2.c: modified to inline procedures if requested.
* gm2/m2.flex: added new keyword __INLINE__
* gm2/gm2-compiler/M2Reserved.def
* gm2/gm2-compiler/M2Reserved.mod: added new keyword __INLINE__
* gm2/gm2-compiler/P1SymBuild.mod: builds inlined procedure
* gm2/gm2-compiler/M2GenGCC.mod: passes front end inlined procedure
to gccgm2.
2006-04-24 Gaius Mulley <gaius@gnu.org>
* GM2 Release 0.51
* tagged CVS using gm2_0_51
* gm2/NEWS updated
* rebuilt configure
* finished implementing declaration of variables at addresses.
* modified gm2/bnf/m2-3.bnf, gm2/gm2-compiler/M2Quads,
gm2/gm2-compiler/SymbolTable.mod, gm2-compiler/P3SymBuild.mod
2006-04-22 Gaius Mulley <gaius@gnu.org>
* implemented the declaration of a variable at an address.
* modified gm2/bnf/m2-3.bnf, gm2/bnf/m2-2.bnf, gm2/gm2-compiler/M2Quads.mod
2006-04-21 Gaius Mulley <gaius@gnu.org>
* added testsuite/gm2/pim/pass/varaddress.mod
* modified gm2/bnf/m2.bnf, gm2/bnf/m2-2.bnf, gm2/bnf/m2-3.bnf,
gm2/bnf/m2-h.bnf to allow parsing of variables declared at addresses.
2006-04-19 Gaius Mulley <gaius@gnu.org>
* added testsuite/gm2/pim/pass/sets5.mod
* fixed bug report by John O Goyo <jgoyo@ca.inter.net>
* (testsuite/gm2/pim/pass/sets5.mod and testsuite/gm2/pim/pass/sets4.mod)
2006-04-19 Gaius Mulley <gaius@gnu.org>
* added testsuite/gm2/pim/pass/sets5.mod
* fixed bug report by John O Goyo <jgoyo@ca.inter.net>
* (testsuite/gm2/pim/pass/sets5.mod and testsuite/gm2/pim/pass/sets4.mod)
2006-03-25 Gaius Mulley <gaius@gnu.org>
* added testsuite/gm2/pim/pass/sets4.mod
* gm2/gm2-compiler/P2SymBuild.mod: added more robust error detection
* gm2/gm2-compiler/M2GenGCC.mod: added more robust error detection
2006-03-17 Gaius Mulley <gaius@gnu.org>
* added successful build reports to the web page
2006-02-21 Gaius Mulley <gaius@gnu.org>
* gm2/gm2.texi: fixed new urls and added missing escaped @
* gm2/gm2-libs.texi: rebuilt
* gm2/gm2-iso/README.texi: fixed typo
2006-02-20 Gaius Mulley <gaius@gnu.org>
* gm2/NEWS updated
2006-02-13 Gaius Mulley <gaius@gnu.org>
* GM2 Release 0.50
* tagged CVS using gm2_0_50
* gm2/NEWS: added, which contains news of user visible changes.
* gm2/Make-lang.in: updated version number
* gm2/gm2.texi: updated gm2 release number to 0.50 and gm2-harness number to 0.7
and improved install section.
* gm2/www: added homepage documents
2006-02-10 Gaius Mulley <gaius@gnu.org>
* gm2/ulm-lib-gm2/std/GetPass.mod: modified to work with:
* gm2/ulm-lib-gm2/sys/termios.def: new definition module for C
* gm2/ulm-lib-gm2/sys/termios.c: portable implmentation module for termios
interface
* gm2/ulm-lib-gm2/sys/SysTermIO.def: Modula-2 interface to the underlying
termios library.
* gm2/ulm-lib-gm2/sys/SysTermIO.mod: Modula-2 interface to termios.c.
* all regression tests pass on LP64
2006-02-07 Gaius Mulley <gaius@gnu.org>
* fixed copyright notices for all ISO definition modules in
gm2/gm2-iso.
2006-01-23 Gaius Mulley <gaius@glam.ac.uk>
* gm2/gm2-compiler/M2Options.mod: allow -p option.
* gm2/gm2-compiler/M2Quads.mod: remove call to stress stack during
Initialization
2006-01-17 Michael H Lambert <lambert@psc.edu>
* testsuite/gm2/iso/pass/realbitscast.mod: modified to detect whether
it is being run under alpha and 64 bit architecture.
* testsuite/gm2/cpp/pass/subaddr.mod: modified to detect whether
it is being run under alpha and 64 bit architecture.
2006-01-17 Gaius Mulley <gaius@glam.ac.uk>
* gm2/gm2-compiler/M2GenGCC.mod: coerse constants passed to parameter
of SYSTEM types. Fixes the make gm2.paranoid on ppc architecture.
* testsuite/gm2/iso/pass/realbitscast.mod: modified to detect whether
it is being run under ia64 architecture.
* testsuite/gm2/cpp/pass/subaddr.mod: modified to detect whether
it is being run under ia64 architecture.
2006-01-16 Gaius Mulley <gaius@glam.ac.uk>
* gm2/gccgm2.c: altered INCL, EXCL and bit tests so that they subtract the
low value of the subrange before performing the bit operation.
* testsuite/gm2/pim/run/pass/setcritical.mod to test bugfix.
* gm2/gm2-compiler/gm2lcc.mod: added -B option
* gm2/lang-specs.h: pass -B option to gm2lcc
2006-01-10 Gaius Mulley <gaius@glam.ac.uk>
* fixed INTEGER, SHORTINT and LONGINT so that they all
call upon gccgm2_GetM2<type> rather than their C counterparts.
* fixed constant overflow on 32 bit address architectures when
compiling arrayhuge.mod and arrayhuge2.mod (as reported by
Michael H Lambert <lambert@psc.edu>)
* M2Code.mod::Code: call FlushWarnings and FlushErrors after StartDeclareScope
which flushes errors before code generation starts. This fixes
a timeout bug in the regression tests reported by
(John B Wallace Jr <wallacjb@enter.net>).
* M2GenGCC.mod::CodeSavePriority: introduced PriorityDebugging and turned
off debugging messages
* M2GenGCC.mod::CodeRestorePriority: introduced PriorityDebugging and turned
off debugging messages
* all regression tests now pass on GNU/Linux i386 (Debian Sarge)
* gm2/gm2-compiler/M2Quads.mod::LoopAnalysis:fixed bug in while loop
* corrected testsuite/gm2/errors/fail/testimport.mod to include a double import.
2006-01-09 Gaius Mulley <gaius@glam.ac.uk>
* fixed LONGINT/LONGCARD bugs so that
testsuite/gm2/switches/pim4/run/pass/FpuIOBug.mod now passes.
LONGINT and LONGCARD are declared as long long int and
long long unsigned int respectively.
* updated gm2/gm2.texi to reflect changes in LONGINT and LONGCARD.
2006-01-08 Gaius Mulley <gaius@glam.ac.uk>
* modified examples to utilize the module priority mechanism.
2006-01-06 Gaius Mulley <gaius@glam.ac.uk>
* improved implementation of module priorities so that
only externally accessible procedures save and restore
interrupts.
* added testsuite/gm2/pimlib/coroutines/pass/priority3.mod and
testsuite/gm2/pimlib/coroutines/pass/priority3.def to test exporting
of procedures which need to save and restore interrupt priorities.
2006-01-05 Gaius Mulley <gaius@glam.ac.uk>
* gm2/Make-lang.in: removed GM2_DIRS from the dependancies of
various rules, which in turn removed a number of "build loops"
* gm2/config-lang.in: removed reference to gm2/p2c/p2c-src/examples/Makefile
2006-01-04 Gaius Mulley <gaius@glam.ac.uk>
* implemented module priorities.
* implemented gm2/gm2-libs-pim/TimeDate.mod
* added testsuite/gm2/pimlib/coroutines/pass/priority.mod,
testsuite/gm2/pimlib/coroutines/pass/priority2.mod and
testsuite/gm2/pimlib/logitech/run/pass/timedate.mod
* included TimeDate to be installed as part of the pim
libraries.
2006-01-03 Michael H Lambert <lambert@psc.edu>
* fixed typo in gm2/gm2.texi
* added __ppc__ ifdefs into testsuite/gm2/iso/pass/realbitscast.mod
so that it ignores the REAL96 test on the G5
* added __ppc__ ifdefs into testsuite/gm2/switches/pim4/run/pass/FpuIOBug.mod

378
gcc/m2/ChangeLog-2007 Normal file
View File

@ -0,0 +1,378 @@
2007-12-10 Gaius Mulley <gaius@gnu.org>
* gm2/NEWS: updated.
* gm2/tools-src/def2texi.py: modified so that references
to types, variables and constants are added to the index
at the end of the documentation.
* gm2-libs-pim/RealInOut.def: all long procedures are also
exported.
2007-12-07 Gaius Mulley <gaius@gnu.org>
* gm2/NEWS: updated.
* gm2/gm2.texi: documented new -fxcode option and minor
fixes.
* gm2/lang-options.h: added -fxcode to list of options.
* gm2/lang.opt: added -fxcode to list of options.
* gm2/m2.flex: added m2flex_GetColumnNo.
* gm2/gm2-compiler/M2Error.mod: OutString modified to
use column and produce GNU and Xcode format errors.
* gm2/gm2-compiler/M2LexBuf.def: export column
related procedures.
* gm2/gm2-compiler/M2LexBuf.mod: introduced recording
of the column position. GetColumnNo, TokenToColumnNo
new procedures.
* gm2/gm2-compiler/M2Options.def: added Xcode.
* gm2/gm2-compiler/M2Options.mod: set Xcode accordingly.
* gm2/gm2/gm2-compiler/M2Students.mod: fixed spelling
mistake.
* gm2/gm2-compiler/P1SymBuild.mod: tidied up error
message.
* gm2/gm2-compiler/SymbolTable.mod: ditto.
* gm2/gm2-compiler/m2flex.def: added GetColumnNo
procedure.
* gm2/gm2-libs-pim/BitBlockOps.mod: intemediate checkin.
2007-12-06 Gaius Mulley <gaius@gnu.org>
* gm2/tools-src/gensum.py: new file.
2007-11-14 Gaius Mulley <gaius@gnu.org>
* gm2/gm2.texi: corrected urls and last edit.
* gm2/gm2-libs.texi: recreated.
2007-11-10 Gaius Mulley <gaius@gnu.org>
* gm2/m2.flex: added explicit cast.
* gm2/Make-lang.in: now build h2def during stage2.
* gm2/gm2/c.flex: modified so that it ignores tabs.
* gm2/bnf/h2def.bnf: many bugfixes, still broken though.
* gm2/gm2-compiler/CLexBuf.mod: improved Debugging support.
* gm2/gm2-compiler/gm2lcc.mod: refactored comment handling
code to use the RemoveComment, RemoveWhiteSuffix and
RemoveWhitePrefix procedures in DynamicStrings module.
* gm2/gm2-compiler/gm2lgen.mod: likewise handle comments.
* gm2/gm2-libs/DynamicStrings.def: export
RemoveWhitePrefix, RemoveWhitePostfix, RemoveComment.
* gm2/gm2-libs/DynamicStrings.mod: implement above.
2007-11-07 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: updated version to 0.63
* gm2/gm2.texi: updated version to 0.63 and updated
unbounded-by-reference documentation.
* gm2/gm2-compiler/M2GenGCC.mod: modified optimization
of unbounded addresses to test the memory range of
each unbounded parameter against a type compatible
var parameter, any overlapping addresses results in
a alloca and memcpy of the non var unbounded array.
2007-11-02 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2GenGCC.mod: completed the further
optimization of unbounded addresses. It checks to
see if the contents of a type compatible unbounded
ARRAY matches the contents of a VAR parameter.
It checks against any VAR parameter (not just
unbounded VAR parameters - consider ARRAY OF BYTE).
* gm2/gm2.texi: documented the implementation of
the -funbounded-by-reference optimization flag
giving examples.
2007-10-30 Gaius Mulley <gaius@gnu.org>
* gm2/gm2.texi: fixed @xref punctuation requirement.
* gm2/gm2-compiler/M2GenGCC.mod: fixed unbounded-by-reference
so that it works out whether two parameters might contain
the same contents. Further optimization is possible via
runtime checking of unbounded addresses.
* gm2/gm2-compiler/SymbolTable.mod: factored out some code.
2007-10-26 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-libs/sckt.def: moved here from examples/server.
* gm2/gm2-libs-ch/sckt.c: moved here from examples/server.
* gm2/examples/ncurses/Makefile: changed switches from -W
to -f
* gm2/gm2-libs-coroutines/Makefile: changed switches from -W
to -f
* gm2/gm2-libs-coroutines/SysVec.mod: added many Asserts and
fixed some bugs relating to microseconds.
* gm2/gm2-libs-coroutines/TimerHandler.mod: fixed bug relating
to time vector.
2007-10-25 Gaius Mulley <gaius@gnu.org>
* gm2/gccgm2.c: CHAR is now declared as an unsigned char.
* testsuite/gm2/pimlib/logitech/run/pass/bbits.mod: new file.
* testsuite/gm2/pimlib/logitech/run/pass/intb.mod: new file.
2007-10-23 Gaius Mulley <gaius@gnu.org>
* gm2/gm2.texi: more building documentation fixes.
* gm2/www/index.ms: updated documentation to reflect
changes to the gm2.texi building instructions.
2007-10-22 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-libs-pim/BitBlockOps.{def,mod}: added.
* gm2/Make-lang.in: added BitBlockOps to the Logitech list
of modules.
* gm2/gm2.texi: improved building documentation which now
relates to the daily CVS snapshot held on
http://floppsie.comp.glam.ac.uk/download/c
2007-10-18 Gaius Mulley <gaius@gnu.org>
* gm2/www/index.ms: rationalised the building instructions
between the web page and gm2/gm2.texi
* gm2/gm2.texi: updated the building instructions.
2007-10-14 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: fixed bug in gm2/gm2-libs/gm2-libs-host.h
target so that configure uses the correct CC and CPP.
2007-10-09 Gaius Mulley <gaius@gnu.org>
* gm2/README: updated to reflect new homepage and mailing
list address.
2007-10-07 Gaius Mulley <gaius@gnu.org>
* fixed bug reported by Dmitry Shatrov <shatrov@gmail.com>
* gm2/gm2-compiler/M2Quads.mod: added CheckNotConstAndVar
procedure. BuildAssignment use CheckNotConstAndVar.
* gm2/testsuite/gm2/pim/fail/constvar.mod: added new
regression test.
* gm2/gm2.texi: updated the last update field.
2007-10-05 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: updated version to 0.62
* gm2/Make-lang.in: altered all -W options to their new
-f counterparts
* gm2/README: modified the advised build command
* gm2/gccgm2.c: removed all section of code inside #if 0
blocks (which were not part of the orig gcc source).
* gm2/gccgm2.c: modified OPT_W to OPT_f to reflect change
of -W flags to -f flags.
* gm2/gccgm2.c: reintroduced the -fcpp handling code.
* gm2/gm2.texi: updated version number to 0.62
* gm2/gm2.texi: altered all -W options to -f options
for code generation options. Left warning options
to use -W to mirror the gcc paradigm.
* gm2/gm2/gm2builtins.c: memmove introduced.
* gm2/gm2spec.c: changed all -W options to -f.
* gm2/lang-specs.h: changed all -W options to -f.
* gm2/lang.opt: changed all -W options to -f.
* gm2/bnf/gm2l.bnf: changed all -W options to -f.
* gm2/bnf/gm2m.bnf: changed all -W options to -f.
* gm2/gm2-libs-pim/BlockOps.{def,mod}: added to repository.
* gm2/examples/map/Makefile: changed all -W options to -f and
added -O3.
* gm2/gm2/gm2-compiler/M2Options.def: changed comments.
* gm2/gm2-compiler/M2Options.mod: changed all -W options to -f.
* gm2/gm2-compiler/M2Quads.mod: changed all -W options to -f.
* gm2/gm2-compiler/SymbolTable.mod: changed all -W options to -f.
* gm2/gm2-compiler/gm2.mod: changed all -W options to -f.
* gm2/gm2-compiler/gm2lcc.mod: changed all -W options to -f.
* gm2/gm2/gm2-compiler/ppg.mod: modified compile-command.
* gm2/gm2-libs/Builtins.def: added memmove to the list of
builtins.
* gm2/gm2-libs/Builtins.mod: implemented M2 wrapper for memmove.
* gm2/gm2-libs/cbuiltin.def: added access to C memmove.
* gm2/man/gm2.man: changed all -W options to -f.
2007-09-27 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-libs/SYSTEM.mod: added SHIFT, ROTATE and their
support counterparts.
* gm2/gm2-libs-pim/BitByteOps.{def,mod}: added.
* gm2/gm2-libs-pim/BitWordOps.{def,mod}: completed.
* gm2/gm2.texi: updated to reflect the addition of SHIFT,
ROTATE procedures in PIM SYSTEM.mod.
* gm2/gm2/Make-lang.in:
* gm2/gm2/README:
* gm2/gm2/gccgm2.c:
* gm2/gm2/gm2.texi:
* gm2/gm2/gm2spec.c:
* gm2/gm2/lang-options.h:
* gm2/gm2/lang-specs.h:
* gm2/gm2/lang.opt:
* gm2/gm2/bnf/gm2l.bnf:
* gm2/gm2/bnf/gm2m.bnf:
* gm2/gm2/gm2-compiler/M2Options.def:
* gm2/gm2/gm2-compiler/M2Options.mod:
* gm2/gm2/gm2-compiler/M2Quads.mod:
* gm2/gm2/gm2-compiler/SymbolTable.mod:
* gm2/gm2/gm2-compiler/gm2.mod:
* gm2/gm2/gm2-compiler/gm2lcc.mod:
* gm2/gm2/gm2-compiler/ppg.mod: all changed to reflect moving
-W switches to -f switches as per gcc. Only using -W for
compile time warnings, -f for language features including
runtime checking.
2007-09-14 Gaius Mulley <gaius@gnu.org>
* www/index.ms: updated web pages to reflect 0.60 release
and availability of debian packages.
2007-08-14 Gaius Mulley <gaius@gnu.org>
* gm2/patches/gcc/4.1.2/02.gaius_rs6000_lang: new patch to
enable gm2 to build on the PS3 (ppc) based machines.
2007-08-08 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: fixes to enable avr cross compile to
build (use cross gcc and add -B./ when building libraries).
2007-07-23 Gaius Mulley <gaius@gnu.org>
* gm2/gccgm2.c: gccgm2_BuildSubrangeType switched over to using
the implementation of the subrange type as opposed to the base
INTEGER type.
* gm2/gm2-compiler/M2Quads.mod: CheckSubrange converts the
Exp into an INTEGER type before generating the range checking
quadruples. This in turn allows M2SubExp.mod to be built with
optimization. make gm2.paranoid with -O works against gcc-4.1.2.
2007-07-06 Gaius Mulley <gaius@gnu.org>
* added gm2/gm2-harness.
* gm2/Make-lang.in: added interactive debugging module
gm2/m2pp.o to link targets.
* gm2/gccgm2.c: rewritten pushdecl and friends and vastly
simplified and reduced the code. Modified all parameters
to use ANSI C rather than K&R C. Rewritten create
gccgm2_BuildStartFunctionCode and gccgm2_BuildEndFunctionCode.
Also ensured that all variables are added to the statement list
via DECL_EXPR and ensured that BIND_EXPR and BLOCKs are created
in exactly the same way as their C counterparts.
Fixed important bug in creating TREEs which represent parameters.
* gm2/m2pp.c: new interactive debugging module will print a GCC
tree using Modula-2 syntax.
* gm2/m2pp.h: prototype for the above.
* gm2/gm2-compiler/M2GCCDeclare.mod: unbounded types are now uniquely
created from their basic type. Improved debugging of unbounded type.
* gm2/gm2-compiler/M2GenGCC.mod: DoCopyString new function which is
used by CodeBecomes and CodeXIndr. Simplified CodeIndrX and CodeXIndr
in light of bugs fixed in gm2/gccgm2.c.
* gm2/gm2-compiler/M2Quads.mod: made the type following more accurate
during the construction of array arithmetic and indirection. This
in turn allows -O to be used in GCC's backend.
* gm2/gm2-compiler/SymbolTable.def: modified interface to unbounded
symbols.
* gm2/gm2-compiler/SymbolTable.def: implemented above.
* GM2 now builds when -O is suppled to stage2 or stage3.
* GM2 now builds with (a patched) gcc-4.1.2
2007-05-28 Gaius Mulley <gaius@gnu.org>
* gm2-compiler/M2Quads.mod: replaced PutVarTypeAndSize with
PutLeftValueFrontBackType.
* gm2-compiler/SymbolTable.mod: implemented
PutLeftValueFrontBackType and GetLeftValueFrontBackType.
* gm2/gm2-compiler/M2GCCDeclare.mod: rationalised variable
creation by introducing function: DoVariableDeclaration.
All variables are created via this function.
Use GetLeftValueFrontBackType.
2007-05-18 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: removed -O for paranoid
2007-05-11 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: added -O for paranoid
* gm2/gccgm2.c:
* gm2/gm2-compiler/M2Base.def: removed generic Unbounded type
* gm2/gm2-compiler/M2Base.mod: removed generic Unbounded type
creation.
* gm2/gm2-compiler/M2Code.mod: tidied up comments and semicolon.
* gm2/gm2-compiler/M2GCCDeclare.def: export DeclareParameters.
* gm2/gm2-compiler/M2GCCDeclare.mod: implement
DeclareParameters and new unbounded type mechanism.
* gm2/gm2-compiler/M2GenGCC.mod: modified references
to unbounded fields. Fixed two major optimization bugs
in CodeXIndr and CodeIndrX pointer types
now use generic pointer types when building indirect GCC
trees.
* gm2/gm2-compiler/M2Quads: now create a specific unbounded type
rather than cast to a generic unbounded record. Again this fixes
bugs in Tree construction which were exposed by the back end
when -O was enabled.
* gm2/gm2-compiler/SymbolTable.def: declared Unbounded record and
field operators.
* gm2/gm2-compiler/SymbolTable.mod: implement Unbounded record and
field operators.
2007-04-25 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-libs: regenerated configure
2007-02-16 Gaius Mulley <gaius@gnu.org>
* gm2/bnf/gm2m.bnf: fixed string deallocation bug.
* gm2/gm2-libs-pim/FileSystem.{def,mod}: exported Reset
and fixed filename and string conversion.
2007-02-07 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2GCCDeclare.mod: added FindOuterModule
to determine whether a symbol should be declared in the
GCC global scope.
* fixes ulm library building problem introduced by the previous
interim checkin.
2007-02-06 Gaius Mulley <gaius@gnu.org>
* interim checkin, due to optimization fixes.
* gm2/gccgm2.c: changes to the way variables are declared.
Removed calls to expand_decl.
* gm2-compiler/M2GCCDeclare.mod: passes boolean to
DeclareKnownVariable indicating whether the variable was
declared in the outer global scope.
2007-01-26 Gaius Mulley <gaius@gnu.org>
* gm2/gccgm2.c: mark_function_addresses_referenced added.
* gm2/gccgm2.c: gccgm2_MarkFunctionReferenced added.
* gm2/gccgm2.c: gccgm2_SetFlagUnitAtATime added.
* gm2/gm2-compiler/M2Code.mod: MarkExported used.
* gm2-compiler/M2GCCDeclare.def: MakeExported defined.
* gm2-compiler/M2GCCDeclare.mod: MakeExported added.
* gm2/gm2-compiler/gccgm2.def: SetFlagUnitAtATime,
MarkFunctionReferenced, defined.
2007-01-19 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-libs-pim/FileSystem.mod: added.
* gm2/Make-lang.in: introduced GM2_O_S3 variable so that
optimization can be introduced into stage3 only.
* gm2/gccgm2.c: added gccgm2_FinishBackend.
* gm2/gm2-compiler/M2Code.mod: use gccgm2_FinishBackend.
2007-01-18 Gaius Mulley <gaius@gnu.org>
* gm2/gccgm2.c: use gm2_mark_addressable rather than
the TREE_ADDRESSABLE macro for consistency.
2007-01-05 Gaius Mulley <gaius@gnu.org>
* gm2/Make-file.in: added FileSystem.mod to the gm2-libs-pim
set of libraries.
* gm2/TODO: removed FileSystem.mod from the list
* gm2/gm2-compiler/P1SymBuild.mod: added error message
* gm2/gm2-libs/FIO.mod: fixed copyright message
* gm2/gm2-libs/M2RTS.def: fixed typo.
* gm2/gm2-libs/libc.def: added rename function.
* gm2/gm2-libs/wrapc.def: modified filesize so that it modifies
two unsigned ints as the size, rather than return a long unsigned.
* gm2/gm2/gm2-libs-ch/libc.c: added unlink function.
* gm2/gm2/gm2-libs-ch/wrapc.c: implemented filesize.
* gm2/gm2/gm2-libs-pim/FileSystem.def: improved comments and added
more file state to the File record.

1994
gcc/m2/ChangeLog-2008 Normal file

File diff suppressed because it is too large Load Diff

1720
gcc/m2/ChangeLog-2009 Normal file

File diff suppressed because it is too large Load Diff

3680
gcc/m2/ChangeLog-2010 Normal file

File diff suppressed because it is too large Load Diff

493
gcc/m2/ChangeLog-2011 Normal file
View File

@ -0,0 +1,493 @@
2011-12-01 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: added ServerSocket.mod to be compiled and
installed in the iso library.
* gm2/gm2-libs-iso/ServerSocket.c: added dummy return value so
that this incomplete module compiles.
2011-11-30 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/SymbolTable.mod: fixed a poor error message
bug reported by <doug@dougtelford.com>. Arrays are now checked
for a correct subscript type before M2GCCDeclare is called.
2011-11-18 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2Range.mod: removed calls to FlushErrors
to allow the compiler to issue many more error messages before
exiting.
2011-11-16 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2CaseList.def: add TypeCaseBounds to the
definition module.
* gm2/gm2-compiler/M2CaseList.mod: GetVariantTagType, checkTypes,
inRange, TypeCaseBounds (New procedure functions). Check to
see that case bounds are of the correct type.
* gm2/gm2-compiler/M2MetaError.mod: fix internal error message.
* gm2/gm2-compiler/M2Options.def: new boolean VariantValueChecking
which is set if -fiso is used. FinaliseOptions new procedure.
* gm2/gm2-compiler/M2Quads.mod: reverse PopT(r1) and PopT(r2)
to correct range bug.
* gm2/gm2-compiler/M2Range.mod: only check missing values
in variant record case bounds if VariantValueChecking is enabled.
We always check for overlapping bounds.
* testsuite/gm2/pim/fail/variant.mod: new file.
* testsuite/gm2/pim/fail/variant2.mod: new file.
* testsuite/gm2/pim/fail/variant3.mod: new file.
2011-11-08 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: altered bnf rules to depend upon
gm2/pge$(exeext).
* gm2/bnf/m2-c.bnf: reimplemented Qualident and PushQualident
to fix a bug reported by Alexandr Simon:
<http://lists.gnu.org/archive/html/gm2/2011-04/msg00002.html>
2011-11-07 Gaius Mulley <gaius@gnu.org>
* gm2/gccgm2.c: BuildCall2, BuildCall3 (New functions).
* gm2/gm2.texi: document the new command line switch
-fdebug-builtins.
* gm2/lang.opt: define -fdebug-builtins.
* gm2/gm2-compiler/M2Base.mod: InitBuiltins (New procedure).
* gm2/gm2-compiler/M2Batch.def: Tidied up spacing.
* gm2/gm2-compiler/M2GenGCC.mod: implemented MaybeDebugBuiltinAlloca,
MaybeDebugBuiltinMemcpy and call then instead of BuiltinAlloca,
BuiltinMemcpy. Modified CanUseBuiltin to return FALSE if
DebugBuiltins is TRUE.
* gm2/gm2-compiler/M2Options.def: DebugBuiltins new boolean flag.
* gm2/gm2-compiler/M2Options.mod: set DebugBuiltins if -fdebug-builtins
is present.
* gm2/gm2-compiler/gccgm2.def: define BuildCall2, BuildCall3.
* gm2/gm2-libs/Builtins.def: alloca_trace (New procedure function).
* gm2/gm2-libs/Builtins.mod: tidied up comment and implemented
alloca_trace.
* gm2/gm2-compiler/M2GenGCC.mod: fixed GetSizeOfHighFromUnbounded
bug reported by John O Goyo
<http://lists.gnu.org/archive/html/gm2/2011-11/msg00004.html>
and Martin Kalbfuß
<http://lists.gnu.org/archive/html/gm2/2011-10/msg00023.html>.
2011-10-29 Gaius Mulley <gaius@gnu.org>
* gm2/gccgm2.c: gccgm2_BuildAddr call gm2_mark_addressable.
* gm2/gccgm2.c: gccgm2_BuildComponentRef, convertToSizeT
(New functions).
* gm2/gm2builtins.c: gm2builtins_BuiltInAlloca call convertToSizeT.
* gm2/gm2-compiler/M2GenGCC.mod: use gccgm2_BuildComponentRef
to access high and address fields within unbounded records.
This fixes a bug reported by Scott Iverson which has been
expressed as testsuite/gm2/pim/run/pass/passparam.mod and
testsuite/gm2/pim/run/pass/passparam2.mod. Manifested
itself when attempting to take the address of a parameter.
This does not work with -O2 as parameters are passed in
registers on some architectures (x86_64). These changes
introduce no new regression test failures.
2011-10-26 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: added LMathLib0.def LegacyReal.def
MemUtils.def to the list of GM2-LIBS-DEFS and
LMathLib0.mod LegacyReal.mod MemUtils.mod to
GM2-LIBS-MODS. This corrects a bug reported by
Steve Giess.
2011-10-25 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2GCCDeclare.mod: added debugging
and also fixed a bug reported by Scott Iverson.
(non-free/scott-iverson/test25/fail/WinShell.mod).
* gm2/gm2-compiler/M2Quads.mod: added error checking
to detect a nul typed constructor.
* gm2/gm2-compiler/Sets.mod: added internal debugging.
2011-10-04 Gaius Mulley <gaius@gnu.org>
* gm2/version.c: updated to 1.0.5
* gm2/gm2-libs/config-host.in: updated to 1.0.5.
* gm2/gm2-libs/config-target.in: updated to 1.0.5
2011-10-02 Gaius Mulley <gaius@gnu.org>
* tagged GM2 gcc_4_1_2_gm2_1_0_4_0 post checkin.
2011-09-30 Gaius Mulley <gaius@gnu.org>
* released GM2 1.0.4
* tagged with: gcc_4_1_2_gm2_1_0_4 prior checkin.
* gm2/version.c: updated to 1.0.4
* gm2/gm2-libs/config-host: rebuilt.
* gm2/gm2-libs/config-host.in: updated to 1.0.4.
* gm2/gm2-libs/config-target: rebuilt.
* gm2/gm2-libs/config-target.in: updated to 1.0.4
2011-07-28 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: add dependencies for the constuction of
gm2/gm2-libs.texi.
2011-07-27 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2Base.mod: allow a dataType to be
passed to ARRAY OF dataType. Bug fix for:
testsuite/gm2/pim/pass/charstring.mod.
* gm2/version.c: updated to 1.0.3
* gm2/gm2-libs/config-host: rebuilt.
* gm2/gm2-libs/config-host.in: updated to 1.0.3.
* gm2/gm2-libs/config-target: rebuilt.
* gm2/gm2-libs/config-target.in: updated to 1.0.3.
2011-07-26 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2ALU.mod: allow constant array strings
to be created with const chars. Bug fix for:
testsuite/gm2/iso/pass/constchar.mod.
* gm2/gm2-compiler/M2ALU.mod: fixed obvious bugs to previous
patch.
2011-07-25 Gaius Mulley <gaius@gnu.org>
* gm2/gm2.texi: corrected typo in the documentation.
2011-07-15 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-libs-iso/StdChans.mod: allow raw operators on
stdin, stdout and stderr. Bug fix to an error reported
by Scott Iverson
(http://lists.gnu.org/archive/html/gm2/2011-07/msg00003.html).
2011-07-07 Gaius Mulley <gaius@gnu.org>
* gm2/gm2.texi: improved the Extended Asm section and changed
the example for the x86_64 processor.
2011-07-05 Gaius Mulley <gaius@gnu.org>
* gm2/gccgm2.c: BuildAsm now has an extra parameter (isSimple).
Also call resolve_asm_operand_names.
* gm2/bnf/m2-2.bnf: parse full GNU asm syntax (including
operand names).
* gm2/bnf/m2-3.bnf: implement full GNU asm syntax (including
operand names). Record all asm operand names, specifiers
and trash lists. Also record whether it was a simple kind.
* gm2/bnf/m2-c.bnf: parse full GNU asm syntax (including
operand names).
* gm2/bnf/m2-h.bnf: parse full GNU asm syntax (including
operand names).
* gm2/bnf/m2.bnf: parse full GNU asm syntax (including
operand names).
* gm2/gm2-compiler/M2GenGCC.mod: correct generation of
input, output and trash values for the asm operands.
* gm2/gm2-compiler/SymbolTable.def: New procedures
(PutGnuAsmSimple) and (IsGnuAsmSimple). Added extra
parameter to (GetRegInterface).
* gm2/gm2-compiler/SymbolTable.mod: Implemented new procedures
(PutGnuAsmSimple) and (IsGnuAsmSimple). Added extra
parameter to (GetRegInterface) to correct a bug.
* gm2/gm2-compiler/gccgm2.def: modified declaration of
(BuildAsm) to include an extra parameter, IsSimple.
* These fixes allow GNU ASM syntax to behave in exactly
the same way as the other GCC front ends.
2011-07-01 Gaius Mulley <gaius@gnu.org>
* gm2/gccgm2.c: modified gccgm2_ChainOnParamValue to contain a
name, str and value.
* gm2/bnf/m2-3.bnf: many fixes in AsmList, AsmOperands, TrashList
with respect to interface sym and gnuasm sym.
* gm2/gm2-compiler/M2GenGCC.mod: call BuildTreeFromInterface
instead of BuildTrashTreeFromInterface.
* gm2/gm2-compiler/SymbolTable.def: fix GetRegInterface so that
NulSym are returned in string and object if i exceeds number of
parameters.
* gm2/gm2-compiler/gccgm2.def: changed definition of
ChainOnParamValue.
2011-06-29 Gaius Mulley <gaius@gnu.org>
* gm2/bnf/m2-3.bnf: maintain a count of the number of asm operands
in both the AsmElement and TrashList.
* gm2/gm2-compiler/SymbolTable.def: PutRegInterface, GetRegInterface
now specify which parameter number they are manipulating.
* gm2/gm2-compiler/SymbolTable.def: modified the implementation of
PutRegInterface, GetRegInterface to use dynamic array Indexing rather
than the List.
2011-06-28 Gaius Mulley <gaius@gnu.org>
* gm2/gm2spec.c: modified default libraries to iso,pim if -fiso is
used. Fixes a bug reported by Scott Iverson
(http://lists.gnu.org/archive/html/gm2/2011-06/msg00026.html).
2011-06-22 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: specify source and build directories to def2texi.py.
* gm2/gm2.texi: modified to document the new behaviour of specifying
library ordering.
* gm2/gm2spec.c: default library is 'pim'. Large number of changes
which remove the implicit ordering of library search paths in favour
of users specifying the explicit order via -flibs=pim,iso,ulm etc.
* gm2/lang.opt: -flibs= takes a number of Joined arguments.
* gm2/examples/hello/Makefile.in: removed -fno-exceptions from the
command line build.
* fixes a bug reported by Scott Iverson
(http://lists.gnu.org/archive/html/gm2/2011-06/msg00002.html).
* gm2/gm2-libs-iso/README.texi: corrected status of copyright and
implementation modules. Removed all information about incomplete
modules.
* gm2/tools-src/def2texi.py: fixed bug in building the www pages
by adding an option to specify the build and source directory.
2011-06-15 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/PCSymBuild.mod: fixed bug in deduceTypes
so that binary constant expressions can correctly identify
their types. Fixes a bug report by Scott Iverson.
2011-06-13 Gaius Mulley <gaius@gnu.org>
* gm2/gccgm2.c: gccgm2_GetArrayNoOfElements (New function).
* gm2/gm2-compiler/M2GenGCC.mod: checkArrayElements (New
procedure function). CodeBecomes modified to call
checkArrayElements to test whether assigned arrays contain
the same number of elements.
* gm2/gm2-compiler/M2Quads.mod: CheckBecomesMeta tidied up
error messages and added extra check to ensure that
we are not assigning from an unbounded array.
* gm2/gccgm2.def: export GetArrayNoOfElements.
Fixes a bug reported by Scott Iverson.
2011-06-11 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2ALU.mod: added a limit check to SetNegate
which fixes a bug reported by Scott Iverson
(http://lists.gnu.org/archive/html/gm2/2011-06/msg00001.html).
2011-06-10 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2Quads.mod: modified CheckNotConstAndVar
to CheckBecomesMeta so that it also checks that we are
not assigning to a unbounded array. Fixes a bug reported
by Scott Iverson
(http://lists.gnu.org/archive/html/gm2/2011-06/msg00010.html).
2011-05-04 Gaius Mulley <gaius@gnu.org>
* gm2: tagged with gcc_4_1_2_0
* gm2: created branch using "cvs tag -r gcc_4_1_2_0 -b gcc_4_1_2_gm2"
* testsuite: tagged with gcc_4_1_2_0
* testsuite: created branch using "cvs tag -r gcc_4_1_2_0 -b gcc_4_1_2_gm2"
2011-04-27 Gaius Mulley <gaius@gnu.org>
* patches/gcc/4.1.2/01-patches: corrected bug in patch.
* gm2/gm2-compiler/M2Quads.mod: fixed bug reported by
John O Goyo
(http://lists.nongnu.org/archive/html/gm2/2011-04/msg00031.html).
2011-04-22 Gaius Mulley <gaius@gnu.org>
* patches/gcc/4.1.2/ChangeLog: New file.
* patches/gcc/4.1.2/01-patches: New file.
These patches have been regenerated and rationalised. They
have also been regression tested against the C and C++
regression tests. Both these sets of regression tests are
unaffected by these patches.
2011-04-09 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: modified to build O2 versions of gm2-libs-min.
2011-04-06 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: modified to allow gm2 to coexist with
gcc as the linker support rather than g++. Useful for
embedded targets which don't yet support g++. Separated
target from host when building libraries and use separate
configure scripts for both.
* gm2/README: removed warning about development code.
* gm2/config-lang.in: added gm2lorder.
* gm2/gm2.texi: updated documentation to reflect release 1.0.
Corrected statements such as GNU Modula-2 is fully ISO
compliant.
* gm2/gm2spec.c: only include -lstdc++ if -fno-exceptions is
not present.
* gm2/gm2-libs/README.texi: tidied up dates.
* gm2/gm2-libs-iso/README.texi: corrected status of modules
given release of 1.0.
* gm2/gm2-libs-iso/Strings.mod: fixed performance bug reported
by Scott Iverson
(http://lists.nongnu.org/archive/html/gm2/2011-03/msg00035.html).
* gm2/p2c/p2c.h: test BUILD_GM2_LIBS_TARGET and include appropriate
configure header.
* gm2/tools-src/makeversion: added another consistency test.
* gm2/gm2-libs/config-host.in: new file.
* gm2/gm2-libs/config-target.in: new file.
* gm2/gm2-libs/configure: removed.
* gm2/gm2-libs/configure.in: removed.
* gm2/gm2-libs/config-host: new file.
* gm2/gm2-libs/config-target: new file.
* gm2/gm2-libs/gm2-libs-target.h.in: new file.
2011-02-24 Gaius Mulley <gaius@gnu.org>
* gm2/gm2.texi: changed lenny to squeeze in repository
definitions.
2011-02-23 Gaius Mulley <gaius@gnu.org>
* gm2/www/tools/texi2tr/src/texi2tr.py: implemented
section alphabetically sorted index. Also implemented
@ifhtml.
2011-02-22 Gaius Mulley <gaius@gnu.org>
* www/tools/texi2tr/src/outputdev.py: added no_tag so
table elements can easily be added - fixes a bug
with enumerate.
* gm2/www/tools/texi2tr/src/texi2tr.py: fixed pushSpecifier
and fixed 'enum' with 'enumerate'. Enumerations work
for integer and alphabetical values.
2011-02-19 Gaius Mulley <gaius@gnu.org>
* gm2/gm2spec.c: ensure that the prev
value is reset before each include path is added.
* gm2/examples/gravity/Makefile.in: changed python version
and fixed exec prefix.
2011-02-18 Gaius Mulley <gaius@gnu.org>
* gm2/gm2.texi: changed node About to Overview.
* gm2/www/tools/texi2tr/src: added function index.
2011-02-17 Gaius Mulley <gaius@gnu.org>
* gm2/gm2.texi: many bug fixes to nodes.
* gm2/www/tools/texi2tr: added html, png subdirs.
* gm2/www/tools/texi2tr/src: many bug fixes applied.
2011-02-15 Gaius Mulley <gaius@gnu.org>
* gm2/gm2.texi: incorporated the contents of the
web page gm2/www/index.ms into gm2.texi.
2011-02-10 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: modified gm2.html rule.
* gm2/gm2.texi: changed Function Index to Indices.
* gm2/examples/texi2tr/src/outputdev.py: added
templatePath.
* gm2/examples/texi2tr/src/texi2tr.py: added
rootName, templatePath, baseName options.
* gm2/www/Makefile.in: new building instructions
for the web site now that texi2tr is useable.
* gm2/www/index.ms: minor changes.
2011-02-09 Gaius Mulley <gaius@gnu.org>
* texi2tr is now able to translate the gm2.texi
into html. First usable version.
* gm2/examples/texi2tr/src/config.py: many changes.
* gm2/examples/texi2tr/src/outputdev.py: many changes.
* gm2/examples/texi2tr/src/navigate.py: many changes.
* gm2/examples/texi2tr/src/texi2tr.py: many changes.
2011-02-04 Gaius Mulley <gaius@gnu.org>
* gm2/examples/texi2tr: new directory.
* gm2/examples/texi2tr/src: new directory.
* gm2/examples/texi2tr/src/config.py: new file.
* gm2/examples/texi2tr/src/outputdev.py: new file.
* gm2/examples/texi2tr/src/navigate.py: new file.
* gm2/examples/texi2tr/src/texi2tr.py: new file.
2011-01-30 Gaius Mulley <gaius@gnu.org>
* gm2/gm2.texi: fixed some typos and corrected the
python version number. Also foxed some texinfo variable
references.
* gm2/gm2/gm2spec.c: tided up code. Also modified the
driver to add easily maintainable ordered lists of
object paths and library paths.
* gm2/el/g-mode.el: updated the dates.
* gm2/gm2/Make-lang.in: use the new tool texi2tr to
generate the html documentation which is currently
under development.
2011-01-22 Gaius Mulley <gaius@gnu.org>
* fixed a bug reported by Steve Giess.
* testsuite/gm2/pim/pass/constcast.mod: New file.
* testsuite/gm2/pim/pass/constmax.mod: New file.
* gm2/gm2-compiler/PCSymBuild.mod: WalkLeaf detect
if the symbol is a type in which case copy the
type rather than get the type of a type.
2011-01-14 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: modified the stage2 and Modula-2
library objects built from C sources to use XGCC.
Define XGCC to the locally built ./xgcc -B./
This allows gm2 to build under Darwin OS X
Snow Leopard.
2011-01-12 Gaius Mulley <gaius@gnu.org>
* released version 1.0.1 of gm2.
* gm2/version.c: updated to version 1.0.1
* gm2/www/index.ms: updated news of 1.0.1 release.
* gm2/gm2-libs/configure.in: updated to 1.0.1
* gm2/gm2-libs/configure: rebuilt.
* gm2/configure: rebuilt.
2011-01-11 Gaius Mulley <gaius@gnu.org>
* fixed many bug reported by
Dragiša Durić (dragisa-duric/testcase20).
* gm2/gm2-compiler/SymbolTable.mod: new procedure
SanityCheckConstants which checks to see types
are used in formal parameters.
* gm2/gm2-compiler/SymbolTable.def: export new procedure
SanityCheckConstants.
* gm2/gm2-compiler/M2Comp.mod: call SanityCheckConstants
after Pass C.
* gm2/gm2-compiler/M2Quads.mod: skip types in CheckParameters
* gm2/gm2-compiler/M2MetaError.def: add ebnf comments.
2011-01-10 Gaius Mulley <gaius@gnu.org>
* fixed many constant type related bugs reported by
Dragiša Durić (dragisa-duric/testcase18 and
dragisa-duric/testcase19).
* gm2/Make-lang.in: modified texi2html build rule.
* gm2/bnf/m2-c.bnf: major number of changes to incorporate
parsing const expressions to deduce their types.
* gm2/gm2-compiler/M2Base.mod: added return types to the
builtin procedure functions so that if they are used in
constant expressions m2-c can determine their types.
* gm2/gm2-compiler/M2Comp.mod: ResolveConstType is now
exported from PCSymBuild rather than P2SymBuild.
* gm2/gm2-compiler/M2GenGCC.mod: allow procedures to be
assigned to constants.
* gm2/gm2-compiler/M2Quads.def: export new procedure
function Top.
* gm2/gm2-compiler/M2Quads.mod: implement new procedure
function Top.
* gm2/gm2-compiler/M2StackAddress.mod: fixed bug in
M2StackAddress.NoOfItemsInStackAddress.
* gm2/gm2-compiler/M2StackWord.mod: fixed same bug in
M2StackWord.NoOfItemsInStackAddress.
* gm2/gm2-compiler/P2SymBuild.def: removed many of the
constant type resolution procedures and moved them to
PCSymBuild.
* gm2/gm2-compiler/PCSymBuild.def: export many constant
type related procedures.
* gm2/gm2-compiler/PCSymBuild.mod: major reimplementation
to allow constant expression trees to be built so that
types can be deduced.
* gm2/init/gm2-gccinit: added new M2Const.
* gm2/www/index.ms: web page now contains info relating
to release 1.0.

310
gcc/m2/ChangeLog-2012 Normal file
View File

@ -0,0 +1,310 @@
2012-12-10 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-libs-pim/Random.mod: fixed bug in RandomLongReal
report by Steve Giess. Incorrect data type was used which
caused a NaN to be generated.
2012-12-08 Gaius Mulley <gaius@gnu.org>
* gm2/examples/gravity/twoDsim.mod: (added semicolon).
* gm2/gm2-libs-pim/InOut.def: improved comment to
OpenOutput.
* gm2/gm2-libs-pim/InOut.mod: fixed so that the file
can only be written to if it does not already exist.
2012-12-03 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-libs-iso/RandomNumber.def: (added file).
* gm2/gm2-libs-iso/RandomNumber.mod: (added file).
2012-11-26 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-libs-pim/Random.def: fixed declaration of
RandomBytes to use VAR parameter.
* gm2/gm2-libs-pim/Random.mod: fixed declaration of
RandomBytes to use VAR parameter. Also improved
implementation of RandomReal and RandomLongReal.
* gm2/gm2-libs-iso/RandomNumber.def: (New module).
* gm2/gm2-libs-iso/RandomNumber.mod: (New module).
* gm2/Make-lang.in: add RandomNumber.mod to the list
of ISO modules.
* gm2/gm2-libs-iso/RandomNumber.def: Fixed description.
2012-11-21 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-libs-pim/Random.def: export RandomLongReal and
RandomBytes. Fixes a bug reported by Steve Giess.
2012-09-19 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/SymbolTable.mod: bug fix to fix up all
unbounded parameter types if they are produced via partial
unbounded symbols. Fixes a bug exposed by macroObjects.mod
in a new example directory.
2012-06-28 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2GenGCC.mod: CodeAddr can now obtain the
address of CHAR constants. Fixes a bug reported by Scott
Iverson.
* gm2/gm2-compiler/M2GenGCC.mod: corrected CodeAddr to ensure
that the address of a char is only converted into address of
a string for constants.
2012-05-04 Gaius Mulley <gaius@gnu.org>
* gm2/gm2spec.c: detect -fonlylink. Ensure that -fonlylink is
present on the command line if -fmakeall is used. Otherwise
the driver will compile and link the main module object together
with the main module compiled via the make. Fixes a bug reported
by Scott Iverson, linking a shared library.
2012-05-03 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2GenGCC.mod: (BinaryOperands) New procedure function.
Used by FoldAdd, CodeAdd, FoldSub, CodeSub, FoldMult, CodeMult,
FoldDivTrunc, CodeDivTrunc, FoldModFloor, CodeModFloor.
2012-05-02 Gaius Mulley <gaius@gnu.org>
* gm2/gccgm2.c: (convert_for_comparison) New function.
gccgm2_BuildEqualTo, gccgm2_BuildNotEqualTo use
convert_for_comparison. This fixes comparison between a
WORD operand. Bug reported by Scott Iverson.
* gm2/gccgm2.c: applied fix for all WORD sizes.
2012-05-01 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2GenGCC.mod: (CodeStandardFunction) implement
TBITSIZE. (FoldStandardFunction) implement TBITSIZE.
* gm2/gm2-compiler/M2Quads.mod: (BuildTBitSizeFunction) New
procedure function.
* gm2/gm2-compiler/M2System.def: (TBitSize) define and export.
Tidied up formatting (sym used instead of Sym).
* gm2/gm2-compiler/M2System.mod: initialise TBitSize.
Tidied up formatting (sym used instead of Sym).
(IsPseudoSystemFunction) includes TBitSize.
2012-04-30 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2GCCDeclare.mod: (BuildRecord) fixed bit
field calculation.
2012-04-28 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2Range.mod: (firstmention) New field
in Range. (FirstMention) New procedure function.
FoldTypeAssign, FoldTypeParam, FoldTypeExpr, CodeTypeAssign,
CodeTypeParam, CodeTypeExpr call FirstMention before
emitting an error message. Multiple related messages have
been chained. This fixes a bug report by Scott Iverson
(duplicate error messages).
* gm2/Make-lang.in: tidied up formatting and added a commented
out short cut used during development.
* gm2/gccgm2.c: tidied up formatting of gccgm2_GetSizeOf.
gccgm2_GetSizeOf now detects COMPONENT_REF.
gccgm2_GetSizeOfInBits now detects COMPONENT_REF.
* gm2/gm2.texi: added new example of how bit field packing
can be achieved.
* gm2/bnf/m2-3.bnf: removed call to dummy
CheckOuterScopeProcedureVariable procedure.
* gm2/bnf/m2-h.bnf: removed import CheckOuterScopeProcedureVariable.
* gm2/gm2-compiler/M2GCCDeclare.mod: (WalkComponentDependants)
New procedure. (IsValueDeendants) New procedure function.
* gm2/gm2-compiler/M2GenGCC.mod: (FoldRecordField, CodeRecordField)
New procedures. CodeUnbounded simplified.
* gm2/gm2-compiler/M2Quads.def: Removed
CheckOuterScopeProcedureVariable.
* gm2/gm2-compiler/M2Quads.mod: many changes to allow
record accesses to be achieved via the GCC Tree
COMPONENT_REF. To this end we use a front end symbol
component which mirrors the eventual GCC Tree.
BuildAdrFunction altered to obtain the address of
Components and the WITH statement has been rewritten.
(CheckOuterScopeProcedureVariable) removed.
New quadruple operator RecordFieldOp introduced to
generate components. All unbounded accesses use the
new component record mechanism.
* gm2/gm2-compiler/SymbolTable.def: (MakeComponentRecord),
(MakeComponentRef), (IsComponent) New procedure functions.
* gm2/gm2-compiler/SymbolTable.mod: (MakeComponentRecord),
(MakeComponentRef), (IsComponent), (GetNthFromComponent),
(buildTemporary). MakeTemporary use buildTemporary.
New procedure functions.
2012-04-11 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2GCCDeclare.mod: (DeclarePackedSet) New
procedure.
* gm2/gm2-compiler/SymbolTable.mod: (MakeSet) creates an
equivalent packedInfo placeholder. (MakeEquivalent)
and (GetPackedEquivalent) modified to handle set type.
2012-04-07 Gaius Mulley <gaius@gnu.org>
* gm2/gccgm2.c: (calcNbits) New function.
* gm2/m2pp.c: (ptc), (m2pp_getaligned),
(m2pp_recordfield_alignment) New functions.
* gm2/gm2-compiler/M2GCCDeclare.mod: fixes to DeclarePackedType.
* gm2/gm2-compiler/P2SymBuild.mod: fixes to HandleRecordFieldPragmas.
* gm2/gm2-compiler/SymbolTable.mod: fixes to
GetDefaultRecordFieldAlignment.
2012-03-27 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2GCCDeclare.mod: added missing RETURN
statement.
* gm2/examples/gravity/twoDsim.mod: added debugging procedure
to display the definition of the polygon.
2012-03-17 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/SymbolTable.mod: record when an unknown
symbol is reported and ensure that we only report unknown
symbols once. Fixes a bug reported by Scott Iverson.
Procedure UnknownSymbolError uses IsUnreportedUnknown and
populates ReportedUnknowns whenever an error message is
generated. New procedure function (IsUnreportedUnknown).
* gm2/gm2-compiler/M2GCCDeclare.mod: renamed MaybePackField
by MakebeAlignField.
* gm2/gm2-compiler/SymbolTable.mod: GetAlignment modified
to return the alignment of Varient and VarientFields.
2012-02-23 Gaius Mulley <gaius@gnu.org>
* gm2/gccgm2.c: (gccgm2_BuildStartFieldVarient,
gccgm2_BuildEndFieldVarient) New functions.
* gm2/m2pp.c: detect FIELD_DECL in m2pp_type.
* gm2/gm2-compiler/M2GCCDeclare.mod: use
BuildStartFieldVarient rather than BuildStartVarient.
Use BuildEndFieldVarient rather than BuildEndVarient.
This fixes a number of regression test bugs including:
testsuite/gm2/extensions/run/pass/align8.mod.
* gm2/gm2-compiler/gccgm2.def: define BuildStartFieldVarient
and BuildEndFieldVarient.
2012-02-15 Gaius Mulley <gaius@gnu.org>
* gm2/gccgm2.c: (gccgm2_BuildTBitSize) detect if TYPE_DECL is passed.
2012-02-14 Gaius Mulley <gaius@gnu.org>
The following changes are a change to the type declaration system
which is necessary to implement bit alignment of record fields.
* gm2/gm2-compiler/M2DebugStack.def: New file.
* gm2/gm2-compiler/M2DebugStack.mod: New file.
* gm2/Make-lang.in: tidied up the file and introduced a commented
rule which allows stage2 to be built from a prebuilt stage1. This
is only ever used during heavy development and allows debugging in
Modula-2 to occur rather than in the translated, C, files.
* gm2/gccgm2.c: gccgm2_BuildStartEnumeration, gccgm2_BuildEndRecord,
start_enum (new parameter ispacked). New functions
(gccgm2_SetTypePacked, gccgm2_SetDeclPacked,
gccgm2_GetPackedBooleanType, gccgm2_SetRecordFieldOffset,
gccgm2_GetTBitSize, noBitsRequired, gccgm2_BuildStartVarient,
gccgm2_BuildEndVarient, gccgm2_BuildSmallestTypeRange,
gccgm2_BuildTBitSize).
* gm2/lang.opt: introduce debugging option -fd.
* gm2/m2.flex: introduce <* *> into the set of lexical tokens.
* gm2/m2pp.c: pretty print union types and also whether records and their
fields are aligned, packed, offset values and addressible.
* gm2/bnf/gm2l.bnf: introduce <* *> into the set of lexical tokens.
* gm2/bnf/gm2m.bnf: introduce <* *> into the set of lexical tokens.
* gm2/bnf/m2-2.bnf: introduce <* *> into the set of lexical tokens.
extended the ebnf to include a default record alignment using pragmas.
Also extended the ebnf to include field alignment and packing using
pragmas.
* gm2/bnf/m2-3.bnf: introduce <* *> into the set of lexical tokens.
extended the ebnf to include a default record alignment using pragmas.
Also extended the ebnf to include field alignment and packing using
pragmas.
* gm2/bnf/m2-c.bnf: introduce <* *> into the set of lexical tokens.
extended the ebnf to include a default record alignment using pragmas.
Also extended the ebnf to include field alignment and packing using
pragmas.
* gm2/bnf/m2-h.bnf: introduce <* *> into the set of lexical tokens.
extended the ebnf to include a default record alignment using pragmas.
Also extended the ebnf to include field alignment and packing using
pragmas.
* gm2/bnf/m2.bnf: introduce <* *> into the set of lexical tokens.
extended the ebnf to include a default record alignment using pragmas.
Also extended the ebnf to include field alignment and packing using
pragmas.
* gm2/el/g-mode.el: removed PACKED as a keyword.
* gm2/gm2-compiler/M2GCCDeclare.mod: huge number of changes and
many aspects have been rewritten. The main changes occur from
delaying a records declaration into a GCC Tree until its alignment
is known. Varient records are also handled in this way. Much
debugging code added as well. Simple types can also be declared
as packed (Subranges, Boolean) and enumeration types.
* gm2/gm2-compiler/M2Quads.def: new procedures BuildBitLength,
BuildPragmaField, BuildDefaultFieldAlignment, OperandAnno,
Annotate).
* gm2/gm2-compiler/M2Quads.mod: implement all of the above.
Provide a useful internal debugging procedure function 'ds'
which display the quadruple stack.
* gm2/gm2-compiler/M2Reserved.def: add LDirectiveTok and
RDirectiveTok.
* gm2/gm2-compiler/M2Reserved.mod: implement above.
* gm2/gm2-compiler/P2SymBuild.def: new procedure functions
P2BuildDefaultFieldAlignment, BuildPragmaConst.
* gm2/gm2-compiler/P2SymBuild.mod: implement above.
* gm2/gm2-compiler/Sets.mod: no longer import BITSET from SYSTEM.
* gm2/gm2-compiler/SymbolTable.def: new procedures
(GetDefaultRecordFieldAlignment, PutDeclaredPacked,
IsDeclaredPacked, IsDeclaredPackedResolved,
GetPackedEquivalent, GetNonPackedEquivalent,
PutDefaultRecordFieldAlignment, PutUnused, IsUnused).
* gm2/gm2-compiler/SymbolTable.mod: implement above.
* gm2/gm2-compiler/gccgm2.def: remove procedure function
BuildStartVarientRecord and add procedure functions
BuildStartVarient, BuildEndVarient, BuildSmallestTypeRange,
GetPackedBooleanType, SetDeclPacked, SetTypePacked,
SetRecordFieldOffset, BuildTBitSize.
* gm2/gm2-compiler/ppg.mod: remove BITSET from SYSTEM
import list.
* gm2/gm2-libs-iso/SYSTEM.def: define new builtin procedure
function TBITSIZE.
2012-02-05 Gaius Mulley <gaius@gnu.org>
* gm2/gccgm2.c: fixed bug reported by Scott Iverson.
The bug occurred when a procedure was used in a constructor.
The solution is to take the address of the FUNCTION_DECL.
2012-01-13 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2GCCDeclare.mod: declare procedures in
topological order with constants and types. This fixes a bug
reported by Scott Iverson.
2012-01-12 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/Indexing.mod: removed import of BITSET from SYSTEM.
* gm2/gm2-compiler/M2Base.mod: BITSET is now declared as a pervasive
type.
* gm2/gm2-compiler/M2Error.mod: removed import of BITSET from SYSTEM.
* gm2/gm2-compiler/M2Printf.mod: removed import of BITSET from SYSTEM.
* gm2/gm2-compiler/M2System.mod: removed BITSET from being declared.
* gm2/gm2-libs/SYSTEM.def: removed BITSET from export list.
* gm2/gm2-libs-min/SYSTEM.def: removed BITSET from export list.
* gm2/gm2-libs-coroutines/SYSTEM.def: removed BITSET from export list.
* gm2/gm2-libs/Indexing.mod: BITSET is now a pervasive type.
* gm2/gm2-libs/M2RTS.mod: BITSET is now a pervasive type.
* gm2/gm2.texi: added new section on packed records and also BITSET
is no longer exported from SYSTEM but is a pervasive type.
* gm2/ulm-lib-gm2/std/M2RTS.mod: no longer import BITSET.
* gm2/ulm-lib-gm2/std/MathLib.mod: no longer import BITSET.
* gm2/ulm-lib-gm2/std/Plot.mod: no longer import BITSET.
* gm2/ulm-lib-gm2/sys/SYSTEM.def: no longer export BITSET.
* gm2/ulm-lib-gm2/sys/SysStat.def: no longer import BITSET.
* gm2/ulm-lib-gm2/sys/SysStat.mod: no longer import BITSET.
* gm2/ulm-lib-gm2/std/Archive.def: no longer import BITSET.
* gm2/ulm-lib-gm2/sys/SysIoctl.def: no longer import BITSET.
* gm2/gm2-libs-pim/BitBlockOps.mod: no longer import BITSET.
* gm2/gm2-libs-pim/BitBlockOps.mod: no longer import BITSET.
* gm2/gm2-libs-pim/BitByteOps.mod: no longer import BITSET.
* gm2/gm2-libs-pim/BitWordOps.mod: no longer import BITSET.
* gm2/gm2/examples/map/AdvMap.def: no longer import BITSET.

810
gcc/m2/ChangeLog-2013 Normal file
View File

@ -0,0 +1,810 @@
2013-12-25 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2GCCDeclare.mod: PushNoOfBits (New
procedure). DeclareLargeSet use PushNoOfBits.
* gm2/gm2-compiler/SymbolKey.def: import WORD from SYSTEM.
2013-12-24 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-gcc/m2convert.c: doOrdinal (New function).
m2convert_BuildConvert call doOrdinal is value
is a STRING_CST and its length <= 1. Refactor
type computation.
* gm2/gm2-gcc/m2statement.c:
m2statement_BuildUnaryForeachWordDo remove p1, p2
pointer calculations and use m2treelib_get_set_field_rhs
and m2treelib_get_set_field_des instead.
m2statement_BuildExcludeVarConst remove p1 and use
m2treelib_get_set_field_des and m2treelib_get_set_field_rhs
instead. m2statement_BuildIncludeVarConst use
m2treelib_get_set_field_des instead of
m2treelib_get_set_field_rhs.
2013-12-20 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-gcc/m2builtins.c: (builtin_function) use
add_builtin_function and set source line appropriately.
2013-12-11 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-libs-coroutines/SYSTEM.def: added commented
internal procedure function definitions.
* gm2/gm2-lang.c: remove the Go defaults in
gm2_langhook_init_options_struct. No longer attempt
to split the stack, which fixes regression test failures
in gm2/coroutines/pim/run/pass/testiotransfer.mod
and gm2/coroutines/pim/run/pass/testtransfer.mod.
2013-12-09 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-libs-coroutines/SYSTEM.def: added definition
of the internal procedure functions
ShiftVal, ShiftLeft, ShiftRight, RotateVal,
RotateLeft, RotateRight to handle large sets.
* gm2/gm2-libs-coroutines/SYSTEM.mod: added implementation
of the internal procedure functions
ShiftVal, ShiftLeft, ShiftRight, RotateVal,
RotateLeft, RotateRight to handle large sets.
* gm2/gm2-compiler/M2GenGCC.mod: fixed type change
bug which occurred if a large bitset is compared to
an empty set. Use ConvertBinaryOperands for the
special case as well.
* gm2/gm2-gcc/m2expr.c: corrected function indirect
prototype to include location_t.
* gm2/gm2-gcc/m2expr.h: corrected function indirect
prototype to include location_t.
2013-12-06 Gaius Mulley <gaius@gnu.org>
* testsuite/gm2/pimcoroutes/pass/gm2.exp:
* testsuite/gm2/pimcoroutes/pass/exports.mod:
* testsuite/gm2/pimcoroutes/pass/exports2.mod:
(New files)
* gm2/gm2-libs-coroutines/SYSTEM.def: corrected
export list taking care to only have data types on the
(* @SYSTEM_DATATYPES@ *) line.
* gm2/Make-lang.in: add
gm2/Make-lang.in to be a dependant of gm2/gm2-libs.texi.
Add new rule to build $(objdir)/gm2/gm2-libs-coroutines/SYSTEM.def.
Add $(objdir)/gm2/gm2-libs-coroutines/SYSTEM.def to build-system.
2013-12-05 Gaius Mulley <gaius@gnu.org>
* gm2/gm2.texi: added information on
how to build a gcc-4.1.2 based gm2 under a multiarch
linux system.
* gm2/gm2.texi: changed configure
examples to reflect new source tree layout.
2013-12-01 Gaius Mulley <gaius@gnu.org>
* gm2/examples/pge/deviceGroff.mod: (newFrame)
emit leading .ll 8i.
* gm2/examples/pge/foo.mod: (regenerated).
* gm2/gm2-gcc/m2builtins.c: (m2builtins_BuildBuiltinTree)
corrected formatting.
* testsuite/gm2/pim/pass/builtin.def: corrected sinf
to use and return SHORTREAL types.
* testsuite/gm2/pim/pass/builtin.mod: corrected sinf
to use and return SHORTREAL types.
* testsuite/gm2/pim/pass/testsinf.mod: corrected test
to use REAL rather than SHORTREAL with sinf.
2013-11-20 Gaius Mulley <gaius@gnu.org>
* gm2/config-lang.in: added target-libgm2
to the list of target_libs.
* gm2/examples/pge/foo.fig: new example.
* gm2/examples/pge/foo.mod: regenerated.
* gm2/gm2-compiler/M2GenGCC.mod: change
type to Address if lvalue is used, this fixes the
regression test failure in
testsuite/gm2/iso/run/pass/unbounded.mod.
* gm2/gm2spec.c: remove extern int force_no_linker.
Changed variable name force_no_linker to allow_linker and
switched boolean value. allow_linker now exported via gcc.h.
* gm2/patches/gcc/4.7.3/0[0-9]-patches:
regenerated.
* gm2/patches/gcc/4.7.3/10-patches:
regenerated.
2013-11-15 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-libs-iso/LongWholeIO.mod: (ReadInt)
* gm2/gm2-libs-iso/ShortWholeIO.mod: (ReadInt)
* gm2/gm2-libs-iso/WholeIO.mod: (ReadInt)
catch overflow and set the read result accordingly.
* gm2/gm2-libs-iso/LongWholeIO.mod: (ReadInt)
* gm2/gm2-libs-iso/ShortWholeIO.mod: (ReadInt)
* gm2/gm2-libs-iso/WholeIO.mod: (ReadInt)
reference SetReadResult correctly via IOChan.
2013-11-14 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2GenGCC.mod: (FoldBinary)
convert left and right operands to the result type.
* gm2/gm2-libs-iso/ShortWholeIO.mod: (ReadInt)
handle negative value without overflowing.
* gm2/gm2-libs-iso/WholeIO.mod: (ReadInt)
handle negative value without overflowing.
2013-11-13 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2ALU.mod: (InitialiseArrayWith)
convert low and high bounds into integers when creating array
constants.
* gm2/gm2-gcc/m2expr.c: (m2expr_BuildAdd),
(m2expr_BuildSub), (m2expr_BuildDivTrunc), (m2expr_BuildModTrunc),
(m2expr_BuildDivFloor), (m2expr_BuildModFloor), (m2expr_BuildLSL),
(m2expr_BuildLSR), (m2expr_BuildLRL), (m2expr_BuildLRR),
(m2expr_BuildMask) all fold operands and also their results.
(m2expr_BuildLRotate) New function. (m2expr_BuildRRotate)
New function.
2013-11-12 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-gcc/m2expr.c: (m2expr_BuildCmplx) check
to see that the expressions are REAL_CST before calling
build_complex.
* gm2/gm2-compiler/M2Options.def: (FinaliseOptions)
exported.
* gm2/gm2-gcc/m2options.h: (FinaliseOptions)
declared extern.
* gm2/gm2-lang.c: (gm2_langhook_post_options)
call M2Options_FinaliseOptions.
2013-11-10 Gaius Mulley <gaius@gnu.org>
* gm2/gcc-gm2/m2expr.c: (m2expr_BuildCap) fold results of each
subexpression to ensure a constant is returned if a constant
parameter is given.
2013-11-08 Gaius Mulley <gaius@gnu.org>
* gm2/examples/pge/fig.py: added abiltity to set a default velocity.
* gm2/examples/pge/foo.fig: changed default demo.
* gm2/examples/pge/foo.fig: changed default demo.
* gm2/tools-src/makeversion: simplified to use 'cat'.
Necessary as the top level directory name no longer contains
the release number.
* gm2/www/tools/texi2tr/html/download.html: changed to
reflect change from cvs to git.
2013-10-28 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-gcc/m2block.c: iterate over the tree chain adding declaration
statements (of variables) to the statement list.
2013-10-17 Gaius Mulley <gaius@gnu.org>
* gm2/gm2.texi: added new section (Building gcc-4.7
under Debian), added new section (Building gcc-4.7
under Solaris).
* gm2/examples/pge/Fractions.mod: updated dates.
* gm2/examples/pge/circles.mxm: added comments and rewritten to use
max2code syntax.
* gm2/examples/pge/mxmmaxima.py: corrected getPolynomials.
* gm2/examples/pge/mxmparser.py: many changes to allow stdout as a filename
specified by '-'.
* gm2/examples/pge/mxmtree.py: many changes and additions.
* gm2/examples/pge/ramps2.mod: useGroff (New constant).
* gm2/examples/pge/rotating-line.mxm: added comments and rewritten to
use max2code syntax.
* gm2/examples/pge/snooker.mod: added a boundary to the snooker table.
* gm2/examples/pge/test.mxm: rewritten to use max2code syntax.
* gm2/examples/pge/twoDsim.mod: minor changes to allow circle on circle
collision to be calculated from a max2code included source file.
2013-10-02 Gaius Mulley <gaius@gnu.org>
* gm2/examples/pge/circles.mxm: (New file).
* gm2/examples/pge/debugt: (New file).
* gm2/examples/pge/max2code.py: (New file).
* gm2/examples/pge/mxmmaxima.py: (New file).
* gm2/examples/pge/mxmout.py: (New file).
* gm2/examples/pge/mxmparser.py: (New file).
* gm2/examples/pge/mxmstack.py: (New file).
* gm2/examples/pge/mxmtree.py: (New file).
* gm2/examples/pge/mxmutils.py: (New file).
* gm2/examples/pge/pge.py: (New file).
* gm2/examples/pge/rotating-circles.mxm: (New file).
* gm2/examples/pge/rotating-line.mxm: (New file).
* gm2/examples/pge/runt: (New file).
* gm2/examples/pge/test.mxm: (New file).
2013-09-27 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2GenGCC.mod: (CodeHigh) convert high value into
a cardinal. (FoldHigh) convert high value into cardinal. Fixes
a bug exposed when compiling ulm-lib-gm2/std/StrSpec.mod.
* gm2/gm2-compiler/M2GenGCC.mod: (FoldHigh) convert constant into
a cardinal.
2013-09-26 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-libs-iso/LongWholeIO.def: (Re-added).
* ShortIO.def: (Re-added).
* ShortWholeIO.def: (Re-added).
* SLongWholeIO.def: (Re-added).
* SShortIO.def: (Re-added).
* SShortWholeIO.def: (Re-added).
* LongWholeIO.mod: (Re-added).
* ShortIO.mod: (Re-added).
* ShortWholeIO.mod: (Re-added).
* SLongWholeIO.mod: (Re-added).
* SShortIO.mod: (Re-added).
* SShortWholeIO.mod: (Re-added).
2013-09-25 Gaius Mulley <gaius@gnu.org>
* gm2/patches/gcc/4.7.3/[01-10] (New patches created).
Added configure which fixes the absence of libgm2 being built.
2013-09-24 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2ALU.mod: (BuildBitset) now return a
BITSET type rather than an integer.
* gm2/gm2-compiler/M2GenGCC.mod: (CodeInclude) do not convert the IntegerTree.
(CodeExclude) do not convert the IntegerTree.
* gm2/gm2-gcc/m2expr.c: (m2expr_BuildLogicalShift) convert op2 and op3
ToWord. (m2expr_BuildIfConstInVar) use varset rather than p1.
(m2expr_BuildComponentRef) call m2tree_skip_reference_type.
(m2expr_BuildBinaryForeachWordDo) call m2treelib_get_set_field_des.
* gm2/gm2-gcc/m2statement.c: (m2statement_BuildIncludeVarConst)
use op1, rather than p1 in m2treelib_get_set_field_rhs.
* gm2/gm2-gcc/m2tree.c: (m2tree_skip_reference_type) New function.
* gm2/gm2-gcc/m2tree.h: (m2tree_skip_reference_type) New declaration.
* gm2/gm2-gcc/m2treelib.c: (m2treelib_get_set_field_des) New function.
* gm2/gm2-gcc/m2treelib.h: (m2treelib_get_set_field_des) New declaration.
2013-09-20 Gaius Mulley <gaius@gnu.org>
* gm2/patches/gcc/4.7.3: remade patch set which now includes toplevel
Makefile.def.
2013-09-18 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2GCCDeclare.mod: (SkipModuleScope) New procedure
function. PushBinding use SkipModuleScope. PopBinding use
SkipModuleScope.
* gm2/gm2-compiler/M2GenGCC.mod: CodeAddr checks whether
op3 IsConstString.
* gm2/gm2-gcc/m2convert.c: (m2convert_ToBitset) New function.
* gm2/gm2-gcc/m2convert.h: (m2convert_ToBitset) New function.
* gm2/gm2-gcc/m2expr.c: many changes to use m2expr_FoldAndStrip
for binary operands. Also many changes to set operators so
that COMPOUND_REF are used whenever possible and that operands
to binary operators are converted to the same types.
Use m2expr_BuildAddAddress instead of BuildAdd for address
arithmetic.
* gm2/gm2-gcc/m2expr.h: fix header for m2expr_BuildAddAddress.
* gm2/gm2-gcc/m2statement.c: many changes to set operators so
that COMPOUND_REF are used whenever possible and that operands
to binary operators are converted to the same types.
Use m2expr_BuildAddAddress instead of BuildAdd for address
arithmetic.
* gm2/gm2-gcc/m2treelib.c: use COMPOUND_REF whenever possible.
Convert all set return values to BITSET. Use m2expr_BuildAddr
rather than m2expr_build_unary_op.
2013-09-14 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-gcc/m2block.c: more fixes for nested procedures
in finishFunctionDecl. Also enabled three asserts.
2013-09-10 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2GenGCC.mod: convert all operands for
comparison operators.
2013-09-06 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-gcc/m2block.c: (cosmetic changes).
* gm2/gm2-gcc/m2statement.c: (m2statement_BuildEndFunctionCode)
call cgraph_get_create_node for a nested function otherwise
call cgraph_finalize_function and gm2_gimplify_function_code.
Fixes allow nested procedures to be compiled.
2013-08-14 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-lang.c: (gm2_langhook_init_options) New function.
(is_cpp_filename) New function. gm2_langhook_post_options
call M2Options_SetCC1Quiet. gm2_parse_input_files only call
init_PerCompilationInit if filename is not a cpp filename argument.
* gm2/gm2spec.c: corrected comment typo. (get_B_or_prefix)
New function. add_exec_name use find_executable_path.
(lang_register_spec_functions). New function.
(add_exec_dir) modified to create the argument -fcppprog=.
* gm2/lang-specs.h: add %:exec_prefix(cc1) to all -fcpp options.
* gm2/lang.opt: added imultilib to Modula-2.
* gm2/gm2-compiler/M2DriverOptions.def: (CppCommandLine) New function.
* gm2/gm2-compiler/M2DriverOptions.mod: (CppCommandLine) implemented
new function.
* gm2/gm2-compiler/M2Options.def: (SetCC1Quiet) New function.
* gm2/gm2-compiler/M2Options.mod: (ScanCppArgs) Removed function.
(CppCommandLine) New function. (CppProg) New function.
(CppArg) New function. (SetCC1Quiet) New function.
* gm2/gm2-compiler/M2Preprocess.mod: removed hack inside PreprocessModule.
* gm2/gm2-gcc/m2options.h: New definitions for M2Options_SetCC1Quiet,
M2Options_CppProg and M2Options_CppArg.
* gm2/patches/gcc/4.7.3/01-patches: rebuilt.
* gm2/patches/gcc/4.7.3/02-patches: rebuilt.
* gm2/patches/gcc/4.7.3/03-patches: rebuilt.
* gm2/patches/gcc/4.7.3/04-patches: rebuilt.
* gm2/patches/gcc/4.7.3/05-patches: rebuilt.
* gm2/patches/gcc/4.7.3/06-patches: rebuilt.
* gm2/patches/gcc/4.7.3/07-patches: rebuilt.
* gm2/patches/gcc/4.7.3/08-patches: rebuilt.
2013-07-20 Gaius Mulley <gaius@gnu.org>
* gm2/configure.in: corrected dates.
* gm2/gm2spec.c: (add_B_prefix) now calls insert_option. (add_library)
calls insert_option. (insert_option) New function.
* gm2/bnf/gm2l.bnf: corrected dates and also emit full path to the
source file in the comment section. Also exit(1) if no source file
can be found.
* gm2/gm2-compiler/gm2lcc.mod: allow -B to either take a concatenated
argument or use the next argument.
2013-07-15 Gaius Mulley <gaius@gnu.org>
* gm2/gm2spec.c: (fe_generate_option) fixed cast to XCNEWVEC.
(printOption) moved function earlier in the file.
(add_library) position is now declared as unsigned int.
(add_library) more debugging, also copy arguments correctly
into the new array. (lang_specific_driver) corrected strncmp
count.
2013-07-12 Gaius Mulley <gaius@gnu.org>
* gm2/gm2spec.c: get_prefix removed string literal and replaced it with
PREFIX. Fix to call add_link_from_include swapped parameters. Use
unsigned int as a comparison. Removed unused variable.
* gm2/Make-lang.in: add -DPREFIX to the build rule for gm2spec.o.
* gm2/gm2.texi: removed item about limitation to link as this is now fixed.
2013-07-11 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-lang.c: gm2_langhook_getdecls return value from m2block_GetGlobals().
gm2_langhook_write_globals call write_global_declarations.
* gm2/gm2spec.c: (purge_include_options) New function. Call ge_generate_option
if -I is found.
* gm2/gm2-compiler/M2GenGCC.mod: corrected dates.
* gm2/gm2-gcc/m2block.c: assert_global_names (New function). m2block_GetGlobals
call assert_global_names and return global_binding_level->names.
* gm2/gm2-gcc/m2block.def: GetGlobals (New procedure function).
* gm2/gm2-gcc/m2block.h: GetGlobals (New procedure function).
* gm2/gm2-gcc/m2decl.c: added debugging hooks to detect variables being declared.
* gm2/gm2spec.c: convert_include_into_link (New procedure function).
2013-07-08 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: removed installation rules for library modules.
* gm2/gm2.texi: added information on how to build gm2 grafted onto gcc-4.7.3.
* gm2/gm2spec.c: many changes which reintroduce the gm2 linking mechanism and
via specs. Many changes due to the differences between gcc-4.7.3 and gcc-4.1.2.
* gm2/lang-specs.h: corrected dates.
* gm2/gm2-compiler/M2Defaults.def: corrected dates.
* gm2/gm2-compiler/M2Defaults.mod: corrected dates.
* gm2/gm2-compiler/M2FileName.def: corrected dates.
* gm2/gm2-compiler/M2FileName.mod: corrected dates.
* gm2/gm2-compiler/M2Options.mod: added Debugging and printf1.
* gm2/gm2-compiler/M2Search.def: corrected dates.
* gm2/gm2-compiler/M2Search.mod: corrected dates.
* gm2/gm2-compiler/gm2lcc.mod: corrected dates.
* gm2/www/Makefile.in: commented out texisrc subcomponents and fixed path for
TEXI2HTML.
* gm2/patches/gcc/4.7.3/01-patches: (Re-made patch).
* gm2/patches/gcc/4.7.3/02-patches: (Re-made patch).
* gm2/patches/gcc/4.7.3/03-patches: (Re-made patch).
* gm2/patches/gcc/4.7.3/04-patches: (Re-made patch).
* gm2/patches/gcc/4.7.3/05-patches: (New file).
2013-06-14 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: removed many of the library building rules.
* gm2/Makefile.in: added description comment.
* gm2/gm2.texi: updated dependencies for building gm2 on the gcc-4.7.x.
* gm2/examples/pge/rotating-line.asc: rebuilt the .asc.
* gm2/gm2-libs-ch/termios.c: include correct target/host configure header file.
* gm2/gm2-libs-min/libc.c: updated copyright dates.
* gm2/p2c/p2c.h: tidied formatting.
* gm2/p2c/p2c-src/include/system.h: remove include <varargs.h>. Add
include of <stddef.h>.
2013-04-30 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2ALU.def: (ConvertToType) New procedure.
* gm2/gm2-compiler/M2ALU.mod: (ConvertToType) New procedure
implemented.
Call ToInteger to change internal GCC types when computing bitsets.
* gm2/gm2-compiler/M2GenGCC.mod: GetFieldNo converts M2ALU gcc trees
using ToCardinal.
* gm2/gm2-compiler/M2Quads.mod: (GetProtection) New procedure function.
(CheckNeedPriorityBegin) create variable of PROTECTION type rather than
CARDINAL.
* gm2/gm2-gcc/m2convert.c: (ToInteger) New function.
* gm2/gm2-gcc/m2convert.def: (ToInteger) New procedure function.
* gm2/gm2-gcc/m2convert.h: (ToInteger) New procedure function.
* gm2/gm2-gcc/m2expr.c: (m2expr_BuildLogicalShift) convert binary
operands to the same type.
* gm2/gm2-gcc/m2statement.c: (m2statement_BuildUnaryForeachWordDo)
convert binary operands to the same type and correct the call to
(*unop).
* gm2/gm2-gcc/m2statement.h: corrected parameter (*unop) to
include the location_t parameter.
2013-04-25 Gaius Mulley <gaius@gnu.org>
* gm2/c.flex: changed variable names try into ctry to avoid compiler
warning.
* gm2/gm2-lang.c: (gimplify_expr_stmt) New function.
(gm2_langhook_gimplify_expr) reimplemented to gimplify THROW_EXPR
and EXPR_STMT.
* gm2/gm2-tree.def: fixed dates.
* gm2/m2pp.c: (m2pp_simple_expression) added CLEANUP_POINT_EXPR
handling. Check issue begin before exception related nodes to aid
pretty printing.
* gm2/gm2-gcc/m2except.c: huge rewrite to bring it into line with
the exception handling schema used in gcc-4.7.1. Use
m2statements to call the exception handling helper functions.
* gm2/gm2-gcc/m2statement.c: fixed typo in comment.
* gm2/gm2spec.c: change fseen_no_exceptions into fseen_exceptions
and invert logic.
* gm2/lang.opt: use fexceptions rather than fno-exceptions
and use the option value which by default is TRUE.
2013-04-18 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-libs/config-host: rebuilt.
* gm2/gm2-libs/config-host.in: fix to generate SIZEOF_long and
presence of struct timeval.
* gm2/gm2-libs/config-target: rebuilt.
* gm2/gm2-libs/config-target.in: fix to generate SIZEOF_long and
presence of struct timeval.
* gm2/gm2-libs/gm2-libs-host.h.in: add define for SIZEOF_LONG and
HAVE_TIMEVAL.
* gm2/gm2-libs/gm2-libs-target.h.in: add define for SIZEOF_LONG and
HAVE_TIMEVAL.
* gm2/Make-lang.in: (gm2.maintainer-reconfigure)
(gm2.maintainer-help) New rules.
* gm2/configure.in: fixed release number to 1.0.5.
* gm2/configure: rebuilt.
2013-04-11 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-gcc/m2type.c: (m2type_GetArrayNoOfElements) call
m2expr_FoldAndStrip to ensure array bounds are defined by
constants. (m2type_BuildArrayIndexType) call
m2expr_FoldAndStrip to ensure array bounds are defined by
constants. This fix allows DynamicStrings.mod to compile.
* gm2/gm2-gcc/m2type.c: (m2type_BuildEndRecord) removed call
to m2block_pushDecl.
2013-04-10 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-lang.c: comment out definition for LANG_HOOKS_GIMPLIFY_EXPR.
* gm2/gm2-compiler/M2ALU.mod: Convert top of stack to Integer type.
* gm2/gm2-compiler/M2GenGCC.mod: ensure that the global scope is in use in CodeEndFile,
CodeStartDefFile, CodeStartModFile. ConvertForComparison convert pointer types to
ADDRESS. Fix calls to BuildThrow to use a location initial parameter.
* gm2/gm2-compiler/M2Range.mod: (CodeWholeZero) convert const lit zero into the same
type as, e.
* gm2/gm2-gcc/m2block.c: added DEBUGGING macro and debugging prints.
* gm2/gm2-gcc/m2convert.c: (m2convert_BuildConvert) added more steps to aid debugging.
* gm2/gm2-gcc/m2convert.h: (m2convert_BuildConvert) changed parameter names.
* gm2/gm2-gcc/m2except.def: (BuildThrow) added missing initial parameter.
* gm2/gm2-gcc/m2expr.c: (gm2/gm2-gcc/m2expr.c) added conversion between
pointer types for MINUS_EXPR.
* gm2/gm2-gcc/m2statement.c: (m2statement_BuildEndFunctionCode) call
gm2_gimplify_function_node.
* gm2/gm2-gcc/m2treelib.c: (m2treelib_do_jump_if_bit) use m2expr_GetWordZero
rather than m2expr_GetIntegerZero.
* gm2/gm2-gcc/m2type.c: (m2type_InitBaseTypes) call m2expr_init.
2013-03-27 Gaius Mulley <gaius@gnu.org>
* gm2/gm2spec.c: intemediate checkin. With enough changes to allow the
libraries to compile.
* gm2/lang-specs.h: intemediate checkin. With enough changes to allow the
libraries to compile.
* gm2/lang.opt: changed help strings for options which are shared by C into
comments.
* gm2/gm2-compiler/M2GCCDeclare.mod: convert resolved constants into a
specific type.
* gm2/gm2-compiler/M2GenGCC.mod: (ConvertBinaryOperands) New procedure.
Convert binary operands into same types.
* gm2/gm2-compiler/M2Options.mod: Quiet default to TRUE.
* gm2/gm2-compiler/M2Range.mod: convert operands to IfOutsideLimits to
the same type.
* gm2/gm2-gcc/m2expr.c: convert operands to BuildLessThan to the same types.
* gm2/gm2-gcc/m2expr.def: (BuildAddAddress) New procedure function.
* gm2/gm2-gcc/m2expr.h: (BuildAddAddress) New procedure function.
* gm2/gm2-gcc/m2statement.c: BuildIndirectProcedureCall use TREE_VALUE (t)
rather than, t.
2013-03-22 Gaius Mulley <gaius@gnu.org>
* gm2/gm2spec.c: many bug fixes relating to using (*in_options)[]
rather than options[].
2013-03-20 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: added gm2/gm2-gcc/m2assert.o to list
of objects.
* gm2/TODO: added new future change request.
* gm2/gm2-lang.c: added -flocation= flag for internal debugging.
Tidied up file by removing some of the #if 0 code.
* gm2/gm2spec.c: re-written comment for clarity.
* gm2/lang-options.h: added -x and -flocation= options.
* gm2/lang.opt: added -flocation= and -x specifications.
* gm2/m2.flex: override the current location if -flocation is set.
* gm2/m2pp.c: add debugging code and also handle the expression node
POINTER_PLUS_EXPR.
* gm2/gm2-compiler/M2GenGCC.mod: added location to many of the build tree functions.
Also convert operands correctly in FoldBecomes. Added type checking in binary
operators.
* gm2/gm2-compiler/M2Options.def: (OverrideLocation, SetForcedLocation) New Procedures.
* gm2/gm2-compiler/M2Options.mod: (OverrideLocation, SetForcedLocation) Implemented.
* gm2/gm2-compiler/M2Quads.mod: Set types for intemediate constants when calculating
unbounded array indices.
* gm2/gm2-compiler/M2Range.mod: ensure that max min values are checked against the
same typed variable.
* gm2/gm2-compiler/M2System.def: add location to InitSystem.
* gm2/gm2-compiler/M2System.mod: add location to InitSystem.
* gm2/gm2-gcc/m2assert.h: added m2assert_AssertLocation prototype. Convert m2assert.h
to general modular style header file.
* gm2/gm2-gcc/m2block.c: ensure that all declarations are added to the BIND_EXPR_BODY.
* gm2/gm2-gcc/m2builtins.def: add location_t to many of the build tree procedure functions.
* gm2/gm2-gcc/m2convert.c: use m2assert_AssertLocation.
* gm2/gm2-gcc/m2decl.c: use m2assert_AssertLocation.
* gm2/gm2-gcc/m2except.c: use m2assert_AssertLocation.
* gm2/gm2-gcc/m2expr.c: use m2assert_AssertLocation. Fixed bugs in type conversion.
* gm2/gm2-gcc/m2expr.h: added m2expr_GetCardinalZero and m2expr_GetCardinalOne.
* gm2/gm2-gcc/m2options.h: M2Options_SetForcedLocation, M2Options_OverrideLocation (New
procedure functions).
* gm2/gm2-gcc/m2statement.c: use m2assert_AssertLocation.
* gm2/gm2-gcc/m2top.c: remove call to cgraph_finalize_compilation_unit.
* gm2/gm2-gcc/m2treelib.c: fix DoCall by using TREE_VALUE (l) rather than, l.
* gm2/gm2-gcc/m2type.c: use m2assert_AssertLocation.
* gm2/gm2-libs/FIO.mod: cast position to INTEGER before comparing it to the return
value for write.
* gm2/gm2-gcc/m2assert.c: (New file).
2013-02-21 Gaius Mulley <gaius@gnu.org>
* gm2/patches/gcc/4.7.1/01-patches: (New file).
* gm2/patches/gcc/4.7.1/02-patches: (New file).
2013-02-18 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-libs-iso/RandomNumber.def: (New file).
* gm2/gm2-libs-iso/RandomNumber.mod: (New file).
2013-02-11 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-lang.c: removed reference to gm2-common.h.
* gm2/gm2-lang.h: include gm2_langhook_init and gm2_langhook_handle_option.
* gm2/gm2-gcc/m2options.h: corrected spelling of M2Options_setdefextension
and M2Options_setmodextension.
* gm2/gm2-compiler/M2DebugStack.def: (New file).
* gm2/gm2-compiler/M2DebugStack.mod: (New file).
* gm2/gm2-compiler/M2DriverOptions.def: (New file).
* gm2/gm2-compiler/M2DriverOptions.mod: (New file).
2013-02-09 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: build rules changed to enable gm2 to be built
with gcc-4.7.1.
* gm2/NEWS: minor version number change.
* gm2/config-lang.in: removed gcc-3.x.y version checking.
* gm2/configure: rebuilt.
* gm2/configure.in: updated as gccgm2.c is no longer used.
* gm2/gccgm2.c: (removed). The contents of this 12000 line file
have been replaced by the modular equivalent in gm2/gm2-gcc/*.[ch]
* gm2/gm2-common.h: (removed).
* gm2/gm2-common.c: (removed).
* gm2/gm2-lang.c: changed to use the gm2/gm2-gcc structure and gcc-4.7.1.
* gm2/gm2-lang.h: changed to use the gm2/gm2-gcc structure and gcc-4.7.1.
* gm2/gm2-tree.def: removed THROW_EXPR, TRY_BLOCK, HANDLER, EXPR_STMT definitions.
* gm2/gm2-tree.h: commented out the language tree code.
* gm2/gm2.texi: modified to reflect library command line switch changes between
1.0.1 and 1.0.4. Improved the assembly language example together with an explanation.
Added alignment information. Updated the Solaris building instructions.
* gm2/gm2config.h.in: (updated to reflect gcc-4.7.1).
* gm2/gm2spec.c: (updated to reflect gcc-4.7.1).
* gm2/lang-options.h: changed -fverbose-unbounded to -Wverbose-unbounded.
* gm2/lang.opt: changed so that libraries dialects can be ordered.
* gm2/m2.flex: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/m2pp.c: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/p2crc: added many more AvoidNames to avoid conflicts with C header files.
* gm2/version.c: updated to 1.0.5.
* gm2/bnf/gm2l.bnf: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/bnf/gm2m.bnf: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/bnf/m2-2.bnf: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/bnf/m2-3.bnf: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/bnf/m2-c.bnf: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/bnf/m2-h.bnf: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/bnf/m2.bnf: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/el/g-mode.el: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/examples/gravity/README: updated package versions required.
* gm2/examples/gravity/twoDsim.def: updated dates.
* gm2/examples/gravity/twoDsim.mod: updated dates and improved debugging.
* gm2/examples/gravity/doc/collision.ms: reorganised document.
* gm2/examples/hello/Makefile.in: modified build rules.
* gm2/examples/hello/hello.mod: added blank line.
* gm2/examples/map/AdvMap.def: removed BITSET import.
* gm2/gm2-compiler/Indexing.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2ALU.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2ALU.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2Base.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2Base.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2Batch.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2Batch.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2Bitset.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2CaseList.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2CaseList.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2Code.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2Comp.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2Comp.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2Error.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2GCCDeclare.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2GCCDeclare.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2GenGCC.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2GenGCC.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2LexBuf.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2LexBuf.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2MetaError.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2Options.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2Options.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2Preprocess.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2Printf.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2Quads.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2Quads.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2Range.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2Range.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2Reserved.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2Reserved.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2System.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/M2System.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/P2SymBuild.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/P2SymBuild.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/PCSymBuild.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/Sets.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/SymbolConversion.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/SymbolConversion.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/SymbolKey.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/SymbolKey.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/SymbolTable.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/SymbolTable.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/gccgm2.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/gm2.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/m2flex.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-compiler/ppg.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/gm2-libs/Builtins.def: added alloca_trace for debugging.
* gm2/gm2-libs/Builtins.mod: implemented alloca_trace for debugging.
* gm2/gm2-libs/Indexing.mod: removed BITSET from imports.
* gm2/gm2-libs/M2RTS.def: removed BITSET from imports.
* gm2/gm2-libs/SYSTEM.def: removed BITSET from export list.
* gm2/gm2-libs/config-host: rebuilt.
* gm2/gm2-libs/config-host.in: updated version to 1.0.5.
* gm2/gm2-libs/config-target: rebuilt.
* gm2/gm2-libs/config-target.in: updated version to 1.0.5.
* gm2/gm2-libs-boot/SYSTEM.def: removed BITSET from export list.
* gm2/gm2-libs-coroutines/SYSTEM.def: removed BITSET from export list.
* gm2/gm2-libs-iso/README.texi: updated the list of implemented ISO Modules and GNU Modules.
* gm2/gm2-libs-iso/SYSTEM.def: export TBITSIZE.
* gm2/gm2-libs-iso/ServerSocket.mod: added missing, RETURN TRUE.
* gm2/gm2-libs-iso/StdChans.mod: changed to include 'raw' in the std file descriptors.
* gm2/gm2-libs-min/SYSTEM.def: removed BITSET from export list.
* gm2/gm2-libs-pim/BitBlockOps.mod: removed BITSET from import list.
* gm2/gm2-libs-pim/BitByteOps.mod: removed BITSET from import list.
* gm2/gm2-libs-pim/BitWordOps.mod: removed BITSET from import list.
* gm2/gm2-libs-pim/Random.def: fixed RandomBytes definition.
* gm2/gm2-libs-pim/Random.mod: fixed RandomBytes definition.
* gm2/init/gm2linit: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/init/gm2minit: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
* gm2/p2c/p2c.h: modified prototypes to use plain C.
* gm2/p2c/p2c-src/src/citmods.c: use TOUPPER rather than toupper, use TOLOWER rather than tolower.
* gm2/p2c/p2c-src/src/decl.c: test for WORD and use unsigned int.
* gm2/p2c/p2c-src/src/expr.c: use TOLOWER, ISSPACE, ISDIGIT, ISALPHA rather than their lower case
counterparts.
* gm2/p2c/p2c-src/src/funcs.c: use TOUPPER rather than the lower case counterpart.
* gm2/p2c/p2c-src/src/lex.c: register the uppercase functions: TOLOWER, TOUPPER, ISALPHA, ISDIGIT.
* gm2/p2c/p2c-src/src/p2clib.c: use ISSPACE and TOUPPER rather than their lower case counterparts.
* gm2/tools-src/def2texi.py: many changes to explicitly differentiate between the build and src directories.
* gm2/tools-src/mklink.c: modified so that the default library is NULL and new --lib specifies the library.
Also alter long options to use -- rather than -.
* gm2/ulm-lib-gm2/std/Archive.def: remove BITSET from import.
* gm2/ulm-lib-gm2/std/M2RTS.mod: remove BITSET from import.
* gm2/ulm-lib-gm2/std/MathLib.mod: remove BITSET from import.
* gm2/ulm-lib-gm2/std/Plot.mod: remove BITSET from import.
* gm2/ulm-lib-gm2/sys/SYSTEM.def: remove BITSET from import.
* gm2/ulm-lib-gm2/sys/SysIoctl.def: remove BITSET from import.
* gm2/ulm-lib-gm2/sys/SysStat.def: remove BITSET from import.
* gm2/ulm-lib-gm2/sys/SysStat.mod: remove BITSET from import.
* gm2/www/tools/texi2tr/html/download.html: modified url to reference gm2-1.0.4.
* gm2/www/tools/texi2tr/html/release.html: modified url to reference gm2-1.0.4.
2013-02-08 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-gcc/dynamicstrings.h: (New file).
* gm2/gm2-gcc/init.c: (New file).
* gm2/gm2-gcc/init.cpp: (New file).
* gm2/gm2-gcc/init.def: (New file).
* gm2/gm2-gcc/init.h: (New file).
* gm2/gm2-gcc/m2assert.h: (New file).
* gm2/gm2-gcc/m2block.c: (New file).
* gm2/gm2-gcc/m2block.def: (New file).
* gm2/gm2-gcc/m2block.h: (New file).
* gm2/gm2-gcc/m2builtins.c: (New file).
* gm2/gm2-gcc/m2builtins.def: (New file).
* gm2/gm2-gcc/m2builtins.h: (New file).
* gm2/gm2-gcc/m2convert.c: (New file).
* gm2/gm2-gcc/m2convert.def: (New file).
* gm2/gm2-gcc/m2convert.h: (New file).
* gm2/gm2-gcc/m2decl.c: (New file).
* gm2/gm2-gcc/m2decl.def: (New file).
* gm2/gm2-gcc/m2decl.h: (New file).
* gm2/gm2-gcc/m2except.c: (New file).
* gm2/gm2-gcc/m2except.def: (New file).
* gm2/gm2-gcc/m2except.h: (New file).
* gm2/gm2-gcc/m2expr.c: (New file).
* gm2/gm2-gcc/m2expr.def: (New file).
* gm2/gm2-gcc/m2expr.h: (New file).
* gm2/gm2-gcc/m2linemap.c: (New file).
* gm2/gm2-gcc/m2linemap.def: (New file).
* gm2/gm2-gcc/m2linemap.h: (New file).
* gm2/gm2-gcc/m2misc.c: (New file).
* gm2/gm2-gcc/m2misc.def: (New file).
* gm2/gm2-gcc/m2misc.h: (New file).
* gm2/gm2-gcc/m2options.h: (New file).
* gm2/gm2-gcc/m2search.h: (New file).
* gm2/gm2-gcc/m2statement.c: (New file).
* gm2/gm2-gcc/m2statement.def: (New file).
* gm2/gm2-gcc/m2statement.h: (New file).
* gm2/gm2-gcc/m2top.c: (New file).
* gm2/gm2-gcc/m2top.def: (New file).
* gm2/gm2-gcc/m2top.h: (New file).
* gm2/gm2-gcc/m2tree.c: (New file).
* gm2/gm2-gcc/m2tree.def: (New file).
* gm2/gm2-gcc/m2tree.h: (New file).
* gm2/gm2-gcc/m2treelib.c: (New file).
* gm2/gm2-gcc/m2treelib.def: (New file).
* gm2/gm2-gcc/m2treelib.h: (New file).
* gm2/gm2-gcc/m2type.c: (New file).
* gm2/gm2-gcc/m2type.def: (New file).
* gm2/gm2-gcc/m2type.h: (New file).
* gm2/gm2-gcc/README: (New file).
2013-01-09 Gaius Mulley <gaius@gnu.org>
* gm2/gm2.texi: updated the building process for OpenBSD
and NetBSD.
2013-01-07 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-libs-iso/SShortWholeIO.def: (added file).
* gm2/gm2-libs-iso/SShortWholeIO.mod: (added file).
* gm2/gm2-libs-iso/SShortIO.def: (added file).
* gm2/gm2-libs-iso/SShortIO.mod: (added file).
* gm2/gm2-libs-iso/SLongWholeIO.def: (added file).
* gm2/gm2-libs-iso/SLongWholeIO.mod: (added file).
* gm2/gm2-libs-iso/ShortIO.def: (added file).
* gm2/gm2-libs-iso/ShortIO.mod: (added file).
* gm2/gm2-libs-iso/LongWholeIO.def: (added file).
* gm2/gm2-libs-iso/LongWholeIO.mod: (added file).
* gm2/gm2-libs-iso/ShortWholeIO.def: (added file).
* gm2/gm2-libs-iso/ShortWholeIO.mod: (added file).
* gm2/gm2/Make-lang.in: added the following modules
to be built and installed as part of the ISO libraries:
SShortIO.mod, SShortIO.def, SLongWholeIO.mod, SLongWholeIO.def,
ShortWholeIO.def, ShortIO.def, LongWholeIO.def, SShortWholeIO.mod
ShortWholeIO.mod, ShortIO.mod, LongWholeIO.mod
* gm2/gm2-compiler/M2Base.mod: fixed bug, which omitted to declare
MaxShortInt, MinShortInt, MaxShortCard, MinShortCard.
* gm2/gm2-libs-iso/README.texi: updated list of ISO style modules
and their respective copyrights. Minor documentation added.

936
gcc/m2/ChangeLog-2014 Normal file
View File

@ -0,0 +1,936 @@
2014-12-24 Gaius Mulley <gaius@gnu.org>
* gm2/examples/pge/pge.py: interim checkin.
* gm2/gm2-compiler/SymbolTable.mod: corrected declaration of
PutDeclaredModule as reported by Christoph Schlegel.
* gm2/gm2-libs-ch/sckt.c: added conditional import of
stdio.h as reported by Christoph Schlegel.
2014-12-22 Gaius Mulley <gaius@gnu.org>
* gm2/examples/pge/run: changed name of python script.
* gm2/examples/swig/strlen/MyStrLib.i: deleted.
* gm2/tools-src/createUlmSys: added SYSTEM_UNIXFORK and
SYSTEM_UNIXSIGNAL.
2014-12-09 Gaius Mulley <gaius@gnu.org>
* gm2/config-lang.in: added new gm2/examples/shared,
gm2/examples/full-strlib and gm2/examples/strio examples to the
list of Makefiles to be generated via configure.
* gm2/examples/swig/exceptions/Makefile.in: rewritten to use
libtool.
* gm2/examples/swig/exceptions/stresstiny.py: removed unnecessary
qualification.
* gm2/examples/swig/exceptions/testtiny.py: removed unnecessary
qualification.
* gm2/examples/swig/exceptions/tiny.def: renamed to libtiny.def.
* gm2/examples/swig/exceptions/tiny.mod: renamed to libtiny.mod.
* gm2/examples/swig/strio/Makefile: deleted.
* gm2/examples/swig/strlib/Makefile.in: rewritten to use libtool.
* gm2/examples/swig/strlib/MyStrLib.def: renamed as libStrLib.def.
* gm2/examples/swig/strlib/MyStrLib.mod: renamed as libStrLib.mod.
* gm2/gm2.texi: rewritten sections on building shared libraries
and interface to python using swig given that gm2 now uses libtool.
2014-12-06 Gaius Mulley <gaius@gnu.org>
* gm2/examples/swig/dual/Makefile.in: removed unnecessary $(RM).
* gm2/examples/swig/tiny/Makefile.in: removed unnecessary $(RM).
* gm2/lang-specs.h: changed invocation of -fswig, -fmakelist, -fmakeinit which
can only be issued with -c and none of them will generate a .s (or .o) file.
The compiler is disabled from producing an output file using %V.
2014-12-05 Gaius Mulley <gaius@gnu.org>
* gm2/config-lang.in: added entry for new test example dual.
* gm2/examples/hello/Makefile.in: fixed example to build, added
reference to stdc++.
* gm2/examples/pge/Makefile.in: changed name of pge.py to pgepygame.py.
* gm2/examples/pge/pge.py: first cut of a python interface to pge.
* gm2/examples/pge/twoDsim.def: moved whereHit back to the definition
module.
* gm2/examples/pge/twoDsim.mod: moved whereHit back to the definition
module.
* gm2/examples/swig/tiny/Makefile.in: rewrote build rules as shared libraries
are now built using libtool.
* gm2/examples/swig/tiny/libtiny.def: rename tiny.def as libtiny.def to comply
with libtool.
* gm2/examples/swig/tiny/libtiny.mod: rename tiny.def as libtiny.def to comply
with libtool.
* gm2/examples/swig/tiny/testtiny.py: import libtiny instead of tiny.
* gm2/gm2-compiler/gm2lcc.mod: shared libraries are built using libtool changes
to allow this tool to deal with .lo, la files. Separate -L from -l as ar
does not understand -L. Long options now require --. (--main, --exec,
--ignoremain, --startup).
* gm2/gm2-compiler/gm2lgen.mod: Long options now require -- (--terminate,
--initial, --exit, --main).
* gm2/gm2-libs/FIO.mod: corrected dates.
* gm2/gm2-libs/libc.def: corrected dates.
* gm2/gm2spec.c: corrected formatting. gen_link_path (New function).
Use gen_link_path rather than add_include.
* gm2/lang-specs.h: changed all gm2lcc and gm2lgen long options to comply
with the new -- delimiter.
2014-11-04 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-gcc/m2expr.c: (m2expr_BuildForeachWordInSetDoIfExpr) add additional
parameter to m2expr_BuildForeachWordInSetDoIfExpr (is_lvalue).
* gm2/gm2-gcc/m2treelib.c: (m2treelib_get_set_value) extra parameter,
is_lvalue, which builds a component ref using an indirect value.
* gm2/gm2-gcc/m2treelib.h: added new parameter to prototype.
* gm2/m2pp.c: (m2pp_bit_ior_expr) New function.
2014-10-30 Gaius Mulley <gaius@gnu.org>
* gm2/examples/pge/popWorld.def: tidied up comment.
* gm2/examples/pge/popWorld.mod: tidied up comment.
* gm2/examples/pge/twoDsim.def: tidied up comment and moved a type definition
into the implementation module.
* gm2/examples/pge/twoDsim.mod: added type definition.
* gm2/gm2-compiler/M2GCCDeclare.mod: (AlignProcedureWithSource) removed procedure.
(DeclareProcedureToGccWholeProgram), (DeclareProcedureToGccSeparateProgram)
call GetProcedureBeginEnd to obtain the position of the BEGIN END tokens for
accurate debugging info.
* gm2/gm2-compiler/M2GenGCC.mod: (CodeNewLocalVar) and (CodeKillLocalVar)
also obtain the position of the BEGIN END tokens for accurate debugging info.
* gm2/gm2-compiler/M2Quads.mod: (BuildProcedureBegin) call PutProcedureBegin to
save the BEGIN location. (BuildProcedureEnd) call PutProcedureEnd to
save the END location.
* gm2/gm2-compiler/SymbolTable.def: (PutProcedureBegin) define new procedure.
(PutProcedureEnd) define new procedure.
* gm2/gm2-compiler/SymbolTable.mod: (PutProcedureBegin) implement new procedure.
(PutProcedureEnd) implement new procedure.
* gm2/gm2-libs-iso/IOChan.mod: (Look) fix bug to ensure the result is set to the
result of the look.
* gm2/gm2-libs-iso/RTfio.def: changed specification of iseoln to avoid having to
read ahead an extra character.
* gm2/gm2-libs-iso/RTfio.mod: use FIO.WasEOLN rather than FIO.EOLN.
(checkPostRead) corrected comment. (setReadResult) changed order of
if statements (check worst condition first).
* gm2/gm2-libs-iso/RTgen.mod: (doLook) restore old result, but return newer
result in r.
* gm2/gm2-libs/FIO.def: (WasEOLN) new procedure function.
* gm2/gm2-libs/FIO.mod: (WasEOLN) new procedure function implemented. Introduced
new state endofline which is set appropriately.
2014-10-23 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2GCCDeclare.mod: (BuildEndFunctionDeclaration) introduce
begin, end locations. (finishFunctionDecl) add location parameter.
* gm2/gm2-compiler/M2GenGCC.mod: (finishFunctionDecl) extra parameter.
* gm2/gm2-compiler/M2Quads.mod: (BuildProcedureBegin) and (BuildProcedureEnd)
record the tokenno of the BEGIN or END respectively.
* gm2/gm2-gcc/m2block.c: (finishFunctionDecl) sets location in the bind_expr.
* gm2/gm2-gcc/m2block.def: (finishFunctionDecl) additional parameter.
* gm2/gm2-gcc/m2block.h: (finishFunctionDecl) additional parameter.
* gm2/gm2-gcc/m2decl.c: (BuildEndFunctionDeclaration) begin and end
location parameters.
* gm2/gm2-gcc/m2decl.def: (BuildEndFunctionDeclaration) begin and end
location parameters.
* gm2/gm2-gcc/m2decl.h: (BuildEndFunctionDeclaration) begin and end
location parameters.
* gm2/gm2-gcc/m2except.c: pass additional parameter for builtin functions.
* gm2/gm2-gcc/m2statement.c: (SetBeginLocation), (SetEndLocation) New procedures.
* gm2/gm2-gcc/m2statement.def: (SetBeginLocation), (SetEndLocation) New procedures.
* gm2/gm2-gcc/m2statement.h: (SetBeginLocation), (SetEndLocation) New procedures.
* gm2/gm2-gcc/m2top.c: tidied up spacing.
* gm2/gm2spec.c: remember_link_arg extra parameter.
* gm2/m2pp.c: added debugging stub.
2014-10-14 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-libs-iso/RTgen.mod: (setReadResult) New procedure.
Modified doLook to use setReadResult.
* gm2/gm2spec.c: started refactoring. Introduced and used AS and GM2CC
macros. Use cc1 or cc1plus rather than gm2cc. gm2cc is no longer needed.
* gm2/Make-file.in: removed all references to gm2cc.
2014-10-10 Gaius Mulley <gaius@gnu.org>
* testsuite/gm2/pim/pass/gm2.exp: added more paths.
* testsuite/lib/gm2.exp: refactored gm2_init_pim and friends.
2014-10-09 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2ALU.mod: use GetDeclaredMod as a replacement for GetDeclared.
* gm2/gm2-compiler/M2Base.mod: use GetDeclaredMod as a replacement for GetDeclared.
* gm2/gm2-compiler/M2GCCDeclare.mod: use GetDeclaredMod as a replacement for GetDeclared.
* gm2/gm2-compiler/M2GenGCC.mod: use GetDeclaredMod as a replacement for GetDeclared.
* gm2/gm2-compiler/M2MetaError.def: provide %1M as a formatting specification.
* gm2/gm2-compiler/M2MetaError.mod: implement %1M as a formatting specification.
* gm2/gm2-compiler/M2Optimize.mod: use GetDeclaredMod as a replacement for GetDeclared.
* gm2/gm2-compiler/M2Quads.mod: use GetDeclaredMod as a replacement for GetDeclared.
Also use tokenno rather than line number in NewLocalVar and KillLocalVar.
* gm2/gm2-compiler/M2Students.mod: use GetDeclaredMod as a replacement for GetDeclared.
* gm2/gm2-compiler/P1SymBuild.mod: record location of implementation and definition module
when declaring procedures.
* gm2/gm2-compiler/P2SymBuild.mod: record location of implementation and definition module
when declaring procedures.
* gm2/gm2-compiler/PCSymBuild.mod: use GetDeclaredMod as a replacement for GetDeclared.
* gm2/gm2-compiler/SymbolTable.def: export GetDeclaredMod and GetDeclaredDef.
* gm2/gm2-compiler/SymbolTable.mod: implement GetDeclaredMod and GetDeclaredDef.
(New procedure) GetDeclaredDefinition. (New procedure) GetDeclaredModule.
* gm2/gm2-gcc/m2block.c: removed debugging traps.
* gm2/gm2-gcc/m2expr.c: tidied formatting.
* gm2/gm2-gcc/m2statement.c: removed unnecessary code.
(add_stmt) changed to record location.
* gm2/gm2-gcc/m2treelib.c: allow component refs to be deferenced by pointers.
* gm2/gm2-libs-iso/RTgen.mod: skip a character without pushing it back twice in
succession.
* gm2/m2pp.c: introduce line file numbers into the source code dump.
* testsuite/gm2/calling-c/datatypes/unbounded/run/pass/gm2.exp: many changes to
simplify the setting up of the chosen dialect and libraries. All
obvious invocations to gm2_init are replaced by gm2_init_pim, gm2_init_iso,
gm2_init_ulm, gm2_init_log, gm2_init_cor.
* testsuite/gm2/case/pass/gm2.exp: as above.
* testsuite/gm2/complex/pass/gm2.exp: as above.
* testsuite/gm2/complex/run/pass/gm2.exp: as above.
* testsuite/gm2/coroutines/pim/run/pass/gm2.exp: as above.
* testsuite/gm2/cpp/pass/gm2.exp: as above.
* testsuite/gm2/cse/fail/gm2.exp: as above.
* testsuite/gm2/cse/pass/gm2.exp: as above.
* testsuite/gm2/dynamic/pass/gm2.exp: as above.
* testsuite/gm2/embedded/pass/gm2.exp: as above.
* testsuite/gm2/errors/fail/gm2.exp: as above.
* testsuite/gm2/examples/callingC/pass/gm2.exp: as above.
* testsuite/gm2/examples/callingC/run/pass/gm2.exp: as above.
* testsuite/gm2/examples/cpp/pass/gm2.exp: as above.
* testsuite/gm2/examples/cppDef/pass/gm2.exp: as above.
* testsuite/gm2/examples/hello/pass/gm2.exp: as above.
* testsuite/gm2/examples/map/pass/gm2.exp: as above.
* testsuite/gm2/exceptions/run/pass/gm2.exp: as above.
* testsuite/gm2/extensions/pass/gm2.exp: as above.
* testsuite/gm2/extensions/run/fail/gm2.exp: as above.
* testsuite/gm2/extensions/run/pass/gm2.exp: as above.
* testsuite/gm2/imports/run/pass/gm2.exp:as above.
* testsuite/gm2/iso/fail/gm2.exp: as above.
* testsuite/gm2/iso/pass/gm2.exp: as above.
* testsuite/gm2/iso/run/pass/gm2.exp: as above.
* testsuite/gm2/isocoroutines/run/pass/gm2.exp: as above.
* testsuite/gm2/isolib/run/pass/gm2.exp: as above.
* testsuite/gm2/link/pim/fail/gm2.exp: as above.
* testsuite/gm2/link/pim/fail/import.mod: as above.
* testsuite/gm2/link/pim/pass/gm2.exp: as above.
* testsuite/gm2/linking/libarchive/pass/gm2.exp: as above.
* testsuite/gm2/pim/fail/gm2.exp: as above.
* testsuite/gm2/pim/options/bounds/fail/gm2.as above.exp:
* testsuite/gm2/pim/options/optimize/run/pass/gm2.expas above.:
* testsuite/gm2/pim/pass/gm2.exp: as above.
* testsuite/gm2/pim/run/fail/gm2.exp: as above.
* testsuite/gm2/pim/run/pass/gm2.exp: as above.
* testsuite/gm2/pimcoroutines/pass/gm2.exp: as above.
* testsuite/gm2/pimlib/coroutines/pass/gm2.exp: as above.
* testsuite/gm2/pimlib/logitech/pass/gm2.exp: as above.
* testsuite/gm2/pimlib/logitech/run/pass/gm2.exp: as above.
* testsuite/gm2/pimlib/pass/gm2.exp: as above.
* testsuite/gm2/pimlib/run/pass/gm2.exp: as above.
* testsuite/gm2/pimlib/ulm/run/pass/gm2.exp: as above.
* testsuite/gm2/quads/run/pass/gm2.exp: as above.
* testsuite/gm2/switches/check-all/run/fail/gm2.exas above.p:
* testsuite/gm2/switches/check-all/run/pass/gm2.exp:as above.
* testsuite/gm2/switches/extended-opaque/fail/gm2.exp: as above.
* testsuite/gm2/switches/extended-opaque/pass/gm2.exp: as above.
* testsuite/gm2/switches/iso/run/pass/gm2.exp: as above.
* testsuite/gm2/switches/makeall/fail/gm2.exp: as above.
* testsuite/gm2/switches/optimization/run/pass/gm2.exp: as above.
* testsuite/gm2/switches/pedantic-params/fail/gm2.exp: as above.
* testsuite/gm2/switches/pedantic-params/pass/gm2.exp: as above.
* testsuite/gm2/switches/pic/run/pass/gm2.exp: as above.
* testsuite/gm2/switches/pim2/run/pass/gm2.exp: as above.
* testsuite/gm2/switches/pim3/run/pass/gm2.exp: as above.
* testsuite/gm2/switches/pim4/run/pass/gm2.exp: as above.
* testsuite/gm2/types/run/pass/gm2.exp: as above.
* testsuite/gm2/ulmlib/pass/gm2.exp: as above.
* testsuite/gm2/ulmlib/std/pass/gm2.exp: as above.
* testsuite/gm2/ulmlib/sys/pass/gm2.exp: as above.
2014-10-03 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-libs/FpuIO.mod: ensure that the debugging preprocessing
directives are only turned on by a specific flag.
* gm2/gm2spec.c: remove GM2_ROOT environment variable and use
GM2_PREFIX and GM2_LIBEXEC instead. These override the --prefix
and --libexec strings used at compile time and allow users to move
the complete tree of binaries to a different directory hierarchy.
2014-10-01 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2Code.mod: tidied up text in qprintf0
* gm2/gm2-compiler/M2Comp.mod: tidied up text in qprintf0
* gm2/gm2-gcc/m2top.def: removed non needed procedure.
* gm2/gm2-gcc/m2top.h: removed non needed function.
2014-09-30 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: removed sckt.c from being built.
* gm2/bnf/gm2l.bnf: corrected import of procedures from Lists.
* gm2/bnf/gm2m.bnf: added import of DEALLOCATE.
* gm2/gm2-compiler/M2Batch.def: added export of LookupModule, LookupOuterModule.
* gm2/gm2-compiler/M2Batch.mod: added import of GetSym.
* gm2/gm2-compiler/M2Comp.mod: added descriptions for each pass.
* gm2/gm2-compiler/M2Error.def: (New procedure declarations) WarnFormat0, WarnFormat1.
* gm2/gm2-compiler/M2Error.mod: (New procedures) WarnFormat0, WarnFormat1.
* gm2/gm2-compiler/M2Pass.def: added IsPassC to export list.
* gm2/gm2-compiler/M2Range.mod: import BuildGreaterThanOrEqual.
* gm2/gm2-compiler/P1SymBuild.mod: added import of procedures from List.
* gm2/gm2-libs-ch/dtoa.c: corrected dates and tidied up spacing.
* gm2/gm2-libs-ch/wrapc.c: corrected dates and tidied up spacing.
* m2/configure: regenerated.
* m2/configure.ac: removed verbose messages.
* make gm2.paranoid now works on Wheezy.
2014-09-28 Gaius Mulley <gaius@gnu.org>
* libgm2/config.h.in: removed HAVE_GETTIMEOFDAY, added HAVE_STRUCT_TIMEVAL,
removed TIME_WITH_SYS_TIME.
* libgm2/configure: rebuilt.
* libgm2/configure.ac: removed AC_HEADER_TIME. Check for struct timeval.
Added GM2_UNDEF macro. GM2_CHECK_LIB rewritten.
* libgm2/libpim/Selective.c: use HAVE_STRUCT_TIMEVAL rather than HAVE_SELECT.
2014-09-27 Gaius Mulley <gaius@gnu.org>
* gm2/examples/pge/macroObjects.def: fixed parameter names so that
implementation and definition modules match.
* gm2/examples/pge/twoDsim.mod: commented out include.
* gm2/gm2-compiler/M2Comp.mod: only attempt to parse an implementation
if the filename is found. This avoids a bug when -fcpp -fm2-whole-program
was used.
* gm2/gm2-compiler/M2Preprocess.mod: corrected dates.
* gm2/gm2-compiler/M2Preprocess.mod: tidied up formatting.
* gm2/gm2-libs/DynamicStrings.mod: guard against the #defines from being
invoked necessary as users may now use -fcpp and -fm2-whole-program and thus
turn on internal debugging of gm2 libraries.
* gm2/gm2-libs/FormatStrings.mod: as above.
* gm2/gm2-libs/FpuIO.mod: as above.
* gm2/gm2-libs/SArgs.mod: as above.
* gm2/gm2-libs/SEnvironment.mod: as above.
* gm2/gm2-libs/SFIO.mod: as above.
* gm2/gm2-libs/StringConvert.mod: as above.
* gm2/lang-specs.h: changed formatting.
2014-09-23 Gaius Mulley <gaius@gnu.org>
* gm2/config-lang.in: added entry for gm2/examples/pge/Makefile.
* gm2/gm2-compiler/M2Range.mod: rewritten CodeForLoopEnd.
(SameTypesCodeForLoopEnd) New procedure.
(DiffTypesSameForLoopEnd) New procedure.
All regression tests pass under Debian Wheezy amd64.
* gm2/examples/pge/Makefile.in: fixed post rules for world.
* gm2/gm2-libs/config-host: rebuilt.
* gm2/gm2-libs/config-host.in: 1.0.9.
* gm2/gm2-libs/config-target: rebuilt.
* gm2/gm2-libs/config-target.in: 1.0.9.
* gm2/gm2.texi: updated release map.
* gm2/gm2spec.c: removed C++ comment.
* gm2/version.c: 1.0.9.
* Released 1.0.9 Beta Release.
2014-09-17 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2Range.mod: minor fixes which solve
testsuite/gm2/pim/run/pass/For5.mod.
* gm2/gm2-libs-iso/RTgen.mod: include guards to ensure that
the do procedure functions are only called if >0 bytes are
to be read/written.
2014-09-16 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2Quads.mod: removed RangeCheck quadruples from
changing the read/write lists. Also removed PutWriteQuad
from being called inside MarkAsRead. More regression tests pass.
(testsuite/gm2/errors/fail/testfio.mod)
(testsuite/gm2/errors/fail/testinit.mod)
* gm2/gm2.texi: changed the -fstatistics entry to -fm2-statistics.
Added entry for -fm2-whole-program.
* gm2/examples/pge/Makefile: corrected rules to whole and foo
and introduced $(CHECK).
* examples/pge/history.mod: hide debugging.
* gm2/examples/pge/twoDsim.mod: hide debugging.
* gm2/gm2-compiler/M2Range.mod: fixed bug in CodeEndForLoop.
2014-09-15 Gaius Mulley <gaius@gnu.org>
* gm2/examples/pge/foo.mod: added comment.
* gm2/gm2-compiler/M2Code.mod: removed references to StrIO and
NumberIO and replaced them with printf0 and printf1.
Re-introduced OptimizationAnalysis which also reports on
total source lines compiled.
* gcc/gm2/gm2-compiler/M2Options.def: SetStatistic (New procedure).
* gcc/gm2/gm2-compiler/M2Options.def: SetStatistic (New procedure)
implemented.
* gm2/gm2-gcc/m2options.h: SetStatistic (New prototype).
* gm2/gm2-lang.c: handle -fm2-statistics.
* gm2/lang-options.h: enumerate -fm2-statistics.
* gm2/lang.opt: enumerate -fm2-statistics.
* gm2/m2.flex: include timevar.h. Call timevar_push, timevar_pop
inside m2flex_GetToken.
2014-09-14 Gaius Mulley <gaius@gnu.org>
* gm2/README: corrected language (gm2) and removed enable-__cxa_atexit.
* gm2/README: fixed source to sources.
* libgm2/libpim/Selective.c: use HAVE_SELECT rather than HAVE_TIMEVAL.
2014-09-13 Gaius Mulley <gaius@gnu.org>
* the majority of these changes fix a bug reported by John O Goyo
(see testsuite/gm2/imports/run/pass/innermods.mod in cc1gm2.
* gm2/Make-lang.in: added P0SymBuild.mod into list of modules. Added
build rule for m2-1.bnf and changed m2.bnf because of new file name.
Changed calls to $(M2LINK) to include --name option.
* gm2/gm2-compiler/M2Batch.def: (LookupModule) New procedure definition.
(LookupOuterModule) New procedure definition.
* gm2/gm2-compiler/M2Batch.mod: (LookupOuterModule) New procedure function.
(LookupModule) New procedure function.
* gm2/gm2-compiler/M2Comp.mod: introduced new Pass0.
* gm2/gm2-compiler/M2GCCDeclare.mod: modified debugging.
* gm2/gm2-compiler/M2Inline.def: Removed file.
* gm2/gm2-compiler/M2Inline.mod: Removed file.
* gm2/gm2-compiler/M2Pass.def: (IsPass0) New procedure function.
* gm2/gm2-compiler/P0SymBuild.mod: New file, generate a scope tree.
* gm2/gm2-compiler/P1SymBuild.mod: changed to follow the scope tree
generated during pass0.
* gm2/gm2-compiler/P1SyntaxCheck.def: removed file.
* gm2/gm2-compiler/P2SymBuild.mod: use LookupModule instead
of MakeDefinitionSource.
* gm2/gm2-compiler/P3SymBuild.mod: use LookupModule instead
of MakeDefinitionSource.
* gm2/gm2-compiler/PCSymBuild.mod: use LookupModule instead
of MakeDefinitionSource.
* gm2/gm2-compiler/P0SymBuild.mod:
* gm2/gm2-compiler/SymbolTable.def:
(PutModuleContainsBuiltin) New procedure definition.
(IsBuiltinInModule) New procedure function definition.
(PutHiddenTypeDeclared) New procedure definition.
(IsHiddenTypeDeclared) New procedure function definition.
* gm2/gm2-compiler/SymbolTable.mod:
(ContainsBuiltin) new field in DefImp.
(PutModuleContainsBuiltin) New procedure.
(IsBuiltinInModule) New procedure function.
(PutExported) allow modules to be imported from.
* gm2/gm2-compiler/m2flex.def: (GetTotalLines)
New function definition.
* gm2/init/gm2-gccinit: added P0SymBuild.
* gm2/m2.flex: (m2flex_GetTotalLines) New function.
* gm2/tools-src/mklink.c: honour CFLAGS and LDFLAGS
(fixes a build problem on 64 bit Solaris, reported by
John O Goyo).
* testsuite/gm2/errors/fail/gm2.exp:
* testsuite/gm2/errors/fail/testfio.mod:
* testsuite/gm2/imports/run/pass/c.def:
* testsuite/gm2/imports/run/pass/c.mod:
* testsuite/gm2/imports/run/pass/gm2.exp:
* testsuite/gm2/imports/run/pass/innermods3.mod:
* m2/libmin/Makefile.am: build SYSTEM.def with -fno-exceptions
* m2/libmin/Makefile.in: regenerated.
* gm2/bnf/m2-1.bnf: new file (copied from m2.bnf with
some name changes).
* gm2/bng/m2.bnf: new contents (pass 0).
* gm2/gm2-compiler/P0SymBuild.def: New file.
* gm2/gm2-compiler/P0SymBuild.mod: New file.
2014-09-04 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-gcc/m2builtins.c: corrected spelling for huge_val, huge_valf,
huge_vall.
2014-09-03 Gaius Mulley <gaius@gnu.org>
* libgm2/config.h.in: rebuilt.
* libgm2/configure: rebuilt.
* libgm2/configure.ac: fixes to the GM2_CHECK_LIB macro to correctly
test for the existence of library functions.
* gm2/configure.in: added test for whether the pth library exists
and issue a warning if it does not.
* gm2/gm2-lang.c: new option -fno-pth. Do not link against -lpth.
* gm2/gm2.texi: document new option.
* gm2/gm2spec.c: implement the new option, by default -lpth is included
into the link process. Add the library before -lstdc++.
* gm2/lang-options.h: entry for new option.
* gm2/lang.opt: entry for new option.
2014-09-02 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: removed unnecessary SO, SO_O2, O2 library build
rules.
* gm2/gm2-compiler/SymbolTable.mod: removed unnecessary Type, Size, Offset
fields from Module, DefImp symbols. Also removed their initialisation.
2014-08-30 Gaius Mulley <gaius@gnu.org>
* gm2/bnf/gm2m.bnf: fixed bug so that nested local modules
propagate their imported modules outwards.
(see testsuite/gm2/imports/run/pass/innermods3.mod).
* gm2/bnf/m2.bnf: corrected dates.
* gm2/bnf/gm2l.bnf: commented out printfs.
* rebuild the all configure files changed by the gm2 front
end.
* rebuilt all patch files.
(gm2/patches/gcc/4.7.3/01-patches, gm2/patches/gcc/4.7.3/02-patches,
gm2/patches/gcc/4.7.3/03-patches, gm2/patches/gcc/4.7.3/04-patches,
gm2/patches/gcc/4.7.3/05-patches, gm2/patches/gcc/4.7.3/12-patches)
2014-08-29 Gaius Mulley <gaius@gnu.org>
* gm2/bnf/gm2m.bnf: fixed bug reported by John O Goyo
(see testsuite/gm2/imports/run/pass/innermods.mod and
testsuite/gm2/imports/run/pass/innermods2.mod).
Maintain a block of nested modules and allow inner modules
to import objects via FROM x statements. (BeginBlock)
New procedure. (EndBlock) New procedure. (RegisterLocalModule)
New procedure. (RegisterImport) New procedure. The ebnf
rules were extended to nearly the complete language (with the exception
of full parsing of definition modules). Similar to gm2l except
the block retains the module level.
2014-08-28 Gaius Mulley <gaius@gnu.org>
* gm2/bnf/gm2l.bnf: fixed bug reported by John O Goyo
(see testsuite/gm2/imports/run/pass/innermods.mod).
Maintain a block of nested modules and allow inner modules
to import objects via FROM x statements. (BeginBlock)
New procedure. (EndBlock) New procedure. (RegisterLocalModule)
New procedure. (RegisterImport) New procedure. The ebnf
rules were extended to nearly the complete language (with the exception
of full parsing of definition modules).
* gm2/examples/hello/Makefile.in: (pre-install-whole) New rule.
* gm2/examples/map/Makefile.in: (pre-install-whole) New rule.
* gm2/examples/pge/Makefile: (whole) New interim rule.
* gm2/gm2-compiler/M2AsmUtil.mod: import IsDefinitionForC.
2014-08-17 Gaius Mulley <gaius@gnu.org>
* gm2/examples/map/Makefile.in: (pre-install-whole) corrected rule.
* gm2/examples/pge/Indexing.def: removed file.
* gm2/examples/pge/Indexing.mod: removed file.
* gm2/gm2-libs/FIO.mod: modified so that it can be compiled under -fiso.
* gm2/gm2-libs/Indexing.mod: modified so that it can be compiled under -fiso.
2014-08-16 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: use new libgm2.a when building stage2.
* gm2/examples/map/Makefile.in: (pre-install-whole) New rule.
* gm2/gm2-compiler/M2AsmUtil.mod: (SymNeedsModulePrefix)
New procedure function. (GetModulePrefix) use SymNeedsModulePrefix.
* gm2/gm2-compiler/M2Batch.def: (ForeachSourceModuleDo) new procedure.
(IsSourceSeen) new procedure function.
* gm2/gm2-compiler/M2Batch.mod: implement ForeachSourceModuleDo
and IsSourceSeen.
* gm2/gm2-compiler/M2Code.mod: import WholeProgram and modify (Code)
and dependent procedures to behave differently if WholeProgram is
set.
* gm2/gm2-compiler/M2Comp.mod: (NeedToParseImplementation) New procedure
function.
* gm2/gm2-compiler/M2GCCDeclare.mod: import WholeProgram and modify
declaration of procedure/module/types/variables to behave differently
if WholeProgram is set.
* gm2/gm2-compiler/M2GenGCC.mod: (IsExportedGcc) New procedure function.
CodeStartModFile pushes the module scope and the global scope.
CodeStartDefFile removed unnecessary code. CodeEndFile call
popGlobalScope. CodeProcedureScope use IsExportedGcc instead of IsExported.
Change CompilingMainModule to CompilingMainModule OR WholeProgram.
* gm2/gm2-compiler/M2Options.def: (DebugTraceQuad, DebugTraceAPI) New
internal options. (SetDebugTraceQuad) New procedure definition.
(SetDebugTraceAPI) New procedure definition.
* gm2/gm2-compiler/M2Options.mod: (SetWholeProgram) remove return type.
(SetDebugTraceQuad) implemented. (SetDebugTraceAPI) implemented.
* gm2/gm2-compiler/M2Scope.def: (DisplayScope) New procedure.
* gm2/gm2-gcc/m2options.h: (SetDebugTraceQuad) exported.
(SetDebugTraceAPI) exported.
* gm2/gm2-lang.c: added case for OPT_fdebug_trace_quad and
OPT_fdebug_trace_api.
* gm2/lang-options.h: added entry for -fm2-whole-program.
* gm2/lang.opt: added entry for -fdebug-trace-quad, -fdebug-trace-api
and -fm2-whole-program.
* many testsuite scripts corrected to reflect the new library locations.
2014-07-30 Gaius Mulley <gaius@gnu.org>'
* gm2/gm2-compiler/M2Comp.mod: corrected logical expression in
NeedToParseImplementation.
2014-07-29 Gaius Mulley <gaius@gnu.org>
* gm2/README: updated preferred snapshot test release. Use git rather
than CVS. Changed configuring advice as using 4.7.3 rather than 4.1.2.
* gm2/gm2-compiler/M2Comp.mod: start of changes which allow -fwhole-program
to be effective.
* gm2/gm2-compiler/M2Options.def: (WholeProgram) new variable, define
and export. (SetWholeProgram) New procedure.
* gm2/gm2-compiler/M2Options.mod: (SetWholeProgram) New procedure implemented.
WholeProgram default to FALSE.
* gm2/gm2-compiler/M2System.mod: allow user to import SIZE from ISO SYSTEM.
Not strictly ISO but it is more flexible with -fwhole-program which will
want to compile everything in a single dialect.
* gm2/gm2-gcc/m2options.h: (M2Options_SetWholeProgram) New declaration.
* gm2/gm2-lang.c: process -fwhole-option by calling M2Options_SetWholeProgram.
* gm2/gm2-libs-iso/SYSTEM.def: add SIZE to export qualified list.
* gm2/lang.opt: add -fwhole-option to list of legal Modula-2 options.
* testsuite/gm2/calling-c/datatypes/unbounded/run/pass/gm2.exp: correct
path to retieve path and libraries from the build area and avoid
the install area.
* libgm2/config.h.in: rebuilt.
* libgm2/configure: rebuilt.
* libgm2/configure.ac: define GM2_CHECK_LIB macro and use it to
safely detect the presence of all used libc and libm functions
used by the Modula-2 libraries.
2014-07-23 Gaius Mulley <gaius@gnu.org>
* fixes to the regression testsuite gm2.exp files to pick up the
libraries from the new build locations.
* libgm2/libiso/Makefile.am: build correct iso version of SYSTEM.
* gm2/gm2.texi: updated the status of the gcc-4.7 branch of gm2.
Also removed an unnecessary --enable-libgm2 option from the
documentation.
2014-07-16 Gaius Mulley <gaius@gnu.org>
* gm2/examples/pge/Makefile: remove hack rule.
* libgm2/config.h.in: rebuilt.
* libgm2/configure: rebuilt.
* libgm2/configure.ac: test for libc functions.
* libgm2/libpim/Selective.c: provide dummy KillSet procedure
function.
2014-07-15 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2Range.mod: CodeWholeNonPos, CodeWholeZero
assign location before it is used.
2014-07-14 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: overhauled to ensure that target and host are
distinct.
* gm2/gm2-compiler/M2GCCDeclare.mod: IsExternal (New procedure function).
FindContext replaces FindTreeScope. IsGlobal (New procedure function).
DeclareVariable uses IsGlobal, IsExternal and FindContext.
* gm2/gm2-gcc/init.c: can now be compiled by a C or C++ compiler.
* gm2/gm2-gcc/m2block.c: new fields to binding_level. is_global and
context. The compiler now correctly uses a translation_unit tree
node to contain the global variables. Bug fixes to correct the
context of local variables. We also ensure that all locals
are declared. Added more self checking debugging code.
* gm2/gm2-gcc/m2block.def: includeDecl (New procedure function).
GetGlobalContext (New procedure function).
* gm2/gm2-gcc/m2block.h: allow m2block.[ch] to be compiled by
a C or C++ compiler, export GetGlobalContext, finishGlobals,
and includeDecl.
* gm2/gm2-gcc/m2builtins.h: allow m2block.[ch] to be compiled by
a C or C++ compiler.
* gm2/gm2-gcc/m2convert.h: allow m2block.[ch] to be compiled by
a C or C++ compiler.
* gm2/gm2-gcc/m2decl.c: simplified and corrected declaration of a
variable. BuildParameterDeclaration simplified as it only handles
procedure/function parameters and not function/procedure types.
* gm2/gm2-gcc/m2decl.h: allow m2decl.[ch] to be compiled by
a C or C++ compiler.
* gm2/gm2-gcc/m2except.h: allow m2except.[ch] to be compiled by
a C or C++ compiler.
* gm2/gm2-gcc/m2expr.h: allow m2expr.[ch] to be compiled by
a C or C++ compiler.
* gm2/gm2-gcc/m2linemap.h: allow m2linemap.[ch] to be compiled by
a C or C++ compiler.
* gm2/gm2-gcc/m2misc.h: allow m2misc.[ch] to be compiled by
a C or C++ compiler.
* gm2/gm2-gcc/m2options.h: allow m2options.[ch] to be compiled by
a C or C++ compiler.
* gm2/gm2-gcc/m2statement.h: allow m2statement.[ch] to be compiled by
a C or C++ compiler.
* gm2/gm2-gcc/m2statement.c: call cgraph_finalize_function whenever
we finish a function. Unit at a time change.
* gm2/gm2-gcc/m2top.h: allow m2top.[ch] to be compiled by
a C or C++ compiler.
* gm2/gm2-gcc/m2type.c: specifically declares procedure types
and parameter types. Corrected a bug with procedure/function
type declaration.
* gm2/gm2-gcc/m2type.def: BuildProcTypeParameterDeclaration (New procedure
function). BuildEndFunctionType additional parameter.
* gm2/gm2-gcc/m2type.h: allow m2type.[ch] to be compiled by
a C or C++ compiler.
* gm2/gm2-lang.c: m2_write_global_declarations (New function).
gm2_langhook_write_globals for each translation unit write out globals.
* gm2/gm2-libs-pim/Break.c: corrected #include syntax. Reformatted to
conform to GNU coding standards.
* gm2/gm2-libs/config-host: rebuilt.
* gm2/gm2-libs/config-target: rebuilt.
* gm2/gm2-libs/config-target.in: use GCC_NO_EXECUTABLES.
* gm2/gm2spec.c: removed style of libraries, added new location of
libraries and new library names.
* gm2/m2pp.c: pl (New function). m2pp_decl_list (New function).
m2pp_decl_bool (New function). remember (New function).
m2pp_translation (New function). m2pp_module_block (New function).
m2pp_procedure_type modified to understand varargs.
* gm2/tools-src/createUlmSys: fixed to test for presence of include
files so that it can be run in a cross compiler for a minimal target.
* gm2/examples/pge/Makefile: remove rule hack from objects.
* gm2/gm2-compiler/M2GenGCC.mod: CodeDivTrunc, FoldDivTrunc,
CodeDivFloor, FoldDivFloor check operand types and if REAL/COMPLEX
family are used then call BuildRDiv instead. Fixes a compiler error
exposed by gm2/examples/pge/roots.mod. BinaryOperandRealFamily
(New procedure function).
* gm2/gm2-gcc/m2expr.c: m2expr_BuildRDiv (New function).
* gm2/gm2-gcc/m2expr.def: m2expr_BuildRDiv (New definition).
* gm2/gm2-gcc/m2expr.h: m2expr_BuildRDiv (New prototype).
2014-04-20 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2GenGCC.mod: (CodeInitAddress) declare tokenno
and location and set them correctly.
* gm2/gm2spec.c: let the -B switch determine where the (preprocessor)
cc1 is found.
2014-04-05 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2GenGCC.mod: (CodeInitAddress) New procedure.
(CodeStatement) added case clause for InitAddressOp which calls
CodeInitAddress.
* gm2/gm2-compiler/M2Quads.def: added InitAddressOp.
* gm2/gm2-compiler/M2Quads.mod: (CheckVariableAt) generate
an InitAddressOp instead of CodeBecomesOp. (WriteQuad)
new case clause for InitAddressOp. (WriteOperands) new case
clause for InitAddressOp.
* fixes variable at address bugs (see
testsuite/gm2/embedded/pass/varataddress2.mod)
2014-03-19 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-gcc/m2except.c: (do_call3) corrected number of parameters.
(build_exc_ptr) add assertion. (gm2_build_throw) add location.
* gm2/tools-src/createUlmSys: improved error message.
* libgm2/Makefile.in: build and install the Ulm libraries.
Included $(GM2_OBJ)/gm2-libs/gm2-libs-target.h as a dependant
to $(GM2_OBJ)/ulm-lib-gm2/sys/SYSTEM.c.
2014-03-18 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-gcc/m2except.c: do_call0 (New function).
do_call1 (New function). do_call3 (New function).
build_exc_ptr (rewritten to use do_call1).
do_free_exception (rewritten to use do_call1).
do_throw (rewritten to use do_call3).
do_rethrow (rewritten to use do_call0).
gm2_build_throw (removed unused local variables).
do_begin_catch (rewritten to use do_call1).
do_end_catch (rewritten to use do_call0).
* gm2/gm2-lang.c: genericize_try_block (New function).
genericize_catch_block (New function).
gm2_langhook_gimplify_expr call genericize_try_block
and genericize_catch_block.
2014-03-12 Gaius Mulley <gaius@gnu.org>
* changed persmissions to most files to remove the execute
bit.
2014-03-12 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: fixed verify flags for gm2.verifyparanoid
and gm2.verifystage12.
* gm2/gm2-libs-iso/M2RTS.mod: detect double HALT and exit with
-1.
* gm2/gm2-libs/M2RTS.mod: detect double HALT and exit with
-1.
* gm2/gm2-libs/Indexing.mod: use memmove rather than memcpy
which fixes the regression testsuite/gm2/isolib/run/pass/termfile.mod.
* gm2/gm2-libs/libc.def: provide definition for memmove.
2014-02-19 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: include the search path -I$(srcdir)/gm2/gm2-gcc
when building stage2 from the compiler sources.
* gm2/bnf/gm2l.bnf: import Dup from DynamicStrings.
* gm2/gm2-compiler/M2ALU.mod: fixed many imports so that
the module can be built during stage2, via xgm2.
* gm2/gm2-compiler/M2Base.mod: fixed many imports so that
the module can be built during stage2, via xgm2.
* gm2/gm2-compiler/M2Preprocess.mod: corrected import of
CppCommandLine from M2Options rather than M2DriverOptions.
* gm2/gm2-compiler/M2Range.mod: fixed many imports so that
the module can be built during stage2, via xgm2.
* gm2/gm2-compiler/M2System.mod: fixed many imports so that
the module can be built during stage2, via xgm2.
* gm2/gm2-compiler/SymbolConversion.mod: fixed many imports so that
the module can be built during stage2, via xgm2.
* gm2/gm2-compiler/m2flex.def: fixed many imports so that
the module can be built during stage2, via xgm2.
* gm2/Make-lang.in: added attribs.o to link stage2/gm2/cc1gm2.
Removed $(BACKENDLIBS) $(LIBSTDCXX) from the dependancies of
stage2/gm2/cc1gm2. Added -I$(srcdir)/gm2/gm2-gcc to
all gm2/gm2-compiler-paranoid rules.
* gm2/gm2-compiler/M2Options.def: added many procedures to the
list of export qualified identifiers.
* gm2/gm2-compiler/SymbolTable.mod: changed needsUnsigned
and needsLong to BOOLEAN.
2014-02-18 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2GenGCC.mod: fixed many imports so that
the module can be built during stage2, via xgm2.
* gm2/gm2-compiler/M2GCCDeclare.mod: fixed many imports so that
the module can be built during stage2, via xgm2.
* gm2/gm2-gcc/m2decl.def: use BOOLEAN parameters rather than
INTEGERs.
* gm2/p2c/p2c-src/src/decl.c: tidied up formatting.
2014-02-17 Gaius Mulley <gaius@gnu.org>
* gm2/config-lang.in: added m2block.c, m2builtins.c and m2decl.c
to the list of gtfiles.
* gm2/gm2-gcc/m2block.c: changed layout of the GTY binding level
structure and use ggc_alloc_binding_level rather than xmalloc.
Include gt-gm2-m2block.h.
* gm2/gm2-gcc/m2type.c: include gt-gm2-m2decl.h.
* gm2/gm2-gcc/m2expr.c: use ggc_alloc_atomic rather than xmalloc.
Include gt-gm2-m2expr.h.
* gm2/gm2-gcc/m2statement.c: include gt-gm2-m2statement.h.
* gm2/gm2-gcc/m2type.c: layout GTY structure correctly and
use ggc_alloc_array_desc and ggc_alloc_struct_constructor
instead of xmalloc. Include gt-gm2-m2type.h.
2014-02-10 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: added -I$(srcdir)/gm2/gm2-gcc to all
the compiler build rules when building gm2/gm2-compiler via xgm2.
* gm2/gm2-compiler/M2ALU.mod: fix imports so that this file can
be built by xgm2.
* gm2/gm2-compiler/M2GenGCC.mod: fixed many (but not all) of the
imports so this file can be compiled by xgm2.
* gm2/gm2-compiler/M2LexBuf.def: add TokenToLocation to export
qualified list.
* gm2/gm2-compiler/M2Options.def: remove IsAnOption,
IsAndOptionAndArg and ParseOptions from the export list.
(SetOptimizing) correct parameter to CARDINAL.
* gm2/gm2-compiler/M2Options.mod: include Dup into export list.
* gm2/gm2-gcc/m2decl.def: import ADDRESS from SYSTEM.
* gm2/gm2-gcc/m2expr.def: import ADDRESS from SYSTEM.
(BuildBinarySetDo) added missing ';'.
* gm2/gm2-gcc/m2statement.def: import ADDRESS from SYSTEM.
* gm2/gm2-gcc/m2top.def: (SetFlagUnitAtATime) alter parameter to
BOOLEAN.
2014-02-02 Gaius Mulley <gaius@gnu.org>
* gm2/bnf/m2-2.bnf: changed rule for ByteAlignment to use the ISO
Modula-2 syntax <* *> extension.
* gm2/bnf/m2-3.bnf: changed rule for ByteAlignment to use the ISO
Modula-2 syntax <* *> extension.
* gm2/bnf/m2-c.bnf: changed rule for ByteAlignment to use the ISO
Modula-2 syntax <* *> extension.
* gm2/bnf/m2-h.bnf: changed rule for ByteAlignment to use the ISO
Modula-2 syntax <* *> extension.
* gm2/bnf/m2.bnf: changed rule for ByteAlignment to use the ISO
Modula-2 syntax <* *> extension.
* gm2/gm2-compiler/M2GenGCC.mod: pass a location as the
first parameter to BuildTryBegin, BuildCatchBegin,
BuildCatchEnd.
* gm2/gm2-compiler/M2Quads.def: changed comment to reflect
new code (bytealignment) is used instead of (ALIGNED).
* gm2/gm2-compiler/M2Quads.mod: change ALIGNED to bytealignment.
BuildAlignment, changed error message to reflect bytealignment.
* gm2/gm2-compiler/P2SymBuild.def: changed comment to reflect
new code (bytealignment) is used instead of (ALIGNED).
* gm2/gm2-compiler/P2SymBuild.mod: BuildAligned check for
the alignment word (bytealignment). BuildVarAlignment
* gm2/gm2-gcc/m2except.def: (InitExceptions) corrected to
include a parameter, location. (BuildCatchBegin) corrected
to include a parameter, location. (BuildCatchEnd) corrected
to include a parameter, location.
* gm2/gm2.texi: changed documentation to reflect new syntax
of alignment used in variable and type declaration.
* testsuite/gm2/extensions/pass/align.mod: changed test code
to reflect new syntax.
* testsuite/gm2/extensions/pass/align2.mod: changed test code
to reflect new syntax.
* testsuite/gm2/extensions/run/pass/align3.mod: changed test code
to reflect new syntax.
* testsuite/gm2/extensions/run/pass/align4.mod: changed test code
to reflect new syntax.
* testsuite/gm2/extensions/run/pass/align5.mod: changed test code
to reflect new syntax.
* testsuite/gm2/extensions/run/pass/align6.mod: changed test code
to reflect new syntax.
* testsuite/gm2/extensions/run/pass/align7.mod: changed test code
to reflect new syntax.
* testsuite/gm2/extensions/run/pass/card16p.mod: corrected test.
* testsuite/gm2/extensions/run/pass/card32p.mod: corrected test.
* testsuite/gm2/extensions/run/pass/card64p.mod: corrected test.
* testsuite/gm2/extensions/run/pass/card8p.mod: corrected test.
2014-01-24 Gaius Mulley <gaius@gnu.org>
* gm2/examples/pge/foo.mod: changed demo.
* gm2/gm2-compiler/M2GenGCC.mod: no longer pass
the fifth parameter to BuildArray.
* gm2/gm2-gcc/m2expr.c: removed the fifth parameter to
BuildArray. Pass NULL_TREE to build4 of a ARRAY_REF.
* gm2/gm2-gcc/m2expr.def: removed the fifth parameter to
the definition of BuildArray.
* gm2/gm2-gcc/m2expr.h: removed the fifth parameter to
the prototype of BuildArray.
2014-01-18 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-gcc/m2expr.c: CheckAddressToCardinal (New function).
BuildAdd use CheckAddressToCardinal for both operands.
BuildSub use CheckAddressToCardinal for both operands.
BuildDivTrunc use CheckAddressToCardinal for both operands.
BuildModTrunc use CheckAddressToCardinal for both operands.
BuildDivFloor use CheckAddressToCardinal for both operands.
BuildModFloor use CheckAddressToCardinal for both operands.
BuildMult use CheckAddressToCardinal for both operands.
* gm2/gm2-gcc/m2type.c: m2_cardinal_address_type_node new
internal datatype. GetCardinalAddressType (New function).
build_m2_cardinal_address_type_node (New function).
* gm2/gm2-gcc/m2type.h: m2type_GetCardinalAddressType
(New function prototype).
2014-01-15 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: use $(LINKER) rather than $(XGCC).
use $(COMPILER) $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS)
to aid building gm2 as a cross compiler.
* gm2/gm2-gcc/m2expr.c: check operand types for ADDRESS
in multiply, divide, modulus and issue appropriate errors.
* gm2/gm2-gcc/m2type.c: (IsAddress) New function.
* gm2/gm2-gcc/m2type.def: (IsAddress) New function.
* gm2/gm2-gcc/m2type.h: (IsAddress) New function prototype.
* gm2/gm2-lang.c: removed duplicate declaration of gm2_gc_root.
Added compiler directives to unused parameters in
gm2_langhook_gimplify_expr.
2014-01-14 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: substituted $(CC) for $(COMPILER) when
building gm2/gm2-lang.o, gm2/stor-layout.o and gm2/m2pp.o.
* gm2/gm2-gcc/m2builtins.c: added BT_FN_NONE to the
builtin_prototype enum. Changed fclass to enum built_in_class.
Modified compound constant constructor to contain correct types
in the terminating array element.
* gm2/gm2-gcc/m2convert.c: remove stop function.
* gm2/gm2-gcc/m2decl.c: remove stop function.
* gm2/gm2-gcc/m2expr.c: remove stop function. Comment out
default_convert_binary_operands and build_nop. Comment out
unused part of m2expr_BuildNegate.
* gm2/gm2-gcc/m2misc.c: corrected formatting.
* gm2/gm2-gcc/m2options.h: added const to the second parameter
in M2Options_CppArg.
* gm2/gm2-lang.c: added const to the declaration of opt.
* gm2/gm2-lang.h: added list of includes, added extern prototype
for gm2_langhook_init_options.
* gm2/gm2spec.c: removed prototype for get_B_or_prefix. Added
conditional compilation for printOption. Added const to
declaration of B_path. (find_executable_path) corrected
local variable declaration to include const.
(add_B_prefix) added ATTRIBUTE_UNUSED to the first parameter.
(get_B_or_prefix) removed. (add_exec_dir) corrected local
variables to include const.
* gm2/gm2version.h: added conditional compilation for the
prototype for gm2version so that it can be accessed by C and C++.
* gm2/m2pp.c: changed stack_t to m2stack_t to avoid type clash.
(pet) New function prototype. (m2pp_integer) New function
prototype. Build gm2 or C versions of m2pp_integer.
Build gm2 or C versions of m2pp_complex.

601
gcc/m2/ChangeLog-2015 Normal file
View File

@ -0,0 +1,601 @@
2015-11-30 Gaius Mulley <gaius@gnu.org>
* gm2/examples/gravity/twoDsim.mod: fixed syntax error.
* gm2/examples/pge/bounce3.mod: use groff device.
* gm2/examples/pge/bounce4.mod: use groff device.
* gm2/examples/pge/slope.mod: use groff device.
* gm2/examples/pge/stairs.mod: use groff device and increase
simulated time.
* gm2/gm2-compiler/ppg.mod: removed white space and fixed
bug with emitting source line preprocessor symbols.
* gm2/m2.flex: fixed floating point constant bug reported
by Michael Riedl (to allow 1.E10 etc).
* testsuite/gm2/iso/constreal.mod: new file.
* gm2/el/g-mode.el: fixed comment spacing at end of sentance
in the automatically generated header and updated the dates.
2015-10-07 Gaius Mulley <gaius@gnu.org>
* gm2/examples/pge/twoDsim.mod: tided up debugging.
* gm2/examples/pge/elc2.mod: New file.
* gm2/examples/pge/rboxes.mod: New file.
2015-10-06 Gaius Mulley <gaius@gnu.org>
* gm2/examples/pge/Makefile.in: build rotating-circles.m.
* gm2/examples/pge/mxmparser.py: formatting change.
* gm2/examples/pge/mxmtree.py: add terms and call pent, hex,
sept, oct for powers 5..8.
* gm2/examples/pge/roots.def: findOctic new procedure function.
* gm2/examples/pge/roots.mod: findOctic new procedure function
wrapper implemented.
* gm2/examples/pge/rotating-circles.mxm: corrected terms and
renamed some of the variables.
* gm2/examples/pge/rotating-line.mxm: tidied up comments.
* gm2/examples/pge/twoDsim.mod: new procedure functions,
pent, hex, sept, oct. New procedure getObjectOrbitingValues.
New procedure maximaCircleCollisionOrbiting. New procedure
function earlierCircleCollisionOrbiting. New procedure
findCollisionCircleLineOrbiting. Removed
findCollisionCircleRLine. findCollisionCirclePolygon call
appropriate routine depending upon whether the polygon is
orbiting. New procedure function, isOrbiting.
findCollisionLineLine call appropriate routine depending
upon whether polygon is orbiting. New procedure
findCollisionLineLineOrbiting.
2015-10-05 Gaius Mulley <gaius@gnu.org>
* gm2/examples/pge/Makefile.in: added new rule for elc2.mod
* gm2/examples/pge/coord.mod: tidied up formatting.
* gm2/examples/pge/twoDsim.mod: added Elasticity constant,
angularMomentum for objects. New procedure function (reflect).
collidePolygonAgainstMovingPolygon (rewritten).
Interim checkin.
2015-09-28 Gaius Mulley <gaius@gnu.org>
* gm2/examples/pge/Makefile.in: new example circle added.
* gm2/examples/pge/coord.def: new procedure function
perpendicular.
* gm2/examples/pge/coord.mod: implemented new procedure
function perpendicular.
* gm2/examples/pge/polar.mod: cosmetic spaces added.
* gm2/examples/pge/popWorld.mod: cosmetic spaces added.
* gm2/examples/pge/twoDsim.mod: many cosmetic changes
and also more explicit parameters which determine if
edge or corner was in collision. First cut of the polygon
collision reaction implemented.
* gm2/gm2.texi: removed duplication switch.
* gm2/gm2-gcc/m2linemap.c: use xstrdup to preserve filename
from being garbage collected. This fixes a critical bug
in the debugging output of large source files when -fcpp
was used.
2015-09-14 Gaius Mulley <gaius@gnu.org>
* gm2/examples/pge/Makefile.in: add boxes.raw and removed
dependancy output.raw from playback.
* gm2/examples/pge/bounce.mod: remove rotate.
* gm2/examples/pge/boxes.mod: changed output device.
* gm2/examples/pge/examples/exampleBoxes.py: changed sound
file examples. Changed crate example.
* gm2/examples/pge/pge.py: added poly3 method.
* gm2/examples/pge/pgeif.mod: check_range attempts to prevent
round off errors and changed to provide a better descriptive
error message.
* gm2/examples/pge/pgeplayback.py: changes to allow generation
of a movie with appropriate sounds effects.
* gm2/examples/pge/polar.def: new procedure function rotatePolar.
* gm2/examples/pge/polar.mod: implement new procedure function
rotatePolar.
* gm2/examples/pge/twoDsim.def: define new procedure function
rvel.
* gm2/examples/pge/twoDsim.mod: major changes to the definition
of the polygon data structures, now use a c of g and polar
coordinates to describe polygon. Removed rpolygon.
2015-09-09 Gaius Mulley <gaius@gnu.org>
* gm2/examples/pge/examples/exampleBoxes.py: interim checkin.
* gm2/examples/pge/pge.py: get_xvel, get_yvel, get_xaccel,
get_yaccel, process_event new methods.
* gm2/examples/pge/pgeif.def: get_xvel, get_yvel, get_xaccel,
get_yaccel (New procedure functions).
* gm2/examples/pge/pgeif.i: get_xvel, get_yvel, get_xaccel,
get_yaccel (New functions).
* gm2/examples/pge/pgeif.mod: get_xvel, get_yvel, get_xaccel,
get_yaccel (Implement new procedure functions).
* gm2/examples/pge/pgeplayback.py: added -V option, added -o
option. Added ability to create a movie with sound effects
using sox and mencoder.
* gm2/examples/pge/twoDsim.def: get_xvel, get_yvel, get_xaccel,
get_yaccel (New procedure functions).
* gm2/examples/pge/twoDsim.mod: get_xvel, get_yvel, get_xaccel,
get_yaccel (Implement new procedure functions).
2015-09-04 Gaius Mulley <gaius@gnu.org>
* gm2/examples/pge/Makefile.in: added -I to link rule.
* gm2/examples/pge/mxmmaxima.py: corrected unary -, + handling.
* gm2/examples/pge/mxmtree.py: corrected output and fixed bug
with class field.
* gm2/examples/pge/rotating-circles.mxm: removed quit command.
* gm2/examples/pge/rotating-line.mxm: removed equality and quit
command.
* gm2/examples/pge/twoDsim.mod: introduced comment for
getPolygonPoint.
* gm2/www/tools/texi2tr/html/download.html: updated download version.
* gm2/www/tools/texi2tr/html/release.html: updated stable release
version.
2015-09-03 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: fixed dates and gcc version number (4.7.4).
* gm2/Makefile.in: fixed dates.
* gm2/c.flex: fixed dates.
* gm2/configure.in; fixed dates and version number.
* gm2/examples/pge/Makefile.in: fixed compile rule to include machine
generated source.
* gm2/examples/pge/circles.mxm: simplified equation.
* gm2/examples/pge/mxmmaxima.py: many interim bug fixes.
* gm2/examples/pge/mxmparser.py: many interim bug fixes.
* gm2/examples/pge/mxmtree.py: many interim bug fixes.
* gm2/examples/pge/twoDsim.mod: improved debugging asserts
and include machine generated source, compare results of both.
* gm2/gm2-lang.c: handle -I option inside cpp args.
* gm2/m2.flex: corrected dates.
* gm2/gm2-compiler/M2Preprocess.mod: removed unnecessary printf
and corrected dates.
* released GM2 1.1.5
* gm2/gm2.texi: updated release map.
* gm2/version.c: 1.1.5.
* gm2/configure.in; 1.1.5.
* gm2/gm2-libs/config-host.in: 1.1.5.
* gm2/gm2-libs/config-target.in: 1.1.5.
* gm2/gm2-libs/config-host: rebuilt.
* gm2/gm2-libs/config-target: rebuilt.
2015-08-24 Gaius Mulley <gaius@gnu.org>
* gm2/examples/pge/examples/exampleBoxes.py: much more debugging
added.
* gm2/examples/pge/pge.py: more debugging added. Also correct
lack of initialiser bugs. Many diagnostics added.
* gm2/examples/pge/pgeif.def: added ValueOutOfRange exception.
* gm2/examples/pge/pgeif.i: added skip_until procedure.
* gm2/examples/pge/pgeif.mod: (check_range) New function
procedure. get_xpos, get_ypos, box, poly3, poly4, poly5
and poly6 all use check_range to check parameter values.
* gm2/examples/pge/twoDsim.mod: added more trace information
and test for object deletion.
* gm2/gm2-compiler/M2Base.mod: added two more metatypes, rec
and array. Check for these meta types and add their
characteristics into the assignment and expression matrices.
This allows ARRAY and RECORD of the correct size to be compatible
with WORD, BYTE, LOC etc.
* gm2/gm2-compiler/M2GCCDeclare.mod: use BuiltinsLocation during
the construction of the base types.
* gm2/gm2-compiler/M2GenGCC.mod: added internal debugging.
(CodeIndirectCall) skip type aliases for the return type.
* gm2/gm2-compiler/M2Scope.mod: added internal debugging.
* gm2/gm2-compiler/SymbolTable.mod: added missing initialisation
for ScopeQuad. This allows cc1gm2 to be run without errors by
valgrind.
* gm2/gm2-gcc/m2convert.c: convert_char_to_array (New function).
convert_string_to_array (New function). BuildConvert changed
to detect whether a const lit char or string is required to be
converted into a fixed string length. This fixes a bug reported.
* gm2/gm2-gcc/m2statement.c: tidied up code and fixed bug in
(BuildReturnValueCode). This fixes a bug exposed by
testsuite/gm2/pim/pass/typeequiv.mod.
* gm2/gm2-gcc/m2type.c: (BuildArrayStringConstructor) now adds
multiple nuls to the end of a string if length exceeds string.
* gm2/gm2-libs/MemUtils.def: tidied up formatting.
* gm2/p2c/p2c-src/src/pexpr.c: fixed bug so that constant strings
have a LOW indice of 0 not 1.
* gm2/pim/pass/typeequiv.mod: corrected date.
* gm2/pim/pass/typeequiv2.mod: corrected date.
* gm2/pim/pass/typeequiv3.mod: corrected date.
2015-08-18 Gaius Mulley <gaius@gnu.org>
* gm2/examples/pge/GC.mod: (gdbif) imported to aid debugging.
Initialised callbacks to NIL (bugfix).
* gm2/examples/pge/twoDsim.mod: removed debugging hook.
* gm2/examples/shared/Makefile.in: corrected dates.
* gm2/gm2-libs-iso/MemStream.mod: assign res to opened (bugfix).
* gm2/gm2-libs/CmdArgs.def: corrected dates.
* gm2/gm2-libs/CmdArgs.mod: corrected dates.
* libgm2/libpim/Makefile.am: added SCmdArgs.def to be installed.
* libgm2/libpim/Makefile.am: added SCmdArgs.mod to be built and
installed.
2015-08-14 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2GenGCC.mod: modified debugging hooks.
* gm2/gm2-compiler/M2Quads.mod: (BuildConvert) allow record types
to be converted as they might fit into a generic type.
* gm2/gm2-gcc/m2convert.c: (same_size_types) New function.
(converting_ISO_generic) only convert using short hand generic
types if they are the correct size. (const_to_ISO_aggregate_type)
New function.
* gm2/gm2-lang.c: (convert) simplified.
2015-08-11 Gaius Mulley <gaius@gnu.org>
* gm2/README: corrected README to reflect prefered method of obtaining
tar.gz file. Also improved the text. Removed the build instructions
and replaced it with a reference to the documentation.
* gm2/examples/pge/deviceIf.mod: added DebugTrace feature.
* gm2/examples/pge/twoDsim.mod: added DebugTrace feature.
* gm2/examples/pge/world.mod: useGroff by default.
* gm2/gm2-compiler/M2Base.mod: fixed bug to allow BYTE to be parameter
compatible with any BYTE sized type (including packed RECORD).
2015-08-05 Gaius Mulley <gaius@gnu.org>
* gm2/examples/pge/Makefile.in: new rule for playback and output.raw.
* the following changes fix bugs in packed enumeration types. Test code
is given in the regression testsuite.
* gm2/extensions/run/pass/packedrecord.mod: new file.
* gm2/extensions/run/pass/packedrecord2.mod: new file.
* gm2/gm2-compiler/M2GCCDeclare.mod: change call to BuildEndEnumeration
to pass three parameters.
* gm2/gm2-gcc/m2type.c: noBitsRequired bug fixed for the case where
values is a power of two. gm2_finish_enum introduce extra parameter
location so that we can generate a call to m2type_BuildSmallestTypeRange
if the enumeration is packed. m2type_BuildEndEnumeration change call
to gm2_finish_enum to include extra parameter.
* gm2/gm2-gcc/m2type.def: change definition of BuildEndEnumeration.
* gm2/gm2-gcc/m2type.h: change prototype of BuildEndEnumeration.
2015-07-01 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-gcc/m2convert.c: change all calls to BuildConvert,
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
GetCardinalZero to have an extra location parameter.
converting_ISO_generic (New procedure function).
const_to_ISO_type (New procedure function).
ConvertConstantAndCheck call const_to_ISO_type.
GenericToType (New procedure function).
These changes allow for much improved location references inside
type conversions and expressions. They also implement ISO WORD
assignment from a constant integer or constant cardinal.
* gm2/gm2-compiler/M2ALU.mod: change all calls to BuildConvert,
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
GetCardinalZero to have an extra location parameter.
* gm2/gm2-compiler/M2GCCDeclare.mod: change all calls to BuildConvert,
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
GetCardinalZero to have an extra location parameter.
* gm2/gm2-compiler/M2GenGCC.mod: change all calls to BuildConvert,
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
GetCardinalZero to have an extra location parameter.
* gm2/gm2-compiler/M2Range.mod: change all calls to BuildConvert,
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
GetCardinalZero to have an extra location parameter.
* gm2/gm2-gcc/m2convert.def: change all calls to BuildConvert,
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
GetCardinalZero to have an extra location parameter.
* gm2/gm2-gcc/m2convert.h: change all calls to BuildConvert,
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
GetCardinalZero to have an extra location parameter.
* gm2/gm2-gcc/m2decl.def: change all calls to BuildConvert,
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
GetCardinalZero to have an extra location parameter.
* gm2/gm2-gcc/m2decl.h: change all calls to BuildConvert,
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
GetCardinalZero to have an extra location parameter.
* gm2/gm2-gcc/m2except.c: change all calls to BuildConvert,
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
GetCardinalZero to have an extra location parameter.
* gm2/gm2-gcc/m2expr.c: change all calls to BuildConvert,
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
GetCardinalZero to have an extra location parameter.
* gm2/gm2-gcc/m2expr.def: change all calls to BuildConvert,
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
GetCardinalZero to have an extra location parameter.
* gm2/gm2-gcc/m2expr.h: change all calls to BuildConvert,
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
GetCardinalZero to have an extra location parameter.
* gm2/gm2-gcc/m2statement.c: change all calls to BuildConvert,
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
GetCardinalZero to have an extra location parameter.
* gm2/gm2-gcc/m2treelib.c: change all calls to BuildConvert,
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
GetCardinalZero to have an extra location parameter.
* gm2/gm2-gcc/m2type.c: change all calls to BuildConvert,
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
GetCardinalZero to have an extra location parameter.
* gm2/gm2-gcc/m2type.def: change all calls to BuildConvert,
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
GetCardinalZero to have an extra location parameter.
* gm2/gm2-gcc/m2type.h: change all calls to BuildConvert,
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
GetCardinalZero to have an extra location parameter.
* gm2/gm2-lang.c: change all calls to BuildConvert,
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
GetCardinalZero to have an extra location parameter.
2015-06-26 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2GenGCC.mod: ConvertTo (New procedure function).
ConvertRHS (New procedure function). IsWord (New procedure function).
CodeConvert changed names of pararmeters and introduced call to
ConvertRHS. CodeXIndr changed names of pararmeters and introduced
call to ConvertRHS. This allows ISO WORD (an array of bytes) to
be converted into CARDINAL.
* gm2/gm2-gcc/m2block.c: allow multiple calls to pushGlobalScope
and multiple calls to popGlobalScope.
* gm2-gcc/m2convert.c: check for FUNCTION_DECL in value and if so
use its address.
* gm2/gm2.texi: updated web pages in light of the unordered list
now implemented correctly in the python translation tool.
Removed many old news entries.
* gm2/www/tools/texi2tr/src/outputdev.py: implement unordered list.
* gm2/www/tools/texi2tr/src/texi2tr.py: check for 'itemize' and
'enumerate'
* testsuite/lib/gm2.exp: corrected LD_LIBRARY_PATH calculation
by testing each library in turn.
* gm2/gm2-compiler/M2GenGCC.mod: corrected type for rhs.
2015-05-30 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: added rule to detect HAVE_STPCPY in configure output.
* gm2/configure.in: check for function stpcpy.
* gm2/gm2-libs/config-target: rebuilt.
* gm2/gm2-libs/config-host: rebuilt.
* gm2/gm2-libs/config-host.in: added check for stpcpy.
* gm2/gm2config.h.in: added check for stpcpy.
* testsuite/gm2/isolib/run/pass/testio2.mod: added debugging printf.
* gm2/gm2-libs-iso/TextIO.mod: fixed bug in ReadToken so that the token
terminates with a white space or null.
* gm2/Make-lang.in: added dynamic test to check for HAVE_STPCPY.
* gm2/gm2-libs/gm2-libs-host.h.in: added check for stpcpy.
2015-05-29 Gaius Mulley <gaius@gnu.org>
* Solaris build fixes.
* gm2/Make-lang.in: added place holder for the stpcpy rule.
Added --lib $(STPCPY) to $(M2LINK) so that the Solaris 10 build
succeeds.
* gm2/gm2-libs-ch/wrapc.c: added #if defined()
to check for the presence of SIGNBIT, SIGNBITL and SIGNBITF.
* gm2/gm2-libs/config-host: rebuilt.
* gm2/gm2-libs/config-host.in: added checks for SIGNBIT, SIGNBITL
and SIGNBITF against libm.
* gm2/gm2-libs/config-target: rebuilt.
* gm2/gm2-libs/config-target.in: added checks for SIGNBIT, SIGNBITL
and SIGNBITF against libm.
* gm2/gm2spec.c: fixed many const char issues so that it can be built
with g++.
* gm2/config.h.in: added #undefs for SIGNBIT, SIGNBITL and SIGNBITF.
* gm2/configure: rebuilt.
* gm2/configure.ac: added checks for SIGNBIT, SIGNBITL
and SIGNBITF against libm.
* gm2/libpim/dtoa.c: added conditional compilation tests for
HAVE_ERRNO_H.
* gm2/libpim/ldtoa.c: added conditional compilation tests for
HAVE_ERRNO_H.
* gm2/libpim/wrapc.c: added conditional compilation tests for
SIGNBIT, SIGNBITL and SIGNBITF.
2015-05-29 Gaius Mulley <gaius@gnu.org>
* Linking fixes (-v).
* This fixes a bug reported by Christoph Schlegel and many others.
* Linking would fail when -v was present on the command line.
* gm2/gm2-compiler/M2Options.def: new parameter to DisplayVersion
(mustExit). Necessary to ensure the -v works in the linking phase.
* gm2/gm2-compiler/M2Options.mod: implement the new parameter
to DisplayVersion (mustExit).
* gm2/gm2-gcc/m2options.h: update the prototype for DisplayVersion.
This occurred because -v was rewritten to --version by gm2spec.c
and --version called exit.
* gm2/gm2-lang.c: call DisplayVersion but request it does not
exit.
* gm2/gm2spec.c: pass TRUE when handling -fgm2-version (to force
an exit). Pass FALSE when handling --version to suppress the
exit.
* gm2/gm2version.h: updated the prototype for gm2_version.
2015-05-29 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-libs-iso/TextIO.mod: new procedure SkipSpaces.
ReadToken calls SkipSpaces, this fixes a bug reported by:
(D.E.Evans <sinuhe@gnu.org>).
* gm2/lang-specs.h: fixed dates and tidied up the spec code so
that many rules are broken down into obvious stages with
inputs and outputs.
* gm2/tools-src/makeversion: changed to reflect the new gm2_version
which has a parameter, mustExit.
2015-05-04 Gaius Mulley <gaius@gnu.org>
* gm2/examples/pge: more interim checkins.
* gm2/gm2-compiler/M2Batch.def: IsModuleSeen (New procedure
function).
* gm2/gm2-compiler/M2Batch.mod: IsModuleSeen (New procedure
function) implemented.
* gm2/gm2-compiler/M2GCCDeclare.mod: TryFindSymbol
(New procedure function). Used to aid internal debugging.
* gm2/gm2-libs-iso/IOLink.mod: fixed bug between dids and cid
checking. Check did against dids and cid against did^.cids.
* gm2/gm2-libs-iso/ProgramArgs.mod: fixed bug reported by
(D.E.Evans <sinuhe@gnu.org>).
2015-04-27 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-libs-iso/MemStream.mod: removed debugging printf.
* gm2/examples/pge: more changes.
2015-04-23 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: add $(TIMEVAR_H) to all m2.flex
dependant rules.
* gm2/examples/pge: more changes.
2015-04-21 Gaius Mulley <gaius@gnu.org>
* gm2/examples/pge/examples: another interim checkin.
(More debugging statements added and internal checking).
* gm2/gm2-libs-iso/RawIO.mod: (Read) call FlushOutErr.
* gm2/gm2-libs-iso/TextIO.mod: (Read) call FlushOutErr.
* gm2/gm2-libs/FIO.def: export FlushOutErr.
* This fixes a bug reported by Steve Giess, which allows
iso and pim libraries to be mixed. It also fixes
the interactive behaviour of the iso libraries so that
output is flushed before data is read.
2015-04-15 Gaius Mulley <gaius@gnu.org>
* released GM2 1.1.3
* gm2/gm2-libs/config-host: rebuilt.
* gm2/gm2-libs/config-host.in: 1.1.3.
* gm2/gm2-libs/config-target: rebuilt.
* gm2/gm2-libs/config-target.in: 1.1.3.
* gm2/gm2.texi: updated release map.
* gm2/version.c: 1.1.3.
* gm2/examples/pge/examples: improved debugging log messages.
2015-04-09 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: changed path to gnu.eps to contain
$(objdir).
* gm2/examples/pge/examples/exampleBoxes.py: more intermin
changes.
* gm2/examples/pge/pge.py: more intermin changes.
* gm2/examples/pge/pgeplayback.py: more intermin changes.
* gm2/examples/pge/twoDsim.mod: more intermin changes.
2015-04-02 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-libs-iso/ConvStringLong.mod: check to see if the
conversion generates a NAN and return accordingly.
* gm2/gm2-libs-iso/ConvStringReal.mod: check to see if the
conversion generates a NAN and return accordingly.
This fixes a bug reported by: Michael Riedl.
2015-04-01 Gaius Mulley <gaius@gnu.org>
* gm2/examples/pge: many bugfixes to the shared library example.
* gm2/gm2-compiler/M2GenGCC.mod: FoldConvert use PopKindTree.
PopKindTree new procedure function. This fixes a bug reported
by: Michael Riedl. (see
http://lists.nongnu.org/archive/html/gm2/2015-02/msg00006.html).
2015-03-28 Gaius Mulley <gaius@gnu.org>
* gm2/examples/pge: many bugfixes to the shared library example.
2015-03-16 Gaius Mulley <gaius@gnu.org>
* gm2/examples/pge: many more improvements to pgeplayback.py
and twoDsim.mod.
2015-03-15 Gaius Mulley <gaius@gnu.org>
* gm2/examples/pge: more changes to the shared library example.
* gm2/gm2-libs/gdbif.mod: New file.
* gm2/gm2-libs/gdbif.def: New file.
2015-02-25 Gaius Mulley <gaius@gnu.org>
* gm2/examples/pge: huge amount of changes to expose the frame
buffer to python/pygame.
2015-02-19 Gaius Mulley <gaius@gnu.org>
* libgm2/libiso/Makefile.in: added MemStream.def and MemStream.mod
in list of modules to be built and installed.
* gm2/gm2-libs-iso/MemStream.def: New file.
* gm2/gm2-libs-iso/MemStream.mod: New file.
2015-02-17 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-libs-iso/Storage.mod: fixed bug reported by
reported by Michael Riedl <udo-michael.riedl@t-online.de>.
DEALLOCATE should assign the pointer to NIL.
2015-02-11 Gaius Mulley <gaius@gnu.org>
* gm2/examples/pge/pge.py: tidied up formatting.
* gm2/gm2-compiler/M2GenGCC.mod: CanConvert (New procedure function).
CodeCast checks to see if non same sized types can be converted
and generates an error message if they cannot.
* gm2/gm2.texi: corrected documentation to use libtool when building
shared libraries. Updated references to jessie, rather than wheezy.
Updated gcc graft to 4.7.4.
* gm2/www/tools/texi2tr/html/download.html: update to stable release
gm2-1.1.1.
* gm2/www/tools/texi2tr/html/release.html: update to stable release
gm2-1.1.1.
* testsuite/gm2/iso/pass/realbitscast.mod: simplified test code.
2015-01-26 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2Quads.mod: MakeLengthConst new procedure
function. BuildLengthFunction use MakeLengthConst.
AssignHighField check for conststring and call MakeLengthConst.
This fixes a bug reported below.
* testsuite/gm2/pim/run/pass/bytearray.mod: new test code to
detect bug reported by Michael Riedl <udo-michael.riedl@t-online.de>.
* gm2/gm2-compiler/M2DriverOptions.mod: add char to the import
list.
* gm2/gm2-compiler/M2Options.mod: add string to the import list.
2015-01-13 Gaius Mulley <gaius@gnu.org>
* Fixed bug reported by Peter Fletcher.
* gm2/bnf/gm2l.bnf: handle '-v' options and remember cpp options.
* gm2/gm2-compiler/M2DriverOptions.mod: remember cpp options.
* gm2/gm2-compiler/M2Options.def: SetVerbose new procedure function.
CppRemember new procedure.
* gm2/gm2-compiler/M2Options.mod: implement SetVerbose
procedure function and CppRemember.
* gm2/www/tools/texi2tr/html/download.html: updated to include
download reference to 4.7.x series of gcc.
* gm2 now builds when grafted onto 4.7.4.
2015-01-04 Gaius Mulley <gaius@gnu.org>
* gm2/examples/pge/Fractions.mod: removed unnecessary local
variable.
* gm2/examples/pge/Makefile.in: added extra sources and added
libraries. Added local directory to the PYTHONPATH.
* gm2/examples/pge/pge.py: many bugfixes and self checking code
added.
* gm2/examples/pge/pgeif.mod: initialise deviceIf.
* gm2/gm2-libs-iso/LowLong.mod: correct prototype for huge_val.
* gm2/gm2-libs-iso/LowReal.mod: correct prototype for huge_val.
* gm2/gm2-libs-iso/LowShort.mod: correct prototype for huge_valf.
* gm2/gm2-libs/Builtins.def: correct prototype for huge_val,
huge_valf, huge_vall.
2015-01-03 Gaius Mulley <gaius@gnu.org>
* gm2/bnf/gm2m.bnf: added debugging and verbose flag.
Also fixed bug so that it understands the -fmake-I option.
* gm2/examples/hello/Makefile.in: use $(EXE) rather than .out
* gm2/examples/ncurses/Makefile.in: corrected arguments to
gm2 -fmakeall.
* gm2/examples/pge/Makefile.in: improved clean target.
* gm2/gm2.texi: corrected typo.
* gm2/lang-specs.h: ensure that gm2m is invoked with the -B
and -fmake-I options present outside the -fgm2begin
-fgm2end delimiters.
2015-01-02 Gaius Mulley <gaius@gnu.org>
* released GM2 1.1.0
* gm2/gm2-libs/config-host: rebuilt.
* gm2/gm2-libs/config-host.in: 1.1.0.
* gm2/gm2-libs/config-target: rebuilt.
* gm2/gm2-libs/config-target.in: 1.1.0.
* gm2/gm2.texi: updated release map.
* gm2/gm2spec.c: removed C++ comment.
* gm2/version.c: 1.1.0.
* gm2/examples/pge/Makefile.in: interim checkin libpgeif uses
libtool during construction. Temporary files removed from git.

1352
gcc/m2/ChangeLog-2016 Normal file

File diff suppressed because it is too large Load Diff

1077
gcc/m2/ChangeLog-2017 Normal file

File diff suppressed because it is too large Load Diff

607
gcc/m2/ChangeLog-2018 Normal file
View File

@ -0,0 +1,607 @@
2018-07-30 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* gm2/gm2spec.c: (fe_generate_option) do not duplicate the old
argument. free up a string after use. (build_include_path)
start the new string with a strcpy not strcat!
(insert_option) create a new vector with an extra entry.
(no_link) return a string which can be free'd.
(add_exec_name) return a string which can be free'd.
2018-07-18 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* gm2/gm2spec.c: reformatted according to GNU coding standards.
2018-07-17 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* gm2/gm2-compiler/ObjectFiles.mod: import ALLOCATE
and DEALLOCATE from Storage. Collect return results
from close and KillIndex.
* gm2/gm2spec.c: reformatted and tidied up code.
* gm2/gm2-libs/GetOpt.mod: remove declaration of PtrToInteger.
* gm2/gm2-libs/GetOpt.mod: corrected record/pointer reference.
2018-07-16 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* gm2/bnf/gm2l.bnf: reformatted to gnu standards.
* gm2/el/gm2-mode.el: minor formatting change.
* gm2/gm2-libs/DynamicStrings.mod: reformatted to gnu standards.
* gm2/gm2-compiler/ObjectFiles.def: (New file).
2018-07-14 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* gm2/Make-lang.in: remove the target configure scripts from
gm2/gm2-libs.
* gm2/configure: rebuilt.
* gm2/examples/callingC/Makefile.in: use multiple -I flags.
* gm2/examples/hello/Makefile.in: use multiple -I flags.
* gm2/gm2-compiler/gm2lcc.mod: reformatted. Archive
all object files, all Modula-2 objects and check for duplication.
* gm2/gm2-libs-ch/wrapc.c: remove unconfigured test for fileinode.
* gm2/gm2-libs/config-host: rebuilt.
* gm2/gm2-libs/config-target: removed.
* gm2/gm2-libs/gm2-libs-host.h.in: rebuilt.
* gm2/gm2-libs/gm2-libs-target.h.in: removed.
* gm2/gm2spec.c: reformatted. (add_env_option) New function.
(lang_specific_driver) call add_env_option.
* gm2/lang-specs.h: (lang_register_spec_functions) register
no_objects.
* gm2/patches/gcc/trunc/01-patches: rebuilt.
* gm2/patches/gcc/trunc/02-patches: rebuilt.
* gm2/patches/gcc/trunc/03-patches: rebuilt.
* gm2/patches/gcc/trunc/04-patches: rebuilt.
* gm2/patches/gcc/trunc/05-patches: rebuilt.
* gm2/patches/gcc/trunc/06-patches: rebuilt.
* gm2/patches/gcc/trunc/07-patches: rebuilt.
* gm2/patches/gcc/trunc/08-patches: rebuilt.
* gm2/patches/gcc/trunc/09-patches: rebuilt.
* gm2/patches/gcc/trunc/10-patches: rebuilt.
* testsuite/gm2/pim/run/pass/testaddr2.mod: reformatted.
* gm2/gm2spec.c: removed unused variable and reformatted.
* gm2/tools-src/makeversion: remove reference to config-target.in.
2018-07-10 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* gm2/gm2-compiler/ObjectFiles.def: New file.
* gm2/gm2-compiler/ObjectFiles.mod: New file.
* gm2/Make-lang.in: added ObjectFiles to be built and linked
into the compiler and tools.
* gm2/gm2-compiler/gm2lcc.mod: use ObjectFiles to remember each
object file so duplicates are not accidentally linked both in
the Modula-2 link and command line list of objects. Much code
was tidied up.
* gm2/gm2-libs-ch/wrapc.c: (fileinode) New function.
* gm2/gm2-libs/libc.def: corrected dates.
* gm2/gm2-libs/wrapc.def: (fileinode) New procedure function.
* libgm2/libpim/wrapc.c: (fileinode) New function. Tidied up
formatting.
2018-07-07 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* gm2/bnf/gm2l.bnf: import Verbose and use. (RegisterImport)
reformatted. (ScanSources) display the module name if Verbose.
(ScanArgs) handle long options and also concatenated arguments.
(-I, --verbose, --M2RTS).
* gm2/gm2-compiler/M2DriverOptions.mod: (CppArgument) New procedure
function. (ScanCppArgs) reformatted and also call CppArgument.
* gm2/gm2-compiler/M2Options.mod: updated dates.
* gm2/gm2-compiler/M2Preprocess.mod: reformatted and changed some of the
Verbose output.
* gm2/gm2-libs-ch/getopt.c: implement long options.
* gm2/gm2-libs/GetOpt.def: provide access to the long options in getopt.
* gm2/gm2-libs/GetOpt.mod: implement long option procedures necessary for getopt.
* gm2/gm2-libs/Storage.def: updated dates.
* gm2/gm2-libs/getopt.def: provide access to the long options in getopt.
* gm2/gm2.texi: corrected docuentation surrounding
* gm2/gm2spec.c: removed GM2IPATH and GM2OPATH temporarily and changed
all include and object paths to avoid using the ":" separator.
(which does not exist for -I). In turn this forces a reimplementation
of the GM2IPATH and GM2OPATH.
* gm2/lang-specs.h: changed all references to gm2l to use the GM2L macro.
Fixed many preprocessor invocation problems which occur when linking
an application which uses the preprocessor.
2018-07-02 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* gm2/Make-lang.in: changes to build stage2/gm2/gm2l
* gm2/bnf/gm2l.bnf: remove FORWARD references.
* gm2/gm2-compiler/M2GenGCC.mod: (GetAddressOfUnbounded)
reformatted. (BuildHighFromStaticArray) bug fixes
and reformatted.
* gm2/gm2-libs/GetOpt.def: introduce long options.
* gm2/iso/run/pass/constructor2.mod: reformatted.
2018-06-27 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* gm2/gm2-compiler/M2GenGCC.mod: (GetHighFromUnbounded)
check to see if the unbounded array has static array
data type and follow the dimension into the static array
to obtain the correct HIGH value.
(BuildHighFromStaticArray) New procedure function.
* gm2/gm2-compiler/M2Range.mod: add missing case clause.
2018-06-23 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* gm2/el/g-mode.el: bug fixes to the m2-tag feature.
* gm2/el/g-mode.el: allow . before a type, keyword,
function and const.
2018-06-22 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* gm2/el/g-mode.el: generate types and builtin functions
dependant upon the dialect chosen.
2018-06-21 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* gm2/el/g-mode.el: fixed m2-tag (find declaration
understands the path and also works in algol keyword mode.
* gm2/el/g-mode.el: fixed visual parenthesis balancing.
* gm2/el/g-mode.el: removed some debugging statements.
2018-06-20 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* gm2/el/g-mode.el: fixed traditional mode. Both algol
mode and traditional are now usable and user selectable.
2018-06-13 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* gm2/el/g-mode.el: added ability to turn on/off
lowercase algol style keyword transformation.
Fixed compile-command.
* gm2/el/gm2-mode.el: renamed from g-mode.el.
Changed internal variables from g-mode- to m2-auto-.
2018-06-11 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* gm2/el/g-mode.el: added defcustom declarations
and fixed some regexp bugs. Applied some defcustom
implementation features.
* gm2/el/g-mode.el: fixed electric END, ELSE and THEN.
Added more defcustoms.
* gm2/el/g-mode.el: added many more defcustoms. Also
tidied up code and also tightened up types and introduced
radio buttons for language choice. Use inbuilt booleans
for binary choices. Fixed key binding for DEL and
Backspace.
2018-06-08 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* gm2/el/g-mode.el: interim checkin, keyword editing
complete (minus delete key).
2018-06-07 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* gm2/el/g-mode.el: interim checkin.
* gm2/el/g-mode.el: another interim checkin in
the development of lowercase keywords.
2018-05-24 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* gm2/gm2-gcc/m2expr.c: (BuildNotEqualToZero)
new function. (checkWholeNegateOverflow)
re-implemented and in the process fixed bug
and the test
testsuite/gm2/switches/check-all/run/fail/intrange5.mod
passes.
(m2expr_Build4LogicalAnd) New function.
* gm2/gm2-gcc/m2expr.c: renamed BuildLogicalAndIf
to BuildTruthAndIf and renamed BuildLogicalOrIf
to BuildTruthOrIf.
2018-05-23 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* implement range checks on whole number multiply.
* gm2/gm2-compiler/M2GenGCC.mod: import BuildMultCheck.
Call CodeMultCheck in quadruple case statement.
(CodeMultChecked) New procedure. (CodeMultCheck)
New procedure.
* gm2/gm2-gcc/m2expr.c: (checkWholeNegateOverflow)
interm checkin. (checkWholeSubOverflow) corrected
comment. (m2expr_Build3LogicalAnd) New function.
(m2expr_Build4LogicalOr) New function.
(checkWholeMultOverflow) New function.
(checkWholeOverflow) New function.
(m2expr_BuildMultCheck) New function.
* gm2/gm2-gcc/m2expr.def: BuildMultCheck exported.
* gm2/gm2-gcc/m2expr.h: BuildMultCheck defined.
* gm2/gm2-gcc/m2expr.c: added missing semicolon.
2018-04-16 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* gm2/Make-lang.in: changed the plugin directory to
plugin rather than gm2/plugin. Corrected .so typeos.
* gm2/gm2.texi: Semantic checking (New section).
* testsuite/gm2/iso/analysis/fail/gm2.exp: New file.
2018-04-14 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* gm2/Make-lang.in: build plugin/m2rte.so and create
gm2/plugin directory.
* gm2/gm2-compiler/CLexBuf.mod: removed FORWARD prototype
definitions.
* gm2/gm2-compiler/M2ALU.mod: removed FORWARD prototype
definitions.
* gm2/gm2-compiler/M2AsmUtil.mod: removed FORWARD prototype
definitions.
* gm2/gm2-compiler/M2BasicBlock.mod: removed FORWARD prototype
definitions.
* gm2/gm2-compiler/M2BasicBlock.mod: removed FORWARD prototype
definitions.
* gm2/gm2-compiler/M2Batch.mod: removed FORWARD prototype
definitions.
* gm2/gm2-compiler/M2Const.mod: removed FORWARD prototype
definitions.
* gm2/gm2-compiler/M2Const.mod: removed FORWARD prototype
definitions.
* gm2/gm2-compiler/M2Depth.mod: removed FORWARD prototype
definitions.
* gm2/gm2-compiler/M2Lex.mod: removed FORWARD prototype
definitions.
* gm2/gm2-compiler/M2LexBuf.mod: removed FORWARD prototype
definitions.
* gm2/gm2-compiler/M2LexBuf.mod: removed FORWARD prototype
definitions.
* gm2/gm2-compiler/M2MetaError.mod: removed FORWARD prototype
definitions.
* gm2/gm2-compiler/M2MetaError.mod: removed FORWARD prototype
definitions.
* gm2/gm2-compiler/M2Optimize.mod: removed FORWARD prototype
definitions.
* gm2/gm2-compiler/M2Swig.mod: removed FORWARD prototype
definitions.
* gm2/gm2-compiler/NameKey.mod: removed FORWARD prototype
definitions.
* gm2/gm2-compiler/PCSymBuild.mod: removed FORWARD prototype
definitions.
* gm2/gm2-compiler/SymbolKey.mod: removed FORWARD prototype
definitions.
* gm2/gm2-compiler/SymbolTable.mod: removed FORWARD prototype
definitions.
* gm2/gm2-compiler/gm2lcc.mod: removed FORWARD prototype
definitions.
* gm2/gm2-compiler/gm2lgen.mod: removed FORWARD prototype
definitions.
* gm2/gm2-libs-ch/libc.c: removed FORWARD prototype
definitions.
* gm2/gm2-libs-coroutines/Debug.mod: removed FORWARD prototype
definitions.
* gm2/gm2-libs-coroutines/Debug.mod: removed FORWARD prototype
definitions.
* gm2/gm2-libs-min/libc.c: removed FORWARD prototype
definitions.
* gm2/gm2-libs/Args.mod: removed FORWARD prototype
definitions.
* gm2/gm2-libs/Args.mod: removed FORWARD prototype
definitions.
* gm2/gm2-libs/CmdArgs.mod: removed FORWARD prototype
definitions.
* gm2/gm2-libs/Debug.mod: removed FORWARD prototype
definitions.
* gm2/gm2-libs/DynamicStrings.mod: removed FORWARD prototype
definitions.
* gm2/gm2-libs/DynamicStrings.mod: removed FORWARD prototype
definitions.
* gm2/gm2-libs/FIO.mod: removed FORWARD prototype
definitions.
* gm2/gm2-libs/NumberIO.mod: removed FORWARD prototype
definitions.
* gm2/gm2-libs/PushBackInput.mod: removed FORWARD prototype
definitions.
* gm2/gm2-libs/RTExceptions.mod: removed FORWARD prototype
definitions.
* gm2/gm2-libs/Scan.mod: removed FORWARD prototype
definitions.
* gm2/gm2-libs/StrIO.mod: removed FORWARD prototype
definitions.
* gm2/gm2-libs/StrLib.mod: removed FORWARD prototype
definitions.
* gm2/gm2-libs/StringConvert.mod: removed FORWARD prototype
definitions.
* gm2/plugins/m2rte.c: renamed to gm2/plugin/m2rte.c.
* gm2/ulm-lib-gm2/std/RTExceptions.mod: removed FORWARD prototype
definitions.
2018-04-10 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* gm2/Make-lang.in: build m2rte plugin, install m2rte plugin.
* gm2/gm2-compiler/M2Base.def: define new exception ExceptionReturn.
* gm2/gm2-compiler/M2Base.mod: implement new exception ExceptionReturn.
* gm2/gm2-compiler/M2Quads.mod: new call to InitReturnRangeCheck.
* gm2/gm2-compiler/M2Range.def: define InitReturnRangeCheck.
* gm2/gm2-compiler/M2Range.mod: (InitReturnRangeCheck),
(FoldReturn), (CodeReturn) New procedures.
* gm2/gm2-lang.c: detect -fno-m2-plugin option.
* gm2/gm2-libs-iso/M2RTS.def: ReturnException defined.
* gm2/gm2-libs-iso/M2RTS.mod: ReturnException implemented.
* gm2/gm2-libs/M2RTS.def: ReturnException defined.
* gm2/gm2-libs/M2RTS.mod: ReturnException implemented.
* gm2/gm2spec.c: detect -fno-m2-plugin and unset boolean if
present. Later insert the -fplugin=m2rte switch if plugins are true.
* gm2/lang-options.h: allow -fm2-plugin and -fno-m2-plugin.
* gm2/lang-specs.h: update dates.
* gm2/lang.opt: define -fm2-plugin and -fno-m2-plugin.
* gm2/m2pp.c: update dates.
* gm2/tools-src/makeSystem: use -fno-m2-plugin when creating system.
* gm2/ulm-lib-gm2/std/M2RTS.mod: ReturnException implemented.
* plugins/m2rte.c: New file.
2018-03-28 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* gm2/bnf/m2-2.bnf: updated dates and trimmed end of
line spaces.
* gm2/bnf/m2-c.bnf: updated dates and trimmed end of
line spaces.
* gm2/gm2-compiler/M2Comp.mod: removed p2c forward
declarations.
* gm2/gm2-compiler/M2Quads.mod: (BuildRealFuncProcCall)
corrected comment title. Call SkipConst to skip over
a constant assigned to a procedure. Fixes a bug reported
by Michael Riedl <udo-michael.riedl@t-online.de>.
* gm2/gm2-compiler/P2SymBuild.mod: remove p2c
forward declarations.
* testsuite/gm2/iso/run/pass/constprocedure.mod:
New regression test to stress the bug reported (above).
* testsuite/gm2/iso/fail/constprocedure.mod: New
regression test to test standard functions are not
allowed to be referenced in a const expression.
(But they can be called).
2018-03-27 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* gm2/el/g-mode.el: corrected dates and changed name
to help debugging.
* gm2/gm2-compiler/Indexing.mod: removed p2c related
comment.
* gm2/gm2-compiler/M2Error.mod: removed intemediate
record type as we are no longer bootstrapping using
p2c.
* gm2/gm2-compiler/M2GCCDeclare.mod: removed intemediate
record types as we are no longer bootstrapping using
p2c.
* gm2/gm2-compiler/M2Range.mod: removed intemediate
record type as we are no longer bootstrapping using
p2c.
* gm2/gm2-compiler/ppg.mod: removed intemediate
record types as we are no longer bootstrapping using
p2c.
2018-03-26 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* gm2/gm2-lang.c: (gm2_langhook_type_for_mode) rewritten
(borrowed code from go-lang.c).
* gm2/gm2-compiler/M2Quads.mod: (BuildAdrFunction)
handle address of unbounded array and check the dimension
access.
2018-03-14 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* gm2/gm2-compiler/SymbolTable.mod: (PutUnbounded)
ensure that all dimensions prior to the requested dimension
has an entry in the array. (NulSym is added).
* gm2/gm2-compiler/M2GCCDeclare.mod: (WalkFamilyOfUnbounded)
check that unbounded is not NulSym before calling unboundedp.
* gm2/gm2-compiler/M2Quads.mod: (UnboundedVarLinkToArray)
and (UnboundedNonVarLinkToArray) ensure that all
parameters to BuildAdrFunction propagate the array
and dimension operand stack.
Fixes bugs exposed in
testsuite/gm2/iso/run/pass/adrunbounded3.mod
2018-02-19 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* gm2/gm2-compiler/M2Quads.mod: (AssignHighField)
check for ArraySym and use if actual parameter
has different number of dimensions to formal
parameter array.
* gm2/gm2-compiler/M2Quads.mod: (BuildConstHighFromSym)
only access the single dimension when building high
as the array will be referencing the desired dimension.
A temporary type will have been created.
2018-02-15 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* gm2/gm2-compiler/M2GenGCC.mod: check and use lvalue op3
which points to the data for the unbounded quadruple.
2018-02-08 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* gm2/gm2-compiler/M2Quads.mod: check open array actual
parameter which is indexed and check the dimension against
formal parameters.
2018-02-07 Gaius Mulley <gaius.mulley@southwales.ac.uk>
* gm2/Make-lang.in: added LDFLAGS to the link of mc.
2018-01-28 Gaius Mulley <gaius@gnu.org>
* gm2/bnf/mc-5.bnf: regenerated.
* gm2/mc-boot/GCmdArgs.c: regenerated.
* gm2/mc-boot/GFIO.c: regenerated.
* gm2/mc-boot/GStrIO.c: regenerated.
* gm2/mc-boot/GStringConvert.c: regenerated.
* gm2/mc-boot/Gdecl.c: regenerated.
* gm2/mc-boot/Gdecl.h: regenerated.
* gm2/mc-boot/GmcComp.c: regenerated.
* gm2/mc-boot/GmcLexBuf.c: regenerated.
* gm2/mc-boot/Gmcp1.c: regenerated.
* gm2/mc-boot/Gmcp2.c: regenerated.
* gm2/mc-boot/Gmcp3.c: regenerated.
* gm2/mc-boot/Gmcp4.c: regenerated.
* gm2/mc-boot/Gmcp5.c: regenerated.
* gm2/mc/decl.def: (addElseComments), (addIfEndComments),
(addWhileDoComment), (addWhileEndComment), (addRepeatComment),
(addUntilComment) defined and exported.
* gm2/mc/decl.mod: (commentPair) New record.
Used in funccallT, returnT, whileT, repeatT, ifT, elsifT,
assignmentT. (doAfterCommentC) New procedure.
(doReturnC) Use (doAfterCommentC).
(doAssignmentC) use (doAfterCommentC). (doIfC)
use (doAfterCommentC). (doRepeatC) use (doAfterCommentC).
(doWhileC) use (doAfterCommentC). (doFuncCallC) use
(doAfterCommentC). (addGenericBody) rewritten.
(addIfComments) rewritten. (addElseComments) New
procedure. (addIfEndComments) New procedure.
(addWhileDoComment) New procedure. (addWhileEndComment)
New procedure. (initPair) New procedure.
(addRepeatComment) New procedure.
(addUntilComment) New procedure.
* gm2/mc/mcLexBuf.mod: fixed an infinite loop bug hunting
for the next token on a buffer boundary case.
2018-01-26 Gaius Mulley <gaius@gnu.org>
* gm2/Make-lang.in: added extra commented definition for
bootstrapping under trunc.
* gm2/bnf/mc-1.bnf: changed comment interface.
* gm2/bnf/mc-2.bnf: removed unnecessary import.
* gm2/bnf/mc-5.bnf: rewritten the comment interface for
after and body comments.
* gm2/mc-boot/GCmdArgs.c: rebuilt.
* gm2/mc-boot/GDebug.c: rebuilt.
* gm2/mc-boot/GDynamicStrings.c: rebuilt.
* gm2/mc-boot/GFIO.c: rebuilt.
* gm2/mc-boot/GFormatStrings.c: rebuilt.
* gm2/mc-boot/GFpuIO.c: rebuilt.
* gm2/mc-boot/GIO.c: rebuilt.
* gm2/mc-boot/GIndexing.c: rebuilt.
* gm2/mc-boot/GM2EXCEPTION.c: rebuilt.
* gm2/mc-boot/GM2RTS.c: rebuilt.
* gm2/mc-boot/GM2RTS.h: rebuilt.
* gm2/mc-boot/GNumberIO.c: rebuilt.
* gm2/mc-boot/GRTExceptions.c: rebuilt.
* gm2/mc-boot/GRTint.c: rebuilt.
* gm2/mc-boot/GSFIO.c: rebuilt.
* gm2/mc-boot/GStorage.c: rebuilt.
* gm2/mc-boot/GStrIO.c: rebuilt.
* gm2/mc-boot/GStrLib.c: rebuilt.
* gm2/mc-boot/GStringConvert.c: rebuilt.
* gm2/mc-boot/GSysStorage.c: rebuilt.
* gm2/mc-boot/Gdecl.c: rebuilt.
* gm2/mc-boot/Gdecl.h: rebuilt.
* gm2/mc-boot/Gkeyc.c: rebuilt.
* gm2/mc-boot/Glibc.h: rebuilt.
* gm2/mc-boot/GmcComment.c: rebuilt.
* gm2/mc-boot/GmcComment.h: rebuilt.
* gm2/mc-boot/GmcComp.c: rebuilt.
* gm2/mc-boot/GmcComp.h: rebuilt.
* gm2/mc-boot/GmcError.c: rebuilt.
* gm2/mc-boot/GmcLexBuf.c: rebuilt.
* gm2/mc-boot/GmcLexBuf.h: rebuilt.
* gm2/mc-boot/GmcMetaError.c: rebuilt.
* gm2/mc-boot/GmcOptions.c: rebuilt.
* gm2/mc-boot/GmcPretty.c: rebuilt.
* gm2/mc-boot/GmcPrintf.c: rebuilt.
* gm2/mc-boot/GmcQuiet.c: rebuilt.
* gm2/mc-boot/GmcSearch.c: rebuilt.
* gm2/mc-boot/Gmcp1.c: rebuilt.
* gm2/mc-boot/Gmcp2.c: rebuilt.
* gm2/mc-boot/Gmcp3.c: rebuilt.
* gm2/mc-boot/Gmcp4.c: rebuilt.
* gm2/mc-boot/Gmcp5.c: rebuilt.
* gm2/mc-boot/GnameKey.c: rebuilt.
* gm2/mc-boot/GsymbolKey.c: rebuilt.
* gm2/mc-boot/Gvarargs.c: rebuilt.
* gm2/mc-boot/Gwrapc.h: rebuilt.
* gm2/mc/decl.def: (addCommentBody) New procedure.
(addCommentAfter) New procedure. (addIfComments)
New procedure. (makeCommentS) New procedure.
(getCommentCharStar) New procedure function.
(getContent) New procedure function.
(setProcedureComment) New procedure function.
(getProcedureComment) New procedure function.
(getAfterStatementComment) New procedure function.
(getInbodyStatementComment) New procedure function.
(isProcedureComment) New procedure function.
(isBodyComment) New procedure function.
(isAfterComment) New procedure function.
* gm2/mc/decl.mod: many alterations to allow per node
after and body comments.
* gm2/mc/keyc.mod: add free and malloc to the list of
names to avoid.
* gm2/mc/mc.flex: many alterations to allow per node
after and body comments.
* gm2/mc/mcComment.def: (commentDesc) New datatype.
(initComment) New procedure function. (addText)
New procedure. (getContent) New procedure function.
* gm2/mc/mcComment.h: updated with new interface.
* gm2/mc/mcComment.mod: (commentDesc) New datatype
implemented.
(initComment) New procedure function. (addText)
New procedure. (getContent) New procedure function.
* gm2/mc/mcComp.def: export getPassNo.
* gm2/mc/mcComp.mod: (getPassNo) New procedure function.
* gm2/mc/mcLexBuf.def: (getProcedureComment) New procedure
function. (getBodyComment) New procedure function.
(getAfterComment) New procedure function.
* gm2/mc/mcLexBuf.h: replicate .def functionality.
* gm2/mc/mcLexBuf.mod: (getProcedureComment) Implement new
procedure function. (getBodyComment) Implement new
procedure function.
2018-01-03 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2GenGCC.mod: (BuildUnaryCheckProcedure)
imported. (BuildNegateCheck) imported. (CodeStatement)
use BuildNegateCheck. (CodeUnaryCheck) New procedure.
(CodeNegateChecked) New procedure.
* gm2/gm2-gcc/m2expr.c: (checkUnaryWholeOverflow) New
function. (m2expr_build_unary_op_check) New function.
(BuildEqualToZero) New function.
(checkWholeNegateOverflow) New function.
(BuildNegateCheck) New function. (BuildNegate)
reimplemented.
* gm2/gm2-gcc/m2expr.def: (BuildUnaryCheckProcedure)
Defined. (BuildNegateCheck) defined.
* gm2/gm2-gcc/m2expr.h: (BuildNegateCheck) added prototype.
2018-01-02 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2GenGCC.mod: (CodeStatement) call
CodeAddChecked and call CodeSubChecked.
(CodeAddChecked) New procedure. (CodeSubChecked)
New procedure.
* gm2/gm2-compiler/M2Quads.mod: (BuildEndFor) suppress
overflow checking in the addition
of the loop variable. The explicit for loop check will
catch an overflow and this addition can overflow for
unsigned types counting down.
* gm2/gm2-gcc/m2expr.c: (BuildAddCheck) corrected
comments and strip results. (BuildSubCheck) corrected
comments and strip results.
* gm2/gm2-gcc/m2range.h: (New file).
* gm2/patches/gcc/trunc: (Regenerated).
2018-01-01 Gaius Mulley <gaius@gnu.org>
* gm2/gm2-compiler/M2GenGCC.mod: (CodeAddCheck) New procedure.
(CodeSubCheck) New procedure. (CodeBinaryCheck) New procedure.
Use CodeAddCheck and CodeSubCheck.
* gm2/gm2-compiler/M2Range.def: (GetMinMax) exported.
* gm2/gm2-gcc/m2expr.c: (BuildAddCheck) New function.
(BuildSubCheck) New function. (checkWholeAddOverflow)
parameters changed. (checkWholeSubOverflow) New function.
(checkWholeOverflow) updated parameters to include subrange min
and max. (build_binary_op_check) New function. (build_binary_op)
call build_binary_op_check.
* gm2/gm2-gcc/m2expr.def: (BuildBinCheckProcedure) New
definition. (BuildSubCheck) New procedure function.
(BuildAddCheck) New procedure function.
* gm2/gm2-gcc/m2expr.h: (BuildAddCheck) New prototype.
(BuildSubCheck) New prototype.
* gm2/gm2-compiler/M2GenGCC.mod: pass lowest into binop.
* gm2/gm2-gcc/m2expr.c: (BuildAddCheck) extra parameter lowest.
(BuildSubCheck) extra parameter lowest. Call build_binary_op
with extra parameter lowest. (BuildLessThanZero) New function.
(BuildGreaterThanZero) New function. (checkWholeAddOverflow)
extra parameter and use BuildLessThanZero and
BuildGreaterThanZero. (checkWholeSubOverflow)
extra parameter and use BuildLessThanZero and
BuildGreaterThanZero. (checkWholeOverflow) call
checkWholeAddOverflow and checkWholeSubOverflow with an extra
parameter.
* gm2/gm2-gcc/m2expr.def: (BuildBinCheckProcedure) extra
parameter. (BuildSubCheck) extra parameter lowest.
(BuildAddCheck) extra parameter lowest.
* gm2/gm2-gcc/m2expr.h: corrected prototype.

4638
gcc/m2/ChangeLog-2019 Normal file

File diff suppressed because it is too large Load Diff

1707
gcc/m2/ChangeLog-2020 Normal file

File diff suppressed because it is too large Load Diff

2299
gcc/m2/Make-lang.in Normal file

File diff suppressed because it is too large Load Diff

231
gcc/m2/NEWS Normal file
View File

@ -0,0 +1,231 @@
This file describes recent user-visible changes in gm2. Bug fixes are
not described. There are more details in the man and info pages.
gm2 is now in the GCC tree and therefore these version numbers are
historical.
VERSION 1.9.5
=============
* More subexpressions tokens are created and accuracy of error positions
within subexpressions has been improved.
* the GCC switch -fanalyzer can be used with Modula-2.
VERSION 1.9.4
=============
* More GCC error routines utilized for error messages, erroneous
subexpressions are more accurately reported.
* Complete type checking now performed.
VERSION 1.9.3
=============
* GCC error routines utilized for error messages.
* complete whole number runtime range error detection finished.
* improved m2-plugin which analyzes the call graph and will issue
warnings if the compiler detects a exported procedure will cause
a range error. The plugin will issue an error if the range error
will be called from the module constructor/deconstructor.
VERSION 1.2.0
=============
* New improved more accurate source/line correlation in debugging output.
* -fm2-g generates nops to further improve debugging single stepping.
* -fm2-whole-program whole program optimization available.
* works with gcc-5.2.0 under x86_64, x86_32, arm 64 bit and arm 32 bit.
VERSION 1.0.4
=============
* Bug fixes to release 1.0
VERSION 1.0
===========
* All ISO libraries are complete.
* All ISO language implemented.
* All regression tests pass on both x86_64 and x86_32 Debian GNU/Linux
platforms.
VERSION 0.68
============
* more ISO library modules are implemented.
* many errors are much more informative and indicate what the
compiler has seen and what it expects.
VERSION 0.63
============
* many ISO library modules are implemented.
* Exception handling is complete and it can coexist with swig.
* all errors now include column information. Also added -fxcode
option which issues errors in Apple Xcode format.
* shared libraries are now implemented, to link against the shared
libraries use the new option -fshared. Likewise to generate a
shared library use the -fshared option.
* the keyword FINALLY is now implemented and both the initialization
and finalization blocks map onto GNU/Linux shared library
constructor and deconstructors.
* the PIM libraries are built with -O0, -O2, -O2 -fshared, -fshared.
* a new option -fswig automatically generates a swig interface file
corresponding to the definition module being compiled.
This allows Python and other scripting languages to call Modula-2
modules.
* new options, -fobject-path, allows users to specify the path for
all objects whereas -I specifies the path for the library sources.
* -fmakeinit option introduced which will generate a file
_m2_modulename.c in the current directory.
* introduced fixed sized types in the SYSTEM module.
VERSION 0.62
============
* all language options changed to -f. Warning options are
still -W. Introduced memmove to Builtins.def.
* Introduced gm2/gm2-libs-pim/BlockOps.{def,mod}
* gm2/gm2-libs-pim/BitByteOps.{def,mod}: added.
* -O now works on compiler and passes make gm2.paranoid.
VERSION 0.61
============
* builds when grafted onto gcc-4.1.2
VERSION 0.52
============
* tagged ready for branch for gcc-3.3.6 so that the head
can be developed with gcc-4.1.0
VERSION 0.51
============
* all regression tests pass on LP64 and i386 GNU/Linux
* declaration of variables at particular addresses is now implemented.
Now gm2 is a full PIM Modula-2 compiler and hence the formal release.
VERSION 0.50
============
* all regression tests pass on LP64 and i386 GNU/Linux, i386, Mac OS X.3 G5
* gm2-harness 0.7 will download, patch and build gcc, gdb, gm2 with the
SET and TYPE enhancements below. gm2-harness-0.7 also honours the
--prefix= option.
* Much better dwarf-2 debugging support and when used with
a patched gdb-6.3 the programmer can display RECORDs,
ARRAYs, SETs, subranges and constant char literals in
Modula-2 syntax.
* it currently complies with Programming in Modula-2 Edition 2, 3 and 4.
Users can switch on specific mutually exclusive features by using
-Wpim or -Wpim2.
* gm2 supports full PIM Modula-2 (except variables located at
particular addresses).
* profiling (-p) option is now available.
* module priorities now implemented.
* Logitech compatible libraries: Break.def, CardinalIO.def,
Conversions.def, DebugPMD.def, DebugTrace.def, Delay.def, Display.def,
ErrorCode.def, FloatingUtilities.def, InOut.def, Keyboard.def,
LongIO.def, Random.def, RealConversions.def, RealInOut.def,
Strings.def, Termbase.def, Terminal.def, TimeDate.def have been implemented.
* all Ulm libraries are available.
VERSION 0.49
============
* supports sets of any ordinal size (memory permitting).
* implements ISO Modula-2 SYSTEM which can be switched on via: -Wiso.
* easy interface to C, and varargs can be passed to C routines.
* University of Ulm libraries are installed together with the compiler
and can be accessed via: -Wlibs=ulm
* some Logitech libraries have been implemented and can be accessed via:
-Wlibs=logitech
* coroutines have been implemented in the PIM style and these are accessible
from SYSTEM. A number of supporting libraries (executive and file descriptor
mapping to interrupt vector libraries are available through the
-Wlibs=pim-coroutines switch).
VERSION 0.42
============
* MinGW cross compilation port released.
Please see http://floppsie.comp.glam.ac.uk/Glamorgan/gaius/web/gm2-mingw.html
for building details.
VERSION 0.41
============
* native sparc port passes make gm2.paranoid and make check-gm2
* native i386 port passes make gm2.paranoid and make check-gm2
* passes all 1350 regression tests
* builds with gcc-3.3.2
VERSION 0.40
============
* brought GM2 up to date with gcc-3.3.1
* many, many bug fixes and no patch is now required in the garbage collection
of gcc-3.3.1
* builds under Redhat 9.0 and Suse 9.0
* added the LONGCARD data type.
* LENGTH is now mapped onto M2RTS.Length if the parameter is not a constant
at compile time.
* standard procedures can be called inside constant expressions.
* introduced examples/pthread
* introduced a tool, h2def, to aid production of DEFINITION MODULE FOR "C" modules
from C header files.
* added MathLib0 module, added svga example.
* added access to thirty one gcc built-in functions.
VERSION 0.33
============
* implemented large sets.
* implemented ISO compliant sets.
* when gm2 is invoked with -gstabs a patched gdb will
display set contents. This also works well with SET OF CHAR.
* definition modules no longer have to explicitly export
identifiers.
VERSION 0.32
============
* gm2 can be built as a native or as a strongarm cross compiler.
* the C preprocessor can be invoked and it processes both definition and
implementation modules.
* error reporting understands preprocessed Modula-2 source.

35
gcc/m2/README Normal file
View File

@ -0,0 +1,35 @@
Building GNU Modula-2
=====================
Please see the GCC documentation (gcc.texi) and section
(Installing GCC).
Regression testing GM2
======================
cd host-build ; make check-m2
runs all regression tests.
Stress testing GM2
==================
cd host-build/gcc ; make gm2.paranoid
builds gm2 using itself and then compiles each module with both
versions of gm2 comparing the emitted assembler code.
Contributing to GNU Modula-2
============================
Please do. But also please read the GNU Emacs info under
* Standards: (standards). GNU coding standards.
* Intellectual Property:: Keeping Free Software Free
* Reading Non-Free Code:: Referring to Proprietary Programs
* Contributions:: Accepting Contributions
you might consider joining the GM2 Mailing list: see URL:
http://lists.nongnu.org/mailman/listinfo/gm2 before you start coding.
Many thanks and enjoy your programming!

12
gcc/m2/aclocal.m4 vendored Normal file
View File

@ -0,0 +1,12 @@
#
# set up the '--enable-ulmlib' command line option
#
# this does not work with the gcc frontent (yet)
# AC_DEFUN([GM2_ULMLIB_OPTION],
# [AC_ARG_ENABLE([ulmlib],
# AS_HELP_STRING([--enable-ulmlib],
# [build and install the University of Ulm libraries]),
# [ulmlib="$withval"],
# [ulmlib="yes"])])
# AC_SUBST([ulmlib])

2
gcc/m2/bnf/README Normal file
View File

@ -0,0 +1,2 @@
This directory contains the ebnf descriptions of the gm2 compiler and
its various tools.

1371
gcc/m2/bnf/gm2l.bnf Normal file

File diff suppressed because it is too large Load Diff

2402
gcc/m2/bnf/gm2m.bnf Normal file

File diff suppressed because it is too large Load Diff

1031
gcc/m2/bnf/m2-1.bnf Normal file

File diff suppressed because it is too large Load Diff

1184
gcc/m2/bnf/m2-2.bnf Normal file

File diff suppressed because it is too large Load Diff

1653
gcc/m2/bnf/m2-3.bnf Normal file

File diff suppressed because it is too large Load Diff

1237
gcc/m2/bnf/m2-c.bnf Normal file

File diff suppressed because it is too large Load Diff

1245
gcc/m2/bnf/m2-h.bnf Normal file

File diff suppressed because it is too large Load Diff

868
gcc/m2/bnf/m2.bnf Normal file
View File

@ -0,0 +1,868 @@
--
-- m2.bnf grammar and associated actions for pass 0.
--
-- Copyright (C) 2001-2021 Free Software Foundation, Inc.
-- Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
--
-- This file is part of GNU Modula-2.
--
-- GNU Modula-2 is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3, or (at your option)
-- any later version.
--
-- GNU Modula-2 is distributed in the hope that it will be useful, but
-- WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with GNU Modula-2; see the file COPYING3. If not see
-- <http://www.gnu.org/licenses/>.
% module P0SyntaxCheck begin
(* output from m2.bnf, automatically generated do not edit if these
are the top two lines in the file.
Copyright (C) 2001-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING. If not,
see <https://www.gnu.org/licenses/>. *)
IMPLEMENTATION MODULE P0SyntaxCheck ;
FROM M2LexBuf IMPORT currentstring, currenttoken, GetToken, InsertToken, InsertTokenAndRewind, GetTokenNo ;
FROM M2MetaError IMPORT MetaErrorStringT0 ;
FROM M2Quads IMPORT PushT, PushTF, IsAutoPushOn, PushAutoOff, PushAutoOn, PopAuto, DisplayStack, PushTFtok ;
FROM M2Reserved IMPORT tokToTok, toktype, NulTok, ImportTok, ExportTok, QualifiedTok, UnQualifiedTok, BuiltinTok, InlineTok ;
FROM P2SymBuild IMPORT BuildString, BuildNumber ;
FROM NameKey IMPORT Name, NulName, makekey ;
FROM StrLib IMPORT StrCopy, StrConCat, StrEqual ;
FROM M2Batch IMPORT MakeProgramSource, MakeDefinitionSource, MakeImplementationSource ;
FROM DynamicStrings IMPORT String, InitString, KillString, Mark, ConCat, ConCatChar ;
FROM M2Debug IMPORT Assert ;
FROM M2Printf IMPORT printf0 ;
(* imports for Pass0 *)
FROM P0SymBuild IMPORT RegisterImports, RegisterInnerImports,
RegisterProgramModule,
RegisterImplementationModule, RegisterDefinitionModule,
RegisterInnerModule, EndModule,
RegisterProcedure, EndProcedure ;
FROM SymbolTable IMPORT NulSym, PutModuleContainsBuiltin, PutHiddenTypeDeclared ;
CONST
Debugging = FALSE ;
Pass0 = TRUE ;
Pass1 = FALSE ;
Pass2 = FALSE ; (* permanently disabled for the time being *)
Pass3 = FALSE ; (* permanently disabled for the time being *)
MaxInsert = 10 ; (* allow 10 tokens to be inserted before *)
(* giving up. *)
VAR
WasNoError : BOOLEAN ;
LastIdent : Name ;
InsertCount: CARDINAL ;
PROCEDURE ErrorString (s: String) ;
BEGIN
MetaErrorStringT0(GetTokenNo(), s) ;
WasNoError := FALSE
END ErrorString ;
PROCEDURE ErrorArray (a: ARRAY OF CHAR) ;
BEGIN
ErrorString(InitString(a))
END ErrorArray ;
% declaration P0SyntaxCheck begin
(*
SyntaxError - after a syntax error we skip all tokens up until we reach
a stop symbol.
*)
PROCEDURE SyntaxError (stopset0: SetOfStop0; stopset1: SetOfStop1; stopset2: SetOfStop2) ;
BEGIN
DescribeError(stopset0, stopset1, stopset2) ;
IF Debugging
THEN
printf0('\nskipping token *** ')
END ;
(* --fixme-- this assumes a 32 bit word size. *)
WHILE NOT (((ORD(currenttoken)<32) AND (currenttoken IN stopset0)) OR
((ORD(currenttoken)>=32) AND (ORD(currenttoken)<64) AND (currenttoken IN stopset1)) OR
((ORD(currenttoken)>=64) AND (currenttoken IN stopset2)))
DO
GetToken
END ;
IF Debugging
THEN
printf0(' ***\n')
END
END SyntaxError ;
(*
SyntaxCheck -
*)
PROCEDURE SyntaxCheck (stopset0: SetOfStop0; stopset1: SetOfStop1; stopset2: SetOfStop2) ;
BEGIN
(* --fixme-- this assumes a 32 bit word size. *)
IF NOT (((ORD(currenttoken)<32) AND (currenttoken IN stopset0)) OR
((ORD(currenttoken)>=32) AND (ORD(currenttoken)<64) AND (currenttoken IN stopset1)) OR
((ORD(currenttoken)>=64) AND (currenttoken IN stopset2)))
THEN
SyntaxError(stopset0, stopset1, stopset2)
END
END SyntaxCheck ;
(*
WarnMissingToken - generates a warning message about a missing token, t.
*)
PROCEDURE WarnMissingToken (t: toktype) ;
VAR
s0 : SetOfStop0 ;
s1 : SetOfStop1 ;
s2 : SetOfStop2 ;
str: String ;
BEGIN
s0 := SetOfStop0{} ;
s1 := SetOfStop1{} ;
s2 := SetOfStop2{} ;
IF ORD(t)<32
THEN
s0 := SetOfStop0{t}
ELSIF ORD(t)<64
THEN
s1 := SetOfStop1{t}
ELSE
s2 := SetOfStop2{t}
END ;
str := DescribeStop(s0, s1, s2) ;
str := ConCat(InitString('syntax error,'), Mark(str)) ;
MetaErrorStringT0(GetTokenNo(), str)
END WarnMissingToken ;
(*
MissingToken - generates a warning message about a missing token, t.
*)
PROCEDURE MissingToken (t: toktype) ;
BEGIN
WarnMissingToken(t) ;
INC(InsertCount) ;
IF (InsertCount<MaxInsert) AND
((t#identtok) AND (t#integertok) AND (t#realtok) AND (t#stringtok))
THEN
IF Debugging
THEN
printf0('inserting token\n')
END ;
InsertToken(t)
END
END MissingToken ;
(*
CheckAndInsert -
*)
PROCEDURE CheckAndInsert (t: toktype; stopset0: SetOfStop0; stopset1: SetOfStop1; stopset2: SetOfStop2) : BOOLEAN ;
BEGIN
IF ((ORD(t)<32) AND (t IN stopset0)) OR
((ORD(t)>=32) AND (ORD(t)<64) AND (t IN stopset1)) OR
((ORD(t)>=64) AND (t IN stopset2))
THEN
WarnMissingToken(t) ;
InsertTokenAndRewind(t) ;
RETURN( TRUE )
ELSE
RETURN( FALSE )
END
END CheckAndInsert ;
(*
InStopSet
*)
PROCEDURE InStopSet (t: toktype; stopset0: SetOfStop0; stopset1: SetOfStop1; stopset2: SetOfStop2) : BOOLEAN ;
BEGIN
IF ((ORD(t)<32) AND (t IN stopset0)) OR
((ORD(t)>=32) AND (ORD(t)<64) AND (t IN stopset1)) OR
((ORD(t)>=64) AND (t IN stopset2))
THEN
RETURN( TRUE )
ELSE
RETURN( FALSE )
END
END InStopSet ;
(*
PeepToken - peep token checks to see whether the stopset is satisfied by currenttoken
If it is not then it will insert a token providing the token
is one of ; ] ) } . OF END ,
if the stopset contains <identtok> then we do not insert a token
*)
PROCEDURE PeepToken (stopset0: SetOfStop0; stopset1: SetOfStop1; stopset2: SetOfStop2) ;
BEGIN
(* and again (see above re: ORD)
*)
IF (NOT (((ORD(currenttoken)<32) AND (currenttoken IN stopset0)) OR
((ORD(currenttoken)>=32) AND (ORD(currenttoken)<64) AND (currenttoken IN stopset1)) OR
((ORD(currenttoken)>=64) AND (currenttoken IN stopset2)))) AND
(NOT InStopSet(identtok, stopset0, stopset1, stopset2))
THEN
(* SyntaxCheck would fail since currentoken is not part of the stopset
we check to see whether any of currenttoken might be a commonly omitted token *)
IF CheckAndInsert(semicolontok, stopset0, stopset1, stopset2) OR
CheckAndInsert(rsbratok, stopset0, stopset1, stopset2) OR
CheckAndInsert(rparatok, stopset0, stopset1, stopset2) OR
CheckAndInsert(rcbratok, stopset0, stopset1, stopset2) OR
CheckAndInsert(periodtok, stopset0, stopset1, stopset2) OR
CheckAndInsert(oftok, stopset0, stopset1, stopset2) OR
CheckAndInsert(endtok, stopset0, stopset1, stopset2) OR
CheckAndInsert(commatok, stopset0, stopset1, stopset2)
THEN
END
END
END PeepToken ;
(*
Expect -
*)
PROCEDURE Expect (t: toktype; stopset0: SetOfStop0; stopset1: SetOfStop1; stopset2: SetOfStop2) ;
BEGIN
IF currenttoken=t
THEN
GetToken ;
(*
WriteFormat2('token number %d token was %a',
GetTokenNo(), makekey(currentstring)) ;
FlushErrors ;
*)
IF Pass0
THEN
PeepToken(stopset0, stopset1, stopset2)
END
ELSE
MissingToken(t)
END ;
SyntaxCheck(stopset0, stopset1, stopset2)
END Expect ;
(*
CompilationUnit - returns TRUE if the input was correct enough to parse
in future passes.
*)
PROCEDURE CompilationUnit () : BOOLEAN ;
BEGIN
WasNoError := TRUE ;
InsertCount := 0 ;
FileUnit(SetOfStop0{eoftok}, SetOfStop1{}, SetOfStop2{}) ;
RETURN( WasNoError )
END CompilationUnit ;
(*
Ident - error checking varient of Ident
*)
PROCEDURE Ident (stopset0: SetOfStop0; stopset1: SetOfStop1; stopset2: SetOfStop2) ;
BEGIN
LastIdent := makekey (currentstring) ;
IF IsAutoPushOn ()
THEN
PushTFtok (LastIdent, identtok, GetTokenNo())
END ;
Expect (identtok, stopset0, stopset1, stopset2)
END Ident ;
(*
string -
*)
PROCEDURE string (stopset0: SetOfStop0; stopset1: SetOfStop1; stopset2: SetOfStop2) ;
BEGIN
IF IsAutoPushOn ()
THEN
PushTF (makekey (currentstring), stringtok) ;
BuildString
END ;
Expect (stringtok, stopset0, stopset1, stopset2)
END string ;
(*
Integer -
*)
PROCEDURE Integer (stopset0: SetOfStop0; stopset1: SetOfStop1; stopset2: SetOfStop2) ;
BEGIN
IF IsAutoPushOn()
THEN
PushTFtok (makekey (currentstring), integertok, GetTokenNo ()) ;
BuildNumber
END ;
Expect(integertok, stopset0, stopset1, stopset2)
END Integer ;
(*
Real -
*)
PROCEDURE Real (stopset0: SetOfStop0; stopset1: SetOfStop1; stopset2: SetOfStop2) ;
BEGIN
IF IsAutoPushOn()
THEN
PushTFtok (makekey (currentstring), realtok, GetTokenNo ()) ;
BuildNumber
END ;
Expect(realtok, stopset0, stopset1, stopset2)
END Real ;
% module P0SyntaxCheck end
END P0SyntaxCheck.
% rules
error 'ErrorArray' 'ErrorString'
tokenfunc 'currenttoken'
token '' eoftok -- internal token
token '+' plustok
token '-' minustok
token '*' timestok
token '/' dividetok
token ':=' becomestok
token '&' ambersandtok
token "." periodtok
token "," commatok
token ";" semicolontok
token '(' lparatok
token ')' rparatok
token '[' lsbratok -- left square brackets
token ']' rsbratok -- right square brackets
token '{' lcbratok -- left curly brackets
token '}' rcbratok -- right curly brackets
token '^' uparrowtok
token "'" singlequotetok
token '=' equaltok
token '#' hashtok
token '<' lesstok
token '>' greatertok
token '<>' lessgreatertok
token '<=' lessequaltok
token '>=' greaterequaltok
token '<*' ldirectivetok
token '*>' rdirectivetok
token '..' periodperiodtok
token ':' colontok
token '"' doublequotestok
token '|' bartok
token 'AND' andtok
token 'ARRAY' arraytok
token 'BEGIN' begintok
token 'BY' bytok
token 'CASE' casetok
token 'CONST' consttok
token 'DEFINITION' definitiontok
token 'DIV' divtok
token 'DO' dotok
token 'ELSE' elsetok
token 'ELSIF' elsiftok
token 'END' endtok
token 'EXCEPT' excepttok
token 'EXIT' exittok
token 'EXPORT' exporttok
token 'FINALLY' finallytok
token 'FOR' fortok
token 'FROM' fromtok
token 'IF' iftok
token 'IMPLEMENTATION' implementationtok
token 'IMPORT' importtok
token 'IN' intok
token 'LOOP' looptok
token 'MOD' modtok
token 'MODULE' moduletok
token 'NOT' nottok
token 'OF' oftok
token 'OR' ortok
token 'PACKEDSET' packedsettok
token 'POINTER' pointertok
token 'PROCEDURE' proceduretok
token 'QUALIFIED' qualifiedtok
token 'UNQUALIFIED' unqualifiedtok
token 'RECORD' recordtok
token 'REM' remtok
token 'REPEAT' repeattok
token 'RETRY' retrytok
token 'RETURN' returntok
token 'SET' settok
token 'THEN' thentok
token 'TO' totok
token 'TYPE' typetok
token 'UNTIL' untiltok
token 'VAR' vartok
token 'WHILE' whiletok
token 'WITH' withtok
token 'ASM' asmtok
token 'VOLATILE' volatiletok
token '...' periodperiodperiodtok
token '__DATE__' datetok
token '__LINE__' linetok
token '__FILE__' filetok
token '__ATTRIBUTE__' attributetok
token '__BUILTIN__' builtintok
token '__INLINE__' inlinetok
token 'integer number' integertok
token 'identifier' identtok
token 'real number' realtok
token 'string' stringtok
special Ident first { < identtok > } follow { }
'@i{is a builtin and checks for an identifier}'
special Integer first { < integertok > } follow { }
'@i{is a builtin and checks for an integer}'
special Real first { < realtok > } follow { }
'@i{is a builtin and checks for an real constant}'
special string first { < stringtok > } follow { }
'@i{is a builtin and checks for an string constant}'
BNF
-- the following are provided by the module m2flex and also hand built procedures below
-- Ident := Letter { ( Letter | Digit ) } =:
-- Integer := Digit { Digit } | OctalDigit { OctalDigit } ( " B " | " C " ) |
-- Digit { HexDigit } " H " =:
-- Real := Digit { Digit } " . " { Digit } [ ScaleFactor ] =:
-- ScaleFactor := " E " [ ( " + " | " - " ) ] Digit { Digit } =:
-- HexDigit := Digit | " A " | " B " | " C " | " D " | " E " | " F " =:
-- Digit := OctalDigit | " 8 " | " 9 " =:
-- OctalDigit := "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" =:
-- String
FileUnit := % PushAutoOff %
( DefinitionModule | ImplementationOrProgramModule ) % PopAuto %
=:
ProgramModule := "MODULE" % PushAutoOn ; %
Ident % RegisterProgramModule ; %
% PushAutoOff ; %
[ Priority ]
";"
% PushAutoOn ; %
{ Import % RegisterImports %
} % PopAuto %
Block % PopAuto %
Ident "." % EndModule %
% PopAuto %
=:
ImplementationModule := "IMPLEMENTATION" "MODULE" % PushAutoOn ; %
Ident % RegisterImplementationModule ; %
% PushAutoOff ; %
[ Priority ] ";" % PushAutoOn ; %
{ Import % RegisterImports %
} % PopAuto %
Block % PopAuto %
Ident % EndModule %
% PopAuto %
"." =:
ImplementationOrProgramModule := ImplementationModule | ProgramModule =:
Number := Integer | Real =:
Qualident := Ident { "." Ident } =:
ConstantDeclaration := Ident "=" ConstExpression =:
ConstExpression := SimpleConstExpr [ Relation SimpleConstExpr ] =:
Relation := "=" | "#" | "<>" | "<" | "<=" | ">" | ">=" | "IN" =:
SimpleConstExpr := UnaryOrConstTerm { AddOperator ConstTerm } =:
UnaryOrConstTerm := "+" ConstTerm | "-" ConstTerm | ConstTerm =:
AddOperator := "+" | "-" | "OR" =:
ConstTerm := ConstFactor { MulOperator ConstFactor } =:
MulOperator := "*" | "/" | "DIV" | "MOD" | "REM" | "AND" | "&" =:
ConstFactor := Number | ConstString | ConstSetOrQualidentOrFunction |
"(" ConstExpression ")" | "NOT" ConstFactor |
ConstAttribute =:
-- to help satisfy LL1
ConstString := string =:
ComponentElement := ConstExpression [ ".." ConstExpression ] =:
ComponentValue := ComponentElement [ 'BY' ConstExpression ] =:
ArraySetRecordValue := ComponentValue { ',' ComponentValue } =:
Constructor := '{' [ ArraySetRecordValue ] '}' =:
ConstSetOrQualidentOrFunction := Constructor | Qualident
[ Constructor | ConstActualParameters ] =:
ConstActualParameters := "(" [ ExpList ] ")" =:
ConstAttribute := "__ATTRIBUTE__" "__BUILTIN__" "(" "(" ConstAttributeExpression ")" ")" =:
ConstAttributeExpression := Ident | "<" Qualident ',' Ident ">" =:
ByteAlignment := '<*' AttributeExpression '*>' =:
OptAlignmentExpression := [ AlignmentExpression ] =:
AlignmentExpression := "(" ConstExpression ")" =:
Alignment := [ ByteAlignment ] =:
TypeDeclaration := Ident "=" Type Alignment =:
Type := SimpleType | ArrayType | RecordType | SetType |
PointerType | ProcedureType =:
SimpleType := Qualident [ SubrangeType ] | Enumeration | SubrangeType =:
Enumeration := "(" IdentList ")" =:
IdentList := Ident % VAR
on: BOOLEAN ;
n : CARDINAL ; %
% on := IsAutoPushOn() ;
IF on
THEN
n := 1
END %
{ "," Ident % IF on
THEN
INC(n)
END %
} % IF on
THEN
PushT(n)
END %
=:
SubrangeType := "[" ConstExpression ".." ConstExpression "]" =:
ArrayType := "ARRAY" SimpleType { "," SimpleType } "OF" Type =:
RecordType := "RECORD" [ DefaultRecordAttributes ] FieldListSequence "END" =:
DefaultRecordAttributes := '<*' AttributeExpression '*>' =:
RecordFieldPragma := [ '<*' FieldPragmaExpression
{ ',' FieldPragmaExpression } '*>' ] =:
FieldPragmaExpression := Ident [ '(' ConstExpression ')' ] =:
AttributeExpression := Ident '(' ConstExpression ')' =:
FieldListSequence := FieldListStatement { ";" FieldListStatement } =:
FieldListStatement := [ FieldList ] =:
FieldList := IdentList ":" Type RecordFieldPragma
|
"CASE" CaseTag "OF" Varient { "|" Varient }
[ "ELSE" FieldListSequence ] "END"
=:
TagIdent := [ Ident ] =:
CaseTag := TagIdent [ ":" Qualident ] =:
Varient := [ VarientCaseLabelList ":" FieldListSequence ] =:
VarientCaseLabelList := VarientCaseLabels { "," VarientCaseLabels } =:
VarientCaseLabels := ConstExpression [ ".." ConstExpression ] =:
CaseLabelList := CaseLabels { "," CaseLabels } =:
CaseLabels := ConstExpression [ ".." ConstExpression ] =:
SetType := ( "SET" | "PACKEDSET" ) "OF" SimpleType =:
PointerType := "POINTER" "TO" Type =:
ProcedureType := "PROCEDURE" [ FormalTypeList ] =:
FormalTypeList := "(" ( ")" FormalReturn |
ProcedureParameters ")" FormalReturn ) =:
FormalReturn := [ ":" OptReturnType ] =:
OptReturnType := "[" Qualident "]" | Qualident =:
ProcedureParameters := ProcedureParameter
{ "," ProcedureParameter } =:
ProcedureParameter := "..." | "VAR" FormalType | FormalType =:
VarIdent := Ident [ "[" ConstExpression "]" ]
=:
VariableDeclaration := VarIdentList ":" Type Alignment =:
VarIdentList := VarIdent % VAR
on: BOOLEAN ;
n : CARDINAL ; %
% on := IsAutoPushOn() ;
IF on
THEN
n := 1
END %
{ "," VarIdent % IF on
THEN
INC(n)
END %
} % IF on
THEN
PushT(n)
END %
=:
Designator := Qualident { SubDesignator } =:
SubDesignator := "." Ident | "[" ExpList "]" | "^" =:
ExpList := Expression { "," Expression } =:
Expression := SimpleExpression [ Relation SimpleExpression ] =:
SimpleExpression := [ "+" | "-" ] Term { AddOperator Term } =:
Term := Factor { MulOperator Factor } =:
Factor := Number | string | SetOrDesignatorOrFunction |
"(" Expression ")" | "NOT" Factor | ConstAttribute =:
SetOrDesignatorOrFunction := ( Qualident [ Constructor |
SimpleDes [ ActualParameters ]
] | Constructor
)
=:
SimpleDes := { "." Ident | "[" ExpList "]" | "^" } =:
ActualParameters := "(" [ ExpList ] ")" =:
Statement := [ AssignmentOrProcedureCall | IfStatement | CaseStatement |
WhileStatement | RepeatStatement | LoopStatement |
ForStatement | WithStatement | AsmStatement |
"EXIT" | "RETURN" [ Expression ] | RetryStatement ] =:
RetryStatement := "RETRY" =:
AssignmentOrProcedureCall := Designator ( ":=" Expression |
ActualParameters | % (* epsilon *) %
) =:
-- these two break LL1 as both start with a Designator
-- ProcedureCall := Designator [ ActualParameters ] =:
-- Assignment := Designator ":=" Expression =:
StatementSequence := Statement { ";" Statement } =:
IfStatement := "IF" Expression "THEN" StatementSequence
{ "ELSIF" Expression "THEN" StatementSequence }
[ "ELSE" StatementSequence ] "END" =:
CaseStatement := "CASE" Expression "OF" Case { "|" Case }
[ "ELSE" StatementSequence ] "END" =:
Case := [ CaseLabelList ":" StatementSequence ] =:
WhileStatement := "WHILE" Expression "DO" StatementSequence "END" =:
RepeatStatement := "REPEAT" StatementSequence "UNTIL" Expression =:
ForStatement := "FOR" Ident ":=" Expression "TO" Expression
[ "BY" ConstExpression ] "DO"
StatementSequence "END" =:
LoopStatement := "LOOP" StatementSequence "END" =:
WithStatement := "WITH" Designator "DO" StatementSequence "END" =:
ProcedureDeclaration :=
ProcedureHeading ";" ( ProcedureBlock % PushAutoOn %
Ident % EndProcedure %
% PopAuto %
) =:
DefineBuiltinProcedure := [ "__ATTRIBUTE__" "__BUILTIN__" "(" "(" Ident ")" ")" |
"__INLINE__" ] =:
ProcedureHeading := "PROCEDURE"
DefineBuiltinProcedure
( % PushAutoOn %
Ident % RegisterProcedure %
% PopAuto %
[ FormalParameters ] AttributeNoReturn ) =:
AttributeNoReturn := [ "<*" Ident "*>" ] =:
-- note that we do need to know whether builtins are used as they
-- determine whether we need to parse the implementation module
-- the same is true for hidden types
Builtin := [ "__BUILTIN__" % PutModuleContainsBuiltin %
| "__INLINE__" ] =:
DefProcedureHeading := "PROCEDURE" Builtin
( Ident [ DefFormalParameters ] AttributeNoReturn )
=:
-- introduced procedure block so we can produce more informative
-- error messages
ProcedureBlock := { Declaration } [ "BEGIN" BlockBody ] "END" =:
Block := { Declaration } InitialBlock FinalBlock "END" =:
InitialBlock := [ "BEGIN" BlockBody ] =:
FinalBlock := [ "FINALLY" BlockBody ] =:
BlockBody := NormalPart [ "EXCEPT" ExceptionalPart ] =:
NormalPart := StatementSequence =:
ExceptionalPart := StatementSequence =:
Declaration := "CONST" { ConstantDeclaration ";" } |
"TYPE" { TypeDeclaration ";" } |
"VAR" { VariableDeclaration ";" } |
ProcedureDeclaration ";" |
ModuleDeclaration ";" =:
DefFormalParameters := "(" [ DefMultiFPSection ] ")" FormalReturn =:
DefMultiFPSection := DefExtendedFP |
FPSection [ ";" DefMultiFPSection ] =:
FormalParameters := "(" [ MultiFPSection ] ")" FormalReturn =:
MultiFPSection := ExtendedFP |
FPSection [ ";" MultiFPSection ] =:
FPSection := NonVarFPSection | VarFPSection =:
DefExtendedFP := DefOptArg | "..." =:
ExtendedFP := OptArg | "..." =:
VarFPSection := "VAR" IdentList ":" FormalType =:
NonVarFPSection := IdentList ":" FormalType =:
OptArg := "[" Ident ":" FormalType [ "=" ConstExpression ] "]" =:
DefOptArg := "[" Ident ":" FormalType "=" ConstExpression "]" =:
FormalType := { "ARRAY" "OF" } Qualident =:
ModuleDeclaration := "MODULE" % PushAutoOn %
Ident % RegisterInnerModule %
% PushAutoOff %
[ Priority ] ";" % PushAutoOn %
{ Import % RegisterInnerImports %
} % PopAuto %
[ Export ] Block % PopAuto %
Ident % EndModule %
% PopAuto %
=:
Priority := "[" ConstExpression "]" =:
Export := "EXPORT" ( "QUALIFIED" IdentList |
"UNQUALIFIED" IdentList |
IdentList
) ";" =:
Import := "FROM" Ident "IMPORT" IdentList ";" |
"IMPORT" % PushT(ImportTok)
(* determines whether Ident or Module *) %
IdentList ";" =:
DefinitionModule := "DEFINITION" "MODULE" [ "FOR" string ] % PushAutoOn %
Ident % RegisterDefinitionModule %
";"
{ Import % RegisterImports %
} % PushAutoOff %
[ Export
]
{ Definition } % PopAuto %
"END" Ident % EndModule %
"." % PopAuto %
=:
Definition := "CONST" { ConstantDeclaration ";" } |
"TYPE" { Ident
( ";" % PutHiddenTypeDeclared %
| "=" Type Alignment ";" ) }
|
"VAR" { VariableDeclaration ";" } |
DefProcedureHeading ";" =:
AsmStatement := 'ASM' [ 'VOLATILE' ] '(' AsmOperands ')' =:
NamedOperand := '[' Ident ']' =:
AsmOperandName := [ NamedOperand ] =:
AsmOperands := string [ ':' AsmList [ ':' AsmList [ ':' TrashList ] ] ]
=:
AsmList := [ AsmElement ] { ',' AsmElement } =:
AsmElement := AsmOperandName string '(' Expression ')'
=:
TrashList := [ string ] { ',' string } =:
FNB

1099
gcc/m2/bnf/mc-1.bnf Normal file

File diff suppressed because it is too large Load Diff

1134
gcc/m2/bnf/mc-2.bnf Normal file

File diff suppressed because it is too large Load Diff

1290
gcc/m2/bnf/mc-3.bnf Normal file

File diff suppressed because it is too large Load Diff

1265
gcc/m2/bnf/mc-4.bnf Normal file

File diff suppressed because it is too large Load Diff

1566
gcc/m2/bnf/mc-5.bnf Normal file

File diff suppressed because it is too large Load Diff

85
gcc/m2/config-lang.in Normal file
View File

@ -0,0 +1,85 @@
# Top level configure fragment for GNU Modula-2.
# Copyright (C) 2000-2021 Free Software Foundation, Inc.
# This file is part of GCC.
# GCC is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
# GCC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
# Configure looks for the existence of this file to auto-config each language.
# We define several parameters used by configure:
#
# language - name of language as it would appear in $(LANGUAGES)
# compilers - value to add to $(COMPILERS)
# stagestuff - files to add to $(STAGESTUFF)
language="m2"
compilers="cc1gm2\$(exeext) gm2l\$(exeext) gm2lcc\$(exeext) \
gm2lgen\$(exeext) gm2lsub\$(exeext) gm2cc\$(exeext) \
gm2lorder\$(exeext)"
stagestuff="gm2\$(exeext) cc1gm2\$(exeext) gm2l\$(exeext) \
gm2lcc\$(exeext) gm2lgen\$(exeext) gm2lsub\$(exeext) cc1gm2-cross\$(exeext)"
target_libs="target-libstdc++-v3 target-libgm2"
# The Modula-2 frontend needs C++ to compile the main, so we need to build the C++
# compiler during stage 1.
lang_requires_boot_languages=c++
# Do not build by default.
build_by_default="no"
gtfiles="\$(srcdir)/m2/gm2-lang.c \
\$(srcdir)/m2/gm2-lang.h \
\$(srcdir)/m2/gm2-gcc/rtegraph.c \
\$(srcdir)/m2/gm2-gcc/m2block.c \
\$(srcdir)/m2/gm2-gcc/m2builtins.c \
\$(srcdir)/m2/gm2-gcc/m2decl.c \
\$(srcdir)/m2/gm2-gcc/m2except.c \
\$(srcdir)/m2/gm2-gcc/m2expr.c \
\$(srcdir)/m2/gm2-gcc/m2statement.c \
\$(srcdir)/m2/gm2-gcc/m2type.c"
outputs=" \
m2/config-make \
m2/www/Makefile \
"
mkdir -p m2/gm2-compiler-boot
mkdir -p m2/gm2-libs-boot
mkdir -p m2/gm2-ppg-boot
mkdir -p m2/gm2-pge-boot
mkdir -p m2/gm2-pg-boot
mkdir -p m2/gm2-ici-boot
mkdir -p m2/gm2-ici
mkdir -p m2/gm2-libiberty
mkdir -p m2/gm2-gcc
mkdir -p m2/gm2-auto
mkdir -p m2/gm2-compiler
mkdir -p m2/gm2-libs
mkdir -p m2/gm2-libs-iso
mkdir -p m2/gm2-compiler-paranoid
mkdir -p m2/gm2-libs-paranoid
mkdir -p m2/gm2-compiler-verify
mkdir -p m2/boot-bin
mkdir -p m2/gm2-libs-pim
mkdir -p m2/gm2-libs-coroutines
mkdir -p m2/gm2-libs-min
mkdir -p m2/mc-boot
mkdir -p m2/mc-boot-ch
mkdir -p m2/mc-boot-gen
mkdir -p plugin
mkdir -p stage1/m2 stage2/m2 stage3/m2 stage4/m2

2
gcc/m2/config-make.in Normal file
View File

@ -0,0 +1,2 @@
# Target libraries are put under this directory:
TARGET_SUBDIR = @target_subdir@

4842
gcc/m2/configure vendored Executable file

File diff suppressed because it is too large Load Diff

50
gcc/m2/configure.ac Normal file
View File

@ -0,0 +1,50 @@
# configure.ac provides gm2spec.c with access to config values.
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
# Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
# GCC is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
# GCC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
AC_INIT(m2, [ ])
# Determine the host, build, and target systems
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
# Determine the noncanonical host name, for Ada.
ACX_NONCANONICAL_HOST
# Determine the noncanonical target name, for directory use.
ACX_NONCANONICAL_TARGET
AC_PATH_PROGS(AR_PATH, ${AR}, ar)
AC_CHECK_PROGS(regex_flex, flex)
if test x$regex_flex = "x" ; then
AC_MSG_ERROR([flex is required to build GNU Modula-2 (hint install flex).])
fi
AC_CHECK_FUNCS([stpcpy])
AC_DEFINE_UNQUOTED(AR_PATH, "$AR_PATH", the path to target archiver)
AC_PATH_PROGS(RANLIB_PATH, ${RANLIB}, ranlib)
AC_DEFINE_UNQUOTED(RANLIB_PATH, "$RANLIB_PATH", the path to target ranlib)
AC_CHECK_HEADERS(sys/types.h)
AC_HEADER_DIRENT
AC_CHECK_LIB([c],[opendir],[AC_DEFINE([HAVE_OPENDIR],[1],[found opendir])])
AC_CONFIG_HEADERS(gm2config.h, [echo timestamp > stamp-h])
AC_OUTPUT

2501
gcc/m2/el/gm2-mode.el Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,264 @@
(* CLexBuf.def provides a lexical buffer for clex.
Copyright (C) 2003-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
DEFINITION MODULE CLexBuf ;
(*
Title : CLexBuf
Author : Gaius Mulley
System : GNU Modula-2
Date : Thu Jan 23 12:32:36 2003
Revision : $Version$
Description: provides a lexical buffer for clex.
*)
FROM SYSTEM IMPORT ADDRESS ;
FROM DynamicStrings IMPORT String ;
FROM NameKey IMPORT Name ;
EXPORT QUALIFIED toktype,
IsMacroDefined, NoArgs, DefineMacro, UnDefineMacro,
OpenSource, CloseSource, ReInitialize, GetToken, InsertToken,
InsertTokenAndRewind, GetLineNo,
GetTokenNo, TokenToLineNo, FindFileNameFromToken, GetFileName,
ResetForNewPass,
currenttoken, currentstring, currentinteger,
EnableMacroSubstitutions,
AddTok, AddTokCharStar, AddTokInteger,
SetFile, PushFile, PopFile, FlushTokens ;
TYPE
toktype = (eoftok, startok, arrowtok, structtok, lsbratok, rsbratok,
lcbratok, rcbratok, lparatok, rparatok, semicolontok,
longtok, inttok, chartok, enumtok, typedeftok,
floattok, doubletok, unsignedtok, consttok,
periodperiodperiodtok,
integertok, hexintegertok, octintegertok,
identtok, realtok, conststringtok, constchartok, codetok,
starthashtok, endhashtok, definetok, undeftok, iftok, elsetok,
endiftok, ifdeftok, ifndeftok, includetok,
nottok, commatok,
periodtok,
gretok, lesstok, ortok, andtok, bartok, ambersandtok,
shiftlefttok, shiftrighttok, divtok, modtok,
sizeoftok, definedtok, hattok, equaltok, notequaltok,
greequaltok, lessequaltok, plustok, minustok, tildetok,
externtok, statictok, autotok, registertok,
voidtok, shorttok, signedtok, uniontok, colontok, becomestok,
volatiletok, typetok) ;
VAR
currenttoken : toktype ;
currentstring : ADDRESS ;
currentinteger: INTEGER ;
(*
EnableMacroSubstitutions -
*)
PROCEDURE EnableMacroSubstitutions (b: BOOLEAN) ;
(*
IsMacroDefined - returns TRUE if macro, n, was defined.
*)
PROCEDURE IsMacroDefined (n: Name) : BOOLEAN ;
(*
NoArgs - returns the number of arguments for macro, n.
-1 if the macro does not exist
*)
PROCEDURE NoArgs (n: Name) : INTEGER ;
(*
DefineMacro - defines macro, n, as defined to start at token, t.
*)
PROCEDURE DefineMacro (n: Name; t: CARDINAL) ;
(*
UnDefineMacro -
*)
PROCEDURE UnDefineMacro (n: Name) ;
(*
OpenSource - Attempts to open the source file, s.
The success of the operation is returned.
*)
PROCEDURE OpenSource (s: String) : BOOLEAN ;
(*
CloseSource - closes the current open file.
*)
PROCEDURE CloseSource ;
(*
ReInitialize - re-initialize the all the data structures.
*)
PROCEDURE ReInitialize ;
(*
ResetForNewPass - reset the buffer pointers to the beginning ready for
a new pass
*)
PROCEDURE ResetForNewPass ;
(*
GetToken - gets the next token into currenttoken.
*)
PROCEDURE GetToken ;
(*
InsertToken - inserts a symbol, token, infront of the current token
ready for the next pass.
*)
PROCEDURE InsertToken (token: toktype) ;
(*
InsertTokenAndRewind - inserts a symbol, token, infront of the current token
and then moves the token stream back onto the inserted token.
*)
PROCEDURE InsertTokenAndRewind (token: toktype) ;
(*
GetLineNo - returns the current line number where the symbol occurs in
the source file.
*)
PROCEDURE GetLineNo () : CARDINAL ;
(*
GetTokenNo - returns the number of tokens read from
the source file by the lexical analaysis.
*)
PROCEDURE GetTokenNo () : CARDINAL ;
(*
TokenToLineNo - returns the line number of the current file for the
TokenNo. The depth refers to the include depth.
A depth of 0 is the current file, depth of 1 is the file
which included the current file. Zero is returned if the
depth exceeds the file nesting level.
*)
PROCEDURE TokenToLineNo (TokenNo: CARDINAL; depth: CARDINAL) : CARDINAL ;
(*
FindFileNameFromToken - returns the complete FileName for the appropriate
source file yields the token number, TokenNo.
The, Depth, indicates the include level: 0..n
Level 0 is the current. NIL is returned if n+1
is requested.
*)
PROCEDURE FindFileNameFromToken (TokenNo: CARDINAL; depth: CARDINAL) : String ;
(*
GetFileName - assigns, a, to the current file name.
*)
PROCEDURE GetFileName () : String ;
(* ***********************************************************************
*
* These functions allow c.lex to deliver tokens into the buffer
*
************************************************************************* *)
(*
AddTok - adds a token to the buffer.
*)
PROCEDURE AddTok (t: toktype) ;
(*
AddTokCharStar - adds a token to the buffer and an additional string, s.
A copy of string, s, is made.
*)
PROCEDURE AddTokCharStar (t: toktype; s: ADDRESS) ;
(*
AddTokInteger - adds a token and an integer to the buffer.
*)
PROCEDURE AddTokInteger (t: toktype; i: INTEGER) ;
(*
SetFile - sets the current filename to, filename.
*)
PROCEDURE SetFile (filename: ADDRESS) ;
(*
PushFile - indicates that, filename, has just been included.
*)
PROCEDURE PushFile (filename: ADDRESS) ;
(*
PopFile - indicates that we are returning to, filename, having finished
an include.
*)
PROCEDURE PopFile (filename: ADDRESS) ;
(*
FlushTokens - removes the last token.
*)
PROCEDURE FlushTokens ;
END CLexBuf.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,103 @@
(* FifoQueue.def provides a simple fifo queue.
Copyright (C) 2001-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
DEFINITION MODULE FifoQueue ;
(*
Author : Gaius Mulley
Title : FifoQueue
Date : Tue Dec 12 16:23:22 GMT 1989
Description: FifoQueue provides a mechanism to and from which CARDINAL
numbers can be stored and retrieved from a FIFO queue.
Last update: Tue Dec 12 16:24:24 GMT 1989
*)
EXPORT QUALIFIED PutEnumerationIntoFifoQueue, GetEnumerationFromFifoQueue,
PutSubrangeIntoFifoQueue, GetSubrangeFromFifoQueue,
PutConstIntoFifoQueue, GetConstFromFifoQueue,
PutConstructorIntoFifoQueue, GetConstructorFromFifoQueue ;
(*
PutEnumerationIntoFifoQueue - places an enumeration symbol, c,
into a fifo queue.
*)
PROCEDURE PutEnumerationIntoFifoQueue (c: CARDINAL) ;
(*
GetEnumerationFromFifoQueue - retrieves an enumeration symbol,
c, from a fifo queue.
*)
PROCEDURE GetEnumerationFromFifoQueue (VAR c: CARDINAL) ;
(*
PutSubrangeIntoFifoQueue - places a subrange symbol into a fifo
queue.
*)
PROCEDURE PutSubrangeIntoFifoQueue (c: CARDINAL) ;
(*
GetSubrangeFromFifoQueue - retrieves a subrange symbol from a
fifo queue.
*)
PROCEDURE GetSubrangeFromFifoQueue (VAR c: CARDINAL) ;
(*
PutConstIntoFifoQueue - places a constant symbol
into a fifo queue.
*)
PROCEDURE PutConstIntoFifoQueue (c: CARDINAL) ;
(*
GetConstFromFifoQueue - retrieves a const symbol
from a fifo queue.
*)
PROCEDURE GetConstFromFifoQueue (VAR c: CARDINAL) ;
(*
PutConstructorIntoFifoQueue - places a constructor symbol
into a fifo queue.
*)
PROCEDURE PutConstructorIntoFifoQueue (c: CARDINAL) ;
(*
GetConstructorFromFifoQueue - retrieves a constructor symbol
from a fifo queue.
*)
PROCEDURE GetConstructorFromFifoQueue (VAR c: CARDINAL) ;
END FifoQueue.

View File

@ -0,0 +1,170 @@
(* FifoQueue.mod provides a simple fifo queue.
Copyright (C) 2001-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
IMPLEMENTATION MODULE FifoQueue ;
FROM Lists IMPORT List, InitList, PutItemIntoList, GetItemFromList ;
TYPE
Fifo = RECORD
Queue: List ;
Out : CARDINAL ;
END ;
VAR
const,
subrange,
enumeration,
constructor: Fifo ;
(*
PutInto - places a CARDINAL number, c, into a fifo queue.
*)
PROCEDURE PutInto (VAR f: Fifo; c: CARDINAL) ;
BEGIN
WITH f DO
PutItemIntoList(Queue, c)
END
END PutInto ;
(*
GetFrom - retrieves a CARDINAL number, c, from a fifo queue.
*)
PROCEDURE GetFrom (VAR f: Fifo; VAR c: CARDINAL) ;
BEGIN
WITH f DO
INC(Out) ;
c := GetItemFromList(Queue, Out)
END
END GetFrom ;
(*
PutEnumerationIntoFifoQueue - places an enumeration symbol, c,
into a fifo queue.
*)
PROCEDURE PutEnumerationIntoFifoQueue (c: CARDINAL) ;
BEGIN
PutInto(enumeration, c)
END PutEnumerationIntoFifoQueue ;
(*
GetEnumerationFromFifoQueue - retrieves an enumeration symbol,
c, from a fifo queue.
*)
PROCEDURE GetEnumerationFromFifoQueue (VAR c: CARDINAL) ;
BEGIN
GetFrom(enumeration, c)
END GetEnumerationFromFifoQueue ;
(*
PutSubrangeIntoFifoQueue - places a subrange symbol into a fifo
queue.
*)
PROCEDURE PutSubrangeIntoFifoQueue (c: CARDINAL) ;
BEGIN
PutInto(subrange, c)
END PutSubrangeIntoFifoQueue ;
(*
GetSubrangeFromFifoQueue - retrieves a subrange symbol from a
fifo queue.
*)
PROCEDURE GetSubrangeFromFifoQueue (VAR c: CARDINAL) ;
BEGIN
GetFrom(subrange, c)
END GetSubrangeFromFifoQueue ;
(*
PutConstructorIntoFifoQueue - places a constructor symbol
into a fifo queue.
*)
PROCEDURE PutConstructorIntoFifoQueue (c: CARDINAL) ;
BEGIN
PutInto(constructor, c)
END PutConstructorIntoFifoQueue ;
(*
GetConstructorFromFifoQueue - retrieves a constructor symbol
from a fifo queue.
*)
PROCEDURE GetConstructorFromFifoQueue (VAR c: CARDINAL) ;
BEGIN
GetFrom(constructor, c)
END GetConstructorFromFifoQueue ;
(*
PutConstIntoFifoQueue - places a constant symbol
into a fifo queue.
*)
PROCEDURE PutConstIntoFifoQueue (c: CARDINAL) ;
BEGIN
PutInto(const, c)
END PutConstIntoFifoQueue ;
(*
GetConstFromFifoQueue - retrieves a const symbol
from a fifo queue.
*)
PROCEDURE GetConstFromFifoQueue (VAR c: CARDINAL) ;
BEGIN
GetFrom(const, c)
END GetConstFromFifoQueue ;
(*
Init - initialize the fifo queue.
*)
PROCEDURE Init (VAR f: Fifo) ;
BEGIN
WITH f DO
InitList(Queue) ;
Out := 0
END
END Init ;
BEGIN
Init(const) ;
Init(enumeration) ;
Init(subrange) ;
Init(constructor)
END FifoQueue.

View File

@ -0,0 +1,128 @@
(* Lists.def provides an unordered list manipulation package.
Copyright (C) 2001-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
DEFINITION MODULE Lists ;
(*
Author : Gaius Mulley
Title : Lists
Date : Tue Dec 12 20:53:36 EST 1989
SYSTEM : UNIX (GNU Modula-2)
Description: Provides an unordered list manipulation package.
Last update: $Date: 2010/10/03 19:01:05 $
Version : $Revision: 1.9 $
*)
FROM SYSTEM IMPORT WORD ;
FROM SymbolKey IMPORT PerformOperation ;
EXPORT QUALIFIED List,
InitList, KillList, PutItemIntoList, GetItemFromList,
GetIndexOfList,
NoOfItemsInList, IsItemInList, IncludeItemIntoList,
RemoveItemFromList, ForeachItemInListDo, DuplicateList ;
TYPE
List ;
(*
InitList - creates a new list, l.
*)
PROCEDURE InitList (VAR l: List) ;
(*
KillList - deletes the complete list, l.
*)
PROCEDURE KillList (VAR l: List) ;
(*
PutItemIntoList - places a CARDINAL, c, into list, l.
*)
PROCEDURE PutItemIntoList (l: List; c: WORD) ;
(*
GetItemFromList - retrieves the nth WORD from list, l.
*)
PROCEDURE GetItemFromList (l: List; n: CARDINAL) : WORD ;
(*
GetIndexOfList - returns the index for WORD, c, in list, l.
If more than one CARDINAL, c, exists the index
for the first is returned.
*)
PROCEDURE GetIndexOfList (l: List; c: WORD) : CARDINAL ;
(*
NoOfItemsInList - returns the number of items in list, l.
*)
PROCEDURE NoOfItemsInList (l: List) : CARDINAL ;
(*
IncludeItemIntoList - adds a WORD, c, into a list providing
the value does not already exist.
*)
PROCEDURE IncludeItemIntoList (l: List; c: WORD) ;
(*
RemoveItemFromList - removes a WORD, c, from a list.
It assumes that this value only appears once.
*)
PROCEDURE RemoveItemFromList (l: List; c: WORD) ;
(*
IsItemInList - returns true if a WORD, c, was found in list, l.
*)
PROCEDURE IsItemInList (l: List; c: WORD) : BOOLEAN ;
(*
ForeachItemInListDo - calls procedure, P, foreach item in list, l.
*)
PROCEDURE ForeachItemInListDo (l: List; P: PerformOperation) ;
(*
DuplicateList - returns a duplicate list derived from, l.
*)
PROCEDURE DuplicateList (l: List) : List ;
END Lists.

View File

@ -0,0 +1,341 @@
(* Lists.mod provides an unordered list manipulation package.
Copyright (C) 2001-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
IMPLEMENTATION MODULE Lists ;
FROM Storage IMPORT ALLOCATE, DEALLOCATE ;
CONST
MaxNoOfElements = 5 ;
TYPE
List = POINTER TO list ;
list = RECORD
NoOfElements: CARDINAL ;
Elements : ARRAY [1..MaxNoOfElements] OF WORD ;
Next : List ;
END ;
(*
InitList - creates a new list, l.
*)
PROCEDURE InitList (VAR l: List) ;
BEGIN
NEW(l) ;
WITH l^ DO
NoOfElements := 0 ;
Next := NIL
END
END InitList ;
(*
KillList - deletes the complete list, l.
*)
PROCEDURE KillList (VAR l: List) ;
BEGIN
IF l#NIL
THEN
IF l^.Next#NIL
THEN
KillList(l^.Next)
END ;
DISPOSE(l)
END
END KillList ;
(*
PutItemIntoList - places a WORD, c, into list, l.
*)
PROCEDURE PutItemIntoList (l: List; c: WORD) ;
BEGIN
WITH l^ DO
IF NoOfElements<MaxNoOfElements
THEN
INC(NoOfElements) ;
Elements[NoOfElements] := c
ELSIF Next#NIL
THEN
PutItemIntoList(Next, c)
ELSE
InitList(Next) ;
PutItemIntoList(Next, c)
END
END
END PutItemIntoList ;
(*
GetItemFromList - retrieves the nth WORD from list, l.
(recursive solution).
*)
(*
PROCEDURE GetItemFromList (l: List; n: CARDINAL) : WORD ;
BEGIN
IF n>NoOfItemsInList(l)
THEN
RETURN( 0 )
ELSE
WITH l^ DO
IF n<=NoOfElements
THEN
RETURN( Elements[n] )
ELSE
RETURN( GetItemFromList( Next, n-NoOfElements ) )
END
END
END
END GetItemFromList ;
*)
(* iterative solution *)
PROCEDURE GetItemFromList (l: List; n: CARDINAL) : WORD ;
BEGIN
WHILE l#NIL DO
WITH l^ DO
IF n<=NoOfElements
THEN
RETURN( Elements[n] )
ELSE
DEC(n, NoOfElements)
END
END ;
l := l^.Next
END ;
RETURN( 0 )
END GetItemFromList ;
(*
GetIndexOfList - returns the index for WORD, c, in list, l.
If more than one WORD, c, exists the index
for the first is returned.
*)
PROCEDURE GetIndexOfList (l: List; c: WORD) : CARDINAL ;
VAR
i: CARDINAL ;
BEGIN
IF l=NIL
THEN
RETURN( 0 )
ELSE
WITH l^ DO
i := 1 ;
WHILE i<=NoOfElements DO
IF Elements[i]=c
THEN
RETURN( i )
ELSE
INC(i)
END
END ;
RETURN( NoOfElements+GetIndexOfList(Next, c) )
END
END
END GetIndexOfList ;
(*
NoOfItemsInList - returns the number of items in list, l.
*)
(*
PROCEDURE NoOfItemsInList (l: List) : CARDINAL ;
BEGIN
IF l=NIL
THEN
RETURN( 0 )
ELSE
WITH l^ DO
RETURN( NoOfElements+NoOfItemsInList(Next) )
END
END
END NoOfItemsInList ;
*)
(*
NoOfItemsInList - returns the number of items in list, l.
(iterative algorithm of the above).
*)
PROCEDURE NoOfItemsInList (l: List) : CARDINAL ;
VAR
t: CARDINAL ;
BEGIN
IF l=NIL
THEN
RETURN( 0 )
ELSE
t := 0 ;
REPEAT
WITH l^ DO
INC(t, NoOfElements)
END ;
l := l^.Next
UNTIL l=NIL;
RETURN( t )
END
END NoOfItemsInList ;
(*
IncludeItemIntoList - adds a WORD, c, into a list providing
the value does not already exist.
*)
PROCEDURE IncludeItemIntoList (l: List; c: WORD) ;
BEGIN
IF NOT IsItemInList(l, c)
THEN
PutItemIntoList(l, c)
END
END IncludeItemIntoList ;
(*
RemoveItem - remove an element at index, i, from the list data type.
*)
PROCEDURE RemoveItem (p, l: List; i: CARDINAL) ;
BEGIN
WITH l^ DO
DEC(NoOfElements) ;
WHILE i<=NoOfElements DO
Elements[i] := Elements[i+1] ;
INC(i)
END ;
IF (NoOfElements=0) AND (p#NIL)
THEN
p^.Next := l^.Next ;
DISPOSE(l)
END
END
END RemoveItem ;
(*
RemoveItemFromList - removes a WORD, c, from a list.
It assumes that this value only appears once.
*)
PROCEDURE RemoveItemFromList (l: List; c: WORD) ;
VAR
p : List ;
i : CARDINAL ;
Found: BOOLEAN ;
BEGIN
IF l#NIL
THEN
Found := FALSE ;
p := NIL ;
REPEAT
WITH l^ DO
i := 1 ;
WHILE (i<=NoOfElements) AND (Elements[i]#c) DO
INC(i)
END ;
END ;
IF (i<=l^.NoOfElements) AND (l^.Elements[i]=c)
THEN
Found := TRUE
ELSE
p := l ;
l := l^.Next
END
UNTIL (l=NIL) OR Found ;
IF Found
THEN
RemoveItem(p, l, i)
END
END
END RemoveItemFromList ;
(*
IsItemInList - returns true if a WORD, c, was found in list, l.
*)
PROCEDURE IsItemInList (l: List; c: WORD) : BOOLEAN ;
VAR
i: CARDINAL ;
BEGIN
REPEAT
WITH l^ DO
i := 1 ;
WHILE (i<=NoOfElements) DO
IF Elements[i]=c
THEN
RETURN( TRUE )
ELSE
INC(i)
END
END
END ;
l := l^.Next
UNTIL l=NIL ;
RETURN( FALSE )
END IsItemInList ;
(*
ForeachItemInListDo - calls procedure, P, foreach item in list, l.
*)
PROCEDURE ForeachItemInListDo (l: List; P: PerformOperation) ;
VAR
i, n: CARDINAL ;
BEGIN
n := NoOfItemsInList(l) ;
i := 1 ;
WHILE i<=n DO
P(GetItemFromList(l, i)) ;
INC(i)
END
END ForeachItemInListDo ;
(*
DuplicateList - returns a duplicate list derived from, l.
*)
PROCEDURE DuplicateList (l: List) : List ;
VAR
m : List ;
n, i: CARDINAL ;
BEGIN
InitList(m) ;
n := NoOfItemsInList(l) ;
i := 1 ;
WHILE i<=n DO
PutItemIntoList(m, GetItemFromList(l, i)) ;
INC(i)
END ;
RETURN( m )
END DuplicateList ;
END Lists.

View File

@ -0,0 +1,989 @@
(* M2ALU.def gcc implementation of the M2ALU module.
Copyright (C) 2001-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
DEFINITION MODULE M2ALU ;
(*
Title : M2ALU.def
Author : Gaius Mulley
System : UNIX (gm2)
Date : Tue Jul 11 09:14:28 2000
Description: Handles all values in the Modula-2 compiler and all
manipulations of values. All values are mapped onto
gcc trees.
*)
FROM NameKey IMPORT Name ;
FROM m2tree IMPORT Tree ;
FROM M2GCCDeclare IMPORT WalkAction, IsAction ;
EXPORT QUALIFIED PtrToValue,
InitValue,
IsValueTypeNone,
IsValueTypeInteger,
IsValueTypeReal,
IsValueTypeComplex,
IsValueTypeSet,
IsValueTypeConstructor,
IsValueTypeArray,
IsValueTypeRecord,
PopInto, PushFrom,
PushIntegerTree, PopIntegerTree,
PushSetTree, PopSetTree,
PushRealTree, PopRealTree,
PushComplexTree, PopComplexTree,
PopConstructorTree,
PushCard,
PushInt,
PushChar,
PushString,
PushTypeOfTree,
CoerseLongRealToCard,
ConvertRealToInt,
ConvertToInt,
ConvertToType,
GetSetValueType,
IsSolved, IsValueConst,
PutConstructorSolved, EvaluateValue, TryEvaluateValue,
IsNulSet, IsGenericNulSet, PushNulSet, AddBitRange, AddBit, SubBit,
SetOr, SetAnd, SetIn,
SetDifference, SetSymmetricDifference,
SetNegate, SetShift, SetRotate,
Addn, Multn, Sub,
DivFloor, ModFloor, DivTrunc, ModTrunc,
Equ, NotEqu, Less, Gre, LessEqu, GreEqu,
GetValue, GetRange, ConstructSetConstant, BuildRange,
IsConstructorDependants, WalkConstructorDependants,
AddField, AddElements,
PushEmptyConstructor, PushEmptyArray, PushEmptyRecord,
ChangeToConstructor,
IsValueAndTreeKnown, CheckOrResetOverflow ;
TYPE
PtrToValue ;
(*
InitValue - initializes and returns a value container.
*)
PROCEDURE InitValue () : PtrToValue ;
(*
IsValueTypeNone - returns TRUE if the value on the top stack has no value.
*)
PROCEDURE IsValueTypeNone () : BOOLEAN ;
(*
IsValueTypeInteger - returns TRUE if the value on the top stack is an integer.
*)
PROCEDURE IsValueTypeInteger () : BOOLEAN ;
(*
IsValueTypeReal - returns TRUE if the value on the top stack is a real.
*)
PROCEDURE IsValueTypeReal () : BOOLEAN ;
(*
IsValueTypeComplex - returns TRUE if the value on the top stack is a complex.
*)
PROCEDURE IsValueTypeComplex () : BOOLEAN ;
(*
IsValueTypeSet - returns TRUE if the value on the top stack is a set.
*)
PROCEDURE IsValueTypeSet () : BOOLEAN ;
(*
IsValueTypeConstructor - returns TRUE if the value on the top
stack is a constructor.
*)
PROCEDURE IsValueTypeConstructor () : BOOLEAN ;
(*
IsValueTypeArray - returns TRUE if the value on the top
stack is an array.
*)
PROCEDURE IsValueTypeArray () : BOOLEAN ;
(*
IsValueTypeRecord - returns TRUE if the value on the top
stack is a record.
*)
PROCEDURE IsValueTypeRecord () : BOOLEAN ;
(*
GetSetValueType - returns the set type on top of the ALU stack.
*)
PROCEDURE GetSetValueType () : CARDINAL ;
(*
PushIntegerTree - pushes a gcc tree value onto the ALU stack.
*)
PROCEDURE PushIntegerTree (t: Tree) ;
(*
PopIntegerTree - pops a gcc tree value from the ALU stack.
*)
PROCEDURE PopIntegerTree () : Tree ;
(*
PushRealTree - pushes a gcc tree value onto the ALU stack.
*)
PROCEDURE PushRealTree (t: Tree) ;
(*
PopRealTree - pops a gcc tree value from the ALU stack.
*)
PROCEDURE PopRealTree () : Tree ;
(*
PushComplexTree - pushes a gcc tree value onto the ALU stack.
*)
PROCEDURE PushComplexTree (t: Tree) ;
(*
PopComplexTree - pops a gcc tree value from the ALU stack.
*)
PROCEDURE PopComplexTree () : Tree ;
(*
PushSetTree - pushes a gcc tree onto the ALU stack.
The tree, t, is expected to contain a
word value. It is converted into a set
type (sym). Bit 0 maps onto MIN(sym).
*)
PROCEDURE PushSetTree (tokenno: CARDINAL;
t: Tree; sym: CARDINAL) ;
(*
PopSetTree - pops a gcc tree from the ALU stack.
*)
PROCEDURE PopSetTree (tokenno: CARDINAL) : Tree ;
(*
PopConstructorTree - returns a tree containing the compound literal.
*)
PROCEDURE PopConstructorTree (tokenno: CARDINAL) : Tree ;
(*
PushFrom - pushes a copy of the contents of, v, onto stack.
*)
PROCEDURE PushFrom (v: PtrToValue) ;
(*
PopInto - pops the top element from the stack and places it into, v.
*)
PROCEDURE PopInto (v: PtrToValue) ;
(*
PushCard - pushes a cardinal onto the stack.
*)
PROCEDURE PushCard (c: CARDINAL) ;
(*
PushInt - pushes an integer onto the stack.
*)
PROCEDURE PushInt (i: INTEGER) ;
(*
PushChar - pushes a char onto the stack.
*)
PROCEDURE PushChar (c: CHAR) ;
(*
PushString - pushes the numerical value of the string onto the stack.
*)
PROCEDURE PushString (s: Name) ;
(*
CoerseLongRealToCard - performs a coersion between a REAL to a CARDINAL
*)
PROCEDURE CoerseLongRealToCard ;
(*
ConvertRealToInt - converts a REAL into an INTEGER
*)
PROCEDURE ConvertRealToInt ;
(*
ConvertToInt - converts the value into an INTEGER. This should be used
if we are computing the number of elements in a char set to
avoid an overflow.
*)
PROCEDURE ConvertToInt ;
(*
ConvertToType - converts the top of stack to type, t.
*)
PROCEDURE ConvertToType (t: CARDINAL) ;
(*
IsSolved - returns true if the memory cell indicated by v
has a known value.
*)
PROCEDURE IsSolved (v: PtrToValue) : BOOLEAN ;
(*
PutConstructorSolved - records that this constructor is solved.
*)
PROCEDURE PutConstructorSolved (sym: CARDINAL) ;
(*
EvaluateValue - attempts to evaluate the symbol, sym, value.
*)
PROCEDURE EvaluateValue (sym: CARDINAL) ;
(*
TryEvaluateValue - attempts to evaluate the symbol, sym, value.
*)
PROCEDURE TryEvaluateValue (sym: CARDINAL) ;
(*
Add - adds the top two elements on the stack.
The Stack:
Entry Exit
Ptr ->
+------------+
| Op1 | <- Ptr
|------------| +------------+
| Op2 | | Op2 + Op1 |
|------------| |------------|
*)
PROCEDURE Addn ;
(*
Sub - subtracts the top two elements on the stack.
The Stack:
Entry Exit
Ptr ->
+------------+
| Op1 | <- Ptr
|------------| +------------+
| Op2 | | Op2 - Op1 |
|------------| |------------|
*)
PROCEDURE Sub ;
(*
Mult - multiplies the top two elements on the stack.
The Stack:
Entry Exit
Ptr ->
+------------+
| Op1 | <- Ptr
|------------| +------------+
| Op2 | | Op2 * Op1 |
|------------| |------------|
*)
PROCEDURE Multn ;
(*
DivFloor - divides the top two elements on the stack.
The Stack:
Entry Exit
Ptr ->
+------------+
| Op1 | <- Ptr
|------------| +--------------+
| Op2 | | Op2 DIV Op1 |
|------------| |--------------|
*)
PROCEDURE DivFloor ;
(*
ModFloor - modulus of the top two elements on the stack.
The Stack:
Entry Exit
Ptr ->
+------------+
| Op1 | <- Ptr
|------------| +--------------+
| Op2 | | Op2 MOD Op1 |
|------------| |--------------|
*)
PROCEDURE ModFloor ;
(*
DivTrunc - divides the top two elements on the stack.
The Stack:
Entry Exit
Ptr ->
+------------+
| Op1 | <- Ptr
|------------| +--------------+
| Op2 | | Op2 DIV Op1 |
|------------| |--------------|
*)
PROCEDURE DivTrunc ;
(*
ModTrunc - modulus of the top two elements on the stack.
The Stack:
Entry Exit
Ptr ->
+------------+
| Op1 | <- Ptr
|------------| +--------------+
| Op2 | | Op2 MOD Op1 |
|------------| |--------------|
*)
PROCEDURE ModTrunc ;
(*
Equ - returns true if the top two elements on the stack
are identical.
The Stack:
Entry Exit
Ptr ->
+------------+
| Op1 |
|------------|
| Op2 |
|------------| Empty
RETURN( Op2 = Op1 )
*)
PROCEDURE Equ (tokenno: CARDINAL) : BOOLEAN ;
(*
NotEqu - returns true if the top two elements on the stack
are not identical.
The Stack:
Entry Exit
Ptr ->
+------------+
| Op1 |
|------------|
| Op2 |
|------------| Empty
RETURN( Op2 # Op1 )
*)
PROCEDURE NotEqu (tokenno: CARDINAL) : BOOLEAN ;
(*
Less - returns true if Op2 < Op1.
The Stack:
Entry Exit
Ptr ->
+------------+
| Op1 |
|------------|
| Op2 |
|------------| Empty
RETURN( Op2 < Op1 )
*)
PROCEDURE Less (tokenno: CARDINAL) : BOOLEAN ;
(*
Gre - returns true if Op2 > Op1
The Stack:
Entry Exit
Ptr ->
+------------+
| Op1 |
|------------|
| Op2 |
|------------| Empty
RETURN( Op2 > Op1 )
*)
PROCEDURE Gre (tokenno: CARDINAL) : BOOLEAN ;
(*
LessEqu - returns true if Op2 <= Op1
The Stack:
Entry Exit
Ptr ->
+------------+
| Op1 |
|------------|
| Op2 |
|------------| Empty
RETURN( Op2 <= Op1 )
*)
PROCEDURE LessEqu (tokenno: CARDINAL) : BOOLEAN ;
(*
GreEqu - returns true if Op2 >= Op1
are not identical.
The Stack:
Entry Exit
Ptr ->
+------------+
| Op1 |
|------------|
| Op2 |
|------------| Empty
RETURN( Op2 >= Op1 )
*)
PROCEDURE GreEqu (tokenno: CARDINAL) : BOOLEAN ;
(*
IsNulSet - returns TRUE if the top element is the nul set constant, {}.
*)
PROCEDURE IsNulSet () : BOOLEAN ;
(*
IsGenericNulSet - returns TRUE if the top element is the generic nul set constant, {}.
*)
PROCEDURE IsGenericNulSet () : BOOLEAN ;
(*
PushNulSet - pushes an empty set {} onto the ALU stack. The subrange type used
to construct the set is defined by, type. If this is NulSym then
the set is generic and compatible with all sets.
The Stack:
Entry Exit
<- Ptr
+------------+
| {} |
Ptr -> |------------|
*)
PROCEDURE PushNulSet (settype: CARDINAL) ;
(*
AddBitRange - adds the range op1..op2 to the underlying set.
Ptr ->
<- Ptr
+------------+ +------------+
| Set | | Set |
|------------| |------------|
*)
PROCEDURE AddBitRange (tokenno: CARDINAL; op1, op2: CARDINAL) ;
(*
AddBit - adds the bit op1 to the underlying set. INCL(Set, op1)
Ptr ->
<- Ptr
+------------+ +------------+
| Set | | Set |
|------------| |------------|
*)
PROCEDURE AddBit (tokenno: CARDINAL; op1: CARDINAL) ;
(*
SubBit - removes a bit op1 from the underlying set. EXCL(Set, Op1)
Ptr ->
+------------+
| Op1 | <- Ptr
|------------| +------------+
| Set | | Set |
|------------| |------------|
*)
PROCEDURE SubBit (tokenno: CARDINAL; op1: CARDINAL) ;
(*
SetIn - returns true if the Op1 IN Set
The Stack:
Entry Exit
Ptr ->
+------------+
| Set |
|------------|
| Op1 |
|------------| Empty
RETURN( Op1 IN Set )
*)
PROCEDURE SetIn (tokenno: CARDINAL; Op1: CARDINAL) : BOOLEAN ;
(*
SetOr - performs an inclusive OR of the top two sets on the stack.
The Stack:
Entry Exit
Ptr ->
+------------+
| Op1 | <- Ptr
|------------| +------------+
| Op2 | | Op2 + Op1 |
|------------| |------------|
*)
PROCEDURE SetOr (tokenno: CARDINAL) ;
(*
SetAnd - performs a set AND the top two sets on the stack.
The Stack:
Entry Exit
Ptr ->
+------------+
| Op1 | <- Ptr
|------------| +------------+
| Op2 | | Op2 * Op1 |
|------------| |------------|
*)
PROCEDURE SetAnd (tokenno: CARDINAL) ;
(*
SetDifference - performs a set difference of the top two elements on the stack.
For each member in the set
if member in Op2 and not member in Op1
The Stack:
Entry Exit
Ptr ->
+------------+
| Op1 | <- Ptr
|------------| +-------------------+
| Op2 | | Op2 and (not Op1) |
|------------| |-------------------|
*)
PROCEDURE SetDifference (tokenno: CARDINAL) ;
(*
SetSymmetricDifference - performs a set difference of the top two sets on the stack.
The Stack:
Entry Exit
Ptr ->
+------------+
| Op1 | <- Ptr
|------------| +------------+
| Op2 | | Op2 - Op1 |
|------------| |------------|
*)
PROCEDURE SetSymmetricDifference (tokenno: CARDINAL) ;
(*
SetNegate - negates the top set on the stack.
Ptr -> <- Ptr
+-----------+ +------------+
| Set | | Set |
|-----------| |------------|
*)
PROCEDURE SetNegate (tokenno: CARDINAL) ;
(*
SetShift - if op1 is positive
then
result := op2 << op1
else
result := op2 >> op1
fi
The Stack:
Entry Exit
Ptr ->
+------------+
| Op1 | <- Ptr
|------------| +------------+
| Op2 | | result |
|------------| |------------|
*)
PROCEDURE SetShift (tokenno: CARDINAL) ;
(*
SetRotate - if op1 is positive
then
result := ROTATERIGHT(op2, op1)
else
result := ROTATELEFT(op2, op1)
fi
The Stack:
Entry Exit
Ptr ->
+------------+
| Op1 | <- Ptr
|------------| +------------+
| Op2 | | result |
|------------| |------------|
*)
PROCEDURE SetRotate (tokenno: CARDINAL) ;
(*
GetValue - returns and pops the value from the top of stack.
*)
PROCEDURE GetValue (tokenno: CARDINAL) : PtrToValue ;
(*
GetRange - returns TRUE if range number, n, exists in the value, v.
A non empty set is defined by having 1..N ranges
*)
PROCEDURE GetRange (v: PtrToValue; n: CARDINAL; VAR low, high: CARDINAL) : BOOLEAN ;
(*
ConstructSetConstant - builds a struct of integers which represents the
set const, sym.
*)
PROCEDURE ConstructSetConstant (tokenno: CARDINAL; v: PtrToValue) : Tree ;
(*
BuildRange - returns a integer sized constant which represents the
value {e1..e2}.
*)
PROCEDURE BuildRange (tokenno: CARDINAL; e1, e2: Tree) : Tree ;
(*
IsConstructorDependants - return TRUE if returned if all
q(dependants) of, sym, return TRUE.
*)
PROCEDURE IsConstructorDependants (sym: CARDINAL; q: IsAction) : BOOLEAN ;
(*
WalkConstructorDependants - walk the constructor, sym, calling
p for each dependant.
*)
PROCEDURE WalkConstructorDependants (sym: CARDINAL; p: WalkAction) ;
(*
IsValueAndTreeKnown - returns TRUE if the value is known and the gcc tree
is defined.
The Stack:
Entry Exit
Ptr ->
+------------+
| Op1 | <- Ptr
|------------| +------------+
*)
PROCEDURE IsValueAndTreeKnown () : BOOLEAN ;
(*
CheckOrResetOverflow - tests to see whether the tree, t, has caused
an overflow error and if so it generates an
error message.
*)
PROCEDURE CheckOrResetOverflow (tokenno: CARDINAL; t: Tree; check: BOOLEAN) ;
(*
AddElements - adds the elements, el BY, n, to the array constant.
Ptr ->
<- Ptr
+------------+ +------------+
| Array | | Array |
|------------| |------------|
*)
PROCEDURE AddElements (tokenno: CARDINAL; el, n: CARDINAL) ;
(*
AddField - adds the field op1 to the underlying constructor.
Ptr ->
<- Ptr
+------------+ +------------+
| const | | const |
|------------| |------------|
*)
PROCEDURE AddField (tokenno: CARDINAL; op1: CARDINAL) ;
(*
PushEmptyConstructor - pushes an empty constructor {} onto the ALU stack.
This is expected to be filled in by subsequent
calls to AddElements, AddRange or AddField.
The Stack:
Entry Exit
<- Ptr
+------------+
| {} |
Ptr -> |------------|
*)
PROCEDURE PushEmptyConstructor (constype: CARDINAL) ;
(*
PushEmptyArray - pushes an empty array {} onto the ALU stack.
This is expected to be filled in by subsequent
calls to AddElements.
The Stack:
Entry Exit
<- Ptr
+------------+
| {} |
Ptr -> |------------|
*)
PROCEDURE PushEmptyArray (arraytype: CARDINAL) ;
(*
PushEmptyRecord - pushes an empty record {} onto the ALU stack.
This is expected to be filled in by subsequent
calls to AddField.
The Stack:
Entry Exit
<- Ptr
+------------+
| {} |
Ptr -> |------------|
*)
PROCEDURE PushEmptyRecord (recordtype: CARDINAL) ;
(*
ChangeToConstructor - change the top of stack value to a constructor, type.
*)
PROCEDURE ChangeToConstructor (tokenno: CARDINAL; constype: CARDINAL) ;
(*
IsValueConst - returns true if the memory cell indicated by v
is only defined by constants. For example
no variables are used in the constructor.
*)
PROCEDURE IsValueConst (v: PtrToValue) : BOOLEAN ;
(*
PushTypeOfTree - pushes tree, gcc, to the stack and records the
front end type.
*)
PROCEDURE PushTypeOfTree (sym: CARDINAL; gcc: Tree) ;
END M2ALU.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,114 @@
(* M2AsmUtil.def provides asm symbol name conversion.
Copyright (C) 2001-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
DEFINITION MODULE M2AsmUtil ;
(*
Author : Gaius Mulley
Title : M2AsmUtil
Date : Thu Feb 1 15:34:08 GMT 1990
Description: Provides utilities relating symbols in the SymbolTable
to their equalalent representation in ASM format.
*)
FROM DynamicStrings IMPORT String ;
FROM NameKey IMPORT Name ;
EXPORT QUALIFIED WriteAsmName, WriteName, GetAsmName, GetFullSymName,
UnderScoreString, DotifyLabel,
GetModuleInitName, GetModuleFinallyName,
GetFullScopeAsmName ;
(*
DotifyLabel - place a dot infront of the label if necessary.
The string, s, should no longer be used after
this function. A new string is returned.
*)
PROCEDURE DotifyLabel (s: String) : String ;
(*
WriteAsmName - displays the symbol, Sym, name using module prefixes
if it is EXPORT QUALIFIED.
*)
PROCEDURE WriteAsmName (Sym: CARDINAL) ;
(*
WriteName - writes out the symbol, Sym, name using module prefixes
if it is EXPORT QUALIFIED.
The procedure differs from the above because it does
not generate any _ prefix to the name.
*)
PROCEDURE WriteName (Sym: CARDINAL) ;
(*
GetAsmName - returns the NameKey for the assembler string of a symbol.
*)
PROCEDURE GetAsmName (Sym: CARDINAL) : Name ;
(*
GetFullSymName - returns the NameKey for the symbol name (which also
may contain the module name). This is the same as
GetAsmName except that it does not have the leading _
*)
PROCEDURE GetFullSymName (Sym: CARDINAL) : Name ;
(*
GetFullScopeAsmName - returns the fully qualified name for the symbol.
This will take the format
[DefImpModule|Module]_{InnerModule}_{Procedure}_SymbolName
*)
PROCEDURE GetFullScopeAsmName (Sym: CARDINAL) : Name ;
(*
UnderScoreString - emits a string with a leading underscore if the C compiler
uses _ prefixes. The string without the underscore is returned.
*)
PROCEDURE UnderScoreString (s: String) : String ;
(*
GetModuleInitName - returns the name of the initialization section of a module.
*)
PROCEDURE GetModuleInitName (Sym: CARDINAL) : Name ;
(*
GetModuleFinallyName - returns the name of the finalization section of a module.
*)
PROCEDURE GetModuleFinallyName (Sym: CARDINAL) : Name ;
END M2AsmUtil.

View File

@ -0,0 +1,326 @@
(* M2AsmUtil.mod provides utilities relating symbols in the SymbolTable.
Copyright (C) 2001-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
IMPLEMENTATION MODULE M2AsmUtil ;
FROM SFIO IMPORT WriteS ;
FROM FIO IMPORT StdOut ;
FROM DynamicStrings IMPORT String, string, ConCat, KillString, InitString, Mark, InitStringCharStar, ConCatChar ;
FROM StdIO IMPORT Write ;
FROM StrIO IMPORT WriteString ;
FROM NameKey IMPORT WriteKey, GetKey, MakeKey, makekey, KeyToCharStar ;
FROM M2Options IMPORT WholeProgram ;
FROM SymbolTable IMPORT NulSym,
GetSymName,
GetScope,
GetBaseModule,
IsInnerModule,
IsVar,
IsProcedure,
IsModule,
IsDefImp,
IsExportQualified,
IsExported,
IsDefinitionForC ;
FROM M2Error IMPORT InternalError ;
FROM M2Configure IMPORT UseUnderscoreForC, UseDotForJumpLabels ;
(*
StringToKey - returns a Name, from a string and destroys the string.
*)
PROCEDURE StringToKey (s: String) : Name ;
VAR
k: Name ;
BEGIN
k := makekey(string(s)) ;
s := KillString(s) ;
RETURN( k )
END StringToKey ;
(*
DotifyLabel - place a dot infront of the label if necessary.
The string, s, should no longer be used after
this function.
*)
PROCEDURE DotifyLabel (s: String) : String ;
BEGIN
IF UseDotForJumpLabels
THEN
RETURN( ConCat(InitString('.'), Mark(s)) )
ELSE
RETURN( s )
END
END DotifyLabel ;
(*
GetFullScopeAsmName - returns the fully qualified name for the symbol.
This will take the format
[DefImpModule|Module]_{InnerModule}_{Procedure}_SymbolName
*)
PROCEDURE GetFullScopeAsmName (Sym: CARDINAL) : Name ;
VAR
Module: String ;
Scope : CARDINAL ;
BEGIN
Scope := GetScope(Sym) ;
IF UseUnderscoreForC
THEN
Module := InitString('_')
ELSE
Module := InitString('')
END ;
Module := ConCat(GetFullScopePrefix(Module, Scope, Sym),
InitStringCharStar(KeyToCharStar(GetSymName(Sym)))) ;
RETURN( StringToKey(Module) )
END GetFullScopeAsmName ;
(*
GetAsmName - returns the NameKey for the assembler string of a symbol.
*)
PROCEDURE GetAsmName (Sym: CARDINAL) : Name ;
VAR
Module: String ;
Scope : CARDINAL ;
BEGIN
Scope := GetScope(Sym) ;
IF UseUnderscoreForC
THEN
Module := InitString('_')
ELSE
Module := InitString('')
END ;
Module := ConCat(GetModulePrefix(Module, Sym, Scope),
InitStringCharStar(KeyToCharStar(GetSymName(Sym)))) ;
RETURN( StringToKey(Module) )
END GetAsmName ;
(*
GetFullSymName - returns the NameKey for the symbol name (which also
may contain the module name).
*)
PROCEDURE GetFullSymName (Sym: CARDINAL) : Name ;
VAR
Module : String ;
Scope : CARDINAL ;
BEGIN
Scope := GetScope(Sym) ;
Module := GetModulePrefix(InitString(''), Sym, Scope) ;
RETURN( StringToKey(ConCat(Module, InitStringCharStar(KeyToCharStar(GetSymName(Sym))))) )
END GetFullSymName ;
(*
WriteAsmName - displays the symbol, Sym, name using module prefixes
if it is EXPORT QUALIFIED.
*)
PROCEDURE WriteAsmName (Sym: CARDINAL) ;
VAR
Scope: CARDINAL ;
BEGIN
IF UseUnderscoreForC
THEN
Write('_')
END ;
Scope := GetScope(Sym) ;
WriteModulePrefix(Sym, Scope) ;
WriteKey(GetSymName(Sym))
END WriteAsmName ;
(*
WriteName - displays the symbol, Sym, name using module prefixes
if it is EXPORT QUALIFIED.
This procedure differs from the above procedure because
it does not generate any _ prefix.
*)
PROCEDURE WriteName (Sym: CARDINAL) ;
VAR
Scope: CARDINAL ;
BEGIN
IF IsVar(Sym) OR IsProcedure(Sym)
THEN
Scope := GetScope(Sym) ;
WriteModulePrefix(Sym, Scope) ;
WriteKey(GetSymName(Sym))
ELSE
InternalError ('Expecting Var or Procedure symbol')
END
END WriteName ;
(*
SymNeedsModulePrefix -
*)
PROCEDURE SymNeedsModulePrefix (sym, mod: CARDINAL) : BOOLEAN ;
BEGIN
IF IsDefImp(mod)
THEN
IF WholeProgram
THEN
IF NOT IsDefinitionForC(mod)
THEN
RETURN( TRUE )
END
ELSIF IsExportQualified(sym)
THEN
RETURN( TRUE )
END
ELSIF IsModule(mod)
THEN
RETURN( WholeProgram )
END ;
RETURN( FALSE )
END SymNeedsModulePrefix ;
(*
GetModulePrefix - returns a String containing the module prefix
for module, ModSym, providing symbol, Sym, is exported.
Name is marked if it is appended onto the new string.
*)
PROCEDURE GetModulePrefix (Name: String; Sym, ModSym: CARDINAL) : String ;
BEGIN
IF (ModSym#NulSym) AND (ModSym#GetBaseModule())
THEN
IF IsInnerModule(Sym) OR IsInnerModule(ModSym)
THEN
RETURN( ConCat(ConCatChar(InitStringCharStar(KeyToCharStar(GetSymName(ModSym))), '_'),
GetModulePrefix(Name, ModSym, GetScope(ModSym))) )
ELSIF SymNeedsModulePrefix(Sym, ModSym)
THEN
RETURN( ConCatChar(ConCat(InitStringCharStar(KeyToCharStar(GetSymName(ModSym))), Mark(Name)), '_') )
END
END ;
RETURN( Name )
END GetModulePrefix ;
(*
GetFullScopePrefix - returns a String containing the full scope prefix
for symbol, Sym. It honours IsExportQualified.
Name is marked if it is appended onto the new string.
*)
PROCEDURE GetFullScopePrefix (Name: String; Scope, Sym: CARDINAL) : String ;
BEGIN
IF Sym#NulSym
THEN
IF IsInnerModule(Scope)
THEN
RETURN( ConCat(ConCatChar(InitStringCharStar(KeyToCharStar(GetSymName(Scope))), '_'),
GetFullScopePrefix(Name, GetScope(Scope), Sym)) )
ELSIF IsDefImp(Scope) AND IsExportQualified(Sym)
THEN
RETURN( ConCatChar(ConCat(InitStringCharStar(KeyToCharStar(GetSymName(Scope))), Mark(Name)), '_') )
ELSIF IsProcedure(Scope)
THEN
RETURN( ConCatChar(ConCat(InitStringCharStar(KeyToCharStar(GetSymName(Scope))), Mark(Name)), '_') )
END
END ;
RETURN( Name )
END GetFullScopePrefix ;
(*
WriteModulePrefix - writes the module prefix for module, ModSym,
providing symbol, Sym, is exported.
*)
PROCEDURE WriteModulePrefix (Sym, ModSym: CARDINAL) ;
VAR
s: String ;
BEGIN
s := GetModulePrefix(InitString(''), Sym, ModSym) ;
s := KillString(WriteS(StdOut, s))
END WriteModulePrefix ;
(*
UnderScoreString - emits a string with a leading underscore if the C compiler
uses _ prefixes. The string without the underscore is returned.
*)
PROCEDURE UnderScoreString (s: String) : String ;
BEGIN
IF UseUnderscoreForC
THEN
Write('_')
END ;
RETURN( WriteS(StdOut, s) )
END UnderScoreString ;
(*
GetModuleInitName - returns the name of the initialization section of a module.
*)
PROCEDURE GetModuleInitName (Sym: CARDINAL) : Name ;
VAR
s: String ;
BEGIN
s := ConCat(ConCat(InitString('_M2_'), Mark(GetModulePrefix(InitStringCharStar(KeyToCharStar(GetSymName(Sym))),
Sym, GetScope(Sym)))),
Mark(InitString('_init'))) ;
IF UseUnderscoreForC
THEN
s := ConCat(InitString('_'), Mark(s))
END ;
RETURN( StringToKey(s) )
END GetModuleInitName ;
(*
GetModuleFinallyName - returns the name of the finalization section of a module.
*)
PROCEDURE GetModuleFinallyName (Sym: CARDINAL) : Name ;
VAR
s: String ;
BEGIN
s := ConCat(ConCat(InitString('_M2_'), Mark(GetModulePrefix(InitStringCharStar(KeyToCharStar(GetSymName(Sym))),
Sym, GetScope(Sym)))),
Mark(InitString('_finish'))) ;
IF UseUnderscoreForC
THEN
s := ConCat(InitString('_'), Mark(s))
END ;
RETURN( StringToKey(s) )
END GetModuleFinallyName ;
END M2AsmUtil.

View File

@ -0,0 +1,403 @@
(* M2Base.def provides a mechanism to check fundamental types.
Copyright (C) 2001-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
DEFINITION MODULE M2Base ;
(*
Author : Gaius Mulley
Title : M2Base
Date : 22/5/87
Description: Implements the default Base Types and Base
procedures in the Modula-2 compiler.
*)
FROM NameKey IMPORT Name ;
FROM m2linemap IMPORT location_t ;
EXPORT QUALIFIED Nil, (* Base constants *)
Cardinal, (* Base types *)
Integer,
Boolean,
True, False,
Char,
Proc,
LongInt, LongCard,
ShortInt, ShortCard,
ZType, RType, CType,
Real,
LongReal, ShortReal,
Complex,
LongComplex,
ShortComplex,
High, IsOrd, (* Base functions *)
LengthS,
Convert,
Re, Im, Cmplx,
Cap, Abs, Odd,
Chr, Val,
IsTrunc, IsFloat,
IsInt,
Min, Max,
New, Dispose, (* Base procedures *)
Inc, Dec,
Incl, Excl,
IsPseudoBaseFunction, (* Manipulation procedures *)
IsPseudoBaseProcedure, (* Manipulation procedures *)
IsBaseType,
GetBaseTypeMinMax,
InitBase,
CannotCheckTypeInPass3,
CheckExpressionCompatible,
CheckAssignmentCompatible,
CheckParameterCompatible,
IsAssignmentCompatible,
IsExpressionCompatible,
IsParameterCompatible,
IsValidParameter,
AssignmentRequiresWarning,
IsMathType,
IsRealType,
IsOrdinalType,
IsComplexType,
GetCmplxReturnType,
ComplexToScalar,
ScalarToComplex,
MixTypes, NegateType,
TemplateProcedure,
ActivationPointer,
IsNeededAtRunTime,
ExceptionAssign,
ExceptionReturn,
ExceptionInc,
ExceptionDec,
ExceptionIncl,
ExceptionExcl,
ExceptionShift,
ExceptionRotate,
ExceptionStaticArray,
ExceptionDynamicArray,
ExceptionForLoopBegin,
ExceptionForLoopTo,
ExceptionForLoopEnd,
ExceptionPointerNil,
ExceptionNoReturn,
ExceptionCase,
ExceptionNonPosDiv,
ExceptionNonPosMod,
ExceptionZeroDiv,
ExceptionZeroRem,
ExceptionWholeValue,
ExceptionRealValue,
ExceptionParameterBounds,
ExceptionNo ;
VAR
TemplateProcedure,
ActivationPointer,
Nil,
Cardinal, Integer,
Boolean, True, False,
Char, Proc,
LongInt, LongCard,
ShortInt, ShortCard,
ZType, RType, CType,
Real,
LongReal, ShortReal,
Complex, LongComplex,
ShortComplex,
Unbounded,
High, LengthS,
Cap, Abs, Odd,
Convert, Val,
Chr,
Re, Im, Cmplx,
Min, Max,
New, Dispose,
Inc, Dec,
Incl, Excl,
ExceptionAssign,
ExceptionReturn,
ExceptionInc,
ExceptionDec,
ExceptionIncl,
ExceptionExcl,
ExceptionShift,
ExceptionRotate,
ExceptionStaticArray,
ExceptionDynamicArray,
ExceptionForLoopBegin,
ExceptionForLoopTo,
ExceptionForLoopEnd,
ExceptionPointerNil,
ExceptionNoReturn,
ExceptionCase,
ExceptionNonPosDiv,
ExceptionNonPosMod,
ExceptionZeroDiv,
ExceptionZeroRem,
ExceptionWholeValue,
ExceptionRealValue,
ExceptionParameterBounds,
ExceptionNo : CARDINAL ;
(*
InitBase - initializes the base types and functions
used in the Modula-2 compiler.
*)
PROCEDURE InitBase (location: location_t; VAR sym: CARDINAL) ;
(*
GetBaseTypeMinMax - returns the minimum and maximum values for a
given base type. This procedure should only
be called if the type is NOT a subrange.
*)
PROCEDURE GetBaseTypeMinMax (type: CARDINAL; VAR min, max: CARDINAL) ;
(*
IsPseudoBaseFunction - returns true if Sym is a Base function.
*)
PROCEDURE IsPseudoBaseFunction (Sym: CARDINAL) : BOOLEAN ;
(*
IsPseudoBaseProcedure - returns true if Sym is a Base procedure.
*)
PROCEDURE IsPseudoBaseProcedure (Sym: CARDINAL) : BOOLEAN ;
(*
IsNeededAtRunTime - returns TRUE if procedure, sym, is a
runtime procedure. Ie a procedure which is
not a pseudo procedure and which is implemented
in M2RTS or SYSTEM and also exported.
*)
PROCEDURE IsNeededAtRunTime (tok: CARDINAL; sym: CARDINAL) : BOOLEAN ;
(*
IsBaseType - returns TRUE if Sym is a Base type.
*)
PROCEDURE IsBaseType (Sym: CARDINAL) : BOOLEAN ;
(*
IsOrdinalType - returns TRUE if, sym, is an ordinal type.
An ordinal type is defined as:
a base type which contains whole numbers or
a subrange type or an enumeration type.
*)
PROCEDURE IsOrdinalType (Sym: CARDINAL) : BOOLEAN ;
(*
IsOrd - returns TRUE if, sym, is ORD or its typed counterparts
ORDL, ORDS.
*)
PROCEDURE IsOrd (sym: CARDINAL) : BOOLEAN ;
(*
IsTrunc - returns TRUE if, sym, is TRUNC or its typed counterparts
TRUNCL, TRUNCS.
*)
PROCEDURE IsTrunc (sym: CARDINAL) : BOOLEAN ;
(*
IsFloat - returns TRUE if, sym, is FLOAT or its typed counterparts
FLOATL, FLOATS.
*)
PROCEDURE IsFloat (sym: CARDINAL) : BOOLEAN ;
(*
IsInt - returns TRUE if, sym, is INT or its typed counterparts
INTL, INTS.
*)
PROCEDURE IsInt (sym: CARDINAL) : BOOLEAN ;
(*
AssignmentRequiresWarning - returns TRUE if t1 and t2 can be used during
an assignment, but should generate a warning.
For example in PIM we can assign ADDRESS
and WORD providing they are both the
same size.
*)
PROCEDURE AssignmentRequiresWarning (t1, t2: CARDINAL) : BOOLEAN ;
(*
IsAssignmentCompatible - returns TRUE if t1 and t2 are assignment
compatible.
*)
PROCEDURE IsAssignmentCompatible (t1, t2: CARDINAL) : BOOLEAN ;
(*
IsExpressionCompatible - returns TRUE if t1 and t2 are expression
compatible.
*)
PROCEDURE IsExpressionCompatible (t1, t2: CARDINAL) : BOOLEAN ;
(*
IsParameterCompatible - returns TRUE if types t1 and t2 are parameter
compatible.
*)
PROCEDURE IsParameterCompatible (t1, t2: CARDINAL) : BOOLEAN ;
(*
IsValidParameter - returns TRUE if an, actual, parameter can be passed
to the, formal, parameter. This differs from
IsParameterCompatible as this procedure includes checks
for unbounded formal parameters, var parameters and
constant actual parameters.
*)
PROCEDURE IsValidParameter (formal, actual: CARDINAL) : BOOLEAN ;
(*
CheckExpressionCompatible - returns if t1 and t2 are compatible types for
+, -, *, DIV, >, <, =, etc.
If t1 and t2 are not compatible then an error
message is displayed.
*)
PROCEDURE CheckExpressionCompatible (t1, t2: CARDINAL) ;
(*
CheckAssignmentCompatible - returns if t1 and t2 are compatible types for
:=, =, #.
If t1 and t2 are not compatible then an error
message is displayed.
*)
PROCEDURE CheckAssignmentCompatible (t1, t2: CARDINAL) ;
(*
CheckParameterCompatible - checks to see if types, t1, and, t2, are
compatible for parameter passing.
*)
PROCEDURE CheckParameterCompatible (t1, t2: CARDINAL) ;
(*
CannotCheckTypeInPass3 - returns TRUE if we are unable to check the
type of, e, in pass 3.
*)
PROCEDURE CannotCheckTypeInPass3 (e: CARDINAL) : BOOLEAN ;
(*
MixTypes - returns the type symbol that corresponds to the types t1 and t2.
NearTok is used to identify the source position if a type
incompatability occurs.
*)
PROCEDURE MixTypes (t1, t2: CARDINAL; NearTok: CARDINAL) : CARDINAL ;
(*
NegateType - if the type, t, is unsigned then returns the
signed equivalent. NearTok is used to identify the
source position if a type incompatability occurs.
*)
PROCEDURE NegateType (t: CARDINAL; NearTok: CARDINAL) : CARDINAL ;
(*
IsMathType - returns TRUE if the type is a mathematical type.
A mathematical type has a range larger than INTEGER.
(Typically REAL/LONGREAL/LONGINT)
*)
PROCEDURE IsMathType (type: CARDINAL) : BOOLEAN ;
(*
IsRealType - returns TRUE if, t, is a real type.
*)
PROCEDURE IsRealType (t: CARDINAL) : BOOLEAN ;
(*
IsComplexType - returns TRUE if, sym, is COMPLEX,
LONGCOMPLEX or SHORTCOMPLEX.
*)
PROCEDURE IsComplexType (sym: CARDINAL) : BOOLEAN ;
(*
ComplexToScalar - returns the scalar (or base type) of the complex type, sym.
*)
PROCEDURE ComplexToScalar (sym: CARDINAL) : CARDINAL ;
(*
ScalarToComplex - given a real type, t, return the equivalent complex type.
*)
PROCEDURE ScalarToComplex (sym: CARDINAL) : CARDINAL ;
(*
GetCmplxReturnType - this code implements the table given in the
ISO standard Page 293 with an addition for
SHORTCOMPLEX and the fixed sized COMPLEX
types found in the GNU Modula-2 SYSTEM
Module.
*)
PROCEDURE GetCmplxReturnType (t1, t2: CARDINAL) : CARDINAL ;
END M2Base.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,87 @@
(* M2BasicBlock.def converts a scope block into a list of basic blocks.
Copyright (C) 2001-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
DEFINITION MODULE M2BasicBlock ;
(*
Title : M2BasicBlock
Author : Gaius Mulley
Date : 20/8/2003
System : GNU Modula-2
Description: Converts a scope block into a list of basic blocks.
The basic blocks are either converted back into quadruples
or alternatively translated into GCC trees.
*)
FROM M2Scope IMPORT ScopeBlock ;
EXPORT QUALIFIED BasicBlock, BasicBlockProc,
InitBasicBlocks, InitBasicBlocksFromRange,
KillBasicBlocks, FreeBasicBlocks,
ForeachBasicBlockDo ;
TYPE
BasicBlock ;
BasicBlockProc = PROCEDURE (CARDINAL, CARDINAL) ;
(*
InitBasicBlocks - converts a list of quadruples as defined by
scope blocks into a set of basic blocks.
All quadruples within this list which are not
reachable are removed.
*)
PROCEDURE InitBasicBlocks (sb: ScopeBlock) : BasicBlock ;
(*
InitBasicBlocksFromRange - converts a list of quadruples as defined by
start..end.
All quadruples within this list which are not
reachable are removed.
*)
PROCEDURE InitBasicBlocksFromRange (start, end: CARDINAL) : BasicBlock ;
(*
KillBasicBlocks - destroys the list of Basic Blocks and assigns bb to NIL.
*)
PROCEDURE KillBasicBlocks (VAR bb: BasicBlock) ;
(*
FreeBasicBlocks - destroys the list of Basic Blocks.
*)
PROCEDURE FreeBasicBlocks (bb: BasicBlock) ;
(*
ForeachBasicBlockDo - for each basic block call procedure, p.
*)
PROCEDURE ForeachBasicBlockDo (bb: BasicBlock; p: BasicBlockProc) ;
END M2BasicBlock.

View File

@ -0,0 +1,350 @@
(* M2BasicBlock.mod converts a scope block into a list of basic blocks.
Copyright (C) 2001-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
IMPLEMENTATION MODULE M2BasicBlock ;
FROM Storage IMPORT ALLOCATE, DEALLOCATE ;
FROM StrIO IMPORT WriteString, WriteLn ;
FROM NumberIO IMPORT WriteCard ;
FROM M2Debug IMPORT Assert ;
FROM M2Options IMPORT OptimizeBasicBlock ;
FROM M2Quads IMPORT IsReferenced, IsConditional, IsUnConditional, IsCall,
IsReturn, IsNewLocalVar, IsKillLocalVar,
IsCatchBegin, IsCatchEnd,
IsInitStart, IsInitEnd, IsFinallyStart, IsFinallyEnd,
IsInitialisingConst,
IsPseudoQuad, IsDefOrModFile,
GetNextQuad, GetQuad, QuadOperator,
SubQuad ;
FROM M2Scope IMPORT ScopeBlock, ForeachScopeBlockDo ;
FROM M2GenGCC IMPORT ConvertQuadsToTree ;
TYPE
BasicBlock = POINTER TO RECORD
StartQuad : CARDINAL ; (* First Quad in Basic Block *)
EndQuad : CARDINAL ; (* End Quad in Basic Block *)
Right : BasicBlock ;
(* Last Basic Block in list *)
Left : BasicBlock ;
END ;
VAR
FreeList : BasicBlock ; (* Free list of Basic Blocks *)
HeadOfBasicBlock: BasicBlock ;
(*
InitBasicBlocks - converts a list of quadruples as defined by
scope blocks into a set of basic blocks.
All quadruples within this list which are not
reachable are removed.
*)
PROCEDURE InitBasicBlocks (sb: ScopeBlock) : BasicBlock ;
BEGIN
HeadOfBasicBlock := NIL ;
ForeachScopeBlockDo (sb, ConvertQuads2BasicBlock) ;
RETURN HeadOfBasicBlock
END InitBasicBlocks ;
(*
InitBasicBlocksFromRange - converts a list of quadruples as defined by
start..end.
All quadruples within this list which are not
reachable are removed.
*)
PROCEDURE InitBasicBlocksFromRange (start, end: CARDINAL) : BasicBlock ;
BEGIN
HeadOfBasicBlock := NIL ;
ConvertQuads2BasicBlock(start, end) ;
RETURN( HeadOfBasicBlock )
END InitBasicBlocksFromRange ;
(*
KillBasicBlocks - destroys the list of Basic Blocks.
*)
PROCEDURE KillBasicBlocks (VAR bb: BasicBlock) ;
BEGIN
FreeBasicBlocks (bb) ;
bb := NIL
END KillBasicBlocks ;
(*
FreeBasicBlocks - destroys the list of Basic Blocks.
*)
PROCEDURE FreeBasicBlocks (bb: BasicBlock) ;
VAR
b, c: BasicBlock ;
BEGIN
IF bb#NIL
THEN
b := bb ;
REPEAT
c := bb^.Right ;
bb^.Right := FreeList ;
FreeList := bb ;
bb := c
UNTIL bb=b
END
END FreeBasicBlocks ;
(*
New - returns a basic block.
*)
PROCEDURE New () : BasicBlock ;
VAR
b: BasicBlock ;
BEGIN
IF FreeList=NIL
THEN
NEW(b)
ELSE
b := FreeList ;
FreeList := FreeList^.Right
END ;
Assert(b#NIL) ;
RETURN( b )
END New ;
(*
ConvertQuads2BasicBlock - converts a list of quadruples to a list of
Basic Blocks.
A Basic Block is defined as a list of quadruples
which has only has one entry and exit point.
*)
PROCEDURE ConvertQuads2BasicBlock (Start, End: CARDINAL) ;
VAR
LastQuadDefMod,
LastQuadConditional,
LastQuadCall,
LastQuadReturn : BOOLEAN ;
Quad : CARDINAL ;
CurrentBB : BasicBlock ;
LastBB : BasicBlock ;
BEGIN
(*
Algorithm to perform Basic Block:
For every quadruple establish a set of leaders.
A Leader is defined as a quadruple which is
either:
(i) The first quadruple.
(ii) Any quadruple which is the target of a jump or unconditional jump.
(iii) Any statement which follows a conditional jump
For each leader construct a basic block.
A Basic Block starts with a leader quadruple and ends with either:
(i) Another Leader
(ii) An unconditional Jump.
Any quadruples that do not fall into a Basic Block can be thrown away
since they will never be executed.
*)
LastBB := NIL ;
Quad := Start ;
LastQuadConditional := TRUE ; (* Force Rule (i) *)
LastQuadCall := FALSE ;
LastQuadReturn := FALSE ;
LastQuadDefMod := FALSE ;
(* Scan all quadruples *)
WHILE (Quad<=End) AND (Quad#0) DO
IF LastQuadConditional OR LastQuadCall OR LastQuadReturn OR
LastQuadDefMod OR IsReferenced(Quad)
THEN
(* Rule (ii) *)
CurrentBB := New() ; (* Get a new Basic Block *)
(* At least one quad in this Basic Block *)
StartBB(CurrentBB, Quad) ;
EndBB(CurrentBB, Quad)
ELSIF CurrentBB#NIL
THEN
(* We have a Basic Block - therefore add quad to this Block *)
EndBB(CurrentBB, Quad)
ELSIF IsPseudoQuad(Quad)
THEN
(* Add Quad to the Last BB since Pseudo Quads - compiler directives *)
(* must not be thrown away. *)
EndBB(LastBB, Quad)
ELSIF IsReturn(Quad) OR IsKillLocalVar(Quad) OR
IsCatchEnd(Quad) OR IsCatchBegin(Quad) OR
IsInitStart(Quad) OR IsInitEnd(Quad) OR
IsFinallyStart(Quad) OR IsFinallyEnd(Quad)
THEN
(* we must leave these quads alone *)
EndBB(LastBB, Quad)
ELSIF IsInitialisingConst(Quad)
THEN
(* we must leave these quads alone *)
EndBB(LastBB, Quad)
ELSE
(* remove this Quad since it will never be reached *)
SubQuad(Quad)
END ;
LastQuadConditional := IsConditional(Quad) ;
LastQuadCall := IsCall(Quad) ;
LastQuadReturn := IsReturn(Quad) ;
LastQuadDefMod := IsDefOrModFile(Quad) ;
IF IsUnConditional(Quad)
THEN
LastBB := CurrentBB ;
CurrentBB := NIL
END ;
Quad := GetNextQuad(Quad)
END
END ConvertQuads2BasicBlock ;
(*
ForeachBasicBlockDo - for each basic block call procedure, p.
*)
PROCEDURE ForeachBasicBlockDo (bb: BasicBlock; p: BasicBlockProc) ;
VAR
b: BasicBlock ;
BEGIN
IF bb#NIL
THEN
b := bb ;
REPEAT
WITH b^ DO
p(StartQuad, EndQuad)
END ;
b := b^.Right
UNTIL b=bb
END
END ForeachBasicBlockDo ;
(*
StartBB - Initially fills a Basic Block, b, with a start quad Quad.
The Basic Block is then added to the end of Basic Block list.
*)
PROCEDURE StartBB (b: BasicBlock; Quad: CARDINAL) ;
BEGIN
WITH b^ DO
StartQuad := Quad ;
EndQuad := Quad
END ;
Add(HeadOfBasicBlock, b) (* Add b to the end of the Basic Block list *)
END StartBB ;
(*
EndBB - Fills a Basic Block, b, with an end quad Quad.
*)
PROCEDURE EndBB (b: BasicBlock; Quad: CARDINAL) ;
BEGIN
b^.EndQuad := Quad
END EndBB ;
(*
Add adds a specified element to the end of a queue.
*)
PROCEDURE Add (VAR Head: BasicBlock;
b : BasicBlock) ;
BEGIN
IF Head=NIL
THEN
Head := b ;
b^.Left := b ;
b^.Right := b
ELSE
b^.Right := Head ;
b^.Left := Head^.Left ;
Head^.Left^.Right := b ;
Head^.Left := b
END
END Add ;
(*
Sub deletes an element from the specified queue.
*)
PROCEDURE Sub (VAR Head: BasicBlock;
b: BasicBlock) ;
BEGIN
IF (b^.Right=Head) AND (b=Head)
THEN
Head := NIL
ELSE
IF Head=b
THEN
Head := Head^.Right
END ;
b^.Left^.Right := b^.Right ;
b^.Right^.Left := b^.Left
END
END Sub ;
(*
DisplayBasicBlocks - displays the basic block data structure.
*)
PROCEDURE DisplayBasicBlocks (bb: BasicBlock) ;
VAR
b: BasicBlock ;
BEGIN
b := bb ;
WriteString('quadruples') ; WriteLn ;
IF b#NIL
THEN
REPEAT
DisplayBlock(b) ;
b := b^.Right
UNTIL b=bb
END
END DisplayBasicBlocks ;
PROCEDURE DisplayBlock (b: BasicBlock) ;
BEGIN
WITH b^ DO
WriteString(' start ') ; WriteCard(StartQuad, 6) ;
WriteString(' end ') ; WriteCard(EndQuad, 6) ;
END
END DisplayBlock ;
BEGIN
FreeList := NIL
END M2BasicBlock.

View File

@ -0,0 +1,180 @@
(* M2Batch.def implements a queue for modules pending compilation.
Copyright (C) 2001-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
DEFINITION MODULE M2Batch ;
(*
Author : Gaius Mulley
Title : M2Batch
Date : 29/5/87
Description: Implements a queue modules pending compilation.
MakeSource enters modules for later compilation.
GetSource collects the next module to be compiled.
*)
FROM DynamicStrings IMPORT String ;
FROM NameKey IMPORT Name ;
EXPORT QUALIFIED MakeDefinitionSource,
MakeImplementationSource,
MakeProgramSource,
GetSource, GetModuleNo, IsModuleKnown,
AssociateDefinition, GetDefinitionModuleFile,
AssociateModule, GetModuleFile,
ForeachSourceModuleDo, IsSourceSeen, IsModuleSeen,
LookupModule, LookupOuterModule ;
TYPE
DoProcedure = PROCEDURE (CARDINAL) ;
(*
MakeDefinitionSource - is given a Name, n, which is used to create a Definition
module.
The Definition Module will be placed onto the
compilation pending queue if it has not yet been
compiled.
If the module has been compiled then no action is
taken. The Module Sym is returned.
*)
PROCEDURE MakeDefinitionSource (tok: CARDINAL; n: Name) : CARDINAL ;
(*
MakeImplementationSource - is given a Name, n, which is used to create an
implementation module.
The implementation Module will be placed onto
the compilation pending
queue if it has not yet been compiled.
If the module has been compiled then no
action is taken. The Module Sym is returned.
*)
PROCEDURE MakeImplementationSource (tok: CARDINAL; n: Name) : CARDINAL ;
(*
MakeProgramSource - is given a Name, n, which is used to create a program module.
The program module will be placed onto the compilation
pending queue if it has not yet been compiled.
If the module has been compiled then no action is taken.
The Module Sym is returned.
*)
PROCEDURE MakeProgramSource (tok: CARDINAL; n: Name) : CARDINAL ;
(*
GetSource - returns with the symbol Sym of the next module to be compiled.
If Sym returns with value NulSym then no module should be
compiled.
*)
PROCEDURE GetSource () : CARDINAL ;
(*
GetModuleNo - returns with symbol number of the module which was
the n th module to be read in Pass 1.
The modules are numbered from 1..n
*)
PROCEDURE GetModuleNo (n: CARDINAL) : CARDINAL ;
(*
IsModuleKnown - returns TRUE if the Name, n, matches a module.
*)
PROCEDURE IsModuleKnown (n: Name) : BOOLEAN ;
(*
AssociateDefinition - associate the source file, filename, with the definition module,
Sym.
*)
PROCEDURE AssociateDefinition (filename: String; Sym: CARDINAL) : String ;
(*
GetDefinitionModuleFile - returns the filename associated with the definition module, Sym.
It may return a temporary preprocessed file.
*)
PROCEDURE GetDefinitionModuleFile (Sym: CARDINAL) : String ;
(*
AssociateModule - associate the source file, filename, with the implementation/program
module, Sym.
*)
PROCEDURE AssociateModule (filename: String; Sym: CARDINAL) : String ;
(*
GetModuleFile - returns the filename associated with the implementation/program module, Sym.
It may return a temporary preprocessed file.
*)
PROCEDURE GetModuleFile (Sym: CARDINAL) : String ;
(*
ForeachSourceModuleDo - call each procedure, p, for which there is a known
source file.
*)
PROCEDURE ForeachSourceModuleDo (p: DoProcedure) ;
(*
IsSourceSeen - returns TRUE if the source for module, sym, has been seen.
*)
PROCEDURE IsSourceSeen (sym: CARDINAL) : BOOLEAN ;
(*
IsModuleSeen - returns TRUE if the source for module, name, has been seen.
*)
PROCEDURE IsModuleSeen (n: Name) : BOOLEAN ;
(*
LookupModule - looks up a module in the current scope, if a module does not exist
then it creates a DefImp module.
*)
PROCEDURE LookupModule (tok: CARDINAL; n: Name) : CARDINAL ;
(*
LookupOuterModule - looks up a module in the order of: current scope, then outer scope, finally if a
module does not exist then it creates a DefImp module.
*)
PROCEDURE LookupOuterModule (tok: CARDINAL; n: Name) : CARDINAL ;
END M2Batch.

View File

@ -0,0 +1,467 @@
(* M2Batch.mod implements a queue for modules pending compilation.
Copyright (C) 2001-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
IMPLEMENTATION MODULE M2Batch ;
FROM M2Debug IMPORT Assert ;
FROM SymbolTable IMPORT MakeModule, MakeDefImp, IsModule, IsDefImp, GetScope, GetLocalSym, GetCurrentScope, GetSym, NulSym ;
FROM NameKey IMPORT GetKey, WriteKey ;
FROM M2Printf IMPORT printf2 ;
FROM M2Error IMPORT InternalError ;
FROM M2MetaError IMPORT MetaError1 ;
FROM Indexing IMPORT Index, InitIndex, GetIndice, HighIndice, RemoveIndiceFromIndex, IncludeIndiceIntoIndex, InBounds ;
FROM Lists IMPORT List, InitList, IncludeItemIntoList, RemoveItemFromList,
GetItemFromList, NoOfItemsInList ;
FROM Storage IMPORT ALLOCATE ;
FROM DynamicStrings IMPORT String ;
FROM M2Pass IMPORT IsPass1, IsPass2, IsPass3, IsPassC ;
TYPE
Module = POINTER TO module ;
module = RECORD
SymNo : CARDINAL ;
Key : Name ;
DefFile,
ModFile: String ;
END ;
VAR
DoneQueue : Index ;
PendingQueue: List ;
(*
MakeProgramSource - is given a Name, n, which is used to create a program module.
The program module will be placed onto the compilation
pending queue if it has not yet been compiled.
If the module has been compiled then no action is taken.
The Module Sym is returned.
*)
PROCEDURE MakeProgramSource (tok: CARDINAL; n: Name) : CARDINAL ;
VAR
Sym: CARDINAL ;
BEGIN
Sym := Get (n) ;
IF Sym = NulSym
THEN
Assert ((NOT IsPass1 ()) AND (NOT IsPass2 ()) AND (NOT IsPass3 ()) AND (NOT IsPassC ())) ;
(* Neither been compiled or on the Pending Queue *)
Sym := MakeModule (tok, n) ;
Put (Sym, n) ;
Push (Sym)
END ;
RETURN Sym
END MakeProgramSource ;
(*
MakeDefinitionSource - is given a Name, n, which is used to create a Definition
module.
The Definition Module will be placed onto the
compilation pending queue if it has not yet been
compiled.
If the module has been compiled then no action is
taken. The Module Sym is returned.
*)
PROCEDURE MakeDefinitionSource (tok: CARDINAL; n: Name) : CARDINAL ;
VAR
Sym: CARDINAL ;
BEGIN
Sym := Get (n) ;
IF Sym = NulSym
THEN
Assert ((NOT IsPass1 ()) AND (NOT IsPass2 ()) AND (NOT IsPass3 ()) AND (NOT IsPassC ())) ;
(* Neither been compiled or on the Pending Queue *)
Sym := MakeDefImp (tok, n) ;
Put (Sym, n) ;
Push (Sym)
END ;
RETURN Sym
END MakeDefinitionSource ;
(*
MakeImplementationSource - is given a Name, n, which is used to create an
implementation module.
The implementation Module will be placed onto
the compilation pending
queue if it has not yet been compiled.
If the module has been compiled then no
action is taken. The Module Sym is returned.
*)
PROCEDURE MakeImplementationSource (tok: CARDINAL; n: Name) : CARDINAL ;
VAR
Sym: CARDINAL ;
BEGIN
Sym := Get (n) ;
IF Sym = NulSym
THEN
Assert ((NOT IsPass1()) AND (NOT IsPass2()) AND (NOT IsPass3()) AND (NOT IsPassC())) ;
(* Neither been compiled or on the Pending Queue *)
Sym := MakeDefImp (tok, n) ;
Put (Sym, n) ;
Push (Sym)
END ;
RETURN Sym
END MakeImplementationSource ;
(*
GetSource - returns with the symbol Sym of the next module to be compiled.
If Sym returns with value 0 then no module should be compiled.
*)
PROCEDURE GetSource () : CARDINAL ;
BEGIN
RETURN Pop ()
END GetSource ;
(*
GetModuleNo - returns with symbol number of the nth module read during Pass 1.
*)
PROCEDURE GetModuleNo (n: CARDINAL) : CARDINAL ;
VAR
m: Module ;
BEGIN
Assert (n#0) ;
IF InBounds (DoneQueue, n)
THEN
m := GetIndice (DoneQueue, n) ;
RETURN m^.SymNo
ELSE
RETURN NulSym
END
END GetModuleNo ;
(*
IsModuleKnown - returns TRUE if the Name, n, matches a module.
*)
PROCEDURE IsModuleKnown (n: Name) : BOOLEAN ;
BEGIN
RETURN Get (n) # NulSym
END IsModuleKnown ;
(*
Get - returns the module symbol matching name, n.
*)
PROCEDURE Get (n: Name) : CARDINAL ;
VAR
i, no: CARDINAL ;
m : Module ;
BEGIN
i := 1 ;
no := HighIndice (DoneQueue) ;
WHILE i <= no DO
m := GetIndice (DoneQueue, i) ;
WITH m^ DO
IF Key = n
THEN
RETURN SymNo
ELSE
INC (i)
END
END
END ;
RETURN NulSym
END Get ;
PROCEDURE Put (Sym: CARDINAL; n: Name) ;
VAR
m: Module ;
BEGIN
NEW (m) ;
IncludeIndiceIntoIndex (DoneQueue, m) ;
WITH m^ DO
SymNo := Sym ;
Key := n ;
DefFile := NIL ;
ModFile := NIL
END
END Put ;
PROCEDURE Push (Sym: CARDINAL) ;
BEGIN
IncludeItemIntoList (PendingQueue, Sym)
END Push ;
PROCEDURE Pop () : CARDINAL ;
VAR
n : CARDINAL ;
Sym: CARDINAL ;
BEGIN
n := NoOfItemsInList (PendingQueue) ;
IF n = 0
THEN
RETURN NulSym
ELSE
Sym := GetItemFromList (PendingQueue, n) ;
RemoveItemFromList (PendingQueue, Sym) ;
RETURN Sym
END
END Pop ;
PROCEDURE DisplayModules ;
VAR
m : Module ;
n, i: CARDINAL ;
BEGIN
i := 1 ;
n := HighIndice(DoneQueue) ;
WHILE i<=n DO
m := GetIndice(DoneQueue, i) ;
WITH m^ DO
printf2('Module %a %d\n', Key, i)
END ;
INC(i)
END
END DisplayModules ;
(*
AssociateDefinition - associate the source file, filename, with the definition module,
Sym.
*)
PROCEDURE AssociateDefinition (filename: String; Sym: CARDINAL) : String ;
VAR
no, i: CARDINAL ;
m : Module ;
BEGIN
i := 1 ;
no := HighIndice(DoneQueue) ;
WHILE i<=no DO
m := GetIndice(DoneQueue, i) ;
WITH m^ DO
IF SymNo=Sym
THEN
DefFile := filename ;
RETURN( filename )
ELSE
INC(i)
END
END
END ;
InternalError ('failed to find module sym')
END AssociateDefinition ;
(*
GetDefinitionModuleFile - returns the filename associated with the definition module, Sym.
It may return a temporary preprocessed file.
*)
PROCEDURE GetDefinitionModuleFile (Sym: CARDINAL) : String ;
VAR
no, i: CARDINAL ;
m : Module ;
BEGIN
i := 1 ;
no := HighIndice(DoneQueue) ;
WHILE i<=no DO
m := GetIndice(DoneQueue, i) ;
WITH m^ DO
IF SymNo=Sym
THEN
RETURN( DefFile )
ELSE
INC(i)
END
END
END ;
RETURN( NIL )
END GetDefinitionModuleFile ;
(*
AssociateModule - associate the source file, filename, with the implementation/program
module, Sym.
*)
PROCEDURE AssociateModule (filename: String; Sym: CARDINAL) : String ;
VAR
no, i: CARDINAL ;
m : Module ;
BEGIN
i := 1 ;
no := HighIndice(DoneQueue) ;
WHILE i<=no DO
m := GetIndice(DoneQueue, i) ;
WITH m^ DO
IF SymNo=Sym
THEN
ModFile := filename ;
RETURN( filename )
ELSE
INC(i)
END
END
END ;
InternalError ('failed to find module sym')
END AssociateModule ;
(*
GetModuleFile - returns the filename associated with the implementation/program module, Sym.
It may return a temporary preprocessed file.
*)
PROCEDURE GetModuleFile (Sym: CARDINAL) : String ;
VAR
no, i: CARDINAL ;
m : Module ;
BEGIN
i := 1 ;
no := HighIndice(DoneQueue) ;
WHILE i<=no DO
m := GetIndice(DoneQueue, i) ;
WITH m^ DO
IF SymNo=Sym
THEN
RETURN( ModFile )
ELSE
INC(i)
END
END
END ;
RETURN( NIL )
END GetModuleFile ;
(*
ForeachSourceModuleDo - call each procedure, p, for which there is a known
source file.
*)
PROCEDURE ForeachSourceModuleDo (p: DoProcedure) ;
VAR
i, no: CARDINAL ;
m : Module ;
BEGIN
i := 1 ;
no := HighIndice(DoneQueue) ;
WHILE i<=no DO
m := GetIndice(DoneQueue, i) ;
WITH m^ DO
IF ModFile#NIL
THEN
p(SymNo)
END
END ;
INC(i)
END
END ForeachSourceModuleDo ;
(*
IsSourceSeen - returns TRUE if the source for module, sym, has been seen.
*)
PROCEDURE IsSourceSeen (sym: CARDINAL) : BOOLEAN ;
BEGIN
Assert (IsModule (sym) OR IsDefImp (sym)) ;
RETURN GetModuleFile (sym) # NIL
END IsSourceSeen ;
(*
IsModuleSeen - returns TRUE if the source for module, name, has been seen.
*)
PROCEDURE IsModuleSeen (n: Name) : BOOLEAN ;
BEGIN
RETURN Get (n) # NulSym
END IsModuleSeen ;
(*
LookupModule - looks up a module in the current scope, if a module does not exist
then it creates a DefImp module.
*)
PROCEDURE LookupModule (tok: CARDINAL; n: Name) : CARDINAL ;
VAR
sym: CARDINAL ;
BEGIN
sym := GetSym (n) ;
IF sym = NulSym
THEN
RETURN MakeDefinitionSource (tok, n)
ELSIF IsModule (sym) OR IsDefImp (sym)
THEN
RETURN sym
ELSE
RETURN MakeDefinitionSource (tok, n)
END
END LookupModule ;
(*
LookupOuterModule - looks up a module in the order of: current scope, then outer scope, finally if a
module does not exist then it creates a DefImp module.
*)
PROCEDURE LookupOuterModule (tok: CARDINAL; n: Name) : CARDINAL ;
VAR
outer: CARDINAL ;
sym : CARDINAL ;
BEGIN
sym := GetSym (n) ;
IF sym = NulSym
THEN
outer := GetScope (GetCurrentScope ()) ;
IF outer # NulSym
THEN
sym := GetLocalSym (outer, n)
END ;
IF sym = NulSym
THEN
(* not a local module, so it must be refering to a definition module. *)
sym := MakeDefinitionSource (tok, n)
END
END ;
IF IsModule (sym) OR IsDefImp (sym)
THEN
RETURN sym
ELSE
RETURN MakeDefinitionSource (tok, n)
END
END LookupOuterModule ;
BEGIN
InitList (PendingQueue) ;
DoneQueue := InitIndex (1)
END M2Batch.

View File

@ -0,0 +1,54 @@
(* M2Bitset.def provides the BITSET type.
Copyright (C) 2003-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
DEFINITION MODULE M2Bitset ;
(*
Title : M2Bitset
Author : Gaius Mulley
System : GNU Modula-2
Date : Wed May 7 21:21:31 2003
Revision : $Version$
Description: provides the BITSET type.
*)
EXPORT QUALIFIED MakeBitset, GetBitsetMinMax, Bitset, Bitnum ;
VAR
Bitset, Bitnum: CARDINAL ;
(*
MakeBitset - creates and declares the type BITSET.
*)
PROCEDURE MakeBitset ;
(*
GetBitsetMinMax - assigns min and max to the minimum and maximum values of BITSET.
*)
PROCEDURE GetBitsetMinMax (VAR min, max: CARDINAL) ;
END M2Bitset.

View File

@ -0,0 +1,89 @@
(* M2Bitset.mod provides the BITSET type.
Copyright (C) 2003-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
IMPLEMENTATION MODULE M2Bitset ;
FROM M2Debug IMPORT Assert ;
FROM m2tree IMPORT Tree ;
FROM m2linemap IMPORT BuiltinsLocation ;
FROM m2type IMPORT GetWordType ;
FROM m2decl IMPORT GetBitsPerBitset ;
FROM m2expr IMPORT GetSizeOf ;
FROM M2ALU IMPORT PushCard, PushIntegerTree ;
FROM NameKey IMPORT MakeKey ;
FROM M2System IMPORT Word ;
FROM M2Base IMPORT Cardinal ;
FROM M2LexBuf IMPORT BuiltinTokenNo ;
FROM SymbolTable IMPORT NulSym,
MakeConstLit,
MakeConstVar,
MakeSet,
MakeSubrange,
PutSet,
PutSubrange,
PopValue,
PopSize ;
VAR
MinBitset, MaxBitset : CARDINAL ;
(*
MakeBitset - creates and declares the type BITSET.
*)
PROCEDURE MakeBitset ;
BEGIN
Bitset := MakeSet (BuiltinTokenNo, MakeKey('BITSET')) ; (* Base Type *)
(* MinBitset *)
MinBitset := MakeConstLit (BuiltinTokenNo, MakeKey('0'), Cardinal) ;
(* MaxBitset *)
MaxBitset := MakeConstVar (BuiltinTokenNo, MakeKey('MaxBitset')) ;
PushCard (GetBitsPerBitset()-1) ;
PopValue (MaxBitset) ;
Assert (Word#NulSym) ;
Bitnum := MakeSubrange (BuiltinTokenNo, MakeKey('BITNUM')) ;
PutSubrange (Bitnum, MinBitset, MaxBitset, Cardinal) ;
PutSet (Bitset, Bitnum, FALSE) ;
PushIntegerTree (GetSizeOf(BuiltinsLocation(), GetWordType())) ;
PopSize (Bitset)
END MakeBitset ;
(*
GetBitsetMinMax - assigns min and max to the minimum and maximum values of BITSET.
*)
PROCEDURE GetBitsetMinMax (VAR min, max: CARDINAL) ;
BEGIN
min := MinBitset ;
max := MaxBitset
END GetBitsetMinMax ;
END M2Bitset.

View File

@ -0,0 +1,123 @@
(* M2CaseList.def implement ISO case label lists.
Copyright (C) 2009-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
DEFINITION MODULE M2CaseList ;
(*
Title : M2CaseList
Author : Gaius Mulley
System : GNU Modula-2
Date : Fri Jul 24 09:53:48 2009
Revision : $Version$
Description:
*)
FROM DynamicStrings IMPORT String ;
FROM Lists IMPORT List ;
(*
PushCase - create a case entity and push it to an internal stack.
Return the case id.
*)
PROCEDURE PushCase (r: CARDINAL; v: CARDINAL) : CARDINAL ;
(*
PopCase - pop the top element of the case entity from the internal
stack.
*)
PROCEDURE PopCase ;
(*
ElseCase - indicates that this case varient does have an else clause.
*)
PROCEDURE ElseCase (f: CARDINAL) ;
(*
BeginCaseList - create a new label list.
*)
PROCEDURE BeginCaseList (v: CARDINAL) ;
(*
EndCaseList - terminate the current label list.
*)
PROCEDURE EndCaseList ;
(*
AddRange - add a range to the current label list.
*)
PROCEDURE AddRange (r1, r2: CARDINAL; tok: CARDINAL) ;
(*
CaseBoundsResolved - returns TRUE if all constants in the case list, c,
are known to GCC.
*)
PROCEDURE CaseBoundsResolved (tokenno: CARDINAL; c: CARDINAL) : BOOLEAN ;
(*
TypeCaseBounds - returns TRUE if all bounds in case list, c, are
compatible with the tagged type.
*)
PROCEDURE TypeCaseBounds (tokenno: CARDINAL; c: CARDINAL) : BOOLEAN ;
(*
OverlappingCaseBounds - returns TRUE if there were any overlapping bounds
in the case list, c. It will generate an error
messages for each overlapping bound found.
*)
PROCEDURE OverlappingCaseBounds (tokenno: CARDINAL; c: CARDINAL) : BOOLEAN ;
(*
MissingCaseBounds - returns TRUE if there were any missing bounds
in the varient record case list, c. It will
generate an error message for each missing
bounds found.
*)
PROCEDURE MissingCaseBounds (tokenno: CARDINAL; c: CARDINAL) : BOOLEAN ;
(*
WriteCase - displays the case list.
*)
PROCEDURE WriteCase (c: CARDINAL) ;
END M2CaseList.

View File

@ -0,0 +1,935 @@
(* M2CaseList.mod implement ISO case label lists.
Copyright (C) 2009-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
IMPLEMENTATION MODULE M2CaseList ;
FROM M2Debug IMPORT Assert ;
FROM M2GCCDeclare IMPORT TryDeclareConstant, GetTypeMin, GetTypeMax ;
FROM M2MetaError IMPORT MetaError1, MetaError2, MetaErrorT0, MetaErrorT1, MetaErrorT2, MetaErrorT3, MetaErrorT4, MetaErrorString1 ;
FROM M2Error IMPORT InternalError ;
FROM M2Range IMPORT OverlapsRange, IsEqual, IsGreater ;
FROM M2ALU IMPORT PushIntegerTree, PopIntegerTree, Addn, Sub, PushInt ;
FROM Indexing IMPORT Index, InitIndex, PutIndice, GetIndice, ForeachIndiceInIndexDo, HighIndice ;
FROM Lists IMPORT InitList, IncludeItemIntoList ;
FROM NameKey IMPORT KeyToCharStar ;
FROM SymbolConversion IMPORT GccKnowsAbout, Mod2Gcc, AddModGcc ;
FROM DynamicStrings IMPORT InitString, InitStringCharStar, ConCat, Mark, KillString ;
FROM m2tree IMPORT Tree ;
FROM m2block IMPORT RememberType ;
FROM m2type IMPORT GetMinFrom ;
FROM Storage IMPORT ALLOCATE ;
FROM M2Base IMPORT IsExpressionCompatible ;
FROM SymbolTable IMPORT NulSym, IsConst, IsFieldVarient, IsRecord, IsRecordField, GetVarientTag, GetType,
ForeachLocalSymDo, GetSymName, IsEnumeration, SkipType ;
TYPE
RangePair = POINTER TO rangePair ;
rangePair = RECORD
low, high: CARDINAL ;
tokenno : CARDINAL ;
END ;
ConflictingPair = POINTER TO conflictingPair ;
conflictingPair = RECORD
a, b: RangePair ;
END ;
CaseList = POINTER TO caseList ;
caseList = RECORD
maxRangeId : CARDINAL ;
rangeArray : Index ;
currentRange: RangePair ;
varientField: CARDINAL ;
END ;
CaseDescriptor = POINTER TO caseDescriptor ;
caseDescriptor = RECORD
elseClause : BOOLEAN ;
elseField : CARDINAL ;
record : CARDINAL ;
varient : CARDINAL ;
maxCaseId : CARDINAL ;
caseListArray: Index ;
currentCase : CaseList ;
next : CaseDescriptor ;
END ;
SetRange = POINTER TO setRange ;
setRange = RECORD
low, high: Tree ;
next : SetRange ;
END ;
VAR
caseStack : CaseDescriptor ;
caseId : CARDINAL ;
caseArray : Index ;
conflictArray: Index ;
FreeRangeList: SetRange ;
(*
PushCase - create a case entity and push it to an internal stack.
r, is NulSym if this is a CASE statement.
If, r, is a record then it indicates it includes one
or more varients reside in the record. The particular
varient is, v.
Return the case id.
*)
PROCEDURE PushCase (r: CARDINAL; v: CARDINAL) : CARDINAL ;
VAR
c: CaseDescriptor ;
BEGIN
INC(caseId) ;
NEW(c) ;
IF c=NIL
THEN
InternalError ('out of memory error')
ELSE
WITH c^ DO
elseClause := FALSE ;
elseField := NulSym ;
record := r ;
varient := v ;
maxCaseId := 0 ;
caseListArray := InitIndex(1) ;
next := caseStack ;
currentCase := NIL
END ;
caseStack := c ;
PutIndice(caseArray, caseId, c)
END ;
RETURN( caseId )
END PushCase ;
(*
PopCase - pop the top element of the case entity from the internal
stack.
*)
PROCEDURE PopCase ;
BEGIN
IF caseStack=NIL
THEN
InternalError ('case stack is empty')
END ;
caseStack := caseStack^.next
END PopCase ;
(*
ElseCase - indicates that this case varient does have an else clause.
*)
PROCEDURE ElseCase (f: CARDINAL) ;
BEGIN
WITH caseStack^ DO
elseClause := TRUE ;
elseField := f
END
END ElseCase ;
(*
BeginCaseList - create a new label list.
*)
PROCEDURE BeginCaseList (v: CARDINAL) ;
VAR
l: CaseList ;
BEGIN
NEW(l) ;
IF l=NIL
THEN
InternalError ('out of memory error')
END ;
WITH l^ DO
maxRangeId := 0 ;
rangeArray := InitIndex(1) ;
currentRange := NIL ;
varientField := v
END ;
WITH caseStack^ DO
INC(maxCaseId) ;
PutIndice(caseListArray, maxCaseId, l) ;
currentCase := l
END
END BeginCaseList ;
(*
EndCaseList - terminate the current label list.
*)
PROCEDURE EndCaseList ;
BEGIN
caseStack^.currentCase := NIL
END EndCaseList ;
(*
AddRange - add a range to the current label list.
*)
PROCEDURE AddRange (r1, r2: CARDINAL; tok: CARDINAL) ;
VAR
r: RangePair ;
BEGIN
NEW(r) ;
IF r=NIL
THEN
InternalError ('out of memory error')
ELSE
WITH r^ DO
low := r1 ;
high := r2 ;
tokenno := tok
END ;
WITH caseStack^.currentCase^ DO
INC(maxRangeId) ;
PutIndice(rangeArray, maxRangeId, r) ;
currentRange := r
END
END
END AddRange ;
(*
GetVariantTagType - returns the type associated with, variant.
*)
PROCEDURE GetVariantTagType (variant: CARDINAL) : CARDINAL ;
VAR
tag: CARDINAL ;
BEGIN
tag := GetVarientTag(variant) ;
IF IsFieldVarient(tag) OR IsRecordField(tag)
THEN
RETURN( GetType(tag) )
ELSE
RETURN( tag )
END
END GetVariantTagType ;
(*
CaseBoundsResolved - returns TRUE if all constants in the case list, c,
are known to GCC.
*)
PROCEDURE CaseBoundsResolved (tokenno: CARDINAL; c: CARDINAL) : BOOLEAN ;
VAR
resolved: BOOLEAN ;
p : CaseDescriptor ;
q : CaseList ;
r : RangePair ;
min,
max,
type,
i, j : CARDINAL ;
BEGIN
p := GetIndice(caseArray, c) ;
WITH p^ DO
IF varient#NulSym
THEN
(* not a CASE statement, but a varient record containing without an ELSE clause *)
type := GetVariantTagType(varient) ;
resolved := TRUE ;
IF NOT GccKnowsAbout(type)
THEN
(* do we need to add, type, to the list of types required to be resolved? *)
resolved := FALSE
END ;
min := GetTypeMin(type) ;
IF NOT GccKnowsAbout(min)
THEN
TryDeclareConstant(tokenno, min) ;
resolved := FALSE
END ;
max := GetTypeMax(type) ;
IF NOT GccKnowsAbout(max)
THEN
TryDeclareConstant(tokenno, max) ;
resolved := FALSE
END ;
IF NOT resolved
THEN
RETURN( FALSE )
END
END ;
i := 1 ;
WHILE i<=maxCaseId DO
q := GetIndice(caseListArray, i) ;
j := 1 ;
WHILE j<=q^.maxRangeId DO
r := GetIndice(q^.rangeArray, j) ;
IF r^.low#NulSym
THEN
IF IsConst(r^.low)
THEN
TryDeclareConstant(tokenno, r^.low) ;
IF NOT GccKnowsAbout(r^.low)
THEN
RETURN( FALSE )
END
ELSE
IF r^.high=NulSym
THEN
MetaError1('the CASE statement variant must be defined by a constant {%1Da:is a {%1d}}', r^.low)
ELSE
MetaError1('the CASE statement variant low value in a range must be defined by a constant {%1Da:is a {%1d}}',
r^.low)
END
END
END ;
IF r^.high#NulSym
THEN
IF IsConst(r^.high)
THEN
TryDeclareConstant(tokenno, r^.high) ;
IF NOT GccKnowsAbout(r^.high)
THEN
RETURN( FALSE )
END
ELSE
MetaError1('the CASE statement variant high value in a range must be defined by a constant {%1Da:is a {%1d}}',
r^.high)
END
END ;
INC(j)
END ;
INC(i)
END
END ;
RETURN( TRUE )
END CaseBoundsResolved ;
(*
IsSame - return TRUE if r, s, are in, e.
*)
PROCEDURE IsSame (e: ConflictingPair; r, s: RangePair) : BOOLEAN ;
BEGIN
WITH e^ DO
RETURN( ((a=r) AND (b=s)) OR ((a=s) AND (b=r)) )
END
END IsSame ;
(*
SeenBefore -
*)
PROCEDURE SeenBefore (r, s: RangePair) : BOOLEAN ;
VAR
i, h: CARDINAL ;
e : ConflictingPair ;
BEGIN
h := HighIndice(conflictArray) ;
i := 1 ;
WHILE i<=h DO
e := GetIndice(conflictArray, i) ;
IF IsSame(e, r, s)
THEN
RETURN( TRUE )
END ;
INC(i)
END ;
NEW(e) ;
WITH e^ DO
a := r ;
b := s
END ;
PutIndice(conflictArray, h+1, e) ;
RETURN( FALSE )
END SeenBefore ;
(*
Overlaps -
*)
PROCEDURE Overlaps (tokenno: CARDINAL; r, s: RangePair) : BOOLEAN ;
VAR
a, b, c, d: CARDINAL ;
BEGIN
a := r^.low ;
c := s^.low ;
IF r^.high=NulSym
THEN
b := a ;
IF s^.high=NulSym
THEN
d := c ;
IF OverlapsRange(Mod2Gcc(a), Mod2Gcc(b), Mod2Gcc(c), Mod2Gcc(d))
THEN
IF NOT SeenBefore(r, s)
THEN
MetaErrorT2(r^.tokenno, 'case label {%1ad} is a duplicate with {%2ad}', a, c) ;
MetaErrorT2(s^.tokenno, 'case label {%1ad} is a duplicate with {%2ad}', c, a)
END ;
RETURN( TRUE )
END
ELSE
d := s^.high ;
IF OverlapsRange(Mod2Gcc(a), Mod2Gcc(b), Mod2Gcc(c), Mod2Gcc(d))
THEN
IF NOT SeenBefore(r, s)
THEN
MetaErrorT3(r^.tokenno, 'case label {%1ad} is a duplicate in the range {%2ad}..{%3ad}', a, c, d) ;
MetaErrorT3(s^.tokenno, 'case range {%2ad}..{%3ad} is a duplicate of case label {%1ad}', c, d, a)
END ;
RETURN( TRUE )
END
END
ELSE
b := r^.high ;
IF s^.high=NulSym
THEN
d := c ;
IF OverlapsRange(Mod2Gcc(a), Mod2Gcc(b), Mod2Gcc(c), Mod2Gcc(d))
THEN
IF NOT SeenBefore(r, s)
THEN
MetaErrorT3(r^.tokenno, 'case range {%1ad}..{%2ad} is a duplicate with case label {%3ad}', a, b, c) ;
MetaErrorT3(s^.tokenno, 'case label {%1ad} is a duplicate with case range %{2ad}..{%3ad}', c, a, b)
END ;
RETURN( TRUE )
END
ELSE
d := s^.high ;
IF OverlapsRange(Mod2Gcc(a), Mod2Gcc(b), Mod2Gcc(c), Mod2Gcc(d))
THEN
IF NOT SeenBefore(r, s)
THEN
MetaErrorT4(r^.tokenno, 'case range {%1ad}..{%2ad} overlaps case range {%3ad}..{%4ad}', a, b, c, d) ;
MetaErrorT4(s^.tokenno, 'case range {%1ad}..{%2ad} overlaps case range {%3ad}..{%4ad}', c, d, a, b)
END ;
RETURN( TRUE )
END
END
END ;
RETURN( FALSE )
END Overlaps ;
(*
OverlappingCaseBound - returns TRUE if, r, overlaps any case bound in the
case statement, c.
*)
PROCEDURE OverlappingCaseBound (tokenno: CARDINAL; r: RangePair; c: CARDINAL) : BOOLEAN ;
VAR
p : CaseDescriptor ;
q : CaseList ;
s : RangePair ;
i, j : CARDINAL ;
overlap: BOOLEAN ;
BEGIN
p := GetIndice(caseArray, c) ;
overlap := FALSE ;
WITH p^ DO
i := 1 ;
WHILE i<=maxCaseId DO
q := GetIndice(caseListArray, i) ;
j := 1 ;
WHILE j<=q^.maxRangeId DO
s := GetIndice(q^.rangeArray, j) ;
IF (s#r) AND Overlaps(tokenno, r, s)
THEN
overlap := TRUE
END ;
INC(j)
END ;
INC(i)
END
END ;
RETURN( overlap )
END OverlappingCaseBound ;
(*
OverlappingCaseBounds - returns TRUE if there were any overlapping bounds
in the case list, c. It will generate an error
messages for each overlapping bound found.
*)
PROCEDURE OverlappingCaseBounds (tokenno: CARDINAL; c: CARDINAL) : BOOLEAN ;
VAR
p : CaseDescriptor ;
q : CaseList ;
r : RangePair ;
i, j : CARDINAL ;
overlap: BOOLEAN ;
BEGIN
p := GetIndice(caseArray, c) ;
overlap := FALSE ;
WITH p^ DO
i := 1 ;
WHILE i<=maxCaseId DO
q := GetIndice(caseListArray, i) ;
j := 1 ;
WHILE j<=q^.maxRangeId DO
r := GetIndice(q^.rangeArray, j) ;
IF OverlappingCaseBound(tokenno, r, c)
THEN
overlap := TRUE
END ;
INC(j)
END ;
INC(i)
END
END ;
RETURN( overlap )
END OverlappingCaseBounds ;
(*
NewRanges -
*)
PROCEDURE NewRanges () : SetRange ;
VAR
s: SetRange ;
BEGIN
IF FreeRangeList=NIL
THEN
NEW(s)
ELSE
s := FreeRangeList ;
FreeRangeList := FreeRangeList^.next
END ;
s^.next := NIL ;
RETURN( s )
END NewRanges ;
(*
NewSet -
*)
PROCEDURE NewSet (type: CARDINAL) : SetRange ;
VAR
s: SetRange ;
BEGIN
s := NewRanges() ;
WITH s^ DO
low := Mod2Gcc(GetTypeMin(type)) ;
high := Mod2Gcc(GetTypeMax(type)) ;
next := NIL
END ;
RETURN( s )
END NewSet ;
(*
DisposeRanges -
*)
PROCEDURE DisposeRanges (set: SetRange) : SetRange ;
VAR
t: SetRange ;
BEGIN
IF set#NIL
THEN
IF FreeRangeList=NIL
THEN
FreeRangeList := set
ELSE
t := set ;
WHILE t^.next#NIL DO
t := t^.next
END ;
t^.next := FreeRangeList ;
FreeRangeList := set
END
END ;
RETURN( NIL )
END DisposeRanges ;
(*
SubBitRange - subtracts bits, lo..hi, from, set.
*)
PROCEDURE SubBitRange (set: SetRange; lo, hi: Tree; tokenno: CARDINAL) : SetRange ;
VAR
h, i : SetRange ;
BEGIN
h := set ;
WHILE h#NIL DO
IF (h^.high=NIL) OR IsEqual(h^.high, h^.low)
THEN
IF IsEqual(h^.low, lo) OR OverlapsRange(lo, hi, h^.low, h^.low)
THEN
IF h=set
THEN
set := set^.next ;
h^.next := NIL ;
h := DisposeRanges(h) ;
h := set
ELSE
i := set ;
WHILE i^.next#h DO
i := i^.next
END ;
i^.next := h^.next ;
i := h ;
h := h^.next ;
i^.next := NIL ;
i := DisposeRanges(i)
END
ELSE
h := h^.next
END
ELSE
IF OverlapsRange(lo, hi, h^.low, h^.high)
THEN
IF IsGreater(h^.low, lo) OR IsGreater(hi, h^.high)
THEN
MetaErrorT0 (tokenno, 'variant case range lies outside tag value')
ELSE
IF IsEqual(h^.low, lo)
THEN
PushIntegerTree(hi) ;
PushInt(1) ;
Addn ;
h^.low := PopIntegerTree()
ELSIF IsEqual(h^.high, hi)
THEN
PushIntegerTree(lo) ;
PushInt(1) ;
Sub ;
h^.high := PopIntegerTree()
ELSE
(* lo..hi exist inside range h^.low..h^.high *)
i := NewRanges() ;
i^.next := h^.next ;
h^.next := i ;
i^.high := h^.high ;
PushIntegerTree(lo) ;
PushInt(1) ;
Sub ;
h^.high := PopIntegerTree() ;
PushIntegerTree(hi) ;
PushInt(1) ;
Addn ;
i^.low := PopIntegerTree()
END
END
ELSE
h := h^.next
END
END
END ;
RETURN( set )
END SubBitRange ;
(*
ExcludeCaseRanges - excludes all case ranges found in, p, from, set
*)
PROCEDURE ExcludeCaseRanges (set: SetRange; p: CaseDescriptor) : SetRange ;
VAR
i, j: CARDINAL ;
q : CaseList ;
r : RangePair ;
BEGIN
WITH p^ DO
i := 1 ;
WHILE i<=maxCaseId DO
q := GetIndice(caseListArray, i) ;
j := 1 ;
WHILE j<=q^.maxRangeId DO
r := GetIndice(q^.rangeArray, j) ;
IF r^.high=NulSym
THEN
set := SubBitRange(set, Mod2Gcc(r^.low), Mod2Gcc(r^.low), r^.tokenno)
ELSE
set := SubBitRange(set, Mod2Gcc(r^.low), Mod2Gcc(r^.high), r^.tokenno)
END ;
INC(j)
END ;
INC(i)
END
END ;
RETURN( set )
END ExcludeCaseRanges ;
VAR
High, Low : Tree ;
errorString: String ;
(*
DoEnumValues -
*)
PROCEDURE DoEnumValues (sym: CARDINAL) ;
BEGIN
IF (Low#NIL) AND IsEqual(Mod2Gcc(sym), Low)
THEN
errorString := ConCat(errorString, InitStringCharStar(KeyToCharStar(GetSymName(sym)))) ;
Low := NIL
END ;
IF (High#NIL) AND IsEqual(Mod2Gcc(sym), High)
THEN
errorString := ConCat(errorString, Mark(InitString('..'))) ;
errorString := ConCat(errorString, Mark(InitStringCharStar(KeyToCharStar(GetSymName(sym))))) ;
High := NIL
END
END DoEnumValues ;
(*
ErrorRange -
*)
PROCEDURE ErrorRange (p: CaseDescriptor; type: CARDINAL; set: SetRange) ;
BEGIN
type := SkipType(type) ;
IF IsEnumeration(type)
THEN
Low := set^.low ;
High := set^.high ;
IF IsEqual(Low, High)
THEN
High := NIL ;
errorString := InitString('enumeration value ') ;
ForeachLocalSymDo(type, DoEnumValues) ;
errorString := ConCat(errorString, InitString(' is ignored by the CASE variant record {%1D}'))
ELSE
errorString := InitString('enumeration values ') ;
ForeachLocalSymDo(type, DoEnumValues) ;
errorString := ConCat(errorString, InitString(' are ignored by the CASE variant record {%1D}'))
END ;
MetaErrorString1(errorString, p^.varient)
END
END ErrorRange ;
(*
ErrorRanges -
*)
PROCEDURE ErrorRanges (p: CaseDescriptor; type: CARDINAL; set: SetRange) ;
BEGIN
WHILE set#NIL DO
ErrorRange(p, type, set) ;
set := set^.next
END
END ErrorRanges ;
(*
MissingCaseBounds - returns TRUE if there were any missing bounds
in the varient record case list, c. It will
generate an error message for each missing
bounds found.
*)
PROCEDURE MissingCaseBounds (tokenno: CARDINAL; c: CARDINAL) : BOOLEAN ;
VAR
p : CaseDescriptor ;
type : CARDINAL ;
missing: BOOLEAN ;
set : SetRange ;
BEGIN
p := GetIndice(caseArray, c) ;
missing := FALSE ;
WITH p^ DO
IF (record#NulSym) AND (varient#NulSym) AND (NOT elseClause)
THEN
(* not a CASE statement, but a varient record containing without an ELSE clause *)
type := GetVariantTagType(varient) ;
set := NewSet(type) ;
set := ExcludeCaseRanges(set, p) ;
IF set#NIL
THEN
missing := TRUE ;
MetaError2('not all variant record alternatives in the CASE clause are specified, hint you either need to specify each value of {%2ad} or use an ELSE clause {%1U}',
varient, type) ;
ErrorRanges(p, type, set)
END ;
set := DisposeRanges(set)
END
END ;
RETURN( missing )
END MissingCaseBounds ;
(*
WriteCase -
*)
PROCEDURE WriteCase (c: CARDINAL) ;
BEGIN
END WriteCase ;
(*
InRangeList - returns TRUE if the value, tag, is defined in the case list.
*)
PROCEDURE InRangeList (cl: CaseList; tag: CARDINAL) : BOOLEAN ;
VAR
i, h: CARDINAL ;
r : RangePair ;
a : Tree ;
BEGIN
WITH cl^ DO
i := 1 ;
h := HighIndice(rangeArray) ;
WHILE i<=h DO
r := GetIndice(rangeArray, i) ;
WITH r^ DO
IF high=NulSym
THEN
a := Mod2Gcc(low)
ELSE
a := Mod2Gcc(high)
END ;
IF OverlapsRange(Mod2Gcc(low), a, Mod2Gcc(tag), Mod2Gcc(tag))
THEN
RETURN( TRUE )
END
END ;
INC(i)
END
END ;
RETURN( FALSE )
END InRangeList ;
(*
checkTypes - checks to see that, constant, and, type, are compatible.
*)
PROCEDURE checkTypes (constant, type: CARDINAL) : BOOLEAN ;
VAR
consttype: CARDINAL ;
BEGIN
IF (constant#NulSym) AND IsConst(constant)
THEN
consttype := GetType(constant) ;
IF NOT IsExpressionCompatible(consttype, type)
THEN
MetaError2('the CASE statement variant tag {%1ad} must be type compatible with the constant {%2Da:is a {%2d}}',
type, constant) ;
RETURN( FALSE )
END
END ;
RETURN( TRUE )
END checkTypes ;
(*
inRange - returns TRUE if, min <= i <= max.
*)
PROCEDURE inRange (i, min, max: CARDINAL) : BOOLEAN ;
BEGIN
RETURN( OverlapsRange(Mod2Gcc(i), Mod2Gcc(i), Mod2Gcc(min), Mod2Gcc(max)) )
END inRange ;
(*
TypeCaseBounds - returns TRUE if all bounds in case list, c, are
compatible with the tagged type.
*)
PROCEDURE TypeCaseBounds (tokenno: CARDINAL; c: CARDINAL) : BOOLEAN ;
VAR
p : CaseDescriptor ;
q : CaseList ;
r : RangePair ;
min, max,
type,
i, j : CARDINAL ;
compatible: BOOLEAN ;
BEGIN
p := GetIndice(caseArray, c) ;
type := NulSym ;
WITH p^ DO
type := NulSym ;
IF varient#NulSym
THEN
(* not a CASE statement, but a varient record containing without an ELSE clause *)
type := GetVariantTagType(varient) ;
min := GetTypeMin(type) ;
max := GetTypeMax(type)
END ;
IF type=NulSym
THEN
RETURN( TRUE )
END ;
compatible := TRUE ;
i := 1 ;
WHILE i<=maxCaseId DO
q := GetIndice(caseListArray, i) ;
j := 1 ;
WHILE j<=q^.maxRangeId DO
r := GetIndice(q^.rangeArray, j) ;
IF (r^.low#NulSym) AND (NOT inRange(r^.low, min, max))
THEN
MetaError2('the CASE statement variant range {%1ad} exceeds that of the tag type {%2ad}',
r^.low, type) ;
compatible := FALSE
END ;
IF NOT checkTypes(r^.low, type)
THEN
compatible := FALSE
END ;
IF (r^.high#NulSym) AND (NOT inRange(r^.high, min, max))
THEN
MetaError2('the CASE statement variant range {%1ad} exceeds that of the tag type {%2ad}',
r^.high, type) ;
compatible := FALSE
END ;
IF NOT checkTypes(r^.high, type)
THEN
compatible := FALSE
END ;
INC(j)
END ;
INC(i)
END ;
RETURN( compatible )
END
END TypeCaseBounds ;
BEGIN
caseStack := NIL ;
caseId := 0 ;
caseArray := InitIndex(1) ;
conflictArray := InitIndex(1) ;
FreeRangeList := NIL
END M2CaseList.

View File

@ -0,0 +1,66 @@
(* M2Check.def perform rigerous type checking for fully declared symbols.
Copyright (C) 2020-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
DEFINITION MODULE M2Check ;
(*
Title : M2Check
Author : Gaius Mulley
System : GNU Modula-2
Date : Fri Mar 6 15:32:10 2020
Revision : $Version$
Description: provides a module to check the symbol type compatibility.
It assumes that the declaration of all dependants
is complete.
*)
(*
ParameterTypeCompatible - returns TRUE if the nth procedure parameter formal
is compatible with actual. If the string is empty then
no error is issued.
*)
PROCEDURE ParameterTypeCompatible (token: CARDINAL; format: ARRAY OF CHAR;
procedure, formal, actual, nth: CARDINAL;
isvar: BOOLEAN) : BOOLEAN ;
(*
AssignmentTypeCompatible - returns TRUE if the des and the expr are assignment compatible.
If the string is empty then no error is issued.
*)
PROCEDURE AssignmentTypeCompatible (token: CARDINAL; format: ARRAY OF CHAR;
des, expr: CARDINAL) : BOOLEAN ;
(*
ExpressionTypeCompatible - returns TRUE if the expressions, left and right,
are expression compatible.
If the string is empty then no error is issued.
*)
PROCEDURE ExpressionTypeCompatible (token: CARDINAL; format: ARRAY OF CHAR;
left, right: CARDINAL) : BOOLEAN ;
END M2Check.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,54 @@
(* M2Code.def coordinate the activity of the front end.
Copyright (C) 2001-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
DEFINITION MODULE M2Code ;
(*
Title : M2Code
Author : Gaius Mulley
Date : 6/8/87
System : UNIX (GNU Modula-2)
Description: M2Code provides a module which coordinates the activity of the front
end optimization routines and the gcc tree generation.
*)
FROM SYSTEM IMPORT WORD ;
EXPORT QUALIFIED Code, CodeBlock ;
(*
Code - calls procedures to generates trees from the quadruples.
All front end quadruple optimization is performed via this call.
*)
PROCEDURE Code ;
(*
CodeBlock - generates all code for this block and also declares all types
and procedures for this block. It will also optimize quadruples
within this scope.
*)
PROCEDURE CodeBlock (scope: WORD) ;
END M2Code.

View File

@ -0,0 +1,522 @@
(* M2Code.mod coordinate the activity of the front end.
Copyright (C) 2001-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
IMPLEMENTATION MODULE M2Code ;
FROM SYSTEM IMPORT WORD ;
FROM M2Options IMPORT Statistics, DisplayQuadruples, OptimizeUncalledProcedures,
(* OptimizeDynamic, *) OptimizeCommonSubExpressions,
StudentChecking, Optimizing, WholeProgram ;
FROM M2Error IMPORT InternalError ;
FROM M2Students IMPORT StudentVariableCheck ;
FROM SymbolTable IMPORT GetMainModule, IsProcedure,
IsModuleWithinProcedure,
CheckHiddenTypeAreAddress, IsModule, IsDefImp,
DebugLineNumbers,
ForeachProcedureDo,
ForeachInnerModuleDo, GetSymName ;
FROM M2Printf IMPORT printf2, printf1, printf0 ;
FROM NameKey IMPORT Name ;
FROM M2Batch IMPORT ForeachSourceModuleDo ;
FROM M2Quads IMPORT CountQuads, GetFirstQuad, DisplayQuadList, DisplayQuadRange,
BackPatchSubrangesAndOptParam, VariableAnalysis,
LoopAnalysis, ForLoopAnalysis, GetQuad, QuadOperator ;
FROM M2Pass IMPORT SetPassToNoPass, SetPassToCodeGeneration ;
FROM M2BasicBlock IMPORT BasicBlock,
InitBasicBlocks, InitBasicBlocksFromRange,
KillBasicBlocks, FreeBasicBlocks,
ForeachBasicBlockDo ;
FROM M2Optimize IMPORT FoldBranches, RemoveProcedures ;
FROM M2GenGCC IMPORT ConvertQuadsToTree ;
FROM M2GCCDeclare IMPORT FoldConstants, StartDeclareScope,
DeclareProcedure, InitDeclarations,
DeclareModuleVariables, MarkExported ;
FROM M2Scope IMPORT ScopeBlock, InitScopeBlock, KillScopeBlock, ForeachScopeBlockDo ;
FROM m2top IMPORT StartGlobalContext, EndGlobalContext, SetFlagUnitAtATime ;
FROM M2Error IMPORT FlushErrors, FlushWarnings ;
FROM M2Swig IMPORT GenerateSwigFile ;
FROM m2flex IMPORT GetTotalLines ;
FROM FIO IMPORT FlushBuffer, StdOut ;
FROM M2Quiet IMPORT qprintf0 ;
FROM M2SSA IMPORT DiscoverSSA ;
CONST
MaxOptimTimes = 10 ; (* upper limit of no of times we run through all optimization *)
Debugging = TRUE ;
VAR
Total,
Count,
OptimTimes,
DeltaProc,
Proc,
DeltaConst,
Const,
DeltaJump,
Jump,
DeltaBasicB,
BasicB : CARDINAL ;
(*
Percent - calculates the percentage from numerator and divisor
*)
PROCEDURE Percent (numerator, divisor: CARDINAL) ;
VAR
value: CARDINAL ;
BEGIN
printf0 (' (') ;
IF divisor=0
THEN
printf0 ('overflow error')
ELSE
value := numerator*100 DIV divisor ;
printf1 ('%3d', value)
END ;
printf0 ('\%)')
END Percent ;
(*
OptimizationAnalysis - displays some simple front end optimization statistics.
*)
PROCEDURE OptimizationAnalysis ;
VAR
value: CARDINAL ;
BEGIN
IF Statistics
THEN
Count := CountQuads() ;
printf1 ('M2 initial number of quadruples: %6d', Total) ;
Percent (Total, Total) ; printf0 ('\n');
printf1 ('M2 constant folding achieved : %6d', Const) ;
Percent (Const, Total) ; printf0 ('\n');
printf1 ('M2 branch folding achieved : %6d', Jump) ;
Percent (Jump, Total) ; printf0 ('\n');
value := Const+Jump+Proc ;
printf1 ('Front end optimization removed : %6d', value) ;
Percent (value, Total) ; printf0 ('\n') ;
printf1 ('Front end final : %6d', Count) ;
Percent (Count, Total) ; printf0 ('\n') ;
Count := GetTotalLines () ;
printf1 ('Total source lines compiled : %6d\n', Count) ;
FlushBuffer (StdOut)
END ;
IF DisplayQuadruples
THEN
printf0 ('after all front end optimization\n') ;
DisplayQuadList
END
END OptimizationAnalysis ;
(*
RemoveUnreachableCode -
*)
PROCEDURE RemoveUnreachableCode ;
BEGIN
IF WholeProgram
THEN
ForeachSourceModuleDo(RemoveProcedures)
ELSE
RemoveProcedures(GetMainModule())
END
END RemoveUnreachableCode ;
(*
DoModuleDeclare - declare all constants, types, variables, procedures for the
main module or all modules.
*)
PROCEDURE DoModuleDeclare ;
BEGIN
IF WholeProgram
THEN
ForeachSourceModuleDo (StartDeclareScope)
ELSE
StartDeclareScope (GetMainModule ())
END
END DoModuleDeclare ;
(*
PrintModule -
*)
PROCEDURE PrintModule (sym: CARDINAL) ;
VAR
n: Name ;
BEGIN
n := GetSymName (sym) ;
printf1 ('module %a\n', n)
END PrintModule ;
(*
DoCodeBlock - generate code for the main module or all modules.
*)
PROCEDURE DoCodeBlock ;
BEGIN
IF WholeProgram
THEN
(* ForeachSourceModuleDo(PrintModule) ; *)
CodeBlock (GetMainModule ())
ELSE
CodeBlock (GetMainModule ())
END
END DoCodeBlock ;
(*
DetermineSubExpTemporaries -
*)
PROCEDURE DetermineSubExpTemporaries ;
BEGIN
IF WholeProgram
THEN
ForeachSourceModuleDo (DiscoverSSA)
ELSE
DiscoverSSA (GetMainModule ())
END
END DetermineSubExpTemporaries ;
(*
Code - calls procedures to generates trees from the quadruples.
All front end quadruple optimization is performed via this call.
*)
PROCEDURE Code ;
BEGIN
CheckHiddenTypeAreAddress ;
SetPassToNoPass ;
BackPatchSubrangesAndOptParam ;
Total := CountQuads () ;
ForLoopAnalysis ; (* must be done before any optimization as the index variable increment quad might change *)
IF DisplayQuadruples
THEN
printf0 ('before any optimization\n') ;
DisplayQuadList
END ;
(* now is a suitable time to check for student errors as *)
(* we know all the front end symbols must be resolved. *)
IF StudentChecking
THEN
StudentVariableCheck
END ;
SetPassToCodeGeneration ;
SetFlagUnitAtATime (Optimizing) ;
StartGlobalContext ;
InitDeclarations ; (* default and fixed sized types are all declared from now on. *)
RemoveUnreachableCode ;
IF DisplayQuadruples
THEN
printf0 ('after dead procedure elimination\n') ;
DisplayQuadList
END ;
DetermineSubExpTemporaries ;
IF DisplayQuadruples
THEN
printf0 ('after identifying simple subexpression temporaries\n') ;
DisplayQuadList
END ;
qprintf0 (' symbols to gcc trees\n') ;
DoModuleDeclare ;
FlushWarnings ;
FlushErrors ;
qprintf0 (' statements to gcc trees\n') ;
DoCodeBlock ;
MarkExported (GetMainModule ()) ;
GenerateSwigFile (GetMainModule ()) ;
DebugLineNumbers (GetMainModule ()) ;
qprintf0 (' gcc trees given to the gcc backend\n') ;
EndGlobalContext ;
OptimizationAnalysis
END Code ;
(*
InitialDeclareAndCodeBlock - declares all objects within scope,
*)
PROCEDURE InitialDeclareAndOptimize (start, end: CARDINAL) ;
BEGIN
Count := CountQuads() ;
FreeBasicBlocks(InitBasicBlocksFromRange(start, end)) ;
BasicB := Count - CountQuads() ;
Count := CountQuads() ;
FoldBranches(start, end) ;
Jump := Count - CountQuads() ;
Count := CountQuads()
END InitialDeclareAndOptimize ;
(*
DeclareAndCodeBlock - declares all objects within scope,
*)
PROCEDURE SecondDeclareAndOptimize (start, end: CARDINAL) ;
BEGIN
REPEAT
FoldConstants(start, end) ;
DeltaConst := Count - CountQuads () ;
Count := CountQuads () ;
FreeBasicBlocks(InitBasicBlocksFromRange (start, end)) ;
DeltaBasicB := Count - CountQuads () ;
Count := CountQuads () ;
FreeBasicBlocks (InitBasicBlocksFromRange (start, end)) ;
FoldBranches(start, end) ;
DeltaJump := Count - CountQuads () ;
Count := CountQuads () ;
FreeBasicBlocks(InitBasicBlocksFromRange (start, end)) ;
INC (DeltaBasicB, Count - CountQuads ()) ;
Count := CountQuads () ;
(* now total the optimization components *)
INC (Proc, DeltaProc) ;
INC (Const, DeltaConst) ;
INC (Jump, DeltaJump) ;
INC (BasicB, DeltaBasicB)
UNTIL (OptimTimes>=MaxOptimTimes) OR
((DeltaProc=0) AND (DeltaConst=0) AND (DeltaJump=0) AND (DeltaBasicB=0)) ;
IF (DeltaProc#0) OR (DeltaConst#0) OR (DeltaJump#0) OR (DeltaBasicB#0)
THEN
printf0 ('optimization finished although more reduction may be possible (increase MaxOptimTimes)\n')
END
END SecondDeclareAndOptimize ;
(*
InitOptimizeVariables -
*)
PROCEDURE InitOptimizeVariables ;
BEGIN
Count := CountQuads () ;
OptimTimes := 0 ;
DeltaProc := 0 ;
DeltaConst := 0 ;
DeltaJump := 0 ;
DeltaBasicB := 0
END InitOptimizeVariables ;
(*
Init -
*)
PROCEDURE Init ;
BEGIN
Proc := 0 ;
Const := 0 ;
Jump := 0 ;
BasicB := 0
END Init ;
(*
BasicBlockVariableAnalysis -
*)
PROCEDURE BasicBlockVariableAnalysis (start, end: CARDINAL) ;
VAR
bb: BasicBlock ;
BEGIN
bb := InitBasicBlocksFromRange(start, end) ;
ForeachBasicBlockDo (bb, VariableAnalysis) ;
KillBasicBlocks (bb)
END BasicBlockVariableAnalysis ;
(*
DisplayQuadsInScope -
*)
PROCEDURE DisplayQuadsInScope (sb: ScopeBlock) ;
BEGIN
printf0 ('Quads in scope\n') ;
ForeachScopeBlockDo (sb, DisplayQuadRange) ;
printf0 ('===============\n')
END DisplayQuadsInScope ;
(*
OptimizeScopeBlock -
*)
PROCEDURE OptimizeScopeBlock (sb: ScopeBlock) ;
VAR
OptimTimes,
Previous,
Current : CARDINAL ;
BEGIN
InitOptimizeVariables ;
OptimTimes := 1 ;
Current := CountQuads () ;
ForeachScopeBlockDo (sb, InitialDeclareAndOptimize) ;
ForeachScopeBlockDo (sb, BasicBlockVariableAnalysis) ;
REPEAT
ForeachScopeBlockDo (sb, SecondDeclareAndOptimize) ;
Previous := Current ;
Current := CountQuads () ;
INC (OptimTimes)
UNTIL (OptimTimes=MaxOptimTimes) OR (Current=Previous) ;
ForeachScopeBlockDo (sb, LoopAnalysis)
END OptimizeScopeBlock ;
(*
DisplayQuadNumbers - the range, start..end.
*)
PROCEDURE DisplayQuadNumbers (start, end: CARDINAL) ;
BEGIN
IF DisplayQuadruples
THEN
printf2 ('Coding [%d..%d]\n', start, end)
END
END DisplayQuadNumbers ;
(*
CodeProceduresWithinBlock - codes the procedures within the module scope.
*)
PROCEDURE CodeProceduresWithinBlock (scope: CARDINAL) ;
BEGIN
ForeachProcedureDo (scope, CodeBlock)
END CodeProceduresWithinBlock ;
(*
CodeProcedures -
*)
PROCEDURE CodeProcedures (scope: CARDINAL) ;
BEGIN
IF IsDefImp (scope) OR IsModule (scope)
THEN
ForeachProcedureDo (scope, CodeBlock)
END
END CodeProcedures ;
(*
CodeBlock - generates all code for this block and also declares
all types and procedures for this block. It will
also optimize quadruples within this scope.
*)
PROCEDURE CodeBlock (scope: WORD) ;
VAR
sb: ScopeBlock ;
n : Name ;
BEGIN
IF DisplayQuadruples
THEN
n := GetSymName (scope) ;
printf1 ('before coding block %a\n', n)
END ;
sb := InitScopeBlock (scope) ;
OptimizeScopeBlock (sb) ;
IF IsProcedure (scope)
THEN
IF DisplayQuadruples
THEN
n := GetSymName(scope) ;
printf1('before coding procedure %a\n', n) ;
ForeachScopeBlockDo(sb, DisplayQuadRange) ;
printf0('===============\n')
END ;
ForeachScopeBlockDo(sb, ConvertQuadsToTree)
ELSIF IsModuleWithinProcedure(scope)
THEN
IF DisplayQuadruples
THEN
n := GetSymName(scope) ;
printf1('before coding module %a within procedure\n', n) ;
ForeachScopeBlockDo(sb, DisplayQuadRange) ;
printf0('===============\n')
END ;
ForeachScopeBlockDo(sb, ConvertQuadsToTree) ;
ForeachProcedureDo(scope, CodeBlock)
ELSE
IF DisplayQuadruples
THEN
n := GetSymName(scope) ;
printf1('before coding module %a\n', n) ;
ForeachScopeBlockDo(sb, DisplayQuadRange) ;
printf0('===============\n')
END ;
ForeachScopeBlockDo(sb, ConvertQuadsToTree) ;
IF WholeProgram
THEN
ForeachSourceModuleDo(CodeProcedures)
ELSE
ForeachProcedureDo(scope, CodeBlock)
END ;
ForeachInnerModuleDo(scope, CodeProceduresWithinBlock)
END ;
KillScopeBlock(sb)
END CodeBlock ;
BEGIN
Init
END M2Code.

View File

@ -0,0 +1,142 @@
(* M2ColorString.def provides procedures for obtaining GCC color strings.
Copyright (C) 2019-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius@glam.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
DEFINITION MODULE M2ColorString ; (*!m2pim+gm2*)
(*
Title : M2ColorString
Author : Gaius Mulley
System : GNU Modula-2
Date : Sat Apr 13 19:21:03 2019
Revision : $Version$
Description: provides procedures for obtaining GCC color strings.
*)
FROM DynamicStrings IMPORT String ;
(*
SetEnableColor - sets the global variable to, b, and returns
the previous value.
*)
PROCEDURE SetEnableColor (b: BOOLEAN) : BOOLEAN ;
(*
quoteOpen - adds an open quote to string, s.
*)
PROCEDURE quoteOpen (s: String) : String ;
(*
quoteClose - adds a close quote to string, s.
*)
PROCEDURE quoteClose (s: String) : String ;
(*
endColor - stops using color.
*)
PROCEDURE endColor (s: String) : String ;
(*
quoteColor - adds quote color to string, s.
*)
PROCEDURE quoteColor (s: String) : String ;
(*
errorColor - adds error color to string, s.
*)
PROCEDURE errorColor (s: String) : String ;
(*
warningColor - adds warning color to string, s.
*)
PROCEDURE warningColor (s: String) : String ;
(*
noteColor - adds note color to string, s.
*)
PROCEDURE noteColor (s: String) : String ;
(*
locusColor - adds locus color to string, s.
*)
PROCEDURE locusColor (s: String) : String ;
(*
insertColor - adds fixit-insert color to string, s.
*)
PROCEDURE insertColor (s: String) : String ;
(*
deleteColor - adds fixit-insert color to string, s.
*)
PROCEDURE deleteColor (s: String) : String ;
(*
filenameColor - adds filename color to string, s.
*)
PROCEDURE filenameColor (s: String) : String ;
(*
typeColor - adds type color to string, s.
*)
PROCEDURE typeColor (s: String) : String ;
(*
range1Color - adds type color to string, s.
*)
PROCEDURE range1Color (s: String) : String ;
(*
range2Color - adds type color to string, s.
*)
PROCEDURE range2Color (s: String) : String ;
END M2ColorString.

View File

@ -0,0 +1,218 @@
(* M2ColorString.mod provides procedures for obtaining GCC color strings.
Copyright (C) 2019-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius@glam.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
IMPLEMENTATION MODULE M2ColorString ;
FROM m2color IMPORT colorize_start, colorize_stop, open_quote, close_quote ;
FROM DynamicStrings IMPORT InitString, InitStringCharStar,
ConCat, ConCatChar, Mark, string, KillString,
Dup, char, Length, Mult ;
FROM StrLib IMPORT StrLen ;
FROM libc IMPORT printf ;
VAR
EnableColor: BOOLEAN ;
(*
SetEnableColor - sets the global variable to, b, and returns
the previous value.
*)
PROCEDURE SetEnableColor (b: BOOLEAN) : BOOLEAN ;
VAR
previous: BOOLEAN ;
BEGIN
previous := EnableColor ;
EnableColor := b ;
RETURN previous
END SetEnableColor ;
(*
append - appends color string, name, to the end of string, s,
and returns, s.
*)
PROCEDURE append (s: String; name: ARRAY OF CHAR) : String ;
VAR
c: String ;
BEGIN
c := InitStringCharStar (colorize_start (EnableColor, name, StrLen (name))) ;
s := ConCat (s, c) ;
c := KillString (c) ;
RETURN s
END append ;
(*
quoteOpen - adds an open quote to string, s.
*)
PROCEDURE quoteOpen (s: String) : String ;
BEGIN
RETURN ConCat (append (s, "quote"), Mark (InitStringCharStar (open_quote ())))
END quoteOpen ;
(*
quoteClose - adds a close quote to string, s.
*)
PROCEDURE quoteClose (s: String) : String ;
BEGIN
s := endColor (s) ;
s := append (s, "quote") ;
s := ConCat (s, Mark (InitStringCharStar (close_quote ()))) ;
s := endColor (s) ;
RETURN s
END quoteClose ;
(*
endColor - stops using color.
*)
PROCEDURE endColor (s: String) : String ;
VAR
c: String ;
BEGIN
c := InitStringCharStar (colorize_stop (EnableColor)) ;
s := ConCat (s, c) ;
c := KillString (c) ;
RETURN s
END endColor ;
(*
quoteColor - adds quote color to string, s.
*)
PROCEDURE quoteColor (s: String) : String ;
BEGIN
RETURN append (s, "quote")
END quoteColor ;
(*
errorColor - adds error color to string, s.
*)
PROCEDURE errorColor (s: String) : String ;
BEGIN
RETURN append (s, "error")
END errorColor ;
(*
warningColor - adds warning color to string, s.
*)
PROCEDURE warningColor (s: String) : String ;
BEGIN
RETURN append (s, "warning")
END warningColor ;
(*
noteColor - adds note color to string, s.
*)
PROCEDURE noteColor (s: String) : String ;
BEGIN
RETURN append (s, "note")
END noteColor ;
(*
locusColor - adds locus color to string, s.
*)
PROCEDURE locusColor (s: String) : String ;
BEGIN
RETURN append (s, "locus")
END locusColor ;
(*
insertColor - adds fixit-insert color to string, s.
*)
PROCEDURE insertColor (s: String) : String ;
BEGIN
RETURN append (s, "fixit-insert")
END insertColor ;
(*
deleteColor - adds fixit-insert color to string, s.
*)
PROCEDURE deleteColor (s: String) : String ;
BEGIN
RETURN append (s, "fixit-delete")
END deleteColor ;
(*
filenameColor - adds filename color to string, s.
*)
PROCEDURE filenameColor (s: String) : String ;
BEGIN
RETURN append (s, "diff-filename")
END filenameColor ;
(*
typeColor - adds type color to string, s.
*)
PROCEDURE typeColor (s: String) : String ;
BEGIN
RETURN append (s, "type")
END typeColor ;
(*
range1Color - adds type color to string, s.
*)
PROCEDURE range1Color (s: String) : String ;
BEGIN
RETURN append (s, "range1")
END range1Color ;
(*
range2Color - adds type color to string, s.
*)
PROCEDURE range2Color (s: String) : String ;
BEGIN
RETURN append (s, "range2")
END range2Color ;
BEGIN
EnableColor := TRUE
END M2ColorString.

View File

@ -0,0 +1,70 @@
(* M2Comp.def continually calls the compiler for every source file.
Copyright (C) 2001-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
DEFINITION MODULE M2Comp ;
(*
Author : Gaius Mulley
Title : M2Comp
Date : 29/5/87
Description: Continually calls the compiler for every source file
referenced in the Modula-2 compiler.
*)
FROM SYSTEM IMPORT ADDRESS ;
EXPORT QUALIFIED CompilingDefinitionModule,
CompilingImplementationModule,
CompilingProgramModule,
compile ;
(*
compile - compile the filename.
*)
PROCEDURE compile (filename: ADDRESS) ;
(*
CompilingDefinitionModule - returns true if the current module being
compiled is a definition module.
*)
PROCEDURE CompilingDefinitionModule () : BOOLEAN ;
(*
CompilingImplementationModule - returns true if the current module being
compiled is an implementation module.
*)
PROCEDURE CompilingImplementationModule () : BOOLEAN ;
(*
CompilingProgramModule - returns true if the current module being
compiled is a program module.
*)
PROCEDURE CompilingProgramModule () : BOOLEAN ;
END M2Comp.

View File

@ -0,0 +1,616 @@
(* M2Comp.mod continually calls the compiler for every source file.
Copyright (C) 2001-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
IMPLEMENTATION MODULE M2Comp ;
FROM M2Options IMPORT Statistics, Quiet, WholeProgram, ExtendedOpaque ;
FROM M2Pass IMPORT SetPassToPass0, SetPassToPass1, SetPassToPass2, SetPassToPassC, SetPassToPass3,
SetPassToNoPass, SetPassToPassHidden ;
FROM M2Reserved IMPORT toktype ;
FROM M2Search IMPORT FindSourceDefFile, FindSourceModFile ;
FROM M2Code IMPORT Code ;
FROM M2LexBuf IMPORT OpenSource, CloseSource, ResetForNewPass, currenttoken, GetToken, ReInitialize, currentstring, GetTokenNo ;
FROM M2FileName IMPORT CalculateFileName ;
FROM M2Preprocess IMPORT PreprocessModule ;
FROM libc IMPORT exit ;
FROM M2Error IMPORT ErrorStringAt, ErrorStringAt2, ErrorStringsAt2, WriteFormat0, FlushErrors, FlushWarnings ;
FROM M2MetaError IMPORT MetaErrorString1, MetaError0, MetaError1 ;
FROM FormatStrings IMPORT Sprintf1 ;
FROM P0SymBuild IMPORT P0Init, P1Init ;
IMPORT m2flex ;
IMPORT P0SyntaxCheck ;
IMPORT P1Build ;
IMPORT P2Build ;
IMPORT PCBuild ;
IMPORT P3Build ;
IMPORT PHBuild ;
IMPORT PCSymBuild ;
FROM M2Batch IMPORT GetSource, GetModuleNo, GetDefinitionModuleFile, GetModuleFile,
AssociateModule, AssociateDefinition, MakeImplementationSource,
MakeProgramSource ;
FROM SymbolTable IMPORT GetSymName, IsDefImp, NulSym,
IsHiddenTypeDeclared, GetFirstUsed, GetMainModule, SetMainModule,
ResolveConstructorTypes, SanityCheckConstants, IsDefinitionForC,
IsBuiltinInModule ;
FROM FIO IMPORT StdErr ;
FROM NameKey IMPORT Name, GetKey, KeyToCharStar, makekey ;
FROM M2Printf IMPORT fprintf1 ;
FROM M2Quiet IMPORT qprintf0, qprintf1, qprintf2 ;
FROM DynamicStrings IMPORT String, InitString, KillString, InitStringCharStar, Dup, Mark, string ;
CONST
Debugging = FALSE ;
VAR
ModuleType : (None, Definition, Implementation, Program) ;
(*
CompilingDefinitionModule - returns true if the current module being
compiled is a definition module.
*)
PROCEDURE CompilingDefinitionModule() : BOOLEAN ;
BEGIN
RETURN( ModuleType=Definition )
END CompilingDefinitionModule ;
(*
CompilingImplementationModule - returns true if the current module being
compiled is an implementation module.
*)
PROCEDURE CompilingImplementationModule() : BOOLEAN ;
BEGIN
RETURN( ModuleType=Implementation )
END CompilingImplementationModule ;
(*
CompilingProgramModule - returns true if the current module being
compiled is a program module.
*)
PROCEDURE CompilingProgramModule() : BOOLEAN ;
BEGIN
RETURN( ModuleType=Program )
END CompilingProgramModule ;
(*
NeedToParseImplementation -
*)
PROCEDURE NeedToParseImplementation (sym: CARDINAL) : BOOLEAN ;
BEGIN
RETURN (IsDefImp(sym) AND IsHiddenTypeDeclared(sym) AND ExtendedOpaque) OR
(IsDefImp(sym) AND IsBuiltinInModule(sym)) OR
(WholeProgram AND (NOT IsDefinitionForC(sym)))
END NeedToParseImplementation ;
(*
Compile - compile file, s, using a 6 pass technique.
*)
PROCEDURE Compile (s: String) ;
BEGIN
DoPass0(s) ;
FlushWarnings ; FlushErrors ;
ResetForNewPass ;
qprintf0('Pass 1: scopes, enumerated types, imports and exports\n') ;
DoPass1 ;
FlushWarnings ; FlushErrors ;
qprintf0('Pass 2: constants and types\n') ;
ResetForNewPass ;
DoPass2 ;
FlushWarnings ; FlushErrors ;
qprintf0('Pass C: aggregate constants\n') ;
ResetForNewPass ;
DoPassC ;
FlushWarnings ; FlushErrors ;
qprintf0('Pass 3: quadruple generation\n') ;
ResetForNewPass ;
DoPass3 ;
FlushWarnings ; FlushErrors ;
qprintf0('Pass 4: gcc tree generation\n') ;
Code ;
FlushWarnings ; FlushErrors
END Compile ;
(*
compile - compile the filename.
*)
PROCEDURE compile (filename: ADDRESS) ;
VAR
f: String ;
BEGIN
f := InitStringCharStar(filename) ;
Compile(f) ;
f := KillString(f) ;
END compile ;
(*
ExamineCompilationUnit - opens the source file to obtain the module name and kind of module.
*)
PROCEDURE ExamineCompilationUnit (VAR name: ADDRESS; VAR isdefimp: BOOLEAN) ;
BEGIN
isdefimp := FALSE ; (* default to program module *)
(* stop if we see eof, ';' or '[' *)
WHILE (currenttoken#eoftok) AND (currenttoken#semicolontok) AND (currenttoken#lsbratok) DO
IF (currenttoken=implementationtok) OR (currenttoken=definitiontok)
THEN
isdefimp := TRUE ;
GetToken
END ;
IF currenttoken=identtok
THEN
name := currentstring ;
RETURN
END ;
GetToken
END ;
m2flex.M2Error(string(InitString('failed to find module name'))) ;
exit(1)
END ExamineCompilationUnit ;
(*
PeepInto - peeps into source, s, and initializes a definition/implementation or
program module accordingly.
*)
PROCEDURE PeepInto (s: String) ;
VAR
name : ADDRESS ;
isdefimp: BOOLEAN ;
BEGIN
IF OpenSource(PreprocessModule(s))
THEN
ExamineCompilationUnit(name, isdefimp) ;
IF isdefimp
THEN
SetMainModule(MakeImplementationSource(GetTokenNo(), makekey(name)))
ELSE
SetMainModule(MakeProgramSource(GetTokenNo(), makekey(name)))
END ;
CloseSource ;
ReInitialize
ELSE
fprintf1(StdErr, 'failed to open %s\n', s) ;
exit(1)
END
END PeepInto ;
(*
DoPass0 -
*)
PROCEDURE DoPass0 (s: String) ;
VAR
Main,
Sym : CARDINAL ;
i : CARDINAL ;
SymName,
FileName: String ;
BEGIN
P0Init ;
SetPassToPass0 ;
PeepInto(s) ;
Main := GetMainModule() ;
i := 1 ;
Sym := GetModuleNo(i) ;
qprintf1('Compiling: %s\n', s) ;
qprintf0('Pass 0: lexical analysis, parsing, modules and associated filenames\n') ;
WHILE Sym#NulSym DO
SymName := InitStringCharStar(KeyToCharStar(GetSymName(Sym))) ;
IF IsDefImp(Sym)
THEN
IF FindSourceDefFile(SymName, FileName)
THEN
qprintf2(' Module %-20s : %s\n', SymName, FileName) ;
ModuleType := Definition ;
IF OpenSource(AssociateDefinition(PreprocessModule(FileName), Sym))
THEN
IF NOT P0SyntaxCheck.CompilationUnit()
THEN
WriteFormat0('compilation failed') ;
CloseSource ;
RETURN
END ;
CloseSource
ELSE
MetaErrorString1 (Sprintf1 (InitString ('file {%%1EUF%s} containing module {%%1a} cannot be found'), FileName), Sym) ;
FlushWarnings ; FlushErrors ;
fprintf1(StdErr, 'failed to open %s\n', FileName) ;
exit(1)
END
ELSE
MetaError1 ('the file containing the definition module {%1EUa} cannot be found', Sym) ;
FlushWarnings ; FlushErrors ;
fprintf1(StdErr, 'failed to find definition module %s.def\n', SymName) ;
exit(1)
END ;
ModuleType := Implementation
ELSE
ModuleType := Program
END ;
IF (Main=Sym) OR NeedToParseImplementation(Sym)
THEN
(* only need to read implementation module if hidden types are declared or it is the main module *)
IF Main=Sym
THEN
FileName := Dup(s)
ELSE
IF FindSourceModFile(SymName, FileName)
THEN
END
END ;
IF FileName#NIL
THEN
qprintf2(' Module %-20s : %s\n', SymName, FileName) ;
IF OpenSource(AssociateModule(PreprocessModule(FileName), Sym))
THEN
IF NOT P0SyntaxCheck.CompilationUnit()
THEN
WriteFormat0('compilation failed') ;
CloseSource ;
RETURN
END ;
CloseSource
ELSE
(* quite legitimate to implement a module in C (and pretend it was a M2 implementation
providing that it is not the main program module and the definition module does not
imply that the implementation defines hidden types. *)
IF (NOT WholeProgram) OR (Sym=Main) OR IsHiddenTypeDeclared(Sym)
THEN
MetaErrorString1 (Sprintf1 (InitString ('file {%%1EUF%s} containing module {%%1a} cannot be found'), FileName), Sym) ;
FlushWarnings ; FlushErrors ;
fprintf1(StdErr, 'file %s cannot be opened\n', FileName)
END
END
END
END ;
SymName := KillString(SymName) ;
FileName := KillString(FileName) ;
INC(i) ;
Sym := GetModuleNo(i)
END ;
SetPassToNoPass
END DoPass0 ;
(*
DoPass1 - parses the sources of all modules necessary to compile
the required module, Main.
*)
PROCEDURE DoPass1 ;
VAR
name : Name ;
Sym : CARDINAL ;
i : CARDINAL ;
FileName: String ;
BEGIN
P1Init ;
SetPassToPass1 ;
i := 1 ;
Sym := GetModuleNo(i) ;
WHILE Sym#NulSym DO
FileName := GetDefinitionModuleFile(Sym) ;
IF FileName#NIL
THEN
IF Debugging
THEN
name := GetSymName(Sym) ;
qprintf1(' Module %a\n', name)
END ;
IF OpenSource(FileName)
THEN
ModuleType := Definition ;
IF NOT P1Build.CompilationUnit()
THEN
MetaError0('compilation failed') ;
CloseSource ;
RETURN
END ;
CloseSource
ELSE
fprintf1(StdErr, 'failed to open %s\n', FileName) ;
exit(1)
END ;
ModuleType := Implementation
ELSE
ModuleType := Program
END ;
FileName := GetModuleFile(Sym) ;
IF FileName#NIL
THEN
IF Debugging
THEN
name := GetSymName(Sym) ;
qprintf1(' Module %a\n', name)
END ;
IF OpenSource(FileName)
THEN
IF NOT P1Build.CompilationUnit()
THEN
MetaError0('compilation failed') ;
CloseSource ;
RETURN
END ;
CloseSource
ELSE
fprintf1(StdErr, 'failed to open %s\n', FileName) ;
exit(1)
END
END ;
INC(i) ;
Sym := GetModuleNo(i)
END ;
SetPassToNoPass
END DoPass1 ;
(*
DoPass2 - parses the sources of all modules necessary to compile
the required module, Main.
*)
PROCEDURE DoPass2 ;
VAR
name : Name ;
Sym : CARDINAL ;
i : CARDINAL ;
FileName: String ;
BEGIN
SetPassToPass2 ;
i := 1 ;
Sym := GetModuleNo(i) ;
WHILE Sym#NulSym DO
FileName := GetDefinitionModuleFile(Sym) ;
IF FileName#NIL
THEN
IF Debugging
THEN
name := GetSymName(Sym) ;
qprintf1(' Module %a\n', name)
END ;
IF OpenSource(FileName)
THEN
ModuleType := Definition ;
IF NOT P2Build.CompilationUnit()
THEN
MetaError0('compilation failed') ;
CloseSource ;
RETURN
END ;
CloseSource
ELSE
fprintf1(StdErr, 'failed to open %s\n', FileName) ;
exit(1)
END ;
ModuleType := Implementation
ELSE
ModuleType := Program
END ;
FileName := GetModuleFile(Sym) ;
IF FileName#NIL
THEN
IF Debugging
THEN
name := GetSymName(Sym) ;
qprintf1(' Module %a\n', name)
END ;
IF OpenSource(FileName)
THEN
IF NOT P2Build.CompilationUnit()
THEN
MetaError0('compilation failed') ;
CloseSource ;
RETURN
END ;
CloseSource
ELSE
fprintf1(StdErr, 'failed to open %s\n', FileName) ;
exit(1)
END
END ;
INC(i) ;
Sym := GetModuleNo(i)
END ;
SetPassToNoPass
END DoPass2 ;
(*
DoPassC - parses the sources of all modules necessary to compile
the required module, Main.
*)
PROCEDURE DoPassC ;
VAR
name : Name ;
Sym : CARDINAL ;
i : CARDINAL ;
FileName: String ;
BEGIN
SetPassToPassC ;
i := 1 ;
Sym := GetModuleNo(i) ;
WHILE Sym#NulSym DO
FileName := GetDefinitionModuleFile(Sym) ;
IF FileName#NIL
THEN
IF Debugging
THEN
name := GetSymName(Sym) ;
qprintf1(' Module %a\n', name)
END ;
IF OpenSource(FileName)
THEN
ModuleType := Definition ;
IF NOT PCBuild.CompilationUnit()
THEN
MetaError0('compilation failed') ;
CloseSource ;
RETURN
END ;
CloseSource
ELSE
fprintf1(StdErr, 'failed to open %s\n', FileName) ;
exit(1)
END ;
ModuleType := Implementation
ELSE
ModuleType := Program
END ;
FileName := GetModuleFile(Sym) ;
IF FileName#NIL
THEN
IF Debugging
THEN
name := GetSymName(Sym) ;
qprintf1(' Module %a\n', name)
END ;
IF OpenSource(FileName)
THEN
IF NOT PCBuild.CompilationUnit()
THEN
MetaError0('compilation failed') ;
CloseSource ;
RETURN
END ;
CloseSource
ELSE
fprintf1(StdErr, 'failed to open %s\n', FileName) ;
exit(1)
END
END ;
INC(i) ;
Sym := GetModuleNo(i)
END ;
PCSymBuild.ResolveConstTypes ;
ResolveConstructorTypes ;
SanityCheckConstants ;
SetPassToNoPass
END DoPassC ;
(*
DoPass3 - parses the sources of all modules necessary to compile
the required module, Main.
*)
PROCEDURE DoPass3 ;
VAR
Main,
Sym : CARDINAL ;
i : CARDINAL ;
FileName: String ;
BEGIN
SetPassToPass3 ;
Main := GetMainModule() ;
i := 1 ;
Sym := GetModuleNo(i) ;
WHILE Sym#NulSym DO
FileName := GetDefinitionModuleFile(Sym) ;
IF FileName#NIL
THEN
IF OpenSource(FileName)
THEN
ModuleType := Definition ;
IF NOT P3Build.CompilationUnit()
THEN
MetaError0('compilation failed') ;
CloseSource ;
RETURN
END ;
CloseSource
ELSE
fprintf1(StdErr, 'failed to open %s\n', FileName) ;
exit(1)
END ;
ModuleType := Implementation
ELSE
ModuleType := Program
END ;
FileName := GetModuleFile(Sym) ;
IF FileName#NIL
THEN
IF OpenSource(FileName)
THEN
IF (Main=Sym) OR WholeProgram
THEN
IF NOT P3Build.CompilationUnit()
THEN
MetaError0('compilation failed') ;
CloseSource ;
RETURN
END
ELSE
(*
not the main module .mod therefore must be implementing
a hidden type - we dont want to generate any
StatementSequence quadrupes but we do want to build TYPEs
and ConstExpressions.
*)
SetPassToNoPass ;
SetPassToPassHidden ;
IF NOT PHBuild.CompilationUnit()
THEN
MetaError0('compilation failed') ;
CloseSource ;
RETURN
END ;
SetPassToNoPass ;
SetPassToPass3
END ;
CloseSource
ELSE
fprintf1(StdErr, 'failed to open %s\n', FileName) ;
exit(1)
END
END ;
INC(i) ;
Sym := GetModuleNo(i)
END ;
SetPassToNoPass
END DoPass3 ;
BEGIN
ModuleType := None
END M2Comp.

View File

@ -0,0 +1,73 @@
(* M2Configure.def exports configuration constants.
Copyright (C) 2001-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
DEFINITION MODULE M2Configure ;
(*
Author : Gaius Mulley
Title : M2Configure
Date : Thu May 17 17:45:37 BST 1990
Description: Exports configuration constants.
Last update: Thu May 17 17:46:57 BST 1990
*)
EXPORT QUALIFIED PushParametersLeftToRight,
UseUnderscoreForC,
UseDotForJumpLabels,
UsingGCCBackend ;
CONST
(*
PushParametersLeftToRight - if TRUE indicates that the parameters
are pushed in order from left to right.
if FALSE indicates that the parameters
are pushed in order from right to left.
*)
PushParametersLeftToRight = TRUE ;
(*
UseUnderscoreForC - if true then the C compiler uses _ in front of
all declarations.
*)
(* we let gcc add _ to all identifiers otherwise we get two _ *)
UseUnderscoreForC = FALSE ;
(*
UseDotForJumpLabels - if true then the C compiler produced .L2: for jump
labels. If false then the C compiler produced L2
*)
UseDotForJumpLabels = FALSE ;
(*
UsingGCCBackend - is the compiler being built with the GCC code generator?
*)
UsingGCCBackend = TRUE ;
END M2Configure.

View File

@ -0,0 +1,24 @@
(* M2Configure.mod exports configuration constants.
Copyright (C) 2001-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
IMPLEMENTATION MODULE M2Configure ;
END M2Configure.

View File

@ -0,0 +1,39 @@
(* M2Const.def maintain and resolve the types of constants.
Copyright (C) 2010-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
DEFINITION MODULE M2Const ;
(*
Title : M2Const
Author : Gaius Mulley
System : GNU Modula-2
Date : Thu Dec 23 15:02:59 2010
Revision : $Version$
Description: provides a module which maintains and resolves the types of constants.
*)
EXPORT QUALIFIED constType ;
TYPE
constType = (unknown, set, str, constructor, array, cast, boolean, ztype, rtype, ctype, procedure, char) ;
END M2Const.

View File

@ -0,0 +1,501 @@
(* M2Const.mod maintain and resolve the types of constants.
Copyright (C) 2010-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
IMPLEMENTATION MODULE M2Const ;
(*
CONST
Debugging = FALSE ;
DebugConsts = FALSE ;
TYPE
constList = POINTER TO cList ;
cList = RECORD
constsym : CARDINAL ;
constmeta: constType ;
expr : CARDINAL ;
type : CARDINAL ;
next : constList ;
END ;
VAR
headOfConsts: constList ;
PROCEDURE stop ; BEGIN END stop ;
(*
addToConstList - add a constant, sym, to the head of the constants list.
*)
PROCEDURE addToConstList (sym: CARDINAL) ;
VAR
h: constList ;
BEGIN
h := headOfConsts ;
WHILE h#NIL DO
IF h^.constsym=sym
THEN
InternalError ('should never see the same symbol id declared twice')
END ;
h := h^.next
END ;
NEW(h) ;
WITH h^ DO
constsym := sym ;
constmeta := unknown ;
expr := NulSym ;
type := NulSym ;
next := headOfConsts
END ;
headOfConsts := h
END addToConstList ;
(*
FixupConstAsString - fixes up a constant, sym, which will have the string type.
*)
PROCEDURE FixupConstAsString (sym: CARDINAL) ;
BEGIN
fixupConstMeta(sym, str)
END FixupConstAsString ;
(*
FixupConstType - fixes up a constant, sym, which will have the type, consttype.
*)
PROCEDURE FixupConstType (sym: CARDINAL; consttype: CARDINAL) ;
VAR
h: constList ;
BEGIN
h := headOfConsts ;
WHILE h#NIL DO
WITH h^ DO
IF constsym=sym
THEN
IF constmeta=str
THEN
InternalError ('cannot fix up a constant to have a type if it is already known as a string')
END ;
type := consttype ;
PutConst(sym, consttype) ;
RETURN
END
END ;
h := h^.next
END
END FixupConstType ;
(*
FixupProcedureType - creates a proctype from a procedure.
*)
PROCEDURE FixupProcedureType (p: CARDINAL) : CARDINAL ;
VAR
par,
t : CARDINAL ;
n, i: CARDINAL ;
BEGIN
IF IsProcedure(p)
THEN
t := MakeProcType(CheckAnonymous(NulName)) ;
i := 1 ;
n := NoOfParam(p) ;
WHILE i<=n DO
par := GetParam(p, i) ;
IF IsParameterVar(par)
THEN
PutProcTypeVarParam(t, GetType(par), IsParameterUnbounded(par))
ELSE
PutProcTypeParam(t, GetType(par), IsParameterUnbounded(par))
END ;
INC(i)
END ;
IF GetType(p)#NulSym
THEN
PutFunction(t, GetType(p))
END ;
RETURN( t )
ELSE
InternalError ('expecting a procedure')
END ;
RETURN( NulSym )
END FixupProcedureType ;
(*
FixupConstProcedure - fixes up a constant, sym, which will be equivalent to e.
*)
PROCEDURE FixupConstProcedure (sym: CARDINAL; e: CARDINAL) ;
VAR
h: constList ;
BEGIN
h := headOfConsts ;
WHILE h#NIL DO
WITH h^ DO
IF constsym=sym
THEN
expr := e ;
type := FixupProcedureType(e) ;
PutConst(sym, type) ;
RETURN
END
END ;
h := h^.next
END
END FixupConstProcedure ;
(*
FixupConstExpr - fixes up a constant, sym, which will be equivalent to e.
*)
PROCEDURE FixupConstExpr (sym: CARDINAL; e: CARDINAL) ;
VAR
h: constList ;
BEGIN
h := headOfConsts ;
WHILE h#NIL DO
WITH h^ DO
IF constsym=sym
THEN
expr := e ;
RETURN
END
END ;
h := h^.next
END
END FixupConstExpr ;
(*
fixupConstMeta - fixes up symbol, sym, to have the, meta, constType.
*)
PROCEDURE FixupConstMeta (sym: CARDINAL; meta: constType) ;
VAR
h: constList ;
BEGIN
h := headOfConsts ;
WHILE h#NIL DO
WITH h^ DO
IF constsym=sym
THEN
constmeta := meta ;
RETURN
END
END ;
h := h^.next
END
END FixupConstMeta ;
(*
fixupConstCast -
*)
PROCEDURE fixupConstCast (sym: CARDINAL; castType: CARDINAL) ;
VAR
h: constList ;
BEGIN
h := headOfConsts ;
WHILE h#NIL DO
WITH h^ DO
IF constsym=sym
THEN
type := castType ;
RETURN
END
END ;
h := h^.next
END
END fixupConstCast ;
(*
findConstType -
*)
PROCEDURE findConstType (sym: CARDINAL) : CARDINAL ;
VAR
h: constList ;
t: CARDINAL ;
BEGIN
h := headOfConsts ;
WHILE h#NIL DO
WITH h^ DO
IF constsym=sym
THEN
t := GetType(sym) ;
IF t=NulSym
THEN
RETURN( NulSym )
ELSE
RETURN( t )
END
END
END ;
h := h^.next
END ;
RETURN( NulSym )
END findConstType ;
(*
findConstMeta -
*)
PROCEDURE findConstMeta (sym: CARDINAL) : constType ;
VAR
h: constList ;
BEGIN
h := headOfConsts ;
WHILE h#NIL DO
WITH h^ DO
IF constsym=sym
THEN
RETURN( constmeta )
END
END ;
h := h^.next
END ;
RETURN( unknown )
END findConstMeta ;
(*
ReportUnresolvedConstTypes - emits an error message for any unresolved constant type.
*)
PROCEDURE ReportUnresolvedConstTypes ;
VAR
h: constList ;
BEGIN
h := headOfConsts ;
WHILE h#NIL DO
WITH h^ DO
IF (constmeta#unknown) AND (constmeta#str) AND (type=NulSym)
THEN
MetaError1('unable to resolve the type of the constant {%1Dad}', h^.constsym)
END
END ;
h := h^.next
END
END ReportUnresolvedConstTypes ;
(*
DebugMeta -
*)
PROCEDURE DebugMeta (h: constList) ;
VAR
n: Name ;
BEGIN
IF DebugConsts
THEN
WITH h^ DO
n := GetSymName(constsym) ;
printf1('constant %a ', n) ;
IF type=NulSym
THEN
printf0('type is unknown\n')
ELSE
printf0('type is known\n')
END
END
END
END DebugMeta ;
(*
constTypeResolved -
*)
PROCEDURE constTypeResolved (h: constList) : BOOLEAN ;
BEGIN
RETURN( h^.type#NulSym )
END constTypeResolved ;
(*
constExprResolved -
*)
PROCEDURE constExprResolved (h: constList) : BOOLEAN ;
BEGIN
RETURN( h^.expr#NulSym )
END constExprResolved ;
(*
findConstMetaExpr -
*)
PROCEDURE findConstMetaExpr (h: constList) : constType ;
BEGIN
RETURN( h^.constmeta )
END findConstMetaExpr ;
(*
constResolveViaMeta -
*)
PROCEDURE constResolveViaMeta (h: constList) : BOOLEAN ;
VAR
n: Name ;
BEGIN
WITH h^ DO
IF findConstMetaExpr(h)=str
THEN
PutConstString(constsym, MakeKey('')) ;
IF DebugConsts
THEN
n := GetSymName(constsym) ;
printf1('resolved constant %a as a string\n', n)
END ;
RETURN( TRUE )
END
END ;
RETURN( FALSE )
END constResolveViaMeta ;
(*
constResolvedViaType -
*)
PROCEDURE constResolvedViaType (h: constList) : BOOLEAN ;
VAR
n: Name ;
BEGIN
WITH h^ DO
type := findConstType(expr) ;
IF type#NulSym
THEN
PutConst(constsym, type) ;
IF DebugConsts
THEN
n := GetSymName(constsym) ;
printf1('resolved type of constant %a\n', n)
END ;
RETURN( TRUE )
END
END ;
RETURN( FALSE )
END constResolvedViaType ;
(*
resolveConstType -
*)
PROCEDURE resolveConstType (h: constList) : BOOLEAN ;
BEGIN
WITH h^ DO
IF (constmeta=unknown) OR (constmeta=str)
THEN
(* do nothing *)
ELSE
DebugMeta(h) ;
IF constTypeResolved(h)
THEN
(* nothing to do *)
ELSE
IF constExprResolved(h)
THEN
IF constResolveViaMeta(h)
THEN
RETURN( TRUE )
ELSIF constResolvedViaType(h)
THEN
RETURN( TRUE )
END
END
END
END
END ;
RETURN( FALSE )
END resolveConstType ;
(*
ResolveConstTypes - resolves the types of all aggegrate constants.
*)
PROCEDURE ResolveConstTypes ;
VAR
h : constList ;
changed: BOOLEAN ;
BEGIN
REPEAT
changed := FALSE ;
h := headOfConsts ;
WHILE h#NIL DO
changed := resolveConstType(h) ;
h := h^.next
END
UNTIL NOT changed ;
ReportUnresolvedConstTypes
END ResolveConstTypes ;
(*
SkipConst - returns the symbol which is a pseudonum of, sym.
*)
PROCEDURE SkipConst (sym: CARDINAL) : CARDINAL ;
VAR
init: CARDINAL ;
h : constList ;
BEGIN
init := sym ;
h := headOfConsts ;
WHILE h#NIL DO
IF (h^.constsym=sym) AND (h^.expr#NulSym)
THEN
sym := h^.expr ;
IF sym=init
THEN
(* circular definition found *)
RETURN( sym )
END ;
h := headOfConsts
ELSE
h := h^.next
END
END ;
RETURN( sym )
END SkipConst ;
BEGIN
headOfConsts := NIL
*)
BEGIN
END M2Const.

View File

@ -0,0 +1,49 @@
(* M2Debug.def simple debugging facilities in the Modula-2 compiler.
Copyright (C) 2001-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
DEFINITION MODULE M2Debug ;
(*
Author : Gaius Mulley
Title : M2Debug
Date : 30/5/87
Description: Implements the Debugging facilities in the Modula-2 compiler.
Last update: 30/5/87
*)
EXPORT QUALIFIED Assert, WriteDebug ;
(*
Assert - tests the boolean, q. If false then an error is reported
and the execution is HALTed.
*)
PROCEDURE Assert (q: BOOLEAN) ;
(*
WriteDebug - only writes a string if the debugging mode is on.
*)
PROCEDURE WriteDebug (a: ARRAY OF CHAR) ;
END M2Debug.

View File

@ -0,0 +1,57 @@
(* M2Debug.mod simple debugging facilities in the Modula-2 compiler.
Copyright (C) 2001-2021 Free Software Foundation, Inc.
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
This file is part of GNU Modula-2.
GNU Modula-2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Modula-2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
IMPLEMENTATION MODULE M2Debug ;
FROM StrIO IMPORT WriteString, WriteLn ;
FROM M2Error IMPORT InternalError ;
FROM M2Options IMPORT CompilerDebugging ;
(*
Assert - tests the boolean, q. If false then an error is reported
and the execution is HALTed.
*)
PROCEDURE Assert (q: BOOLEAN) ;
BEGIN
IF NOT q
THEN
InternalError ('assert failed')
END
END Assert ;
(*
WriteDebug - only writes a string if the debugging mode is on.
*)
PROCEDURE WriteDebug (a: ARRAY OF CHAR) ;
BEGIN
IF CompilerDebugging
THEN
WriteString(a) ; WriteLn
END
END WriteDebug ;
END M2Debug.

Some files were not shown because too many files have changed in this diff Show More