feature: now-ms builtin for wall-clock timing#365
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes bio + logs-forensics + ml-engineer per-phase timing wish.