Cmajor Changelog

What's new in Cmajor 4.2.0

Oct 26, 2021
  • Bug fix: Solution explorer tree view node collapse scrolling bug fixed.
  • Bug fix: Solution explorer node expand crash bug fixed when opening a new project/solution and there was previous solution open.
  • Bug fix: System.Windows.Component.LinkBefore and System.Windows.Component.LinkAfter fixed.
  • Bug fix: One context menu item crash bug fixed in System.Windows library and in cmcode.
  • Bug fix: Two bugs in the concept implementation fixed.
  • Error reporting of the XML parser improved. Now error line and column included in the parsing error message.
  • Now cmcode solution explorer tree view contains basic icons.
  • Full instantiation requests.
  • Interfaces reimplemented.
  • XML serialization reimplemented.
  • Assertions converted to exceptions in the system library. The exceptions are:
  • NullPointerException: thrown when trying to call a member function or access a member variable through empty UniquePtr or SharedPtr, or iterate or access using an empty iterator.
  • IndexOutOfBoundsException: thrown when trying to index a string using an invalid index.
  • InvalidParameterException: thrown when a parameter is invalid in other than UniquePtr or SharedPtr or iterator classes.
  • PreconditionViolationException: thrown when a precondition of a function or a class invariant is not satisfied at the beginning of a function.
  • System.Windows control classes have now an extra constructor that usually takes only one parameter of type ControlNameCreateParams. It provides more flexibility in changing control's creation parameters. The idea is taken from one of the books (D&E) of Bjarne Stroustrup.
  • TreeView can show icons.
  • New System.Windows library components:
  • ImageList
  • ListView
  • PathView

New in Cmajor 4.1.0 (Aug 19, 2021)

  • [Code completion](https://slaakko.github.io/cmajor/projects/cmcode/cmcode.html#cc) improved.
  • [Installation](https://slaakko.github.io/cmajor/installation/installation.html) document revised.
  • Using new installer and uninstaller programs on Windows.

New in Cmajor 4.0.0 (Jul 13, 2021)

  • Code completion:
  • Cmajor Code is a new IDE for Cmajor for Windows. It was first written in the Cmajor programming language, but due to mysterious slowing problem it was converted to C++. You can edit, compile, debug, and run programs from cmcode.

New in Cmajor 3.10.0 (Apr 21, 2021)

  • Recent Cmajor Code IDE versions suffer from nasty behaviour: the Cmajor Code IDE gradually slows down, and this is not enough, actually the entire machine slows down, until Cmajor Code is closed. The reason for this behaviour is a mystery, but this problem has been fixed by rewriting the IDE in a language that works: C++.
  • Bug fix (C++ backend compiler): "String not bound" error fixed.
  • Bug fix (compiler) Linking error "symbol InitCompileUnit_ not defined" fixed.
  • Bug fixes (Cmajor Code): Scrolling. Copy/paste. Console.
  • Bug fix (System.Xml.Serialization): Reading empty list of a primitive type caused a crash.
  • State of the Cmajor Code IDE (open files, breakpoints, expanded project tree view nodes, is locals view open, is call stack view open), is saved to <solution>.cms.settings.xml file, and restored from there when the solution is opened.
  • State of a project in Cmajor Code IDE (program arguments, breakpoints), is saved to <project>.cmp.settings.xml file and restored from there when a solution containing that project is opened.
  • Startup dialog (Cmajor Code). Startup dialog can be turned off by unchecking Edit | Options | Show startup dialog.
  • Reimplemented file I/O in the runtime library. System library file API's changed: support for old InputFileStream, OutputFileStream, etc... removed. Use the static File class and StreamWriter, StreamReader, StringWriter and FileByteStream, BufferedByteStream, etc... New implementation allows parallel threads to write/read simultaneously to/from different files.
  • The return value of File.Size is now of type long (it was ulong before).
  • ReadFile function removed. Use File.ReadAllText.

New in Cmajor 3.8.0 (Dec 19, 2020)

  • Bug fix (Cmajor Code editor) Adding lines to the middle of a file that was longer than the screen did not update scroll bars and then you could not scroll to the end of the file.
  • Bug fix (Cmajor Code editor): Double clicking last word of text left last character out of selection.
  • Bug fix (Cmajor Code editor): Selection with mouse.
  • Performance bug fix (Cmajor Code): Tooltip window handling for the toolbar was done on OnMouseEnter and OnMouseLeave event handlers and done synchronously. It was causing a delay of about 70 ms for each toolbutton on my machine. Tooltip handling is now moved to OnMouseHover event handler.
  • (Cmajor Code editor) Ctrl-A now selects entire text.
  • (Cmajor Code editor) Go To Definition: right clicking an identifier in the editor and selecting 'Go To Definition' from the context menu locates the editor to the definition location of that symbol. Not perfect. This feature requires that you have successfully compiled the project containing the definition and the project in which the identifier resides.
  • Tracing.

New in Cmajor 3.7.0 (Nov 22, 2020)

  • Bug fix: Fixed a bug in class template compilation causing access violation in compiler.
  • Bug fix: Removed flashing console window when building projects in CmDevEnv.
  • Bug fix: JSON parser did not accept empty array and empty object.
  • Bug fix: Consider the following program:
  • using System;
  • abstract class Component
  • public Component()
  • public default virtual ~Component();
  • public string Addr()
  • return ToHexString(cast<ulong>(cast<void*>(this)));
  • public abstract void Boom();
  • class Container
  • public nothrow Container(Component* parent_) : parent(parent_)
  • public void Fail()
  • Console.Out() << ">Container.Fail()" << endl();
  • parent->Fail();
  • Console.Out() << "<Container.Fail()" << endl();
  • public Component* parent;
  • class ToFail : Component
  • public ToFail(const string& text_) : base(), text(text_), container(this)
  • public nothrow Container& GetContainer()
  • return container;
  • public ~ToFail()
  • Console.Out() << "destructor ~ToFail() " << Addr() << " called" << endl();
  • public override void Fail()
  • Console.Out() << ">ToFail.Fail: " << Addr() << endl();
  • Console.Out() << "<ToFail.Fail: " << Addr() << endl();
  • public string text;
  • public Container container;
  • void main()
  • Console.Out() << "start" << endl();
  • UniquePtr<ToFail> toFail(new ToFail(ToString(1)));
  • Console.Out() << "toFail addr is " << toFail->Addr() << endl();
  • Console.Out() << "toFail container parent addr is " << toFail->container.parent->Addr() << endl();
  • toFail->GetContainer().Fail();
  • Console.Out() << "end" << endl();
  • Because ToString(1) returns an rvalue, the compiler erroneously generated a move constructor for the ToFail class and called it after converting the string to a ToFail object. This has been fixed now so that move constructor is not generated and called, but ToFail.ToFail(const string&) constructor is just called with a string argument as expected.
  • Before the fix, the program above printed the following lines and crashed:
  • D:workbug>bindebugbug
  • start
  • destructor ~ToFail() 00000038913FF888 called
  • toFail addr is 00000210D28CC780
  • toFail container parent addr is 00000038913FF888
  • >Container.Fail() // <--- access violation
  • Now the program prints:
  • D:workbug>bindebugbug
  • start
  • toFail addr is 0000024F7DE191E0
  • toFail container parent addr is 0000024F7DE191E0
  • >Container.Fail()
  • >ToFail.Fail: 0000024F7DE191E0
  • <ToFail.Fail: 0000024F7DE191E0
  • <Container.Fail()
  • end
  • destructor ~ToFail() 0000024F7DE191E0 called
  • The debugger has now conditional breakpoints.
  • Directory.GetDirectories.
  • New tool: supd for synchronizing parallel source code directory trees.
  • Decided to drop TLS support on Windows.
  • Installation instructions updated.
  • Includes first version of Cmajor Code, a new IDE for Windows written in Cmajor.
  • Instructions for setting up compiler development environment on Windows and compiling the compiler and tools from sources.
  • Occasionally you may get the following internal error when compiling the system library with the compiler with the C++ backend: "Error: class 'String<uchar>' not bound." I think it has something to do with concurrency in the compiler. A workaround is to compile sequentally by adding the "-st" option (this is much slower). That is: "cppcmc -st -u -v System.cms" for the debug mode and "cppcmc -st -u -v -c=release System.cms" for the release mode.

New in Cmajor 3.6.0 (Aug 14, 2020)

  • Bug fix: a character literal that contained a single non-ASCII Unicode letter, for example **'รถ'**, caused an error 'invalid UTF-8 sequence'.
  • Faster function entry and exit code for functions that can throw or contain a cleanup block.
  • Support for [fibers](https://slaakko.github.io/cmajor/system/content/System.Base/doc/ns_System.Threading.Fibers.html) added to system library.
  • [Process](https://slaakko.github.io/cmajor/system/content/System.Base/doc/class_Process_6FDB48284B5FF1E26D28956730DFB867F0A83291.html) 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](https://releases.llvm.org/download.html#10.0.0) 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](https://slaakko.github.io/cmajor/langref/langref.html#attributes) and the overload resolution process has been changed to take that attribute into account.

New in Cmajor 3.5.0 (May 8, 2020)

  • The previous 3.4.0 version was broken. It printed an error message about missing SOULNG_ROOT environment variable. Sorry for the inconvenience for those who downloaded it and tried to use it. In this version this has been fixed.
  • Default TextWriter output operators for Pair<T, U> and for the following containers: List<T>, Set<T, C>, Map<Key, Value, KeyCompare>, HashSet<T, H, C> and HashMap<K, T, H, C>. The TextWriter output operator for Pair<T, U> is defined as follows:
  • The default output operator for Pair<T, U> prints the first and second members of the pair inside parentheses separated by a comma.
  • The default output operator for List<T> prints the elements of the list inside brackets "[" and "]" and separated by commas.
  • The default output operator for Set<T> prints the elements of the set inside braces "{" and "}" and separated by commas.
  • The default output operator for Map<Key, Value, KeyCompare> prints the elements (pairs) of the map inside braces "{" and "}" and separated by commas.
  • The default output operator for HashSet<T, H, C> prints the elements of the hashset inside braces "{" and "}" and separated by commas.
  • The default output operator for HashMap<K, T, H, C> prints the elements (pairs) of the hashmap inside braces "{" and "}" and separated by commas.
  • If you want to define your own output operator for one of those container types, you can do so by deriving your own container type from that container type and define the output operator for that type. For example, deriving a class template from List<T> called MyList<T> and defining an output operator for it:

New in Cmajor 3.4.0 (May 4, 2020)

  • Bug fix: String(CharT c, long n) constructor constructed a string that was not null terminated causing possibly access violations. Fixed.
  • Bug fix: You could not have instantiated 'default' member functions in a class template. Fixed.
  • Bug fix: Instantiation of a destructor in a class template failed in certain circumstances yielding an access violation. Fixed.
  • Class ID changed to be a 128-bit product of primes (previously it was 64-bit product of primes). This was because 64 bits was not enough for representing all classes when System.Windows library was included.
  • You could not sort a list of noncopyable elements such as a list of unique pointers. Now you can sort also movable elements.
  • TextWriter and StringWriter
  • Includes the first version of the System.Windows library and support for Windows GUI applications. The structure of the System.Windows library is presented in this document
  • Spring software diagram designer tool.
  • Upgraded to LLVM 10.0.0

New in Cmajor 3.3.0 (Jan 30, 2020)

  • Bug fix: Path.MakeCanonical now converts a drive letter to upper case.
  • Bug fix: The following construct generated invalid code:
  • class A { }
  • class B : A { }
  • void main() { System.Collections.List<A> x; B b; x.Add(b); }
  • Now fixed.
  • Bug fix: The following construct generated invalid code:
  • class A { }
  • class B : A { }
  • void foo<T>(const T& x) { }
  • void main() { B b; foo<A>(b); }
  • Now fixed.
  • Bug fix: System.String<CharT>(CharT c) constructor was not explicit, so that a single character may be converted to a string in an unwanted context. Now fixed.
  • Global variables.
  • You can now create string literals and arrays of string literals as compile time constants, and obtain the length of a string literal as a compile time constant:
  • public const char foo = "foo"; public const long n = foo.Length(); public const char[] strings = [ "abc", "xyzzy", "foobar" ]; public const long m = strings[2].Length();
  • The same applies to wchar and uchar.
  • Unnamed namespaces like in C++. These two declarations with the same the name in two source files do not conflict each other because they are contained in an unnamed namespace that receives a unique name at compile time:
  • // alpha.cm:
  • namespace { const int[] foo = [1, 2, 3]; }
  • // beta.cm:
  • namespace { const int[] foo = [2, 3, 4]; }
  • The mangled name of an unnamed namespace will be "unnamed_ns_UNIQUE_HEX_STRING" where UNIQUE_HEX_STRING will be SHA-1 hash of a random UUID. The mangled names of the entities belonging to an unnamed namespace will be unique.
  • Visual Studio extension updated. It supports now Visual Studio 2019. The cmajor.vsix extension for VS 2019 is in the cmajor/vs/2019 directory.
  • System library changes:
  • System.Base library has some additions, for example a Timestamp class.
  • System.Json library has now serialization support for UUID's and timestamps.
  • APIs of the following libraries have changed because they have been regenerated from C++ code base using the 'cpp2cm' tool and they use new parsing libraries:
  • System.Dom
  • System.Net.Http
  • System.Text.RegularExpressions
  • System.Xml
  • New lexing, parsing and AST libraries System.Lex and System.Parsing and Cm.Ast added. Old System.Text.Parsing and System.Text.Parsing.CodeDom libraries are now gone, because the new libraries offer superset of their functionality and duplicate functionality would have made the system library much larger.
  • New 'cmupd' tool for converting projects and solutions that use old System APIs to use the new APIs. It's not perfect of course, so some manual changes may be needed.
  • All system library parsers and lexers are now generated using the 'soulcm' lexer/parser generator tool. Each generated lexer is a DFA that has a multimeg Unicode character class map array which is in compressed form inside an executable containing the lexer. First call to a constructor of some lexer takes a while (about half a second on my machine), because it expands the class map. Subsequent calls to the same lexer (to a constructor or other member function) are much faster (taking fraction of a millisecond), because the class map is already expanded.
  • New System.Windows library that is available only on Windows. It is still in preliminary stage.
  • System.cms solution file can now be found in the cmajor/system/platform/windows and cmajor/system/platform/linux directories for Windows and Linux respectively. The Windows version includes the new System.Windows library.
  • Upgraded to LLVM 9.0.0
  • Upgraded to Unicode 12.1.

New in Cmajor 2.4.0 (Sep 26, 2018)

  • In this release I have focused on improving compilation performance. The system library build for example used to take 1 min 36 secs on my machine. Now it takes only 46 seconds.
  • Shorter compilation time is achieved by:
  • Better handling of class templates. The old compiler used to instantiate a class template many times over and over again. Now it instantiates one specialization for given set of template arguments for each module.
  • Using a module cache. The compiler is now implemented as both a DLL and EXE. When building from IDE the DLL version is now used. It caches recently compiled or read modules (especially the 16 system library modules), so it speeds up the compilation.
  • Parallel compilation. The starting phase of compilation, source file parsing, and the ending phase of compilation, code generation, are now both done in parallel using as many threads as there are processors in the machine. Middle phases, type checking and bound tree generation are single threaded. I tried using locking but there seems to be too much contention in the middle compilation phases.
  • Unicode library change. Final 10 second speed improvement comes from reducing hash table instances for Unicode tables. There used to be separate hash table instances for each enumerated type - information pointer combination.
  • The class identifiers and UUIDs are now baked into the executable, so separate .cls files are not needed any more.
  • VMT header initialization is now done dynamically. The VMT header now constitutes of a 64-bit class identifier initially zero and 16-byte UUID that is initialized by the compiler. If in the is-expression or as-expression the class identifier is zero, the program calls the runtime library to initialize the 64-bit class identifier by looking it up from a hash table using the UUID as a key. This is done first time only: when the VMT header is initialized the is and as expressions use the initialized nonzero 64-bit class identifiers for class derivation computations.

New in Cmajor 2.3.0 (Sep 1, 2018)

  • Documentation generator program cmdoc has been rewritten. The system library documentation is now in the new format and contains hyperlinked sources.
  • Solved threading problems in multithreaded build.
  • Fixed a compiler bug that caused invalid code to be generated for compiler-generated special member functions when a class e.g. "Foo" has a member variable of type List. Thanks Olli!
  • Fixed an API bug in the System.Dom library: the DomText class used to have a constructor with a node name parameter. It constructed an empty text node. Now it has been changed to DomText(const String<uchar>& data_) constructor that constructs a text node with node name "text" and given data.
  • Fixed a compiler bug in JSON serialization. Due to this bug the JSON serialization didn't work at all in debug configuration in version 2.2.0. The bug caused invalid debug info to be generated by the compiler. Now fixed.
  • In version 2.2.0 you could not assign a function template to a delegate. Fixed.
  • Fixed a compiler bug in unary operator evaluation for class types. The unary operator could not be a nonmember function taking class type argument.
  • New compiler option --build-threads=N (-bt=N), [IDE: Build Options | Number of build threads]. Use N threads for building a solution. The default is to use 2 x C threads, where C is the number of cores in the machine.

New in Cmajor 2.2.0 (Jul 24, 2018)

  • Parallel build for mutually independent projects in the same solution. Build is executed using 2 x C threads, where C = number of cores in the machine.
  • Support for "xml:space=preserve" attribute in the System.Dom library.
  • Documentation improved. There's now a brief document about implementation of the Cmajor compiler.

New in Cmajor 2.1.0 (Mar 17, 2018)

  • Cmajor compiler and tools ported to Linux.
  • Conditional compilation symbol 'WINDOWS' defined on Windows and 'LINUX' defined on Linux platform.
  • Documentation improved. There's now installation instructions.

New in Cmajor 2.0.0 (Mar 15, 2018)

  • Large portion of the front-end rewritten. Now using LLVM as a library.
  • Documentation improved.
  • Compiler and library support for JSON serialization.
  • XML processing libraries:
  • System.Xml
  • System.Dom
  • System.XPath
  • Tools:
  • cmprof
  • cmunit
  • cmdoc

New in Cmajor 1.5.0.0 (Aug 24, 2016)

  • NEW:
  • Code completion in the editor (not perfect but mostly usable).
  • A document about implementation of the Cmajor compiler: Implementation.pdf in the doc subdirectory.
  • constexpr: a function declared constexpr is evaluated at compile time if given literal arguments of a basic type (int, uint, long, ulong, etc.). A constexpr function can call other constexpr functions. It can also be a function template. It can be called in contexts where a compile time constant is expected. When argument is not a literal it behaves as an ordinary function. constexpr is a new keyword.
  • Intrinsic type predicates.
  • Predicate constraints for concept checking.
  • System.Numerics.Multiprecision library has now BigFloat and BigRational classes.
  • Updated to LLVM version 3.8.1 and GCC version 5.4.0.
  • Bug fixes:
  • ++x, --x, x++ and x-- were broken when x was a reference to a basic type (int&, uint&, etc.). Now fixed.

New in Cmajor 1.4.0.0 (Mar 14, 2016)

  • Unicode support
  • interfaces much like in Java and C#

New in Cmajor 1.2.0.0 (Nov 5, 2015)

  • Is- and as-operators.
  • See Cmajor Programming Language Specification 3.3 (LanguageSpec.pdf)
  • for details. "as" is a new keyword.
  • New configurations:
  • 'profile' configuration for profiling Cmajor applications.
  • 'full' configuration does whole-program analysis
  • and optimizes is- and as-expressions and virtual function calls.
  • (see Cmajor Compiler User's Manual (UserManual.pdf) for details).
  • Profiling:
  • cmprof tool for creating profile reports and
  • cmprofview tool for inspecting them (Windows).
  • See Profiling Cmajor Applications (cmprof.pdf) for details.
  • IDE (Windows):
  • batch build.
  • Bug fixes:
  • type 'Cm.Ast.BoolNode' does not fulfill the requirements of concept Cm.Ast.AstNode because symbol 'Cm.Ast.Node' does not denote a type or a concept. Fixed.
  • List.Resize() required a Copyable type while Movable would suffice.
  • Ast.Reader and Ast.Writer treated specifiers as a 16-bit unit, while it was 32-bit.
  • Compiler did not warn if class contained a nonvirtual member function that hided the base class virtual function.
  • Now a warning is issued unless the function is explicitly declared as 'new'.
  • Compiler now enforces that a class containing abstract member functions must be declared abstract.
  • Invalid code was generated for the expression &x[i] where x is of array type.
  • Enumerated type assignment operation was overconstrained
  • Temporaries having nontrivial destructor that were constructed in condition expression of if, while or do statement were not destroyed correctly.
  • Jump to wrong target was generated for a continue statement inside a for statement.
  • Invoking a class delegate generated invalid code: first argument was always passed by reference although it would not be of a class type.
  • Sometimes the scope of primary template was not searched when binding a class template specialization yielding a "type symbol not found" error.
  • An error in qualified name lookup fixed.
  • Searching items from empty hashtable (or hashset or hashmap) caused division by zero thus terminating the program.
  • cmdb ate all arguments starting with '-' that were ment to program being debugged. This yielded out-of-sequence debugging error in Cmajor IDE.
  • compiler: Parsing assignment statement of the form "x[a + b] = 1;" failed.
  • compiler: Returning a reference to a static variable of primitive type from a static class generated invalid code.
  • compiler: If a class template contained an abstract function, the compiler tried to instantiate it yielding an internal error "body source not set".
  • debugger: Invalid type expression string for a derived template type generated.
  • IDE: parsing source files that contained ulong values that didn't fit in long caused an exception.

New in Cmajor 1.1.0.0 (Aug 10, 2015)

  • Mersenne Twister based pseudo random number generator added to system library (System.Rand() function and System.RandomShuffle() algorithm).
  • Single-dimensional arrays. o Rotate algorithm added to system library.
  • Linked lists and hash tables added to system library: (System.Collections.LinkedList, System.Collections.HashSet and System.Collections.HashMap classes.)
  • SHA-1, SHA-256 and SHA-512 added to system library: System.Security.Sha1 class, System.Security.GetSha1MessageDigest(const string& message) and System.Security.GetSha1FileDigest(const string& filePath) functions.
  • System.Security.Sha256 class, System.Security.GetSha256MessageDigest(const string& message) and System.Security.GetSha256FileDigest( const string& filePath) functions. System.Security.Sha512 class, System.Security.GetSha512MessageDigest(const string& message) and System.Security.GetSha512FileDigest( const string& filePath) functions. o
  • Debugger can now inspect contents of all:
  • containers in System.Collections namespace: System.Collections.List, System.Collections.ForwardList, System.Collections.LinkedList, System.Collections.Set, System.Collections.Map, System.Collections.HashSet and System.Collections.HashMap. o Debugger (cmdb) ported to Linux. o Bug fixes: - compiler: Parsing assignment statement of the form "x[a + b] = 1;" failed. - compiler: Returning a reference to a static variable of primitive type from a static class generated invalid code. - compiler: If a class template contained an abstract function, the compiler tried to instantiate it yielding an internal error "body source not set". - debugger: Invalid type expression string for a derived template type generated. - IDE: parsing source files that contained ulong values that didn't fit in long caused an exception. Note: Ubuntu Document Viewer seems to have a problem showing included PDF documentation. At least okular shows them beautifully.

New in Cmajor 1.0.0.0 (Jun 24, 2015)

  • Front end completely rewritten.
  • Library (.cml) and debug info files (.cdi & .cmdb) are now in binary format for faster loading.
  • Debugging improved (C backend only).
  • New tools:
  • Unit test engine (cmunit),
  • Parser generator (cmpg), library file
  • Dumper (cmldump), debug info file
  • Dumper (cdidump) and source line
  • Counter (slines).

New in Cmajor 0.9.1.0 (Sep 30, 2014)

  • Debug info for class templates went broken in 0.8.0 due to separate compilation changes.

New in Cmajor 0.9.0.0 (Sep 29, 2014)

  • Faster recompiles. If the interface of a source file (function names, parameter or return types, etc.) has not changed since previous build, recompiles only modified source file(s). If the interface has changed, must recompile also source files that depend on the modified file(s).
  • Threading library (System.Threading) implemented using POSIX threads. Thread, Mutex, RecursiveMutex, ConditionVariable and LockGuard classes.
  • Sockets library (System.Net.Sockets). TcpSocket class.
  • JSON data interchange format library (System.Text.Json).
  • 128-bit unsigned integer arithmetics implemented using 64-bit operations. uhuge class.
  • Nanosecond resolution time library. Duration and TimePoint classes. Now() function.
  • Documentation revised. o Fixed a bug not allowing multiple static class members having a non-trivial destructor in same compilation unit.
  • Fixed a bug in IDE not allowing project file paths that contain spaces.
  • Fixed a bug in compiler generated move constructors and move assignment operators. Compiler did not generate call to base class move constructor or move assignment.

New in Cmajor 0.8.0.0 (Sep 3, 2014)

  • Rvalue references and move semantics.
  • Disjunctive constraint expressions. (e.g. class C where T is Copyable or T is Movable).
  • Separate compilation. (= incremental compilation.) Template repository didn't work with separate compilation, so it is gone for good. Now templates are instantiated into each compilation unit that need them.
  • System extension libraries: - System.Text.Parsing library - System.Text.RegularExpressions library o Raw string literals (@"\foo".)
  • A function can be marked nothrow although it calls functions that can throw if it handles all exceptions (that is: catches System.Exception), and does not deliberately throw any exception from catch blocks.
  • Order dependency bug of delegate declaration in C backend fixed (cmc).
  • Fixed a bug in computation of full name of a namespace (cmc).
  • Fixed a bug in removing a library reference from project references (CmDevEnv).
  • Fixed a bug in template repository inline function files: type name should be fully qualified name (cmc).
  • Fixed a bug in using partially destroyed cached derived type object while parsing template or inline compile unit (cmc).
  • Invalid LLVM code was generated for character constants (cmc).
  • Sometimes inspect could not show members of a pointer to a class type yielding "" error. Fixed to fall back showing members of base class in that case (cmdb).
  • Debugger had problems with recursive function calls. Next, step and out commands (step over, step in and step out in IDE) rewritten (cmdb).
  • Fixed a bug in generation of C debug info for do-loop inside a function template (e.g. ToString()) (cmc).

New in Cmajor 0.7.0.0 (Jun 19, 2014)

  • C backend:
  • The compiler generates primitive C code comparable with LLVM intermediate code when compiling for the C backend.
  • Debugging improved:
  • Now you can debug directly from IDE in Windows, and using the Cmajor source level debugger (cmdb) in Windows by compiling for the C backend. You can also debug using GNU debugger (GDB) in Windows by compiling for the LLVM backend.
  • Source file text encoding changed in CmDevEnv from UTF-8 to windows-1252 (Western Europian), because Cmajor does not (at least yet) support Unicode.
  • Bug in comparing two Boolean expressions for equality or inequality in if, for, while or do statement conditions fixed.

New in Cmajor 0.6.2.0 (Mar 26, 2014)

  • Bug in landing pad code generation (exception handling) fixed

New in Cmajor 0.6.1.0 (Mar 11, 2014)

  • New project dialog fixed in IDE

New in Cmajor 0.6.0.0 (Feb 28, 2014)

  • compiler completely revised from version 0.5.0
  • now uses LLVM back-end
  • has IDE in Windows
  • has debugging support for gdb in Linux

New in Cmajor 0.5.0.0 Beta (Mar 13, 2013)

  • Fixed a number of bugs in front-end:
  • where-clauses did not work in classes that belong to other than System namespace.
  • The compiler incorrectly reported cyclic class relationships, when there was none
  • Now the compiler topological sorts the classes and type checks first classes that do not depend on other classes, and type checking of member functions other than constructors, destructor and assignment operators are deferred after the class is otherwise type checked. Hopefully this solves dependency problems.
  • When a class had a static member function returning an instance of the same class, the parser incorrectly interpreted it as static constructor.
  • Type of '*this' was not a reference.
  • Overload resolution logic improved.
  • Support for libraries improved.
  • Fixed empty branch target error when constructing a temporary.
  • Fixed empty branch target error in disjunction expressions (||).
  • Constructor function epilog were wrong.
  • Pointer member access operator (->) pointing to member variable did not generate right code.
  • Member access (.) could not be chained: a.b worked, but a.b.c did not.
  • switch statement did not accept char type expressions and case statements char constants.
  • Expression was not accepted as a value of an enumeration constant.
  • BitSet added to System Library.
  • Now the System library is reorganized into seven namespaces:
  • System
  • System.Collections
  • System.Concepts
  • System.Diagnostics
  • System.IO
  • System.Os
  • System.Support
  • Support for solution files (.cms) added.
  • Now -b builds only changed projects, -R forces a rebuild.
  • Added conversion member functions (e.g. operator int())

New in Cmajor 0.4.0.0 Beta (Feb 4, 2013)

  • Implemented 'concepts' for Cmajor.
  • Concepts:
  • produce better error messages for template instantiation failures
  • enable separate type checking of templates using 'archetype' classes built from concepts
  • enable concept-based overloading of functions to select the most efficient implementation of an algorithm at compile time
  • are now applied throughout the Cmajor System Library
  • Implemented various algorithms based on algorithms found in C++: Standard Template Library
  • Sort() and InsertionSort()
  • Distance() and Next()
  • UpperBound() and EqualRange()
  • Count() - ForEach()
  • Transform()
  • Equal() and LexicographicalCompare()
  • MinElement() and MaxElement()
  • Gcd()
  • Added function objects Plus, Negate, Minus, Multiplies, Divides and Remainder, and IdentityElement() functions.
  • Added BackInsertIterator, FrontInsertIterator and InsertIterator and corresponding functions BackInserter(), FrontInserter() and Inserter() that work with List, LinkedList (and any InsertableForwardContainer) using Copy().
  • Fixed:
  • List.Insert() was not working correctly when list happened to grow
  • HashMap.operator[]() did not compile