Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Releases: l1mey112/stas

0.2.0 Stable

02 Dec 13:01
Compare
Choose a tag to compare

Release Changelog Complete Post - stas 0.2.0

Changelog

This is the first stable release of stas. FreeBSD and Linux are supported in their entirety. The new include system, conditional compilation, and symlink sub command allow stas to be used outside of the supporting repository directory.

The language and compiler have become stable and user friendly, and the development of stas will slow down from this point onward.

Thank you for sticking around!

  • Native FreeBSD support.
  • FreeBSD is now a cross compilation target specified using the -os switch.
  • Compile time conditional compilation using the comptime keyword.
  • -os freebsd declares TARGET_FREEBSD and -os linux declares TARGET_LINUX
  • ?def keyword is used to check if a constant variable is declared.
  • All POSIX OS specific system calls and definitions are declared seamlessly using conditional compilation.
  • Basic C FFI interface using the cextern keyword. C FFI is limited to freestanding libraries.
  • -c switch to allow creation of object code only, for use with linking to C programs.
  • Inline assembly.
  • syscall0 to syscall6 and _breakpoint keywords have been removed from stas, now implemented with inline assembly.
  • All command line argument switches have been standardised to use only one dash. For example, -dump-tok and -trace-calls.
  • -unsafe compiler switch, currently only strips assertions.
  • Pure functions using the const qualifier before a function declaration. Const functions can be used inside constant expressions and be evaluated at compile time.
  • Add -comptime-depth switch for limiting recursion when evaluating compile time constant functions, default is 12.
  • Better inclusion/module system.
  • Files included with the include 'file.stas' will be searched for in the current directory of the current stas file.
  • Files included with the include <file.stas> form will be searched for in the stas library folder, next to the stas compiler executable, located in lib/.
  • ./stas symlink sub command. Creates a symbolic link to the stas executable in /usr/local/bin to allow it to be invoked from anywhere.
  • Files may only be included once. Similar to #pragma once.
  • Wyrand PRNG is used for rand. A hash library is included to store Wyrand hash functions.
  • OS indepentent way to create localhost POSIX TCP sockets in the standard library.
  • Support for syscall errno values and handling using the errno? function.
  • Stack based allocation buffer now uses a static buffer.
  • Add functions inside the term.stas library for colouring text.
  • Implementation many string manipulation functions inside the standard library.
  • Many OS independent functions for interfacing with child processes, files, file paths, file descriptors and more have been implemented.
  • execute_child? get_executable_path find_abs_path_of_executable? and normalise_path are among the many OS independent functions implemented.
  • Updated old APIs in the standard library to use the fn optional? semantics.
  • Outdated examples have been updated to use OS independent APIs.
  • Many examples and tests cases have been added to the stas repository. Try some!
  • Assembly files generated by the stas backend will reside in /tmp/stas as to not clog up your working directory.
  • Bugfix: the linker is properly called when generating object files.
  • Bugfix: noreturn based parser fixes.
  • Plus many undocumented bugfixes trailing along with commits.

0.1.3

18 Nov 16:30
Compare
Choose a tag to compare

Release Changelog Complete Post - stas 0.1.3

Changelog

  • Complete parser rewrite and cleanup. This allows for many improvements.
  • Constant variables can now be declared inside functions. They follow the same scoping rules as normal variables.
  • Variable declarations can now have a constant expression to denote it's size in memory.
  • Static assertions at the top level.
  • New sizeof keyword for use with automatic and buffer variables. It also can be used inside constant expressions.
  • Improved error message for duplicate indentifiers.
  • Constant folding is back in code generation. Was present in the V stas compiler, missing till now.
  • The noeval function attribute to disable the constant folding behavior.
  • The layout in memory of auto variables has been reversed to be in line with what would be assumed.
  • String length is excluded from the push_str instruction, with it being pushed separately.
  • NASM bootstrap files have been included in the bootstrap/ folder.
  • --trace-calls compiler switch. The compiled executable will have function calls traced at runtime.
  • Inline functions can now use the ret keyword.
  • Test runner written in V. The accompanying file, make_bootstrap.sh, calls test runner.
  • continue and break keywords both raise unreachable code errors.
  • Bugfix: fix allocated registers leaking when performing operations with automatic variables.

0.1.2: Go try stas out!

11 Nov 18:05
Compare
Choose a tag to compare

Release Changelog Complete Post - stas 0.1.2

Changelog

  • New envp keyword for accessing environment variables. A getenv function is provided.
  • Now portable to all Linux distributions due to proper PATH enviroment variable being parsed and read.
  • Attempts to merge duplicate string literals. Similar to -fmerge-constants in GCC.
  • Rich error system showing and underlining the exact token inside the file that caused the error.
  • The linker is now called when generating object files.
  • Short form function declarations for functions that accept and return zero values.
  • Function attributes. noreturn, inline and noinline are supported.
  • Simple allocation buffer in the standard library.
  • Overflow checks for signed and unsigned integers.
  • Bugfix: multiple fixes for unreachable scope propagation in the parser.
  • Bugfix: scanner fixes for multi line character and string literals.
  • Bugfix: stack shuffling operations now return correct backtraces in a parser error.
  • Bugfix: fix early return scopes that caused errors with complex blocks.
  • Bugfix: add error for unhandled scope that a complex block requires.
  • Bugfix: if and else cases with an early return now are checked correctly in the parser.

0.1.1

09 Nov 14:12
Compare
Choose a tag to compare

Release Changelog Complete Post - stas 0.1.1

Changelog

  • Visual Studio Code support for stas with the stas-vscode extension. The extension is published at the open-vsx registry, download a copy there. If you are using vscodium, search for it in your extensions tab!
  • Support for syntax highlighting in the Hugo static site generator, although you may need to wait for a new release from them (build it from source for the impatient).
  • New addr keyword. Used to get addresses of variables declared with the auto keyword.
  • Single character literals denoted with backticks. `A`, `\n`, `0`
  • Unreachable code declared after the use of the ret keyword is now checked for and is a compiler error.
  • Use the -r switch to execute the file after compilation, arguments after this switch will ignored and passed to the program.
  • Scanner and token improvements, to make way for a rich error reporting system in a later release.
  • Stack backtraces showing exactly what value was pushed onto the stack and where on a compiler error.
  • Pretty printing of string literals in generated assembly.
  • NASM backend, generates object files and annotated assembly with exported labels with the -g switch.
  • Many improvements to codegen, generated code takes up a smaller footprint.
  • --dump-tok and --dump-ir switches for dumping the compiler's inner data structures.
  • Tail recursion optimisation.
  • Code generation when inlining function bodies has been improved greatly.
  • -v or --verbose enables verbose mode. Compiler passes will be timed and lots of information will be dumped.
  • Negative numbers (about time). Signed comparision has been possible with <s, >s, <=s, >=s.
  • Bugfix: stack checks on branches with early returns with the ret keyword are no longer implemented with a nasty hack.
  • Bugfix: consecutive inline functions with branches no longer have their labels conflict.
  • Bugfix: now waits for the backend to finish and handles it's exit code.
  • Bugfix: now passes a proper argv[0] to child processes.

Note: It is not recommended that you build stas and experiment with it in this state. Executable paths are hard coded, this will be cleaned up in the 0.1.2 release.

0.1.0: stas can compile itself!

01 Nov 09:30
Compare
Choose a tag to compare

As such, there is no need for the V compiler anymore. It is tucked away in a-different-branch.

Thanks for observing me on this journey.