Christoffer Lerno
4d4bbbdebc
Parses attribute defines. Removal of incremental array parsing. Labels in macros should now work correctly. Volatile and attribute are no longer keywords. Checked a few todos. On test failure, return -1
2021-11-18 20:36:45 +01:00
Christoffer Lerno
7b04e7cf85
Added experimental "scoping" and fixed (simple) debug symbols
2021-11-17 23:56:09 +01:00
Christoffer Lerno
7bd76c973c
Placeholders for builtins. Updated character literal parsing, supporting 1-16 characters. More test cases.
2021-11-12 10:13:15 +01:00
Christoffer Lerno
4f09b0c351
Bitstruct implementation.
2021-11-05 11:59:30 +01:00
Christoffer Lerno
29e7af843a
Remove old try-catch. Top down promotion for binary etc. Prevent non-simple widening. Introducing wildcard failable. Move LLVM GEP usage. Regcall test and fix. Optimized slice assign.
2021-10-26 18:40:41 +02:00
Christoffer Lerno
9942be54dc
More optimized memclear. Added helper function on array gep.
2021-10-21 23:37:14 +02:00
Christoffer Lerno
4ca7ba048b
Updated to use ?, ?? and !! instead of !!, else and "else $unreachable"
2021-10-20 23:27:13 +02:00
Christoffer Lerno
b4df56db54
Removed original_type, pure, removed bigint, added i128 type, lots of fixes to $Foo, reassigning ct type, catch/macro, "!", removed type inference.
2021-10-19 10:39:02 +02:00
Christoffer Lerno
e4c7dde30b
Fix of shadowing bug. Allow pointer and subarrays to be constant initialized. Compile time values may now pass around anything considered compile time constant. It's possible to index into an initializer list at compile time. (Some work still remains on this)
2021-09-18 01:13:42 +02:00
Christoffer Lerno
29b3535460
Added fannkuch example.
2021-09-10 09:20:27 +02:00
Christoffer Lerno
73ce1017e8
Support LLVM 13+
2021-08-31 22:39:01 +02:00
Christoffer Lerno
63cff727b2
Removed use of ?:
2021-08-31 22:24:30 +02:00
Christoffer Lerno
8731634f4d
Unified constants (enum, error types, typeid). Removed EXPR_MEMBER_ACCESS. Added if-catch-switch. switch-case can handle non constant values. Inlining removed on O0. Added subarray comparison allowing string cases.
2021-08-27 19:13:32 +02:00
Christoffer Lerno
1751e7ece5
Remove old try/catch. Remove incorrect flattening. Basic asm. Start work on if-catch-switch.
2021-08-24 12:41:20 +02:00
Christoffer Lerno
f180a0d44a
Change anyerror { i64, i64 } -> i64. Cleaned up platform data and max tls / vector align. Initial work on bitstruct (just parsing). Updated try / catch semantics.
2021-08-18 17:31:09 +02:00
Christoffer Lerno
bc4ed2b213
Use assert functions on various platforms.
2021-08-16 16:43:53 +02:00
Christoffer Lerno
da76777ee4
Fixes to aarch64 float struct return. Missing byval and align on calls. This *breaks* try-catch.
2021-08-11 19:17:45 +02:00
Christoffer Lerno
f64c35214e
Change error -> anyerr / errtype
2021-07-18 14:11:39 +02:00
Christoffer Lerno
069dbe8238
Make it possible for globals and static variables to have failables.
2021-07-18 12:39:08 +02:00
Christoffer Lerno
22fb7b4bcc
Fix bug in (x && y && z) codegen.
2021-07-16 11:18:33 +02:00
Christoffer Lerno
a5ce7c47ba
Adding "require" precondition. Corrects inferred arrays and fixes so that it uses [*] everywhere. Distict type will now allow methods to be added to it. Added $alignof and $sizeof.
2021-07-09 23:57:35 +02:00
Christoffer Lerno
4ed2596164
Removes "yield"
2021-06-28 00:19:46 +02:00
Christoffer Lerno
038ed7f9d5
Macro methods added.
2021-06-26 17:42:45 +02:00
Christoffer Lerno
5a6cdd25ef
Introduced ${...} syntax for constants. Fixed issue where constants were not correctly handled for macros. /* */ comments are nesting. Added LINE, FUNC, FILE defines. Corrected shallow resolution of subarrays. Added int defines. Removed Vararray.
2021-06-24 00:59:25 +02:00
Christoffer Lerno
dafe0e6fb6
Updated scope code and variable tracking. Added trailing body macros.
2021-06-10 15:06:12 +02:00
Christoffer Lerno
dd8b850544
Support for "static" keyword.
2021-05-30 16:30:16 +02:00
Christoffer Lerno
3c4233f4d4
Fixes to failable return from expression and macro blocks. Allow division by float zero. Correct type promotion from compile time float.
2021-05-17 21:17:46 +02:00
Christoffer Lerno
f7919edb35
Split modules into generic and normal modules on the top level. Prepare for static. Change local -> static as keyword. Add private include. Remove old sub module search.
2021-05-09 19:26:05 +02:00
Christoffer Lerno
c6f671a6ca
A bit more global...
2021-04-29 22:44:00 +02:00
Christoffer Lerno
4210f1ccb2
Some work on vararray. Fix span on post unary. Updated error recovery. Updated return analysis to handle void functions. "while" now disallows error prone next line statement. Working on auto linking. Failable load optimized. Optimization and corrections for call returns + documentation.
2021-04-05 23:34:40 +02: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
7fc12192f4
Added "distinct" types.
2021-01-24 21:10:57 +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
6a5a0f2b94
Moved ABI lowering from codegen to semantic analysis. Fixes for failables in the ABI and the codegen.
2020-12-04 19:19:57 +01:00
Christoffer Lerno
31e9ec3d52
Optimize load of return & some parameter types. Fix issue with non-exapanding coerce. Add support for specific arch_os in tests.
2020-11-24 20:31:18 +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
4222f2731e
&&temp operator. Macro evaluation.
2020-10-16 18:11:30 +02: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
fb937156fe
Work on debug + fix of failable bug.
2020-09-02 10:18:30 +02:00
Christoffer Lerno
31d2c15dba
Adding $unreachable
2020-08-02 00:06:43 +02:00
Christoffer Lerno
009ccfd730
Adding assert.
2020-08-01 20:53:47 +02:00
Christoffer Lerno
380c1c8ab4
Support for $assert. Also change order of checking global declarations from parsing to semantic analysis.
2020-07-30 17:44:41 +02:00
Christoffer Lerno
ce68bda86c
Corrected ptr->bool conversion. Avoid checking function body if function is invalid. Switch defer test cases. Slices with test cases.
2020-07-28 17:37:48 +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
34c7df9ee1
Fixed multi line error reporting for tokens. Handle infinite empty for loops. Changed cast syntax to "cast(foo as Foo)". Completed enum casts. Added more tests.
2020-07-25 21:54:32 +02:00
Christoffer Lerno
b4c661eaad
Pre lexing and mmap allocation together with exact exits.
2020-07-15 15:42:54 +02:00
Christoffer Lerno
dc86c21210
New failable based error handling. Labelled break/continue/next.
2020-07-09 13:07:08 +02:00
Christoffer Lerno
b2bfd87a06
Started work on ranges. Added weak/noreturn/inline/cname/stdcall/section/alignment attributes. Some work on subarrays. Fixes to throws. Function pointers work.
2020-05-20 14:22:22 +02:00