File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5943,7 +5943,7 @@ void Lowering::InsertPInvokeMethodProlog()
59435943 noway_assert (comp->info .compUnmanagedCallCountWithGCTransition );
59445944 noway_assert (comp->lvaInlinedPInvokeFrameVar != BAD_VAR_NUM);
59455945
5946- if (comp->opts .ShouldUsePInvokeHelpers ())
5946+ if (!comp-> info . compPublishStubParam && comp->opts .ShouldUsePInvokeHelpers ())
59475947 {
59485948 return ;
59495949 }
@@ -5972,6 +5972,13 @@ void Lowering::InsertPInvokeMethodProlog()
59725972 DISPTREERANGE (firstBlockRange, store);
59735973 }
59745974
5975+ // If we use P/Invoke helper calls then the hidden stub initialization
5976+ // is all we need to do. Rest will get initialized by the helper.
5977+ if (comp->opts .ShouldUsePInvokeHelpers ())
5978+ {
5979+ return ;
5980+ }
5981+
59755982 // Call runtime helper to fill in our InlinedCallFrame and push it on the Frame list:
59765983 // TCB = CORINFO_HELP_INIT_PINVOKE_FRAME(&symFrameStart);
59775984 GenTree* frameAddr = comp->gtNewLclVarAddrNode (comp->lvaInlinedPInvokeFrameVar );
You can’t perform that action at this time.
0 commit comments