Commit Graph

118 Commits

Author SHA1 Message Date
Christoffer Lerno
7134b3ba35 Update Raylib examples to use Raylib5. 2024-08-29 23:34:31 +02:00
Chuck Benedict
05ab0707fc Add RISC-V block asm support 2024-08-20 22:42:38 +02:00
Christoffer Lerno
edfea639cf - Introduce $vaarg[...] syntax and deprecate the old $vaarg(...).
- Similar change to `$vasplat`: `$vasplat` and `$vasplat[1..]`.
2024-08-16 09:28:28 +02:00
Christian Buttner
30af7f1ca6 Add c-include-dirs project/manifest setting. (#1338)
Set the include directories to be used when compiling C sources.
2024-08-10 01:51:59 +02:00
Alexey Kutepov
a5b5f315d1 Implement passing arguments to program via compile-run (#1296) 2024-08-03 19:47:52 +02:00
Chuck Benedict
563e677b08 Add Riscv Example (#1268)
Add Riscv example. Risc-V CI. Install baremetal toolchain. Prevent imported crt file from messing up linker search.
2024-07-31 14:43:47 +02:00
Christoffer Lerno
e293c435af 0.6.0: init_new/init_temp removed. LinkedList API rewritten. List "pop" and "remove" function now return Optionals. RingBuffer API rewritten. Allocator interface changed. Deprecated Allocator, DString and mem functions removed. "identity" functions are now constants for Matrix and Complex numbers. @default implementations for interfaces removed. any* => any, same for interfaces. Emit local/private globals as "private" in LLVM, following C "static". Updated enum syntax. Add support [rgba] properties in vectors. Improved checks of aliased "void". Subarray -> slice. Fix of llvm codegen enum check. Improved alignment handling. Add --output-dir #1155. Removed List/Object append. GenericList renamed AnyList. Remove unused "unwrap". Fixes to cond. Optimize output in dead branches. Better checking of operator methods. Disallow any from implementing dynamic methods. Check for operator mismatch. Remove unnecessary bitfield. Remove numbering in --list* commands Old style enum declaration for params/type, but now the type is optional. Add note on #1086. Allow making distinct types out of "void", "typeid", "anyfault" and faults. Remove system linker build options. "Try" expressions must be simple expressions. Add optimized build to Mac tests. Register int. assert(false) only allowed in unused branches or in tests. Compile time failed asserts is a compile time error. Remove current_block_is_target. Bug when assigning an optional from an optional. Remove unused emit_zstring. Simplify phi code. Remove unnecessary unreachable blocks and remove unnecessary current_block NULL assignments. Proper handling of '.' and Win32 '//server' paths. Add "no discard" to expression blocks with a return value. Detect "unsigned >= 0" as errors. Fix issue with distinct void as a member #1147. Improve callstack debug information #1184. Fix issue with absolute output-dir paths. Lambdas were not type checked thoroughly #1185. Fix compilation warning #1187. Request jump table using @jump for switches. Path normalization - fix possible null terminator out of bounds. Improved error messages on inlined macros.
Upgrade of mingw in CI. Fix problems using reflection on interface types #1203. Improved debug information on defer. $foreach doesn't create an implicit syntactic scope.
Error if `@if` depends on `@if`. Updated Linux stacktrace. Fix of default argument stacktrace. Allow linking libraries directly by file path. Improve inlining warning messages. Added `index_of_char_from`. Compiler crash using enum nameof from different module #1205. Removed unused fields in find_msvc. Use vswhere to find msvc. Update tests for LLVM 19
2024-06-12 10:14:26 +02:00
Christoffer Lerno
9a114b38d3 Updated retry and test.c3 examples. 2024-02-17 15:19:27 +01:00
Christoffer Lerno
748c737e8f 0.5.4: Hash variables accept designated initializers. @safemacro overrides the need for @ in macro names. Fixes to macro context evaluation. Updated allocator api. Removed install_win_reqs.bat. Deterministic @init for MacOS. Fixed temp memory issue with formatter. Support LLVM 19. Add support to compare bitstructs using == and !=. Support Windows .def files. Removed invalid grammar from grammar.y. Support compile time folding of &|^~ for bitstructs. output project setting now respected. Fix issue where constants were not properly constant folded. Add temp_push/pop. Aliased declarations caused errors when used in initializers. Fix export output. Fix of const ternary #1118. Fix of $$MODULE in nested macros #1117. Fix debug info on globals. out now correctly detects subscript[] use #1116. Lateral implicit imports removed. Default to '.' if no libdir is specified. Improved error messages for --lib. Fix raylib snake example. Overzealous local escape check corrected #1127. Improved yacc grammar #1128. --linker argument #1067. Fixes to the matrix operations #1130. Added GenericList. 2024-02-15 21:39:33 +01:00
Christoffer Lerno
1e38ccdd2b Fix missing free on GrowableBitSet. init_new/init_temp for GrowableBitSet, LinkedList, List, HashMap, DString, ByteBuffer. Interface to_string renamed to_new_string. Change in allocator usage, malloc is now heap. Added new_array, new_zero_array, new, new_clear, clone. Concat => concat_new. string::printf => string::new_format, string::tprintf => string::tformat. "to_*" are now "to_new_*" and "to_temp_*". "from_*" is "new_from*" 2023-11-09 01:59:49 +01:00
Christoffer Lerno
120e21b80b Convencience function for random + entropy function. 2023-10-31 22:21:38 +01:00
Christoffer Lerno
cd7a03c2cf Interface based streams. Fix for initializing with a force unwrap inside. Allow $define to take a list. Allow $define to return error on argument type mismatch in call. Fixed broken bit operations on boolean vectors. 2023-10-31 01:06:59 +01:00
Christoffer Lerno
1aa038c92f Interface based streams. Fix for initializing with a force unwrap inside. Allow $define to take a list. Allow $define to return error on argument type mismatch in call. Fixed broken bit operations on boolean vectors. 2023-10-31 01:06:59 +01:00
Christoffer Lerno
9af37fe427 $and, $or, $is_const, $assignable, .is_eq, .is_ordered, $defined($vatype(2)) works looking if we can create a type, $defined(foo[0]) $defined(foo()). Remove $checks and @checked. Improvide casting checks to always work without destructive changes. 2023-10-24 22:06:04 +02:00
Christoffer Lerno
89d4c2cab7 Allocator uses protocols. Fix bug where it was not possible to pass a ref variable as a ref variable. Correct codegen for !anyptr. 2023-10-14 12:39:46 +02:00
Christoffer Lerno
a1ecf2211f as_str() replaced by str_view() 2023-09-24 23:50:16 +02:00
Christoffer Lerno
6e0982327d Added example project file and updated project file defaults. 2023-09-19 10:06:22 +02:00
Dmitry Atamanov
a06cc76c9b Support additional keys in projects. 2023-09-19 09:56:49 +02:00
Christoffer Lerno
9eef34049d Remove vestiges of top down widening. 2023-09-19 09:45:56 +02:00
Dmitry Atamanov
d129cd49a5 Add libc-free hello_world 2023-09-15 16:46:38 +02:00
Christoffer Lerno
1d04b70efe Fixed issues inferring length with subarrays. Removed old, non-working example. Infer length in the case of subarray literals. 2023-09-12 22:24:20 +02:00
Christoffer Lerno
d67e846712 Remove cast from void! to anyfault. Rename @catchof to @catch 2023-09-09 22:49:32 +02:00
Christoffer Lerno
5a2ef79fe6 Update "not working" examples. 2023-09-05 14:36:17 +02:00
Christoffer Lerno
4c081f59ff Refactoring, adding printf / printfn to all streams. 2023-09-03 10:14:04 +02:00
Christoffer Lerno
9a6d83f526 Updated stream API. 2023-09-03 01:14:15 +02:00
Dmitry Atamanov
efb492eace Add simple benchmark runner. 2023-08-29 12:28:06 +02:00
Christoffer Lerno
581ecdb2a8 Only add a director as a link path if the directory can be found. Update raylib examples. 2023-07-19 22:06:57 +02:00
Christoffer Lerno
aa216fa510 Dev (#859)
* Fix bug where analysing subexpr relied on them not being analysed. Fix issue where converting a const initializer bool to integer failed. Fix of issue where the case check assumed other cases were const values.

* Fix bug where analysing subexpr relied on them not being analysed. Fix issue where converting a const initializer bool to integer failed. Fix of issue where the case check assumed other cases were const values. Remove PTHREAD for windows.

* Fix bug where analysing subexpr relied on them not being analysed. Fix issue where converting a const initializer bool to integer failed. Fix of issue where the case check assumed other cases were const values. Remove PTHREAD for windows.
2023-07-17 02:00:27 +02:00
Christoffer Lerno
34306cbf5d Fixes missing checks to body arguments. Do not create debug declaration for value-only parameter. Bug in alignment for atomics. Macro ref parameters are pointers. 2023-07-15 15:11:44 +02:00
Pierre Curto
d709c18f5f std/lib/core: rename DString.str to DString.as_str (#834)
Signed-off-by: Pierre Curto <pierre.curto@gmail.com>
2023-07-08 00:10:04 +02:00
Christoffer Lerno
4f7b42cdc4 New generic syntax and ad hoc invocation. 2023-07-06 23:43:36 +02:00
Christoffer Lerno
848a5212ef Fixes #811. Update some stdlib methods. Header printout correctly picks a name. #804 2023-07-03 13:17:43 +02:00
Christoffer Lerno
d5b01d3a8f Native ls 2023-06-21 16:27:53 +02:00
Christoffer Lerno
ab93389031 - Updated posix/win32 stdlib namespacing
- Process stdlib
- Fix to void expression blocks
2023-06-21 16:27:53 +02:00
Christoffer Lerno
bff7b492a2 Further bitstruct cast fixes. Updated code. 2023-05-10 13:03:15 +02:00
Christoffer Lerno
172d561f07 Change syntax of $if, $assert, $include, $echo. Introduces $error 2023-05-06 12:18:00 +02:00
Christoffer Lerno
2a79e0f1cf Introduce def as a trial. Fixup of timeit. 2023-04-21 17:42:38 +02:00
Christoffer Lerno
c847650579 Introduce def as a trial. Fixup of timeit. 2023-04-21 16:03:28 +02:00
Christoffer Lerno
edd2f1c717 Updated timeit. 2023-04-21 15:57:48 +02:00
Christoffer Lerno
0a12686237 Remove acornvm 2023-04-21 15:51:00 +02:00
Christoffer Lerno
809321e20c Updated grammar. Removal of elif. Removal of ':' ';' in some ct statements. Empty faults is now an error. Remove "define" for types. Remove "private". Better errors on incorrect bitstruct syntax. Introduction of wildcard type rather than optional wildcard. Removal of scaled vector type. mkdir and rmdir. Disallow define @Foo() = { @inline }. Add handling for @optreturn and change it to @return!. Restrict interface style functions. Updated x64 ABI. stdlib updates to string. Removed deprecated functions. Update how variadics are implemented. Extended error messages. x86 ABI fixes. Shift check fixes. '!' and '?' are flipped. No trailing ',' allowed in functions. Fix to string parsing. Allow l suffix. Simplifying flatpath. any replaces variant, anyfault replaces anyerr. Allow getting the underlying type of anyfault. De-duplicate string constants. Fix of readme. Extended list. Fix of "(MyEnum)x + 1". Clock and DateTime types. Fixes to array concat. 2023-04-21 10:56:39 +02:00
Christoffer Lerno
5ee0d52ff1 Deprecate :; in $if etc. 2023-03-20 01:03:54 +01:00
Christoffer Lerno
8b0df0ee11 try? / catch? 2023-03-17 22:49:48 +01:00
Christoffer Lerno
4ffeada3c7 Updated stdlib. Prefer file::open. Fix to slice assign with distinct types. 2023-03-12 00:33:16 +01:00
Christoffer Lerno
1480b8f872 Update examples and contracts. 2023-03-08 15:57:42 +01:00
Christoffer Lerno
dd4edfb747 Updated malloc/calloc/realloc/free deprecation of old helper functions. Add checks to prevent incorrect alignment on types when using malloc. Better errors from $assert. Added @deprecated. Fixed issue using named arguments after varargs. 2023-02-27 15:03:27 +01:00
Christoffer Lerno
f86aa136cb Updated fopen. ZString.len does not output number of Char32. Add example. 2023-02-23 10:42:36 +01:00
Christoffer Lerno
5e457be605 Implement more @export / @private improvements. Make @private default… (#729) 2023-02-13 08:31:40 +01:00
Christoffer Lerno
1548cd06ef Enable local multi-declarations. Fix of builtin argument checking. Migrate to @noinit. 2023-02-11 02:03:02 +01:00
Christoffer Lerno
505543e9b4 Remove import of std::array 2023-02-05 20:59:42 +01:00