Commit Graph

537 Commits

Author SHA1 Message Date
Christoffer Lerno
331f9b23f8 Attributes correctly checks for recursive definitions now. Added a max bitstruct size. 2022-07-30 02:55:32 +02:00
Christoffer Lerno
9886d381c0 Update allocator and resolution. 2022-07-30 02:55:32 +02:00
Christoffer Lerno
12c17b62cf Allow any expression as default expression. 2022-07-30 02:55:32 +02:00
Christoffer Lerno
6f5f5feb97 Fixing distinct, typedef and bitstruct copying. Fix where global constants did not need to be constant. Bump to 0.2.26 2022-07-27 18:12:27 +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
7e0a29ef40 Fix constant typeid comparisons. Allow methods to use & and * and constants. Improved error messages. Updated String type with generic append. 2022-07-24 15:10:04 +02:00
Christoffer Lerno
b313bec69d Fix to "typeid.kind". Conversion unsigned int -> enum fixed. @autoimport -> @builtin. Comparison macros. Bump to 0.2.21 2022-07-22 17:09:49 +02:00
Christoffer Lerno
d3a053e049 Updated mangling and bump to 0.2.18 2022-07-20 12:22:03 +02:00
Christoffer Lerno
4afec24434 More advanced introspection. 2022-07-20 12:22:03 +02:00
Christoffer Lerno
29edd6e54e Fix to extension methods in other modules. Version 0.2.17 2022-07-19 14:17:00 +02:00
Christoffer Lerno
6cf3c9f46b Fix in nested block handling. @maydiscard and @nodiscard annotations. If the common type of int[x] and int[y] is int[] 2022-07-17 19:48:24 +02:00
Christoffer Lerno
ca21b1daac Allow [in] to be used on subarray types. Added more to "conv" module. 2022-07-09 19:32:39 +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
e09e5c06d3 User defined attributes. 2022-05-11 20:55:09 +02:00
Christoffer Lerno
b0c55ff777 Support enum associated values. 2022-05-11 20:55:09 +02:00
Christoffer Lerno
9691d50a6f @ is now part of the name of an attribute or a macro. Macros without '@' must be function-like. 2022-05-08 22:16:33 +02:00
Christoffer Lerno
29a9769651 Ordinal based enums. 2022-05-08 21:39:00 +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
8743223dd6 Allocators. Rename of "optenum" to fault. Memcpy and memset added. Cleanup of declaration use. 2022-04-09 20:07:59 +02:00
Christoffer Lerno
b31629c5e8 Removal of "or_else jump". Fixes to defer & macros/blocks, optimized failable return. @noscope macros removed. Disallow meaningless defer.
Correctly show error on return or rethrow inside of a defer. Fix copying an access expression. Removing scoped expr.
2022-03-26 20:16:36 +01:00
Christoffer Lerno
1061b4e1dd Make doc an AST type. 2022-03-11 12:24:07 +01:00
Christoffer Lerno
e02362de0c Resolve contracts as they are encountered. 2022-03-11 11:17:39 +01:00
Christoffer Lerno
8f6fb8b7d7 Move body param as decl. Fix lexer bug with docs. 2022-03-10 14:54:52 +01:00
Christoffer Lerno
fc296ea579 Extracted macro declaration body to separately allocated field. 2022-03-10 14:54:52 +01:00
Christoffer Lerno
0565e87e5e Support '@pure' and parse the optreturn tag. 2022-03-10 09:46:30 +01:00
Christoffer Lerno
6a48f81485 Smaller Decl and Expr. Compressed TypeInfo. 2022-03-09 19:10:11 +01:00
Christoffer Lerno
322d714305 Dev (#404)
Remove 'errtype' name and reduce Expr / TypeInfo memory footprint.
2022-03-08 23:38:27 +01:00
Christoffer Lerno
069a2d40cb Changing how defer works. Remove of undef. Simplify ensure. 2022-03-08 14:15:31 +01:00
Christoffer Lerno
2802b2b96d Ensure, $eval and $evaltype, @unreachable() replaces $unreachable. <Type>.sizeof 2022-03-04 15:49:17 +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
df3e51c17e Implicit imports. 2022-02-16 20:41:54 +01:00
Christoffer Lerno
06917f2e65 Added "guess a number". Fix CT enum / int comparison. Fix some array pointer decay scenarios. Infer type of expression blocks. Correctly merge anyerr. 2022-02-01 22:46:32 +01:00
Christoffer Lerno
ba66aaaf12 Foreach overload is now done using attributes (@operator(elementat), @operator(elementref) and @operator(len)) rather than reserved functions. 2022-01-29 16:45:03 +01:00
Christoffer Lerno
cf56825d26 Fixed bug when using indexing on a generic type. Made array::list::List work with [] and foreach. 2022-01-26 21:27:13 +01:00
Christoffer Lerno
e5bcb74822 Added levenshtein.c3 to working files. Fixes to reverse indexing. Added min/max functions. Tentatively removed "opaque" 2022-01-26 17:40:01 +01:00
Christoffer Lerno
8922399c36 Add $for 2022-01-24 22:52:01 +01:00
Christoffer Lerno
556be2ff7f "@autoimport" attribute #366 2022-01-18 23:16:48 +01:00
Christoffer Lerno
d916f111b3 Fixes a | b when a | b are boolean. Fixes to RISCV and x64 ABI implementations. 2022-01-16 01:13:43 +01:00
Christoffer Lerno
5683fe3f8c Add parsing for escaping and remove "fault" token name. Allow excluding stdlib. Fixes to the x64 abi: no narrowing done for i32 results, assuming too many registers, more tests. 2022-01-12 23:56:59 +01:00
Christoffer Lerno
041c096801 Refactored some of the llvm lowering. Work on TB. Disabled mimalloc due to issues with LLVM. 2022-01-09 21:23:37 +01:00
Christoffer Lerno
a176ae353b Refactored function pointer. 2022-01-07 19:13:07 +01:00
Christoffer Lerno
8a840746f6 Compound statements are linked lists. Remove unused "global_symbols" "public_symbols" "qualified_symbols". Reduce max hash map load. 2022-01-05 19:40:44 +01:00
Christoffer Lerno
1d5ff71b21 Rearchitecture contexts. Fixing macro resulution, hash arguments and defers. 2022-01-04 20:45:58 +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
c52629d60f Main arguments are now slices if desired. 2021-12-17 01:28:57 +01:00
Christoffer Lerno
680b077eb1 Flexible array member added, zero sized structs removed. 2021-12-14 19:00:33 +01:00
Christoffer Lerno
e54679c01e Remove string literals. 2021-12-09 02:15:05 +01:00
Christoffer Lerno
17a03bc104 Added rudimentary operator overload. 2021-11-27 00:57:27 +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