fix(v1.0.2): Array grow from 0, Map/Set rehash, checked div/mod
ci / build (ubuntu) (push) Has been cancelled
ci / macos smoke (push) Has been cancelled
ci / windows smoke (push) Has been cancelled
selfhost-loop / bootstrap determinism (push) Has been cancelled
ci / unit + fmt (push) Has been cancelled
ci / examples (push) Has been cancelled
ci / goldens + tools (push) Has been cancelled
ci / apps (push) Has been cancelled
ci / selfhost smoke (push) Has been cancelled
ci / CI gate (push) Has been cancelled
ci / build (ubuntu) (push) Has been cancelled
ci / macos smoke (push) Has been cancelled
ci / windows smoke (push) Has been cancelled
selfhost-loop / bootstrap determinism (push) Has been cancelled
ci / unit + fmt (push) Has been cancelled
ci / examples (push) Has been cancelled
ci / goldens + tools (push) Has been cancelled
ci / apps (push) Has been cancelled
ci / selfhost smoke (push) Has been cancelled
ci / CI gate (push) Has been cancelled
- Array_Push grows from cap 0 (same min as Insert) to avoid segfault - Map/StringMap/Set: default min cap 8 and auto-rehash at ~50% load - Integer / and % emit bux_div_i64 / bux_mod_i64 (panic instead of SIGFPE) - Bump version to 1.0.2; stdlib golden regressions; fmt clean
This commit is contained in:
+12
-1
@@ -1,10 +1,21 @@
|
||||
# Bux — План за подобрения (post-v1.0.0)
|
||||
|
||||
> **Дата:** 2026-07-28
|
||||
> **Статус:** Всички приоритетни задачи изпълнени ✅ · follow-up DX/correctness shipped
|
||||
> **Статус:** Всички приоритетни задачи изпълнени ✅ · follow-up DX/correctness shipped · **v1.0.2** patch
|
||||
|
||||
---
|
||||
|
||||
## Сесия 6 — v1.0.2 runtime correctness (2026-07-28)
|
||||
|
||||
| # | Задача | Файлове |
|
||||
|---|--------|---------|
|
||||
| S.1 | `Array_Push` grow from cap 0 (no segfault) | `lib/Array.bux` |
|
||||
| S.2 | `Map`/`StringMap`/`Set` min cap + auto-rehash (no hang / FPE) | `lib/Map.bux`, `lib/Set.bux` |
|
||||
| S.3 | Integer `/` `%` → `bux_div_i64` / `bux_mod_i64` | `bootstrap/lir_c_backend.nim`, `bootstrap/c_backend.nim`, `src/c_backend.bux` |
|
||||
| S.4 | Version **1.0.2** + golden regressions | `bootstrap/cli.nim`, `src/cli.bux`, `bux.toml`, `tests/stdlib_golden/` |
|
||||
|
||||
**Verified:** stdlib golden PASS; `Array_New(0)+Push` OK; `Map_New(2)+5 inserts` OK; div-by-zero → `bux panic: division by zero`; examples PASS; fmt-check PASS.
|
||||
|
||||
## Сесия 4 — Try payload type + LSP formatting (2026-07-28)
|
||||
|
||||
| # | Задача | Файлове |
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
# Bux v1.0.2 — Patch
|
||||
|
||||
**Date:** 2026-07-28
|
||||
**Tag:** `v1.0.2`
|
||||
|
||||
Patch release on the **v1.0 language freeze**. No language-surface breakage;
|
||||
stdlib + codegen correctness only.
|
||||
|
||||
## Fixes
|
||||
|
||||
| Area | Issue | Fix |
|
||||
|------|--------|-----|
|
||||
| `Array_Push` | `Array_New(0)` + push → segfault (`cap * 2 == 0`) | Grow to at least 4 when capacity was 0 (same as `Array_Insert`) |
|
||||
| `Map` / `StringMap` | Full table → infinite loop in open-addressing probe; `cap == 0` → SIGFPE on `%` | Default min cap 8; auto-rehash when load ≥ 50% |
|
||||
| `Set` | Same as Map | Same grow / min-cap policy |
|
||||
| Integer `/` and `%` | Divisor 0 → raw SIGFPE | Emit `bux_div_i64` / `bux_mod_i64` (bootstrap LIR + C backends, selfhost C backend) |
|
||||
|
||||
## Verify
|
||||
|
||||
```bash
|
||||
make build
|
||||
./buxc --version # bux 1.0.2 (bootstrap)
|
||||
make test-stdlib test-examples
|
||||
```
|
||||
Reference in New Issue
Block a user