Christoffer Lerno
c249c3f3b6
Fix of accidentally printing "prev" when using $checks. Updated binary search.
2023-07-04 02:29:02 +02:00
Pierre Curto
55d17ec990
add the std::sort::binarysearch module
...
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-07-04 01:35:10 +02:00
Christoffer Lerno
bbbcd9bf48
Updated name mangling for static vars in llvm.
2023-07-04 01:12:39 +02:00
Christoffer Lerno
c2c6f09d68
Fixes #811 . Update some stdlib methods. Header printout correctly picks a name. #804
2023-07-03 15:45:06 +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
21d8a8b6da
Fix #809 missing checks on generic types, accepting both types where constants should be and vice versa.
2023-07-01 23:58:00 +02:00
Christoffer Lerno
45820d45e5
Allow using inferred type on method first parameter.
2023-07-01 22:47:54 +02:00
Pierre Curto
2ac213a3ce
lib/std/io/stream: add ReadBuffer and WriteBuffer streams
...
ReadBuffer and WriterBuffer buffer stream reads and writes to a stream.
Useful in situations where the underlying stream is sensitive to the number
of read or write calls.
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-07-01 17:38:09 +02:00
Christoffer Lerno
70ea6ce04b
Fix #806 , and also makes sure that things like FOO.x.a is a compile time value.
2023-07-01 16:29:17 +02:00
Christoffer Lerno
f74e294dc2
Push stack codegen to function for cleaner binaries. Some refactoring in allocators.
2023-06-30 01:01:58 +02:00
Christoffer Lerno
57c8b5fc75
Fix on rethrow + macros.
2023-06-27 20:41:17 +02:00
Christoffer Lerno
f651a59294
Fix on rethrow + macros.
2023-06-27 13:19:28 +02:00
Christoffer Lerno
fee80682b1
Update to error message when expecting a type.
2023-06-27 10:19:09 +02:00
Christoffer Lerno
fc054dad81
Added some to_string.
2023-06-26 16:21:07 +02:00
Christoffer Lerno
83f8bbb91b
Update range to have exclusive and inclusive range.
2023-06-26 10:18:09 +02:00
Christoffer Lerno
8c73a450a1
Reduce memory consumtion. Add "range"
2023-06-25 21:39:53 +02:00
Christoffer Lerno
be04473af4
Name change, some updates using "from end" indexing.
2023-06-24 18:21:16 +02:00
Christoffer Lerno
fedffc2f35
Name change, some updates using "from end" indexing.
2023-06-24 15:20:40 +02:00
Pierre Curto
55a1f794cf
lib/std/encoding: add base64 support
...
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-06-24 14:23:18 +02:00
Pierre Curto
0ab0f727ad
lib/std: fix ByteWriter.read_from method ( #793 )
...
* lib/std: fix ByteWriter.read_from method
When reading from a stream which does not have an available method,
ByteWriter would not make any progress if its buffer was empty.
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
* test/unit/stdlib/io: use separate module for TestReader
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
---------
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-06-23 10:44:36 +02:00
Christoffer Lerno
0eee9daf1d
Macros generating lambdas now actually is a thing.
2023-06-22 23:42:40 +02:00
Christoffer Lerno
4d552ae44d
Update $include syntax and behaviour. Remove top level $if completely.
2023-06-21 16:27:53 +02:00
Christoffer Lerno
3dd1741484
Fix of contract error location for @require #788
2023-06-20 21:35:48 +02:00
Christoffer Lerno
f9548cb213
Fix nested hash resolution for access identifiers. Fixes #789
2023-06-20 17:05:13 +02:00
Pierre Curto
f439539c6e
lib::std::core::bitorder: add read and write
...
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-06-19 23:34:30 +02:00
Christoffer Lerno
57424d8b6b
Fixes #786 , constant initialization with constants sometimes causing an error lowering to LLVM. Fixes bug passing void as a vararg argument to an any vararg.
2023-06-19 10:38:37 +02:00
Christoffer Lerno
3bdeec3bc2
Incorrect defer/return value ordering in some cases.
2023-06-18 23:25:33 +02:00
Christoffer Lerno
4c1edfb941
Dev ( #777 )
...
* The new @if directive.
2023-06-10 23:16:28 +02:00
Christoffer Lerno
8eaad81800
Dead strip by default. Add list to_string. Fix missing check for dynamic calls.
2023-06-05 14:54:17 +02:00
Christoffer Lerno
3e54d13b62
Prefer def
2023-06-02 20:08:45 +02:00
Christoffer Lerno
275e3c6a09
Update with CPU type.
2023-05-30 16:42:15 +02:00
Christoffer Lerno
9de02efa01
Exclude main methods from dllexport.
2023-05-28 15:59:15 +02:00
Christoffer Lerno
07b107ff5e
Better handling of attribute definition errors. Resolves #753
2023-05-26 11:31:27 +02:00
Christoffer Lerno
b794c893d6
Dynamic dispatch.
2023-05-25 22:28:45 +02:00
Christoffer Lerno
ddd0497922
Better lowering of distinct types. Noreturn function call expr recognized as a "jump" for escape analysis. Preferring "def" in libs. To upper / to lower for ascii. Initial dynlib support.
2023-05-21 21:41:01 +02:00
Tonis
a877d4458c
Improve Matrix identity functions and add Quaternion to matrix function ( #765 )
...
* Edit matrix identity fn and add quaternion to matrix fn
* Change matrix identity macros to constants
---------
Co-authored-by: Tonis <tanton@paysure.solutions >
2023-05-16 11:50:01 +02:00
Christoffer Lerno
3a725d1348
Better error on missing ';' in certain cases.
2023-05-15 08:45:10 +02:00
Christoffer Lerno
172d561f07
Change syntax of $if, $assert, $include, $echo. Introduces $error
2023-05-06 12:18:00 +02:00
Christoffer Lerno
3dd6675e1b
Fixed const vector codegen. Missing math comparisons.
2023-05-06 02:29:26 +02:00
Christoffer Lerno
6fc38bbcb9
Accidental change.
2023-04-28 23:36:45 +02:00
Christoffer Lerno
184cc19d36
Further grammar fixes.
2023-04-28 19:11:57 +02:00
Christoffer Lerno
e8642d6797
Fixes to access grammar. "delete" => "remove"
2023-04-24 09:10:35 +02:00
Christoffer Lerno
2a79e0f1cf
Introduce def as a trial. Fixup of timeit.
2023-04-21 17:42:38 +02:00
Christoffer Lerno
8059dc1539
delete_if, retain_if, rindex_of, compact, compact_count added to List.
2023-04-21 14:45:25 +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
ad7ee06635
Grammar updates. Updated enum member parsing.
2023-03-22 21:46:47 +01:00
Christoffer Lerno
0f80d985fa
Fix sema errors on flexible array slices.
2023-03-22 12:56:15 +01:00
Christoffer Lerno
316af36723
Add dstringwriter.
2023-03-22 12:23:47 +01:00
Christoffer Lerno
9850adfa56
Rename OUT_OF_DISK => OUT_OF_SPACE. Allow byte writer to take a buffer.
2023-03-22 11:52:45 +01:00
Christoffer Lerno
93fa135d28
Deprecation of define Type = ...
2023-03-20 22:56:06 +01:00