gm2
[Top][All Lists]
Advanced

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

[Gm2] Latest changes


From: Gaius Mulley
Subject: [Gm2] Latest changes
Date: 07 Feb 2008 22:36:36 +0000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Hi,

I believe I've fixed the recently reported REAL/LONGREAL and constant
literal code generator bugs.

        * fixed REAL/LONGREAL bugs as reported by:
          Ivan F. Villanueva B and Steve Giess.
        * gm2/gm2-compiler/M2Base.def:  ZRealType added and
          exported.
        * gm2/gm2-compiler/M2Base.mod:  ZRealType implemented.
          Added parameter checking meta type matrix.
          Added ZRealType to expression, assignment and
          parameter type checking matrices.
        * gm2/gm2-compiler/M2GCCDeclare.mod:  tell GCC about
          the front end ZRealType type.
        * gm2/gm2-compiler/M2Quads.mod:  improved type incompatible
          error message.
        * gm2-compiler/SymbolTable.mod:  floating point literals
          use the ZRealType.
        * gm2/gm2-libs/FpuIO.mod:  explicitly cast REAL to LONGREAL.
        * gm2/gm2-libs/StringConvert.mod:  explicitly cast CARDINAL
          to LONGCARD.
        * gm2/gm2-libs-pim/RealInOut.mod:  explicitly cast LONGREAL
          to REAL and visa versa.
        * gm2/ulm-lib-gm2/std/Directories.mod:  cast blocksize
          (LONGCARD) to CARDINAL.

In the process of fixing these bugs I've had to make the type system
stricter when passing parameters.  This means that LONGREAL is no
longer compatible with REAL or SHORTREAL, but these data types must be
converted appropriately.  Floating point constant literals are
compatible with all three (the Z type as defined by ISO M2).

Likewise I've also tightened the parameter passing rules for passing
CARDINAL, LONGCARD and SHORTCARDs.

I'm in the process of adding this to the documentation.  However I'd
like feed back on whether you believe the rules should be tightened
further.  I'm minded to make:

          LONGCARD, LONGINT, SHORTCARD, SHORTINT, CARDINAL INTEGER
         +----------------------------------------------------------
LONGCARD |LONGCARD  LONGINT     n          n        n         n
LONGINT  |LONGINT   LONGINT     n          n        n         n
SHORTCARD|   n         n     SHORTCARD  SHORTINT    n         n
SHORTINT |   n         n     SHORTINT   SHORTINT    n         n
CARDINAL |   n         n        n          n      CARDINAL  INTEGER
INTEGER  |   n         n        n          n      INTEGER   INTEGER

hold true for both assignments and expressions as well.

regards,
Gaius




reply via email to

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