All the changes for Alta's primary (and currently only) backend, the C transpiler, will be kept in this file.
This project follows semantic versioning.
- Many, MANY changes that are TBD (to-be-documented)
- Output class typedef definitions before the actual structure definitions (to allow them to store pointers to themselves)
- Make sure to copy conditional expression outputs (by casting)
- Silence some compiler warnings for generated code about incompatible pointer casts for:
- Generator scope destruction when calling
_Alta_object_destroy
- Casting
_Alta_self
to_Alta_basic_class
in generator initializers - Casting from
_Alta_basic_class
to the appropriate class type in generator executions - Using
_Alta_object_destroy
when deleting a variable
- Generator scope destruction when calling
- Properly dereference reference types generated by
to
casts - Properly reference reference types when passing them into operator methods
- Dereference the iterator instance used for iterative ranged-for loops if necessary
- Properly dereference references types when doing special fetches
- Insert default return values that abort (in case the user provides no return value) for operator method definitions
- Register symbols for
from
andto
casts and operator methods
void
type support added- New
CTranspiler.vararg
attribute for parameters- This attribute lets Talta know that the annotated parameter is a C-style vararg parameter and that it should format arguments for this parameter accordingly
- This is used, for example, in the declaration for
printf
:declare function printf(string: ptr byte,
@CTranspiler.vararg
data: any...): int
- This tells Alta that instead of passing arguments to printf like this:
printf("some %d string", (any[]){ 3 })
- Which, by the way, is invalid C code because of the
any
type
- ...it should pass them like this:
printf("some %d string", 3)
- Attributes are now executed at detail time
- Note: this change was made in order to comply with the corresponding change in AltaCore
CTranspiler.include
has been updated accordingly, and the new attribute (CTranspiler.vararg
) also implements this behavior
- We now have a policy of changelog modularization, and this is in effect for the various subprojects
- In other words, refer to the changelogs of updated dependencies for additional changes
- CI integration has been added for automated builds (and automated testing once tests are added)
- Build artificats are now put into their own folders in the build directory:
bin
for executables andlib
for libraries
- AltaCore v0.9.0
- Ceetah v0.4.1
- General attribute support
CTranspiler
attribute domain- BTW,
[AttributeString]
=const ptr const byte
, which is a string literal - Currently, it contains the following attributes:
include(header: [AttributeString])
= Instructs the C transpiler to include the specifiedheader
in the current module's header output
- BTW,
- AltaCore v0.8.0
- String literal support
- AltaCore v0.7.0
- Namespace support
- AltaCore v0.6.0
- Package versions are now included as part of mangled module names
- Hoisted types support
- Currently only necessary for function-pointer types
- Function calls can now be transpiled!
- AltaCore v0.5.1
- Function-pointer type support
- AltaCore v0.4.0
- Ceetah v0.3.0
- Mangle function parameter names
- Previously, they were left unmangled
- AltaCore v0.3.1
- AltaCore v0.3.0
- Boolean transpilation
- Both boolean literals and the boolean type
- Binary operations (
+
,-
,*
,/
) - Module importation!
- Full support for cherry-pick imports, theoretical support for alias imports
- AltaCore v0.2.0
- Ceetah v0.2.0
- Assignment expressions are here!
- We now use
shared_ptr
s in some places because Ceetah and AltaCore have switched to using them instead of raw pointers- We didn't completely switch because we can use raw pointers in places where we don't allocate new objects or keep pointers to objects (although we could fully switch if we wanted to)
- Ceetah v0.1.0
- AltaCore v0.1.0
- Function and variable name mangling
- Mangled function names include parameter types so that function overloading can be easily implemented in the future without much fuss on the backend
return
support- Function definition support
- Automatic function declaration in headers
- Alta type to C type translation
- Alta's
byte
is basically equivalent to C'schar
, andint
is the same for both const
andptr
translation, as wellref
s are translted to pointers just likeptr
- Alta's
- Variable definition and retrieval support
- Theoretical accessor support
- Theoretical because accessors aren't a thing in Alta yet, so we have no way of testing it
- Theoretically supported, though, because it should work as-is when accessors are added to Alta
- Integer literal translation