r/ProgrammingLanguages • • 3h ago

MOCKA Modula-2 Version 2610 Released

I have released a new version of MOCKA today.

It is located at

https://github.com/trijezdci/MOCKA/tree/master/x86(PIM)/ver2610/ver2610)

Changes are listed at
https://github.com/trijezdci/MOCKA/blob/master/x86(PIM)/ver2610/CHANGES.md/ver2610/CHANGES.md)

Highlights

+ private modules

DEFINITION MODULE Foo PRIVATE TO Bar, Baz;
(* Only Bar and Baz can import this module *)

+ import with re-export

IMPORT Bar+, Baz+, Bam;
(* any import of this module will also import Bar and Baz *)

+ fixed width whole number types

CARDINAL16, CARDINAL32, CARDINAL64
INTEGER16, INTEGER32, INTEGER64

+ type conversion operator

real := int :: REAL;

+ pervasive functions LOG2, POW2, LOG10, POW10

n := LOG2(m);

+ ISO cast function

target := SYSTEM.CAST(TargetType, value);

+ bitwise functions BWAND, BWOR and BWNOT

n := SYSTEM.BWAND(m, k);

+ bitshift functions SHL, SHR and ASHR

n := SYSTEM.SHL(m, shiftFactor);

+ many inconsistency and bug fixes.

+ Modula-2 Tk interface library 

more is in the change log. check it out!

Outlook

The next stage is to give this compiler an AMD64 backend.

The 32-bit compiler will then be retired.

The 64-bit compiler will be used for a rewrite supporting Modula-2 R10.

6 Upvotes

0 comments sorted by