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

[CppCodeGen] Enable Delegates tests #6735

Merged
merged 4 commits into from Jan 10, 2019

Conversation

Projects
None yet
2 participants
@kbaladurin
Copy link
Collaborator

kbaladurin commented Dec 27, 2018

No description provided.

@@ -62,7 +62,7 @@ public static GenericLookupResult GetLookupSignature(NodeFactory factory, ReadyT
case ReadyToRunHelperId.VirtualDispatchCell:
return factory.GenericLookup.VirtualDispatchCell((MethodDesc)target);
case ReadyToRunHelperId.MethodEntry:
return factory.GenericLookup.MethodEntry((MethodDesc)target);
return factory.GenericLookup.MethodEntry((MethodDesc)target, additionalParam != null ? (bool)additionalParam : false);

This comment has been minimized.

@jkotas

jkotas Dec 27, 2018

Member

Other codegens deal with this by passing around unboxing MethodDesc. Can the CppCodeGen do the same?

This comment has been minimized.

@kbaladurin

kbaladurin Jan 9, 2019

Collaborator

Other codegens generate code that obtains address of actual method not unboxing stub for such cases:

ldftn      instance string valuetype test.Program/GenStruct`1<!!0>::MakeGenString<!!0>()
calli      instance string ()

Unboxing stubs are used in case of delegate construction.

@kbaladurin kbaladurin force-pushed the kbaladurin:cppgen_delegates branch 2 times, most recently from 6a04039 to 911ab28 Jan 9, 2019

Konstantin Baladurin added some commits Dec 27, 2018

Konstantin Baladurin
[CppCodeGen] Fix ldftn import
ImportLdFtn should generate code that obtains address of actual method not
unboxing stub. Unboxing stubs are used in case of delegate construction.
Konstantin Baladurin
[CppCodeGen] Fix call importing in case of delegate instantiation
Remove unnecessary update of the first argument (firstParameter) of the
delegate initialization function.
Konstantin Baladurin

@kbaladurin kbaladurin force-pushed the kbaladurin:cppgen_delegates branch from 911ab28 to 5e70c3d Jan 9, 2019

@jkotas

This comment has been minimized.

Copy link
Member

jkotas commented Jan 10, 2019

@dotnet-bot test this please

@jkotas

jkotas approved these changes Jan 10, 2019

Copy link
Member

jkotas left a comment

Thanks

@jkotas jkotas merged commit 2b0165d into dotnet:master Jan 10, 2019

12 checks passed

OSX10.12 Debug and CoreCLR tests Build finished.
Details
OSX10.12 Debug and CoreFX tests Build finished.
Details
OSX10.12 Release Build finished.
Details
Ubuntu Debug and CoreCLR tests Build finished.
Details
Ubuntu Debug and CoreFX tests Build finished.
Details
Ubuntu Release Build finished.
Details
Windows_NT Debug and CoreCLR tests Build finished.
Details
Windows_NT Debug and CoreFX tests Build finished.
Details
Windows_NT Release Build finished.
Details
Windows_NT_Wasm Debug and CoreCLR tests WebAssembly Build finished.
Details
Windows_NT_Wasm Release WebAssembly Build finished.
Details
license/cla All CLA requirements met.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment