HowlFrame #90 Phase 3a: experimental defun and call bytecode - #58
Merged
Merged
Conversation
…code path -compile-hfir-bc now emits existing CALL and RETURN opcodes for defun, call, and return. while still fails closed. Production -compile-bc stays AST bytecode after the gate. #90 stays Partial. Co-authored-by: William Elias <wylelias.123@gmail.com>
howlcipher
commented
Sep 30, 2026
howlcipher
left a comment
Owner
Author
There was a problem hiding this comment.
Phase 3a looks clean on the fence.
Experimental -compile-hfir-bc gains defun / call / return on existing CALL/RETURN. Production -compile-bc still AST — locked by TestCompileBcStaysASTWhileHfirBcRejectsWhile. while still fail-closed (HFIR_BYTECODE_UNSUPPORTED, no artifact). ControlEdges empty. No new opcodes/caps, no Wasm, no linker/module smuggle, no path flip.
Conformance: 09_defun_call.howl / defun_call across hfir_bytecode + AST hosts. #88 transport still rejects defun. write_file/mkdir out of scope.
#90 stays Partial. CI build green on 6e82439. Hard nos clean — undraft when ready; do not squash-merge as #90 Done.
howlcipher
marked this pull request as ready for review
September 30, 2026 04:54
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
Phase 3a makes the experimental HFIR→bytecode path run
defunandcall. Production-compile-bcis unchanged. Issue #90 stays Partial.LowerASTgivesdefuna name, orderedparamedges, andbodyedges.type_hint,type_hints,type_param, and a return-type symbol between the parameter list and the body are erased, matching the AST bytecode compiler.callstores the callee name and orderedargedges.returnhas an optionalvalue.-compile-hfir-bc/hfir.LowerToBytecoderegisters aBCFunctionand emits the existingCALLandRETURNopcodes. No new opcode and no new capability.whileis stillHFIR_BYTECODE_UNSUPPORTEDwith noBCProgram. Adefunwhose body containswhilefails the same way.ControlEdgesstay empty.defun, so #88 stays closed.write_fileandmkdirstay deferred. No Wasm, no module linker, and no production path flip.Hosts for the new conformance case
tests/conformance/abi_v1/09_defun_call.howl(defun_callintests/conformance/lowered_hfir_abi_v1.json):hfir_bytecode-compile-hfir-bc, then-run-bcbytecode-compile-bc(AST bytecode after the gate), then-run-bc. Canonical resultinterpreter,go,javascriptweb_appThose hosts print
42andphase3a.How to test
TestLoweredHFIRABIConformance/defun_callis the shared case.go test ./...passed locally.Manual:
A
whileprogram still compiles and runs with-compile-bc, and-compile-hfir-bcrejects it without writing an artifact.Journal:
docs/journals/2026-09-30_lowered_hfir_abi_phase3a_defun_call.md.This PR does not mark #90 Done and should not be squash-merged as a completion of that issue.