cflmy
|
e119727c5d
|
feat(stdlib): format all value types and expose handle identity members
- Add read-only FunctionRef.module/name and PluginHandle.plugin/export
members; PluginHandle.id stays private (ADR-0029).
- Extend stdlib/format.mq.md to Formula/Code/FunctionRef/PluginHandle/
Memory/Resource/Unit, with UTF-8 byte length for Code.
- Fix two-digit ordered-list body indentation so arms 10+ stay inside their
branch (they were previously top-level statements).
- Extend stdlib demo to Formula/Code/FunctionRef and assert all three
io.写值/打印 pairs match byte-for-byte.
- Add runtime member observation test, ADR-0029, spec/status/changelog/evidence.
Gate: fmt, clippy -D warnings, 416 tests passed.
|
2026-11-20 21:57:04 +08:00 |
|
cflmy
|
92bfbf2568
|
feat(rfc-cm): baseline P0-P3 compute machine, stdlib and resource slices
Implements the first vertical slices of RFC-CM-0001/0002 on top of a113d89:
- P1: opaque Memory regions (64 KiB pages, budgets, grow-only), byte
read/write, Memory-index place assignment, wire/host-boundary rejection.
- CM-A04/A05: value-semantics List/Map/Text/Table primitives and the
recoverable Result map convention.
- CM-A06: opaque Resource handles, resource.open/read/write/close, stdout
write, granted project-file read and buffered write, strict fail-closed.
- CM-A07 Compat-A: explicit .mq.md format/utf8/io chain matching builtin
print for the covered value types; builtin remains default.
- P2 fixtures: allocators, list/tree/graph/hash, integer codecs, UTF-8
encode/decode, CSV/JSON subsets, table filter/sort/join, bytecode VM.
- ADRs 0022-0027, spec updates, evidence reports and 68 semantic goldens.
Gate: cargo fmt --check, clippy -D warnings, 407 tests passed.
|
2026-11-20 21:16:54 +08:00 |
|
cflmy
|
2e49c7b855
|
feat(runtime): tree-walk interpreter for Marqdo IR
Blueprint sections 7.2 and 3: Marqdo executes with its own Rust interpreter.
- Frames with isolated scopes, named/positional argument binding, explicit
signature rules, compile-time constant defaults evaluated in an empty frame.
- Statements: assignment, expression statements, link-form calls, branch
(first true arm), loop (condition re-evaluated, return propagates), return.
- Expressions: exact Int arithmetic, `/` always Float, mixed arithmetic Float,
exact Int/Float comparisons via rationals, Text concatenation, short-circuit
and/or, Bool-only conditions, indexes with negative positions, map/Formula/
Code member access, calls (same module, imports, FunctionRef values).
- Builtins: print/len/type/str/int/float/table/ref plus capability-host
dispatch for math.*, foreign.*, fs.*; `ref` resolves functions or exactly one
inert resource and errors on ambiguity instead of picking the first.
- Fuel, stack-depth and wall-clock budgets are enforced; call errors carry a
structured stack of frames.
- End-to-end tests: recursion, loops, explicit positional signatures, builtins,
function references, non-Bool conditions, fuel/stack exhaustion, ambiguous
references.
|
2026-11-20 10:43:59 +08:00 |
|