gm2
[Top][All Lists]
Advanced

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

[Gm2] bit field access and other bug fixes


From: Gaius Mulley
Subject: [Gm2] bit field access and other bug fixes
Date: Sun, 29 Apr 2012 13:16:38 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Hello,

finally the bit field access code is complete and also I've fixed
the multiple error messages bug.  The bit field access was more
complex than I originally thought and required more changes to
front, middle and back end of the gm2 (front end).  However
what is really fun is that gm2 will produce better code when
accessing record fields.  This in turn means that unbounded
string parameter passing should be more efficient.  I've yet to
run performance tests, it could be quite interesting.  For certain
gm2 passes better quality trees to the gcc back end - which should
bode well when we migrate to newer gcc releases - and can exploit 
back end optimization.

I plan to formally release gm2 soon (ish) gm2-1.1 based on 4.1.2.
Thereafter (aside from bug fixes) I'll concentrate all efforts onto
forward porting gm2 onto 4.6.x (partially complete).

I'd welcome any testing reports about the current cvs of gm2, before
releasing 1.1.  Also I'd like to migrate from the __ATTRIBUTE__
alignment syntax to the newer Modula-2 ISO syntax <* bytealignment(expr)
*>.  Maybe this should be deprecated gracefully,

So in summary:  bitfield access is implemented, packed records (packed
sets) are implemented and multiple identical errors have been removed.
An example of its use can be found here:

http://www.nongnu.org/gm2/packed.html

regards,
Gaius

I see:

# of expected passes            9776
# of unexpected failures        12

on x86_64 Debian.  The 12 failures are intrange.mod and rangesupport.mod
which test a feature which has not been implemented yet.



Anyhow here is the changelog:

    * 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.




reply via email to

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