C34A
5dea48101f
MSVC compatibility
2021-10-19 13:04:17 +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
0a4f35154a
Addeded some hash functions. Fix of visibility resolution for macros. std lib is now loaded from a directory.
2021-09-22 10:27:10 +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
bcda6d71c9
AST printout removed. Split initializer types. Const list functionality.
2021-09-10 15:47:23 +02:00
Christoffer Lerno
2ff5acc2a1
Allow constant strings as default values.
2021-08-31 13:03:12 +02:00
Christoffer Lerno
6e386538dc
Fixed bool->bool casts. Fixed ternary with boolean "legs". Removed some superfluous code.
2021-08-28 13:39:15 +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
f7803fd192
Add @naked attribute
2021-08-22 23:54:13 +02:00
Christoffer Lerno
64f20da080
Better handling of void/void*, unified local/global var analysis. Native base64 / hex data array (needs more checks)
2021-08-20 10:29:17 +02:00
Christoffer Lerno
232632b74e
Add section with (incomplete) checking for mach-o
2021-08-18 22:28:43 +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
490dd65664
Add attributes to call site. @inline, @noinline to calls #250
2021-08-03 12:02:36 +02:00
Christoffer Lerno
ec612eea67
Added some explicit casts. Added sret at call site.
2021-07-29 16:42:20 +02:00
Christoffer Lerno
c4627eb9d2
Removed "deprecated" as attribute.
2021-07-24 15:56:38 +02:00
Christoffer Lerno
c4aa366592
Use heuristic to determine the type to convert to for compile time types. Added parsing for generic
2021-07-22 18:45:39 +02:00
Christoffer Lerno
198e3c369c
Extension methods added. Some initial work on virtual.
2021-07-21 19:28:02 +02:00
Christoffer Lerno
d578b249c2
Updated attributes and some cleaning of ABI info.
2021-07-17 18:09:31 +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
12ffeeaad7
Fixes to the cname patch.
2021-06-30 22:41:34 +02:00
Christoffer Lerno
e530869aeb
Change "cname" to "extname"
2021-06-30 22:36:57 +02:00
Christoffer Lerno
1d0c2ab2b0
Unifies function and macro argument parsing. Removed generic and attribute parsing. Prepare removal of yield.
2021-06-27 23:09:37 +02:00
Christoffer Lerno
038ed7f9d5
Macro methods added.
2021-06-26 17:42:45 +02:00
Christoffer Lerno
9572c4afc9
Top level $if now uses $if: / $endif; Fix of boolean globals. Fix of $else: clause. Fix of $assert inside of $if
2021-06-24 18:01:59 +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
cf58da4a3c
Remove the complex type.
2021-05-30 21:44:44 +02:00
Christoffer Lerno
dd8b850544
Support for "static" keyword.
2021-05-30 16:30:16 +02:00
Christoffer Lerno
0605a8c500
Introduce "private" keyword and private modules / private import.
2021-05-30 16:30:16 +02:00
Christoffer Lerno
d9566ef894
Generic modules are back, slightly different.
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
97f7d1288e
Function type updated inside of type code.
2021-05-24 00:53:35 +02:00
Christoffer Lerno
dbb067a005
Cleanup.
2021-05-23 21:32:32 +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
15a65d0c97
Allow use of pthreads to parallelize codegen.
2021-05-09 19:26:05 +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
3bd638bf77
Fixes to debug info in function pointer declarations. Incorrect x64 ABI code for structs by val. Change "Compiler" to "GlobalContext" storage of all types inside. Call debug symbol correct.
2021-05-02 16:42:28 +02:00
Christoffer Lerno
01f7343945
Parsing of interface. Fix to unpacking arraypointers. Fix accidental unsplat.
2021-04-29 03:12:25 +02:00
Christoffer Lerno
21d4ecf9b4
Splat/unsplat/typed varargs
2021-04-28 14:33:26 +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
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
1d50beb330
Work on constant string and inferred array sizes.
2021-02-03 23:01:37 +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
26d25e3f74
Recursive references between globals are now correctly handled.
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