Conversation
0d67060 to
be9ca44
Compare
|
@djolertrk Is this ready? Looks like you just need to update the expect tests that are failing (since the handling of stubs has changed), but once that is done, I'm guessing there isn't much more planned for this PR correct? |
greenhat
left a comment
There was a problem hiding this comment.
Looking good when the stub ends up being an op!
I did not find how the stdlib/tx_kernel function calls transformation is preserved.
| // If this is a linker stub, synthesize its body to exec the MASM callee. | ||
| // Note: Intrinsics and Miden ABI (SDK/stdlib) calls are expected to be | ||
| // surfaced via such linker stubs rather than as core-wasm imports. | ||
| if maybe_lower_linker_stub(function_ref, &body_data.body, module_state)? { |
There was a problem hiding this comment.
maybe_lower_linker_stub handles cases where the stub is transformed to call the stdlib/tx_kernel function. See for example
compiler/tests/integration/expected/examples/p2id.wat
Lines 707 to 715 in e8de1ae
compiler/tests/integration/expected/examples/p2id.hir
Lines 1253 to 1276 in e8de1ae
I don't see them handled anywhere after the deletion of this call.
|
@djolertrk The first commit is without a signature. Please sign. |
|
As a side note, github does not send a notification on PR status change (draft -> ready) so when I get a notification for a new commit I'm not sure if it's ready for review. Re-requesting review or ping in a comment is appreciated since it ends up as a notification in my inbox. |
1ec9ae1 to
b2562c1
Compare
Use two Pass approach: - Pass 1: Detect and register ALL linker stubs first - Pass 2: Translate non-stub function bodies with all stubs available This ensures operations like `arith.add` appear directly at call sites instead of `hir.exec @intrinsics::felt::add` calls. Add test case as well: $ litcheck lit run --path bin tests/lit/inline-stubs
In addition, update expect tests.
b2562c1 to
48a41be
Compare
Do it in two phases: