feat(jit): Cranelift lazy-stdin dispatch for for-line iterator (ILO-342)#681
Merged
Conversation
Collaborator
Author
|
needs manual rebase (conflicts in: src/builtins.rs) |
Collaborator
Author
|
needs manual — rebase conflict in non-doc file(s) |
hotfix(codegen/js): handle Pattern::Or, Expr::Todo, Expr::Panic
eb10c9a to
5c839ac
Compare
❌ 1 Tests Failed:
View the full list of 1 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
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.
Summary
for-line "stdin"lazy iterator (ILO-70 / feat: for-line stdin lazy line iterator (ILO-70) #601)jit_cranelift.rsandcompile_cranelift.rs) now dispatchOP_FOREACHPREP/OP_FOREACHNEXTtojit_foreachprep_lazy/jit_foreachnext_lazytrampolines when theHeapObjdiscriminant atptr+0equals 8 (LazyStdinLines); the existing plain-Listfast path (discriminant == 1) is unchangedis_lazyflag soFOREACHNEXTknows which path to take without re-reading the discriminant each iterationextern "C"helpers invm/mod.rs:jit_foreachprep_lazyandjit_foreachnext_lazy— both callhandle.next_line()via theArc<Mutex<...>>and return a heap-stringNanValorTAG_NILon EOF/errorStdinLinesHandle::from_linestest helper added (#[cfg(test)]) for in-memory iterator injectionTest plan
cranelift_foreachprep_lazy_stdin_count— 3-line handle yields count 3cranelift_foreachprep_lazy_stdin_empty— empty handle skips loop body, returns 0cranelift_foreachprep_lazy_stdin_collects_text— actual line text ("hi" + "world" → len sum 7) flows through the lazy dispatch pathprobe_heapobj_lazy_discriminant— runtime-confirms discriminant values (List=1, LazyStdinLines=8) match JIT constantscargo build --features cranelift— clean (only pre-existing unrelated warnings)🤖 Generated with Claude Code