Christoffer Lerno
97ac957cb7
"Public by default"
2021-05-30 16:30:16 +02:00
Christoffer Lerno
892c7e8874
Changed generic modules to internal templates.
2021-05-27 08:30:02 +02:00
Christoffer Lerno
1f676c135c
Removed func and rewrote typedefs.
2021-05-23 13:16:48 +02:00
Christoffer Lerno
460c0d04d7
Generic modules.
2021-05-12 17:25:59 +02:00
Christoffer Lerno
9b86b00834
Compilation is now done with each module compiled together.
2021-05-11 14:58:21 +02:00
Christoffer Lerno
0e076234ca
Set stdlib library for testing and profit. Fix bugs when using void* to step. Make constants private linkage. Compare pointers using unsigned comparison without conversion. Use manual ptrdiff code. Fix issue returning "void!". Unify pointers when doing Foo* - void*. Allow comparing for example void* < Foo*
2021-04-29 03:12:25 +02:00
Christoffer Lerno
07595df412
Change cast and int rules: constant folding always starts. Promotion using left side on all operands to bit width. Implicit narrowing to max size on right hand side.
2021-03-17 18:25:00 +01:00
Christoffer Lerno
4f064e7da2
Initial checkin of docs parsing. char is now unsigned, and signed char is "ichar".
2021-01-29 18:46:17 +01:00
Christoffer Lerno
45c4f205bb
More correct alignment. Foreach added. Removed dynamic designated array initialization. Use 16 byte alignment on arrays >= 16 for x64
2021-01-27 00:14:16 +01:00
Christoffer Lerno
3a24fbfa6d
Moved examples around. Updated (and corrected) const initialization. Removed "in" keyword. Added "member" attribute domain. Many fixes in struct padding and alignment and tests. Fixed extern global.
2021-01-24 00:55:09 +01:00
Christoffer Lerno
4da36dfed9
Optimized and improved aggregate initialization. Compound literal updated to Foo({ 1, 2 })-style. ".name = x" style initialization for named arguments and designated initializers. Added runtime messages on panics. subarrays convert implictly to pointers. len/len() functions. Fix taking slice of pointer. Vararg fixes
...
Consistent length typedef.
First stab at initializers.
Change compound literal to Foo({ 1, 2 }) style.
Fixed up some tests.
Optimize the zero struct codegen.
Optimize union empty initializer.
Fix issues with unions. Added alignment to globals. Added some union tests.
Use puts to emit error messages during runtime. Fixup of int[] -> int* style conversions.
Fix implicit conversion of int[3]* -> int*
Fix int[] size. Use () to invoke the length of a subarray. Fix taking a slice of a pointer. Limit the number of members in a struct.
Fixes to vararg using debug and cleanups to slices.
2020-12-22 21:55:52 +01:00
Christoffer Lerno
3c15e495dd
Add macro arguments &foo $foo #foo.
...
C ABI compatibility aarch64, win64, x86, x64
Added debug info
2020-11-22 22:16:19 +01:00
Christoffer Lerno
77ccfc1f7c
Added CT_SWITCH parsing in top level. Nil changed to null. Parsing more in line with grammar. Parse type as expressions. Zero init by default for locals. Corrected bool/fp conversion. Add memcpy pass to fix issue with value load/stores.
2020-09-21 11:38:12 +02:00
Christoffer Lerno
7b7abf5d4a
Fixes to defer, allowing break in defer (instead of continue). Fixed bug in PTR->BOOL cast. Extended test system to support multi files and codegen.
2020-07-27 11:40:45 +02:00
Christoffer Lerno
75dd644e52
Corrected parsing for incremental arrays. Correctly handle failed declarations. More tests.
2020-07-25 21:54:32 +02:00
Christoffer Lerno
bd68380f06
Fixes to compile time integer conversions to to unsigned values, detecting negative values. Require cast on int -> pointer cast. Fixed check on array underflow. More tests.
2020-07-25 02:43:06 +02:00
Christoffer Lerno
ed01616f1e
Changed how structs/unions are parsed so that recovery becomes more robust. Allow for more complex error data. Fixed recursive structs/unions. Corrected prefix precedence rules. Begin work on checking initializer constant-ness. Fixed error on failed arithmetic promotion. Added checks on constant overflow of sub/add/mult. Allow "current_module_name::x" to refer to globals. Added many tests.
2020-07-23 18:04:18 +02:00