Skip to content

Extract wasm string-ctor thunk selection and prestub native-helper fallback from next-blocker-spc#131121

Merged
davidwrighton merged 2 commits into
mainfrom
copilot/next-blocker-spc-again
Jul 21, 2026
Merged

Extract wasm string-ctor thunk selection and prestub native-helper fallback from next-blocker-spc#131121
davidwrighton merged 2 commits into
mainfrom
copilot/next-blocker-spc-again

Conversation

Copilot AI commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Extracts the requested subset from main...AndyAyersMS:runtime:next-blocker-spc: the GetCookieForCalliSig string-constructor handling and the prestub.cpp managed-FCall helper entrypoint fix. This narrows the PR to the two runtime paths needed to unblock wasm mixed interpreter/R2R dispatch.

  • src/coreclr/vm/wasm/helpers.cppGetCookieForCalliSig

    • Adds a string-constructor special case so interpreter→R2R calli cookies use the constructor factory thunk shape (matching existing R2R→interpreter string-ctor handling).
    • Uses explicit thunk-key mapping by constructor arity, including ReadOnlySpan<char> constructor handling.
  • src/coreclr/vm/prestub.cpp — managed FCall helper publication

    • Handles both managed-helper forms under portable entrypoints:
      • interpreter bytecode available → publish interpreter data;
      • interpreter bytecode absent (native R2R helper) → publish helper native actual code.
    • Prevents routing back into prestub when the helper resolves to native code.
if (ilStubInterpData != NULL)
{
    SetInterpreterCode((InterpByteCodeStart*)ilStubInterpData);
    PortableEntryPoint::SetInterpreterData(entryPoint, (PCODE)(TADDR)ilStubInterpData);
}
else
{
    _ASSERTE(PortableEntryPoint::HasNativeEntryPoint(pCode));
    PortableEntryPoint::SetActualCode(entryPoint, (PCODE)(TADDR)PortableEntryPoint::GetActualCode(pCode));
}

Copilot AI and others added 2 commits July 21, 2026 00:35
Co-authored-by: davidwrighton <10779849+davidwrighton@users.noreply.github.com>
Co-authored-by: davidwrighton <10779849+davidwrighton@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 21, 2026 00:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because there is no eligible user to bill. To allow Copilot reviews on bot-authored pull requests, enable direct organization billing in your organization's Copilot settings.

Copilot AI changed the title Extract GetCookieForCalliSig and prestub fixes from next-blocker-spc Extract wasm string-ctor thunk selection and prestub native-helper fallback from next-blocker-spc Jul 21, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 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: @JulieLeeMSFT, @BrzVlad, @janvorli
See info in area-owners.md if you want to be subscribed.

@azure-pipelines

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

@davidwrighton

Copy link
Copy Markdown
Member

/ba-g This change does not affect the iOS build in any way.

@davidwrighton
davidwrighton merged commit 3583062 into main Jul 21, 2026
127 of 129 checks passed
@davidwrighton
davidwrighton deleted the copilot/next-blocker-spc-again branch July 21, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants