gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gm2] EXIT statement fix


From: Gaius Mulley
Subject: [Gm2] EXIT statement fix
Date: Mon, 14 Sep 2009 18:03:36 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Hi,

I've fixed a major bug surrounding the EXIT statement.  I
misunderstood that EXITs are only allowed in LOOP END statements (I
thought they were allowed to terminate FOR, UNTIL and WHILE
statements).  This is now fixed and some of the testcases are altered
appropriately.

A minor milestone has been reached as gm2 can now compile and
run CocoR - well the test 'taste.atg' builds correctly.  I'm
going to try a few more examples and automate the checking.
This port of CocoR uses the ISO libraries, thus testing RndFile
and default input/output.  Some important fixes were applied to
ISO libraries and also gm2/gm2-libs/FIO.mod

regards,
Gaius

here are the latest changelog entries:

  * gm2/gm2-compiler/M2Quads.mod:  RepeatStack, WhileStack,
    ForStack
    new stacks for respective loops.  PushFor, PopFor (New
    Procedures).
    REPEAT, FOR and WHILE loops no longer allow EXIT to
    terminate the
    loop as EXIT is only allowed to terminate LOOP statements
    (as per
    ISO and PIM Modula-2).
  * gm2/gm2-libs/FIO.mod:  corrected order of parameters to
    memcpy.
    Ensure that calls to EOF do not alter the file state.
  * gm2/gm2-libs-iso/SimpleCipher.mod:  use early RETURN and
    not EXIT
    as EXITs are only allowed inside LOOP statements.
  * gm2/gm2-libs-iso/TextIO.mod:  remove EXIT statement from
    WHILE loop.

  * gm2/TODO:  removed completed items.
  * gm2/gccgm2.c:  modified documentation in light of completing
    ISO Modula-2 language.  Also rewritten the descriptions of
    INC and DEC.
  * gm2/gm2-compiler/M2CaseList.mod:  bug fixes in the missing
    range checking.
  * gm2/gm2-compiler/M2GCCDeclare.mod:  fixes so that cyclic
  * array declarations are canonicalised by their front end type and
  * the GCC index type.
  * gm2/gm2-compiler/gccgm2.def:  BuildStartArrayType new
  * parameter,
    type.
  * gm2/patches/gcc/4.1.2/06.gaius_patch_tree:  new version of
    tree.[ch] patches.
  * gm2/gm2/tools-src/makeversion:  corrected date.
  * gm2/gm2-compiler/M2CaseList.mod:  use IsEqual to test
  * identity of constants rather than =.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]