Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
81b37b6
audio: enhance audio channel functionality and add global volume control
profelis May 25, 2026
de603a1
linq_fold: PR A — pattern-table refactor foundation + migrate plan_re…
borisbat May 26, 2026
93195b2
linq_fold: PR A follow-up — EmitFn / RequiresPredicate to function<> …
borisbat May 26, 2026
4302b3c
linq_fold: PR A — address R1 (Copilot)
borisbat May 26, 2026
74c5b5c
linq_fold: make LinqCall public for Sphinx cross-ref
borisbat May 26, 2026
3dc3571
linq_fold: pattern populate is [_macro], not [init] — fix aot.exe JIT
borisbat May 26, 2026
5e6517c
audio: PR #2872 review fixes
borisbat May 26, 2026
3dd916b
linq_fold: PR A — address R2 (Copilot)
borisbat May 26, 2026
cf8e1f4
linq_fold: PR A — R3a (Copilot defensive + side-effect fixes)
borisbat May 26, 2026
cc81424
daslib/with_boost: with_ call_macro with auto-lock
borisbat May 26, 2026
6b2cf71
linq_fold: PR A — R3b (document pre+post select extension)
borisbat May 26, 2026
7de7dee
linq_fold: PR A — R3c (source × terminator test matrix backfill)
borisbat May 26, 2026
86e9480
with_boost: drop return-value form, enable workhorse elements
borisbat May 26, 2026
b5fe6e7
audio: HRTF budget + simulated-3D normalization + R1/R2 fixes
borisbat May 26, 2026
3cb8312
audio: fix stats-box leak — lock_box_remove for the final delete
borisbat May 26, 2026
cb3cb93
linq_fold: PR A — R4 (privacy sweep + defensive guard + rename)
borisbat May 26, 2026
2609dfd
audio: set_audio_stats_box(null) clears stats publication safely
borisbat May 26, 2026
74abec4
with_boost: inline-emit, scale to any arity, drop helpers
borisbat May 26, 2026
1941204
audio: address Copilot R4+R5
borisbat May 26, 2026
8fa298e
with_boost: address Copilot review on the rewrite
borisbat May 26, 2026
db077bb
linq_fold: PR A — R5 ([_macro] guards + decision-log fix)
borisbat May 26, 2026
b296104
with_boost: tighten lvalue-chain check + drop stale temp note
borisbat May 26, 2026
7f88dfc
audio: address Copilot R6+R7 on stats window state
borisbat May 26, 2026
781f3c7
with_boost: add handmade module-with_boost.rst (fixes CI stub check)
borisbat May 26, 2026
6fec3f4
linq_fold: PR A — R6 (first_or_default bug + one_of set-eq + doc fix)
borisbat May 26, 2026
57cbf40
with_boost: fix Sphinx errors on doc build
borisbat May 26, 2026
6e082a4
cmake: register tests/audio/test_hrtf_budget.das for AOT
borisbat May 26, 2026
50f2a0a
linq_fold: PR A — R7 (alias narrow + masterplan doc drift)
borisbat May 26, 2026
05dc27f
with_boost: add WithMacro class docstring (fixes Sphinx error)
borisbat May 26, 2026
4f2e5b0
with_boost: address Copilot review (finalList, panic-text, table-rule)
borisbat May 26, 2026
fe2fbae
linq_fold: PR A — track KR-1 (chained _where regression deferred to P…
borisbat May 26, 2026
280433d
with_boost: address Copilot review round 2
borisbat May 26, 2026
c7d493f
Merge pull request #2879 from GaijinEntertainment/bbatkin/audio-boost…
borisbat May 26, 2026
42038fc
Merge pull request #2878 from GaijinEntertainment/bbatkin/linq-fold-p…
borisbat May 26, 2026
f4d5d08
linq_fold: PR B1 foundation — KR-1 closure + new aliases + new predic…
borisbat May 26, 2026
20aa59c
Merge pull request #2880 from GaijinEntertainment/claude/epic-jang-3e…
borisbat May 26, 2026
7ec26dc
linq_fold: PR B1 migration — c_chain cardinality + plan_loop_or_count
borisbat May 26, 2026
416e6e2
linq_fold: fix formatter drift on @@<EmitFn>
borisbat May 26, 2026
f0c213f
linq_fold: fix LINT003 — var→let on never-mutated test arrays
borisbat May 26, 2026
fbaa188
Merge pull request #2881 from GaijinEntertainment/bbatkin/linq-fold-p…
borisbat May 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ All code MUST use gen2 syntax (add `options gen2` at the top of every file). Key
- Structs/arrays/tables always pass by reference — no `&` needed.
- Only **workhorse types** (`int`, `float`, `bool`, `string`, …, `isWorkhorseType` on the C++ side) pass by value.
- **AST pointers (gc_node) pass by value** — copying the pointer, no refcount, no allocation. `def foo(p : ExpressionPtr)` shares the node; `var p` lets you reassign locally; `var p : ExpressionPtr&` propagates reassignment back. For mutable field access, take the param as `var`.
- **Lambdas pass by value (copy aliases the capture frame).** A `lambda<…>` is a fat pointer to a heap-allocated capture frame, so `=` copies the pointer (creates an alias) and pass-by-value is free. **`delete lam` requires `unsafe`** since other aliases may still be live — same rule as raw pointer / class `delete`. The rule cascades: `array<lambda<…>>`, structs with a lambda field, tuple/variant containing a lambda — all inherit the unsafe-delete requirement.
- **Lambdas are copyable.** A `lambda<…>` is a fat pointer to a heap-allocated capture frame; `=` and pass-by-value copy the pointer (creates an alias), and `push`/array storage works without `push_clone`. **`delete lam` requires `unsafe`** since other aliases may still be live — same rule as raw pointer / class `delete`. The unsafe-delete rule cascades: `array<lambda<…>>`, structs with a lambda field, tuple/variant containing a lambda — all inherit the unsafe-delete requirement.
- **Strings:** `var s : string` is a writable local copy (no propagation). `var s : string&` propagates. `:=` clones into current context's heap (required across contexts); plain `=` copies the pointer.
- **Residual `smart_ptr` types** (`ProgramPtr`, `ContextPtr`, `FileAccessPtr`, `DebugAgentPtr`, `VisitorAdapterPtr`) still use refcount semantics — variables holding them need `var inscope`. AST types do NOT — see below.

Expand Down Expand Up @@ -178,6 +178,7 @@ Full migration table (when reading older docs that say `var inscope` or `<-` for
- `panic("message")`, `assert(condition)`, `verify(condition)` (stays in release)
- **Postfix conditional:** `return expr if (cond)`, `break if (cond)`, `continue if (cond)` — early-exit guard on one line
- **Braceless early-exit:** prefer `if (cond) return X` (or postfix `return X if (cond)`) over `if (cond) { return X }` — STYLE005 flags the braced single-terminator form as noise
- **Panic is fatal, not an exception.** daslang has no C++/JS-style exception model. A `panic` (or failed `assert` / `verify`) means the program is broken — the only correct response is to print diagnostics and exit. `try/recover` exists to capture the message before exit so you can log it nicely, NOT to recover-and-continue. Do not write code that relies on continuing after `recover`; do not design APIs around panic-as-control-flow. Corollary: `{ body } finally { cleanup }` deliberately skips `cleanup` on panic (the cleanup can't run safely on a broken program); this is not a bug. Don't try to "fix" it; don't use `finally` for cleanup that needs to run on panic. If you need post-statements that run after a block in the normal path, just put them after the block — panic skips everything, and that's the design.

### Generic function dispatch

Expand Down Expand Up @@ -232,7 +233,7 @@ Full migration table (when reading older docs that say `var inscope` or `<-` for
- `require foo public` — re-exports `foo` transitively
- `[export] def main()` defaults to returning `void`, but you can declare it as `def main() : int { ... return rc }` when you need to surface a non-zero process exit code (e.g. CLI tools where callers — MCP wrappers, CI, parent shells — branch on exit). See `dastest/dastest.das` for the canonical pattern. Don't reach for `panic` just to force a non-zero exit; declare `: int` and `return rc` instead.
- `push` copies (fails for non-copyable types), `emplace` moves (zeros source), `push_clone` clones (preserves source)
- Non-copyable types (`array<T>`, `table<K;V>`, lambdas): use `:=`, `push_clone`, or `<-`
- Non-copyable types (`array<T>`, `table<K;V>`): use `:=`, `push_clone`, or `<-`. (Lambdas are copyable — see above.)
- Blocks cannot be stored/returned/captured — use lambdas or function pointers
- Class methods: `def const`, `def abstract const`, `def static`; call syntax `obj.method()`, `obj->method()`, `obj |> method()`
- **`is`/`as` on handled types checks EXACT type**, not C++ inheritance — `expr is ExprField` is `false` when `expr` is `ExprSafeField`. `as` on wrong type crashes. Must handle each concrete type explicitly.
Expand Down
Loading
Loading