You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b861dcb
Browse filesBrowse the repository at this point in the historyBrowse files
hzq
committed
Bound collection work in OAA expressions
Charge array scans and value copies independently of AST steps. Borrow read-only inputs for collection operations, detach returned values, and keep short-circuit and small-slice behavior intact.
Copy file name to clipboardExpand all lines: docs/language.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -316,6 +316,7 @@ agent "agent/step-block" {
316
316
- In `$(input.limit ?? 10)`, use 10 only when the field is missing or null. The operator returns the value itself, preserving 0, false and empty strings, and does not evaluate an unused default. Both operands are still checked at compile time. It binds below `||` and above `? :`; parenthesize mixed expressions for readability. Older runtimes need an upgrade before using this syntax.
317
317
-`$(input.rows[input.pick] ?? "missing")` selects one array element using a computed zero-based index. Only non-negative safe integers are accepted; an invalid or out-of-range index, a missing element, or a non-array target yields `null`. It does not look up object properties or coerce numeric strings. Subscripts bind before arithmetic and can be chained for nested arrays. Require `graph-array-index-v1` in `GET /health` and upgrade any workers that install such bundles.
318
318
-`$(input.rows[input.pick].title ?? "missing")` reads a fixed field from the selected object without scanning the array. Postfix `.field` binds like `[...]` and can be chained with it. It reads only own data fields, not inherited properties, getters, methods, or reserved names such as `constructor`. A missing field or a non-object target yields `null`; dynamic object keys are not supported. Check `graph-static-field-v1` in `GET /health` and upgrade workers that install bundles using the syntax.
319
+
- Each expression has a separate 262,144-item budget for collection scans and value copies. Array scans reserve their length before iterating; `slice` reserves only the selected range, and array `len` does not scan its elements. Unused short-circuit branches do not spend the budget. Exceeding it raises `expression_budget_exceeded`, not `null`.
0 commit comments