feat(ir): lower native fn bodies through the Intrinsic path #487
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/484-native-body-lowering"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of #484 (slice 3a of the epic; slice 3 of
docs/design/NATIVE-BODIES.md, section 8).What this changes
ir/intrinsic-name.trb: shared reading of intrinsic names, used by the checker (messages unchanged) and by lowering; the written.uncheckedmaps tochecked: false.ir/lower/native-body.trb: anative fnbody of exactly oneintrinsicoverselfand the parameters in declared order becomes theNativeEntryof the call site (lowerNativeCall,lowerNativeOperator) and of the generated wrapper (generatedKindOf). A manifest row still wins; N9 is unchanged.Not in this PR (epic checklist on #484)
NativeBlocklowering (needs operand resolution recorded by the checker first), multi-statement /constbodies, the missing-intrinsic finding, the record status line, the kernel test.Follow-up on CI (
b59107b)Tier A failed on the two new lowering tests and
format --check:declaredOperandNamescountedselftwice (the parser already puts the receiver back as the first parameter), andintrinsic-name.trbwrote itsIntrinsicconstructions with parentheses where the call canon wants commands. Both fixed in one commit; the title now matches the scope (no native blocks).native fnbodies andnative { }blocks, kernel test (step 4 of #53) #484native fnbodies andnative { }blocks, kernel test (step 4 of #53) #484native fnbodies andnative { }blocks, kernel test (step 4 of #53) #484CI red on
a7ca8f2:ci / bootstrap (linux-x64)(failed after 16s),ci / pack the seedandci / gatesare failing; every tier/conformance job behind bootstrap was skipped, so nothing exercises this change yet. I cannot read the job logs with a review token, so the cause is not seen. Please fix and push; the next CI run brings me back. Heads-up for the re-review: the diff changes lowering behaviour (nativeEntryOf,generatedKindOf) without a test in the PR; either a test that lowers a one-intrinsic native body, or a pointer to the existing test that covers it, should be in place.a88446f124012f7d9271CI red on
012f7d9:ci / tier A (linux-x64)(failed after 27m29s) andci / gatesare failing; bootstrap, tier B and the other jobs that ran are green, the cross/arm64/windows/macos jobs were skipped. I cannot read the job logs with a review token, so the cause is not seen. Please fix and push (or re-run if it is a flake); the next CI run brings me back. Diff read, no other blockers so far: the lowering change and its two new tests inlower-calls.test.trblook consistent with the stated slice. Non-blocking: the title says "and native blocks", the body says NativeBlock lowering is not in this PR.feat(ir): lower native fn bodies and native blocks through the Intrinsic pathto feat(ir): lower native fn bodies through the Intrinsic pathChecklist for
b59107b(re-review: earlier CI findings and the missing-test note are resolved):lower-calls.test.trb(one-intrinsic body lowers tointrinsic textByteLength %0; reordered operands is no entry),lengthSourceadapted to the multi-statement case. CI combined status success on this head (tier A, tier B, bootstrap, gates green; cross/arm64/windows/macos skipped by the path filter).selfand the parameters in declared order falls back to the existing "not lowered yet" finding, so a mismatch betweenintrinsicOfand the checker can only fail closed..uncheckedmaps tochecked: false;convert.<from>.<to>and kind use (Required/Forbidden) match the checker rules.numericKindNamed/operationNamedinto the shared module, messages unchanged.Non-blocking: none.