-
Notifications
You must be signed in to change notification settings - Fork 274
Reduce non-default-interface costs for complicated runtimeclasses #1579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
jonwis
wants to merge
30
commits into
microsoft:master
Choose a base branch
from
jonwis:user/jonwis/fast-runtimeclasses
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
64b8e32
Add thunk-based interface caching plan, build/test scripts
jonwis 85d475f
Address plan review: fix 10 gaps, snake_case, rework build script
jonwis 5a3fa1e
Move write_abi_args to Phase 1, add user rules to plan
jonwis 93ef473
Rules: add -logo nul, reduce noisy output guidance
jonwis 0cb57ec
Phase 1: thunked runtimeclass infrastructure (strings, ASM stubs, con…
jonwis 2600e33
Phase 2 WIP: code generator emits thunked runtimeclasses
jonwis 40dac14
Fix thunked type identity: arg<T>, is_com_interface, empty_value, box…
jonwis 01709ea
Update plan notes: systematic fix complete, disassembly verification …
jonwis 59740ce
Add thunked_dispatch test: consumer-side PropertySet verification
jonwis 722d83a
Phase 3 tests: copy/move, ABI interop, as/try_as, thread safety
jonwis 58b1c07
Update plan: Phase 3 test coverage table, reset_thunked bug documenta…
jonwis 63e8c49
Phase 3 complete: generic default (StringMap) + full mode (Package >8…
jonwis 9edcf17
Phase 3 complete: all test scenarios covered, 3072 assertions / 102 t…
jonwis 89dae65
Add technical documentation: docs/runtimeclass-caching.md
jonwis d7eaf1f
Exclude async default interfaces from thunking; add operator== with C…
jonwis b175ad2
Fix bind_in, delegate ABI, test_slow expectation; exclude async types
jonwis 29dcec0
Update plan: e2e validation checkpoint, 5 issues found and fixed
jonwis fcf05c5
Checkpoint - QI to an unsupported interface causes bad corruption by …
jonwis fae75d3
Checkpoint - enable QIs to return failures
jonwis 68ee998
Rename things
jonwis 8d2ad89
Modernize assembly using windows macros
jonwis 6bdf12d
Inline resolve thunk into base.h, remove separate .cpp
jonwis 94f6aad
Gate flattened runtimeclasses behind -flatten_classes flag
jonwis ee7371a
Fix doc inaccuracies for PR readiness
jonwis 917954e
Consolidate plan doc: replace session breadcrumbs with concise notes
jonwis bd43637
Add cached_thunks static lib for nuget packaging
jonwis 59c86ee
Restore test_slow QI count expectation
jonwis b228424
Fast ABI documentation
jonwis 760436d
Refresh documentation
jonwis 716ff56
Add ODR violation validation
jonwis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,7 @@ test*.xml | |
| test*_results.txt | ||
| test_failures.txt | ||
| build | ||
| _build | ||
| packages | ||
| Debug | ||
| Release | ||
|
|
||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { | ||
| "tabWidth": 4, | ||
| "useTabs": false, | ||
| "overrides": [ | ||
| { | ||
| "files": "*.md", | ||
| "options": { | ||
| "printWidth": 120, | ||
| "proseWrap": "always" | ||
| } | ||
| } | ||
| ] | ||
| } |
Submodule winmd
added at
0f1eae
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <ItemGroup Label="ProjectConfigurations"> | ||
| <ProjectConfiguration Include="Debug|Win32"> | ||
| <Configuration>Debug</Configuration> | ||
| <Platform>Win32</Platform> | ||
| </ProjectConfiguration> | ||
| <ProjectConfiguration Include="Release|Win32"> | ||
| <Configuration>Release</Configuration> | ||
| <Platform>Win32</Platform> | ||
| </ProjectConfiguration> | ||
| <ProjectConfiguration Include="Debug|x64"> | ||
| <Configuration>Debug</Configuration> | ||
| <Platform>x64</Platform> | ||
| </ProjectConfiguration> | ||
| <ProjectConfiguration Include="Release|x64"> | ||
| <Configuration>Release</Configuration> | ||
| <Platform>x64</Platform> | ||
| </ProjectConfiguration> | ||
| <ProjectConfiguration Include="Debug|ARM64"> | ||
| <Configuration>Debug</Configuration> | ||
| <Platform>ARM64</Platform> | ||
| </ProjectConfiguration> | ||
| <ProjectConfiguration Include="Release|ARM64"> | ||
| <Configuration>Release</Configuration> | ||
| <Platform>ARM64</Platform> | ||
| </ProjectConfiguration> | ||
| </ItemGroup> | ||
| <PropertyGroup Label="Globals"> | ||
| <VCProjectVersion>16.0</VCProjectVersion> | ||
| <ProjectGuid>{B3F2B53D-5E38-4B75-9C07-E2B1A5C2E0D7}</ProjectGuid> | ||
| <Keyword>Win32Proj</Keyword> | ||
| <RootNamespace>cached_thunks</RootNamespace> | ||
| </PropertyGroup> | ||
| <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||
| <PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration"> | ||
| <ConfigurationType>StaticLibrary</ConfigurationType> | ||
| <UseDebugLibraries>true</UseDebugLibraries> | ||
| <CharacterSet>Unicode</CharacterSet> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration"> | ||
| <ConfigurationType>StaticLibrary</ConfigurationType> | ||
| <UseDebugLibraries>false</UseDebugLibraries> | ||
| <WholeProgramOptimization>true</WholeProgramOptimization> | ||
| <CharacterSet>Unicode</CharacterSet> | ||
| </PropertyGroup> | ||
| <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||
| <ImportGroup Label="ExtensionSettings"> | ||
| </ImportGroup> | ||
| <ImportGroup Label="Shared"> | ||
| </ImportGroup> | ||
| <ImportGroup Label="PropertySheets"> | ||
| <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
| </ImportGroup> | ||
| <PropertyGroup Label="UserMacros" /> | ||
| <PropertyGroup Condition="'$(Configuration)'=='Release'"> | ||
| <LinkIncremental>false</LinkIncremental> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition="'$(Configuration)'=='Debug'"> | ||
| <LinkIncremental>true</LinkIncremental> | ||
| </PropertyGroup> | ||
| <ItemDefinitionGroup> | ||
| <Lib> | ||
| <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> | ||
| </Lib> | ||
| </ItemDefinitionGroup> | ||
| <PropertyGroup> | ||
| <Platform_Arm Condition="'$(Platform)'=='ARM64'">true</Platform_Arm> | ||
| <Platform_Arm Condition="'$(Platform_Arm)'!='true'">false</Platform_Arm> | ||
| <Platform_Intel>!$(Platform_Arm)</Platform_Intel> | ||
| <TargetName>cppwinrt_cached_thunks</TargetName> | ||
| </PropertyGroup> | ||
| <ImportGroup> | ||
| <Import Condition="$(Platform_Intel)" Project="$(VCTargetsPath)\BuildCustomizations\masm.props" /> | ||
| <Import Condition="$(Platform_Arm)" Project="$(VCTargetsPath)\BuildCustomizations\marmasm.props" /> | ||
| </ImportGroup> | ||
| <!-- ARM64: preprocess with cl.exe to expand #include "ksarm64.h" --> | ||
| <Target Name="CppWinRTPreprocessArmThunk" Condition="$(Platform_Arm)" BeforeTargets="_MARMASM" Outputs="$(IntDir)cached_thunks_arm64.pp" Inputs="..\strings\cached_thunks_arm64.asm"> | ||
| <Exec Command="cl /E /Tc ..\strings\cached_thunks_arm64.asm > $(IntDir)cached_thunks_arm64.pp" /> | ||
| </Target> | ||
| <Target Name="CppWinRTPreprocessArmECThunk" Condition="$(Platform_Arm)" BeforeTargets="_MARMASM" Outputs="$(IntDir)cached_thunks_arm64ec.pp" Inputs="..\strings\cached_thunks_arm64ec.asm"> | ||
| <Exec Command="cl /E /Tc ..\strings\cached_thunks_arm64ec.asm > $(IntDir)cached_thunks_arm64ec.pp" /> | ||
| </Target> | ||
| <ItemGroup Condition="'$(Platform)'=='x64'"> | ||
| <MASM Include="..\strings\cached_thunks_x64.asm"> | ||
| <FileType>Document</FileType> | ||
| </MASM> | ||
| </ItemGroup> | ||
| <ItemGroup Condition="'$(Platform)'=='Win32'"> | ||
| <MASM Include="..\strings\cached_thunks_x86.asm"> | ||
| <FileType>Document</FileType> | ||
| <UseSafeExceptionHandlers>true</UseSafeExceptionHandlers> | ||
| </MASM> | ||
| </ItemGroup> | ||
| <ItemGroup Condition="$(Platform_Arm)"> | ||
| <MARMASM Include="$(IntDir)cached_thunks_arm64.pp"> | ||
| <PreprocessWithCl Condition="'$(VisualStudioVersion)' >= '17.0'">false</PreprocessWithCl> | ||
| <FileType>Document</FileType> | ||
| </MARMASM> | ||
| <MARMASM Include="$(IntDir)cached_thunks_arm64ec.pp"> | ||
| <PreprocessWithCl Condition="'$(VisualStudioVersion)' >= '17.0'">false</PreprocessWithCl> | ||
| <FileType>Document</FileType> | ||
| </MARMASM> | ||
| </ItemGroup> | ||
| <ImportGroup> | ||
| <Import Condition="$(Platform_Intel)" Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" /> | ||
| <Import Condition="$(Platform_Arm)" Project="$(VCTargetsPath)\BuildCustomizations\marmasm.targets" /> | ||
| </ImportGroup> | ||
| <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
| <ImportGroup Label="ExtensionTargets"> | ||
| </ImportGroup> | ||
| </Project> |
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be a matrix config instead of all runs.