thecalculus
a7d032df21
fix: argument parsing error 'sdk_path-version' instead of 'sdk-version'
2023-10-26 13:29:39 +02: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
8a12dc5bd4
Fix issue where inferred vectors where incorrectly handled in unions and structs.
2023-10-21 22:10:00 +02:00
Christoffer Lerno
d01d8d3663
"protocol" => "interface"
2023-10-20 14:12:08 +02:00
Pierre-Nicolas Clauss
e380075852
fix: standard library search paths
...
Path construction for locating the standard library expects ending
slashes.
2023-10-19 13:04:43 +02:00
Pierre-Nicolas Clauss
7df5bc0017
Add more paths to search for the standard library
...
Module `std` is searched first in a `c3` subdirectory.
Search directories are, in order and relative to the compiler executable
location:
- `lib/c3` relative to the parent directory
- `lib` relative to the parent directory
- `/lib/c3`
- `/lib`
- `/c3`
- `/`
- `c3` relative to the parent directory
- the parent directory
- `lib/c3` relative to the grand-parent directory
- `lib` relative to the grand-parent directory
2023-10-17 13:55:51 +02:00
Christoffer Lerno
9b61ddb876
Add @pure to asm. Allow regular statements in naked function.
2023-10-15 19:11:11 +02:00
pini
76fa404b89
Feat/asm x86 ( #1046 )
...
* fix(asm): consider asm blocks as volatile
When asm blocks are not marked as volatile, they may be (wrongly)
discarded by LLVM optimization passes.
* fix(asm): mark syscall as clobbering return register
The `syscall` instruction returns the system call result in the `rax`
register.
* feat(asm): add push instructions.
* feat(asm): add pop instructions
2023-10-14 20:50:45 +02:00
Christoffer Lerno
682dfd0e47
Update default asm dialect on asm strings. Fix naked function analysis.
2023-10-14 13:56:53 +02:00
Christoffer Lerno
80a9842a25
Fix incorrect check for naked functions.
2023-10-14 12:46:31 +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
54f32ed71b
Fix alignment for remaining bitstruct binary ops. Turn off broken Mingw LLVM in CI.
2023-10-13 14:43:04 +02:00
Christoffer Lerno
fed343e3bb
Fix alignment for negating bitstructs. Update mingw LLVM versions in CI.
2023-10-13 13:57:44 +02:00
Christoffer Lerno
fd21b057eb
Missing target directive in test.
2023-10-13 13:37:27 +02:00
Christoffer Lerno
e81e91be93
Fix void* <=> protocol casts. Fix of tests.
2023-10-13 12:44:58 +02:00
Christoffer Lerno
9b714e1dbb
Remove TB.
2023-10-12 22:00:49 +02:00
Christoffer Lerno
e67e17ef1e
Fix MacOS SDK.
2023-10-12 21:59:40 +02:00
Christoffer Lerno
942d53a678
Fix tests. Refactoring MacOS SDK.
2023-10-12 14:10:46 +02:00
Christoffer Lerno
806d7e965f
Update MacOS output to include platform version in target triple, fixing the linker warnings metioned here: #1028
2023-10-12 12:36:12 +02:00
Christoffer Lerno
db3e9c7ec7
Add delete testing for windows and update "clean"
2023-10-11 15:49:05 +02:00
Christoffer Lerno
b657724d9b
Add delete testing in for windows.
2023-10-11 12:48:38 +02:00
Pierre Curto
5a5b600490
std::collections::list: add List.init_from_array
...
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-10-11 12:46:28 +02:00
Christoffer Lerno
1472d60c8a
Update version and releasenotes.
2023-10-10 23:32:04 +02:00
Christoffer Lerno
a9c28cce6d
Default protocols. Closes #1039
2023-10-10 23:30:33 +02:00
Christoffer Lerno
b7a896805d
Fix bug in growable bitset. Always insert 0xAA in malloc on testing.
2023-10-09 14:23:41 +02:00
Pierre Curto
6b571fe427
List capacity and SubProcess field name change ( #1038 )
...
* std::collections::list: adjust increased capacity
* std::os::process: rename conflicting field in SubProcess
* c3c: adjust spacing for --list-builtins and --list-keywords
2023-10-09 12:52:23 +02:00
Christoffer Lerno
3f77e868b1
Fixes #1040 .
2023-10-09 00:55:54 +02:00
Christoffer Lerno
31bc766944
Fix issue where in error messages, integers were assumed to be unicode characters.
2023-10-09 00:41:31 +02:00
Christoffer Lerno
ebddbfb416
Restrict any -> Protocol conversion. Protocol <-> looks at parent. Detect duplicate method definitions for protocols.
2023-10-08 23:43:02 +02:00
Pierre Curto
3aa85cf641
misc ( #1033 )
...
* make conv::char32_to_utf8_unsafe() return the number of bytes it wrote
add tests for DString
fix pointer arithmetic in DString.insert_at
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
* add support to printf for %d and enums
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
---------
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-10-08 02:12:20 +02:00
Christoffer Lerno
312a39ee24
Handle protocol inheritance. Allow overlapping protocol methods. Remove the need for &self in protocol declarations. Fix cast rules for protocol. Fix cast rules for bitstruct #1034 .
2023-10-08 02:10:28 +02:00
Christoffer Lerno
99cfaa1583
Refactor protocols.
2023-10-06 22:31:41 +02:00
Christoffer Lerno
f3e3aa231d
Make Random use protocols.
2023-10-06 22:31:41 +02:00
Christoffer Lerno
a1bce81ed0
Fix growable bitset ( #1032 )
2023-10-06 01:27:32 +02:00
Christoffer Lerno
dad21bfc6f
See if we can get better errors.
2023-10-05 20:35:40 +02:00
Pierre Curto
9643a7c2b2
add DString.insert_at ( #1026 )
...
* add DString.insert
* make conv::utf32to8 more C3-like
2023-10-05 19:12:47 +02:00
Christoffer Lerno
d16ad0b4c7
Update "clean".
2023-10-05 19:06:55 +02:00
Christoffer Lerno
32f6d711ac
Revert linker changes.
2023-10-05 18:48:05 +02:00
Christoffer Lerno
a07ba63917
Compiling does not leave exe when successful, and also works with generic modules. #1027 . For now, silence errors due to the macos linker changes. #1028 . Try update clean on Windows #456 .
2023-10-05 16:31:11 +02:00
Christoffer Lerno
70f906c71a
Dynamic protocols. Correctly widen unsigned array indices (see #1029 )
2023-10-05 15:20:41 +02:00
Christoffer Lerno
49c4595457
Dynamic protocols.
2023-10-05 15:20:41 +02:00
Christoffer Lerno
4cc30c0d33
Replace static initializer with @init / @finalizer
2023-10-03 12:45:43 +02:00
Pierre Curto
757a5b58e8
std::core::dstring: fix DString.zstr() ( #1024 )
...
rename DString.zstr to DString.zstr_view
2023-10-03 00:32:56 +02:00
Christoffer Lerno
2b9276b495
Add 'exec'
2023-09-30 23:28:22 +02:00
Pierre Curto
b2c7b713f2
add descriptions to the --list-project-properties cli option ( #1021 )
...
* fix constant name typo
* add descriptions to the --list-project-properties cli option
* add missing file name for main.c3
2023-09-30 19:52:11 +02:00
Pierre Curto
99ec44ad78
c3c init: add missing file name
...
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-09-29 14:07:59 +02:00
Christoffer Lerno
db4298431d
Remove debug printout.
2023-09-29 14:04:13 +02:00
Christoffer Lerno
fc8b185b5b
Add library init.
2023-09-28 11:06:51 +02:00
Christoffer Lerno
f3752d273c
Add /run dir for projects. See #921
2023-09-28 10:01:20 +02:00
Christoffer Lerno
aa6101d8ea
Correctly deduce the return type for macros with implicit return. See #1018 .
2023-09-26 17:37:27 +02:00