Skip to content

Cmajor 3.6.0 for Windows x64 and Linux

Compare
Choose a tag to compare
@slaakko slaakko released this 14 Aug 16:10
· 509 commits to master since this release

Cmajor 3.6.0 for Windows x64 and Linux

Release notes

  • Bug fix: a character literal that contained a single non-ASCII Unicode letter, for example 'ö', caused an error 'invalid UTF-8 sequence'. Fixed.

  • Faster function entry and exit code for functions that can throw or contain a cleanup block.

  • Support for fibers added to system library.

  • Process class
    added to system library.

  • Switched to clang++ on WSL / on Linux.
    I have used LLVM 10.0.0 pre-built binaries for Ubuntu 18.04 available on the LLVM download page for building the compiler on Linux/WSL.

  • Default TextWriter output operators for containers revisited.

    The 3.5.0 version included default output operators, operator<<, for container types.
    However it required the programmer to derive her own container type from the standard one, if she wanted to define her own output operator for that container type.
    In this version this limitation has been removed.

    The default output operators are now declared with the new system_default attribute
    and the overload resolution process has been changed to take that attribute into account.
    It works as follows:
    The overload resolution has been changed to be a two-phase process.
    In the first phase the compiler ignores functions that have a system_default attribute, as if they did not exist at all.
    Now if the user has defined her own ouput operator for a container, the compiler finds it and uses it without resorting to system_default functions.
    Only if the set of viable functions is empty, the compiler does a phase two lookup.
    This time the compiler considers also functions that have been declared with the system_default attribute and if there is now viable functions, the compiler will use the best match.
    Thus the compiler will use a system-defined default output operator only if the programmer has not defined her own version.

  • New tools:

    cppcmc, cmdb and cmdb2xml.

    • cppcmc is a command-line Cmajor compiler that generates primitive C++ that is then compiled to native code using the configured C++ compiler.
    • cmdb is a command-line debugger.
    • cmdb2xml converts a binary debug information file to XML for inspection.
  • Changed System.Numerics.Multiprecision library implementation to use C++ boost::multiprecision library.

  • ANSI escapes for coloring text output. Works on Linux and on Windows when using Windows Terminal (wt.exe) as console host:

    using System;
    
    void main()
    {
        Console.Out() << TextColor.green << "green" << Color.reset << endl();
    }
    
  • Sometimes compilation of the system library from the command line may fail with the following error:

    error opening mapped file 'D:/work/cmajorm/cmajor/system/System.Dom/lib/release/System.Dom.cmm'
    

    In this case you may turn off threaded compilation by using the -st and -bt=1 options, that is:

    cmc -st -bt=1 -u -v -c=release System.cms