| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Add `range::slice` macro (#3425) * Add `range::slice` macro * Split `range::slice` macro to `slice` and `exclusive_slice` Also adds bounds checking and type checking for the range. * Releasenotes fix. * Some refactoring. * Use a single function. * Update releasenotes. * Handle the case where we get an invalid range. Add tests. --------- Co-authored-by: Christoffer Lerno <christoffer@aegik.com> | 20 天前 | |
- `CachedInStream` and `CachedOutStream` added. - `InStream.read` now consistently returns 0 on EOF, and never throws io::EOF, and requires a non-zero buffer target. | 30 天前 | |
compiler: Optimize slice equality, fix $$reverse and $$mod (#3491) * Optimize slice equality for flat types Lower slice equality comparisons for flat data types like integers, pointers, and enums to memcmp rather than emitting a scalar loop. * Fix buffer allocation size in llvm_emit_reverse Allocate `elements * sizeof(LLVMValueRef)` instead of 1 element when vector length exceeds 128 to prevent heap corruption. * Fix unsigned modulo builtin emission BUILTIN_EXACT_MOD emitted signed division instead of unsigned remainder for unsigned integer types, causing $$mod on unsigned integers to return the quotient instead of the remainder. * Add release notes | 12 天前 | |
Add @feat (#3406) * - Add `@feat` attribute. - Add `$feat` compile time function. * Update http tests. * Fixes * EMSCRIPTEN -> POSIX | 1 个月前 | |
Separate panic code to builtin_panic. Change to excuse from faultdef from constdef to constset. | 22 天前 | |
Add @feat (#3406) * - Add `@feat` attribute. - Add `$feat` compile time function. * Update http tests. * Fixes * EMSCRIPTEN -> POSIX | 1 个月前 | |
Added path::is_link support (#3480) * Added path::is_link support * Updated releasenotes --------- Co-authored-by: Christoffer Lerno <christoffer@aegik.com> | 13 天前 | |
Add @feat (#3406) * - Add `@feat` attribute. - Add `$feat` compile time function. * Update http tests. * Fixes * EMSCRIPTEN -> POSIX | 1 个月前 | |
Deprecate old `void!` @benchmark and @test functions. | 1 年前 | |
fix(bigint): shift left for values > 32 bits (#3469) * Fix shift_left: check MAX_LEN instead of current length BigInt.shl silently returned 0 for any shift of 32 bits or more: 1 << 1 = 2 (correct) 1 << 31 = 2147483648 (correct) 1 << 32 = 0 (wrong, expected 4294967296) 1 << 64 = 0 (wrong) 1 << 100 = 0 (wrong) Root cause is a capacity-vs-length confusion in shift_left. When the shift produced a carry out of the top limb, the carry was only appended under the guard `buf_len + 1 <= len`, where `len` is the value's current *significant* length, not the capacity of the backing array (which is always MAX_LEN, since BigInt.data is a fixed uint[MAX_LEN]). Shifting a value whose significant length is already at its maximum -- which includes the common case of shifting 1, where buf_len == len == 1 -- left the carry with nowhere to go, so it was silently discarded and every bit shifted out of the top limb was lost. Shifting by 32 or more moves the entire value into that discarded carry, yielding 0. The result must be allowed to grow up to MAX_LEN limbs, so bound buf_len against the array capacity instead. This matches the guard already used by BigInt.add_this for the same carry-out situation. Both callers of shift_left (BigInt.shl_this and multi_byte_divide) pass buffers of exactly MAX_LEN uints, so bounding by MAX_LEN cannot overflow. shift_right needs no equivalent change: it only ever shrinks the value and appends nothing. Also adds unit tests covering shifts across the 32-bit limb boundary (1, 31, 32, 33, 63, 64, 65 and 100 bits), cross-checked against repeated doubling and multiplication by 2^n, plus shl/shr round-trips. * Check for overflow in shift_left. * Updated releasenotes. * Add description. --------- Co-authored-by: Christoffer Lerno <christoffer@aegik.com> | 17 天前 | |
json: add unmarshaling support, clean up DOM parsing, and add benchmarks (#3384) * json: add unmarshaling support, clean up DOM parsing, and add benchmarks - Added `unmarshal` (JSON string to struct) and `@unmarshal_to` (Object* to struct). - Simplified DOM parsing. - Sped up serialization. - Added benchmarks for marshaling, unmarshaling, and DOM parsing. - Updated unit tests. * add serialize_object() and an example on `resources/examples/json_pretty_print.c3` * complete the benchmarks * fixes: fix array bounds, add vector support, and clean up redundancies * Some refactoring. * Rename Indent. Add tests. * continuing work * Some formatting. * Update releasenotes * Refactoring, moving unmarshaling partly to object. Object .is_empty is also .is_map. Improve backwards compatibility. Release memory on failure. --------- Co-authored-by: Christoffer Lerno <christoffer@aegik.com> | 1 个月前 | |
Add socket address getters and refactor http_server example (#3460) * std::net: implement peer_address, peer_port, local_address, and local_port on Socket * examples/http_server: refactor to non-blocking event-driven architecture added nice descriptions of each section for tutorial purposes * fix BSDs PLATFORM_O_NONBLOCK BSDs bindings need a full check! :( * simplify and maybe fix a 32bit bug * syntax cleaning * add release notes * A little refactoring to extract common code. Introduce specific fault. --------- Co-authored-by: Christoffer Lerno <christoffer@aegik.com> | 23 天前 | |
Add @feat (#3406) * - Add `@feat` attribute. - Add `$feat` compile time function. * Update http tests. * Fixes * EMSCRIPTEN -> POSIX | 1 个月前 | |
Implementing Mergesort (#3120) * Implement merge sort. * Cleanup of imported modules. * Allow Mergesort to accept a user provided compare function. * Correctly handle mamory used for sorting and added unit tests. * Changed name of allocator * Update releasenotes. --------- Co-authored-by: Christoffer Lerno <christoffer@aegik.com> | 4 个月前 | |
Add test. Update missing functions in nothread. | 23 天前 | |
feat(datetime): enable comparison operators (#3431) Co-authored-by: Christoffer Lerno <christoffer@aegik.com> | 1 个月前 | |
Updated contracts. RingBuffer->RingList new implementation `List.remove_unordered_at`. Rename isz -> sz Require explicit uint<->int casts. - PanicFn now takes an `int` for row. - Align literal types with C semantics. - Use value promotion instead of signedness promotion to int. So that small unsigned types promote to int, not uint. Fix longjmp OpenBSD | 5 个月前 | |
- `__atomic_compare_exchange` had an incorrect implementation. | 3 个月前 | |
Update test for 32 bit. | 2 个月前 | |
Add tests. | 16 天前 | |
Updated contracts. RingBuffer->RingList new implementation `List.remove_unordered_at`. Rename isz -> sz Require explicit uint<->int casts. - PanicFn now takes an `int` for row. - Align literal types with C semantics. - Use value promotion instead of signedness promotion to int. So that small unsigned types promote to int, not uint. Fix longjmp OpenBSD | 5 个月前 | |
- Add `compare_to` and `compare_to_ignore_case` to `String`. #3096 Remove old ascii.c3 | 5 个月前 | |
- Parsing a malformed hex float would not correctly get reported. - Parsing an integer with traing space would incorrectly be reported as an error. | 3 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 20 天前 | ||
| 30 天前 | ||
| 12 天前 | ||
| 1 个月前 | ||
| 22 天前 | ||
| 1 个月前 | ||
| 13 天前 | ||
| 1 个月前 | ||
| 1 年前 | ||
| 17 天前 | ||
| 1 个月前 | ||
| 23 天前 | ||
| 1 个月前 | ||
| 4 个月前 | ||
| 23 天前 | ||
| 1 个月前 | ||
| 5 个月前 | ||
| 3 个月前 | ||
| 2 个月前 | ||
| 16 天前 | ||
| 5 个月前 | ||
| 5 个月前 | ||
| 3 个月前 |