Skip to content

Add NativeAOT WebAssembly object writer - #132032

Draft
jtschuster wants to merge 13 commits into
dotnet:wasm-writer-shared-implementationfrom
jtschuster:wasm-naot-writer-stacked
Draft

Add NativeAOT WebAssembly object writer#132032
jtschuster wants to merge 13 commits into
dotnet:wasm-writer-shared-implementationfrom
jtschuster:wasm-naot-writer-stacked

Conversation

@jtschuster

Copy link
Copy Markdown
Member

Summary

  • add a NativeAOT WebAssembly object writer on top of the shared WASM writer
  • emit the structural imports and indices needed for independently valid WASM output
  • add reproZero and focused single-method compilation coverage
  • track alternate function symbol names without consuming additional function indices

Stacked on #131778.

Validation

  • dotnet build src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj --no-restore
  • compiled reproZero.obj with the rebuilt ILCompiler
  • wasm-validate --enable-tail-call --enable-exceptions artifacts/bin/reproZero/wasm/Debug/reproZero.obj
  • git diff --check

Note

This pull request description was generated with GitHub Copilot.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 6 pipeline(s).
10 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib
See info in area-owners.md if you want to be subscribed.

assert(helperFunction.accessType == IAT_PVALUE);
GetEmitter()->emitAddressConstant(helperFunction.addr);
GetEmitter()->emitIns_I(INS_I_load, EA_PTRSIZE, 0);
if (helperFunction.accessType != IAT_VALUE)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PEP-specific logic should be gated by JitFlags::JIT_FLAG_PORTABLE_ENTRY_POINTS check

assert(call->gtControlExpr != nullptr);
LIR::Use callTargetUse(BlockRange(), &call->gtControlExpr, call);
GenTree* callTargetForArg;
if (call->gtControlExpr != nullptr)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method is called LowerPEPCall. It is odd to overload it to lower non-PEP calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants