Christoffer Lerno
31d151aa30
Added MSVC download script to prebuilts. Implicitly use msvc_sdk if available. Bump version to 0.3.17
2022-08-14 23:42:18 +02:00
Christoffer Lerno
aa337049ea
Fix -l and -L build options.
2022-08-10 22:21:29 +02:00
Christoffer Lerno
2f5d51c92c
Attempt to add more native file handling for MSVC ( #459 )
...
* Fix clean and update MSVC function calls.
2022-06-04 21:32: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
ecdcd8f959
0.1.1: Add -L and -l parameters, also incomplete support of .c3i files.
2022-04-15 18:52:36 +02:00
Christoffer Lerno
3799dbb082
Use declid instead of decl* in the decltable.
2022-03-12 14:45:54 +01:00
Christoffer Lerno
4f4bc80953
Symtab has a new hash map type. New, small, sourcespan, external symbols simplified. Updated docs.
2022-03-01 10:32:52 +01:00
Christoffer Lerno
7226bff6ea
Use JSON, unifying settings.
2022-02-15 18:53:54 +01:00
Christoffer Lerno
8f2ae41ea5
Removed allocation of AbiType. Separate string arena.
2022-01-03 12:19:46 +01:00
Christoffer Lerno
fd1353f0f1
Removed scratch hash table use for parameter checks. Faster symtab setup. Scrubbed the lexer somewhat without changing behaviour.
2022-01-01 22:08:07 +01:00
Christoffer Lerno
bbeed12600
Removing unused hash table functions. Removal of macro DECL_NEW. Smaller initial vector size. Remove unnecessary memclear.
2021-12-30 16:41:00 +01:00
Christoffer Lerno
52cc4f8ba5
Move compiler plain malloc calls to function to make them easy to track.
2021-12-19 23:11:32 +01:00
Christoffer Lerno
8aa00b015b
Add support from compiling c from c3c.
2021-12-09 23:38:57 +01:00
Christoffer Lerno
379a66a14b
Add switch(variant)
2021-12-09 22:52:48 +01:00
Christoffer Lerno
bc2d789c2e
Filter \r before lexing.
2021-12-03 16:43:37 +01:00
Christoffer Lerno
1bb9c2d249
Allow the compiler to be called multiple times (while leaking)
2021-12-02 22:50:38 +01:00
Christoffer Lerno
05c9b7cb33
More explicit conversion and width changes to some field.
2021-11-21 23:37:54 +01:00
Christoffer Lerno
bb39cf20c0
Removal of #pragma mark, explicit conversions.
2021-11-21 21:43:06 +01:00
Christoffer Lerno
4f09b0c351
Bitstruct implementation.
2021-11-05 11:59:30 +01:00
Christoffer Lerno
f48661d35e
Removed use of basename / dirname.
2021-10-19 23:09:05 +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
b66ea1b4cd
Updating CALLOCS
2021-08-31 22:09:56 +02:00
Christoffer Lerno
69d9775876
Removed define for declaring ct vars and replaced it with var for declarations. Updated error messages. Added $defined.
2021-08-31 12:44:18 +02:00
Christoffer Lerno
f198e6c53a
Added multi line strings raw strings. This also somewhat improves error reporting on strings.
2021-08-21 21:50:41 +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
2246b641b1
Fix stack overwrite.
2021-07-30 00:18:30 +02:00
Christoffer Lerno
89d831fc18
Remove debug printout unless explicitly required. Add compile-only option.
2021-07-19 14:10:31 +02:00
Christoffer Lerno
2778adbcb9
Fix bug #208
2021-07-18 18:53:00 +02:00
kvk1920
050382b68e
Windows compatibility ( #207 )
...
* incorrect environment detection fixed
* use %zu instead of %ld for size_t
* fix rounding in integer division
* fix compiler error on Windows
* implement missed functions
* make linker available if MinGW environment is used
* make linker available under MSYS2 Clang64 and MSYS2 MinGW64
2021-07-13 12:59:55 +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
3a75032ba9
Workaround for GCC warning.
2021-06-11 18:39:48 +02:00
Christoffer Lerno
117cc6339b
Add data to end of VHeader.
2021-06-11 17:35:44 +02:00
Christoffer Lerno
e650ae771f
Thread pool and some updated lib code.
2021-06-11 13:23:45 +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
95f39f42eb
Fix nasty bug where the node copies did not get a proper id.
2021-05-31 21:11:10 +02:00
Christoffer Lerno
1f676c135c
Removed func and rewrote typedefs.
2021-05-23 13:16:48 +02:00
Christoffer Lerno
9b86b00834
Compilation is now done with each module compiled together.
2021-05-11 14:58:21 +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
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
21357c4fc1
Fix crash when having return value errors. Updated docs. Find and load builtin.c3 locate std lib.
2020-07-31 16:29:52 +02:00
Christoffer Lerno
f45d6ef84b
Fix, separate out the function pass from the decl pass. Diagnose non-visible symbols as not visible rather than missing. Fix crash when module identifier is incorrect. !! operator added. New character literal parsing. Added simple test framework.
2020-07-21 23:43:28 +02:00
Christoffer Lerno
dc86c21210
New failable based error handling. Labelled break/continue/next.
2020-07-09 13:07:08 +02:00
Christoffer Lerno
50c36789bf
Fixes bug handling chained && ||. Work towards more macro functionality. Correctly emit stdcall. Corrected character parsing in escaped string entries.
2020-06-11 15:45:58 +02:00
Christoffer Lerno
d8423eff56
Fix space at end of file.
2020-05-03 02:08:33 +02:00
Christoffer Lerno
373001fd12
Error -> errset (temporarily). Catch / throw now works, but it will not yet correctly handle defer.
2020-05-03 02:04:13 +02:00
Christoffer Lerno
400c38b95b
Use correct sizes and alignments. Fix designated initializers and literals. Added todo
2020-04-06 13:45:58 +02:00
Christoffer Lerno
2e3bbf119c
Lexer cleanup
2020-03-29 17:40:03 +02:00
Christoffer Lerno
7b4ed09517
Introduced a Lexer context, comment parsing now actually works properly. Token use in decl/ast/expr is moved to SourceRange instead. And the SourceRange used start/end, which is better than using start + len for many uses.
2020-01-25 17:56:17 +01: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