Skip to content

feature: now-ms builtin for wall-clock timing#365

Merged
danieljohnmorris merged 8 commits into
mainfrom
feature/clock-builtin
May 17, 2026
Merged

feature: now-ms builtin for wall-clock timing#365
danieljohnmorris merged 8 commits into
mainfrom
feature/clock-builtin

Conversation

@danieljohnmorris
Copy link
Copy Markdown
Collaborator

Closes bio + logs-forensics + ml-engineer per-phase timing wish.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 17, 2026

Codecov Report

❌ Patch coverage is 84.37500% with 10 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/vm/compile_cranelift.rs 11.11% 8 Missing ⚠️
src/codegen/python.rs 50.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

# Conflicts:
#	SPEC.md
#	ai.txt
#	skills/ilo/SKILL.md
# Conflicts:
#	src/vm/compile_cranelift.rs
#	src/vm/jit_cranelift.rs
#	src/vm/mod.rs
The previous merge from main dropped the VM and Cranelift entries for the new now-ms builtin while keeping the interpreter and verifier paths, so vm and jit engines fell through to "undefined function: now-ms" at compile time. Re-add the OP_NOWMS opcode (177), the VM and Cranelift dispatch, and the jit_now_ms helper, plus document now-ms in SPEC.md so build.rs regenerates ai.txt and SKILL.md in sync.
Bare now and now-ms in operand position (e.g. >now-ms 0, +now-ms 0) parsed as Refs and tripped ILO-T004 because the existing parse_call_or_atom zero-arg special case only fires at statement head. Add an operand-position branch in parse_operand that turns now and now-ms into zero-arg Calls so the prefix-binop shapes work without forcing a bind-first or parens, while parse_atom keeps now/now-ms as plain idents so the statement-head now x form still reaches the verifier's arity-mismatch path (existing now_with_args_arity_error test preserved).
@danieljohnmorris danieljohnmorris merged commit 90ee20e into main May 17, 2026
4 of 5 checks passed
@danieljohnmorris danieljohnmorris deleted the feature/clock-builtin branch May 17, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant