Commit Graph

37 Commits

Author SHA1 Message Date
Christoffer Lerno
73619817ba Update panic function and early work on tests. Optimize ABI lowering. 2022-11-03 19:38:34 +01:00
Christoffer Lerno
c5b9b6c761 Single module compilation. 2022-09-30 13:56:08 +02:00
Christoffer Lerno
5cacc41925 Add global builder / updated codegen. 2022-08-12 01:50:48 +02:00
Christoffer Lerno
b1c78edc5e Bump version to 0.3.13. Set codeview flag for Windows debug. 2022-08-11 22:31:26 +02:00
Christoffer Lerno
1bf3bb51bf Add asm output option using --emit-asm. 2022-08-10 11:41:40 +02:00
Christoffer Lerno
cdff5c3e26 Dev (#500)
Single code path for kind/inner/len/sizeof on type and typeid. Fix of #493. Bump to 0.2.24. Remove ´func´ deprecated keyword. Unify builtin access. Enum and fault name reflection.
2022-07-26 00:56:59 +02:00
Christoffer Lerno
4afec24434 More advanced introspection. 2022-07-20 12:22:03 +02:00
Christoffer Lerno
c8a614e43f LLVM 15 compatibility fixes (#465)
More variant code. Fixes to typekind. Fixes to macro with failable returns. Remove use of LLVMConstInsert etc. Version 0.2.8
2022-07-06 16:41:52 +02:00
Christoffer Lerno
b1d83e2ccd Auto-import std::core. Fix module assignment of declarations. Introspection improvements. Deref null error panics in safe mode. Support for LLVM 15 2022-06-29 21:57:35 +02:00
Christoffer Lerno
890c4bc435 0.2.0. Build system improvements. Target changes x64-windows -> windows-x64, x64-darwin -> macos-x64. Improved mac support. LLD linking for Mac, Windows, Linux. Cross linking for Mac, Windows. Clean up string use. Fix of debug handling of multiple compilation units per module. MSVC CI 2022-04-26 13:20:33 +02:00
Christoffer Lerno
6789fab93c Panic function that may be redefined. Trap and stacktrace builtins. Bug using builtin fixed. Fixes to using $$LINE and friends. Produces a stacktrace on error. 2022-03-18 12:43:17 +01:00
Christoffer Lerno
7226bff6ea Use JSON, unifying settings. 2022-02-15 18:53:54 +01:00
Christoffer Lerno
a176ae353b Refactored function pointer. 2022-01-07 19:13:07 +01:00
Christoffer Lerno
1d5ff71b21 Rearchitecture contexts. Fixing macro resulution, hash arguments and defers. 2022-01-04 20:45:58 +01:00
Christoffer Lerno
5cbc619f13 .obj / .exe default suffix now depends on target, not compiler platform. 2021-12-19 13:11:43 +01:00
Christoffer Lerno
05c9b7cb33 More explicit conversion and width changes to some field. 2021-11-21 23:37:54 +01:00
C34A
5dea48101f MSVC compatibility 2021-10-19 13:04:17 +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
gdm85
33fc08542e Add support of builds for Ubuntu 18/20 through Docker 2021-06-15 09:57:34 +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
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
c6f671a6ca A bit more global... 2021-04-29 22:44:00 +02:00
Christoffer Lerno
954a90dae3 Fix of arch target. Experimental linker support. 2021-04-09 18:47:41 +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
564c93700e Fixed bug that would intermittently arise from multiple contexts having the same pointer (should preferably be fixed in a different way later). Free all the arenas before codegen. Change "next" to "nextcase". Allow missing function parameters. Add "inline" structs. 2021-01-03 00:15:51 +01:00
Christoffer Lerno
025c5e6e8a Added some more PIE/PIC code. Not quite correct yet unfortunately. 2020-11-28 22:17:32 +01:00
Christoffer Lerno
162bb9dac8 Add a new "target" command line option to set the target without the need for a full target triple. Add debug command line options. Fix bug with coerce for x64 SysV ABI. 2020-11-23 23:24:27 +01:00
Christoffer Lerno
f2c394dc96 Compatibility with both LLVM 10 and 11 2020-11-23 17:40:13 +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
89ce6064e1 Started work on cleaning up dumping the AST. Lots still to do but... Split try expr further and fixed emit of statement. 2020-05-06 22:23:53 +02:00
Christoffer Lerno
93bd0fb337 Jumping on else added. 2020-05-05 11:28:49 +02:00
Christoffer Lerno
78aa49cc0e Work on getting typeof up and running. Try-else now works. 2020-04-22 20:19:55 +02:00
Christoffer Lerno
ebbea2ac42 Lookahead cleanup. Start work on throws. Fix try expressions. Beginning work on initializer. Some fixes on LLVM types. Moving more target info into C3. Moving alignment into types Introducing a meta type (incomplete). Start work on macros. Splitting '@' from macro name. 2020-03-29 17:39:33 +02:00
Christoffer Lerno
cdc1bfe267 Start using UnaryOp/PostUnaryOp ++/-- now works post/pre and also on pointers. Fix ++/-- on any number. Added examples. c3c now compiles files by default. Extended symbol resolution. Addition of 'extern'. Multi-level paths. 2020-01-16 21:28:13 +01:00
Christoffer Lerno
aee3f99ea7 Added some codegen & .o generation and (hopefully correct) optimization. Hacked strings in together with i++/i--. Fixed up parsing of strings supporting \u \U \x => UTF8 2019-11-27 16:16:44 +01:00
Christoffer Lerno
990918b609 LLVM Codegen 2019-11-20 17:09:25 +01:00