@@ -2365,13 +2365,6 @@ CORINFO_METHOD_HANDLE CEEInfo::GetDelegateCtor(
2365
2365
MODE_PREEMPTIVE;
2366
2366
} CONTRACTL_END;
2367
2367
2368
- if (isVerifyOnly ())
2369
- {
2370
- // No sense going through the optimized case just for verification and it can cause issues parsing
2371
- // uninstantiated generic signatures.
2372
- return methHnd;
2373
- }
2374
-
2375
2368
CORINFO_METHOD_HANDLE result = NULL ;
2376
2369
2377
2370
JIT_TO_EE_TRANSITION ();
@@ -2697,9 +2690,6 @@ void CEEInfo::ScanToken(Module * pModule, CORINFO_RESOLVED_TOKEN * pResolvedToke
2697
2690
if (pModule->IsSystem ())
2698
2691
return ;
2699
2692
2700
- if (isVerifyOnly ())
2701
- return ;
2702
-
2703
2693
//
2704
2694
// Scan method instantiation
2705
2695
//
@@ -2884,10 +2874,6 @@ void CEEInfo::ComputeRuntimeLookupForSharedGenericToken(DictionaryEntryKind entr
2884
2874
PRECONDITION (CheckPointer (pResultLookup));
2885
2875
} CONTRACTL_END;
2886
2876
2887
-
2888
- // We should never get here when we are only verifying
2889
- _ASSERTE (!isVerifyOnly ());
2890
-
2891
2877
pResultLookup->lookupKind .needsRuntimeLookup = true ;
2892
2878
pResultLookup->lookupKind .runtimeLookupFlags = 0 ;
2893
2879
@@ -3691,13 +3677,6 @@ CorInfoInitClassResult CEEInfo::initClass(
3691
3677
JIT_TO_EE_TRANSITION ();
3692
3678
{
3693
3679
3694
- // Do not bother figuring out the initialization if we are only verifying the method.
3695
- if (isVerifyOnly ())
3696
- {
3697
- result = CORINFO_INITCLASS_NOT_REQUIRED;
3698
- goto exit;
3699
- }
3700
-
3701
3680
FieldDesc * pFD = (FieldDesc *)field;
3702
3681
_ASSERTE (pFD == NULL || pFD->IsStatic ());
3703
3682
@@ -5173,7 +5152,7 @@ void CEEInfo::getCallInfo(
5173
5152
{
5174
5153
BYTE * indcell = NULL ;
5175
5154
5176
- if (!(flags & CORINFO_CALLINFO_KINDONLY) && ! isVerifyOnly () )
5155
+ if (!(flags & CORINFO_CALLINFO_KINDONLY))
5177
5156
{
5178
5157
// We shouldn't be using GetLoaderAllocator here because for LCG, we need to get the
5179
5158
// VirtualCallStubManager from where the stub will be used.
@@ -5826,9 +5805,6 @@ CorInfoHelpFunc CEEInfo::getCastingHelper(CORINFO_RESOLVED_TOKEN * pResolvedToke
5826
5805
MODE_PREEMPTIVE;
5827
5806
} CONTRACTL_END;
5828
5807
5829
- if (isVerifyOnly ())
5830
- return fThrowing ? CORINFO_HELP_CHKCASTANY : CORINFO_HELP_ISINSTANCEOFANY;
5831
-
5832
5808
CorInfoHelpFunc result = CORINFO_HELP_UNDEF;
5833
5809
5834
5810
JIT_TO_EE_TRANSITION ();
@@ -9455,7 +9431,7 @@ CorInfoTypeWithMod CEEInfo::getArgType (
9455
9431
9456
9432
case ELEMENT_TYPE_PTR:
9457
9433
// Load the type eagerly under debugger to make the eval work
9458
- if (! isVerifyOnly () && CORDisableJITOptimizations (pModule->GetDebuggerInfoBits ()))
9434
+ if (CORDisableJITOptimizations (pModule->GetDebuggerInfoBits ()))
9459
9435
{
9460
9436
// NOTE: in some IJW cases, when the type pointed at is unmanaged,
9461
9437
// the GetTypeHandle may fail, because there is no TypeDef for such type.
@@ -12108,12 +12084,6 @@ void* CEEJitInfo::getFieldAddress(CORINFO_FIELD_HANDLE fieldHnd,
12108
12084
if (ppIndirection != NULL )
12109
12085
*ppIndirection = NULL ;
12110
12086
12111
- // Do not bother with initialization if we are only verifying the method.
12112
- if (isVerifyOnly ())
12113
- {
12114
- return (void *)0x10 ;
12115
- }
12116
-
12117
12087
JIT_TO_EE_TRANSITION ();
12118
12088
12119
12089
FieldDesc* field = (FieldDesc*) fieldHnd;
@@ -12164,12 +12134,6 @@ CORINFO_CLASS_HANDLE CEEJitInfo::getStaticFieldCurrentClass(CORINFO_FIELD_HANDLE
12164
12134
*pIsSpeculative = true ;
12165
12135
}
12166
12136
12167
- // Only examine the field's value if we are producing jitted code.
12168
- if (isVerifyOnly ())
12169
- {
12170
- return result;
12171
- }
12172
-
12173
12137
JIT_TO_EE_TRANSITION ();
12174
12138
12175
12139
FieldDesc* field = (FieldDesc*) fieldHnd;
@@ -12752,7 +12716,6 @@ CorJitResult invokeCompileMethodHelper(EEJitManager *jitMgr,
12752
12716
// If we're doing an "import_only" compilation, it's for verification, so don't interpret.
12753
12717
// (We assume that importation is completely architecture-independent, or at least nearly so.)
12754
12718
if (FAILED (ret) &&
12755
- !jitFlags.IsSet (CORJIT_FLAGS::CORJIT_FLAG_IMPORT_ONLY) &&
12756
12719
(forceInterpreter || !jitFlags.IsSet (CORJIT_FLAGS::CORJIT_FLAG_MAKEFINALCODE)))
12757
12720
{
12758
12721
if (SUCCEEDED (ret = Interpreter::GenerateInterpreterStub (comp, info, nativeEntry, nativeSizeOfCode)))
@@ -12777,7 +12740,6 @@ CorJitResult invokeCompileMethodHelper(EEJitManager *jitMgr,
12777
12740
// If we're doing an "import_only" compilation, it's for verification, so don't interpret.
12778
12741
// (We assume that importation is completely architecture-independent, or at least nearly so.)
12779
12742
if (FAILED (ret) &&
12780
- !jitFlags.IsSet (CORJIT_FLAGS::CORJIT_FLAG_IMPORT_ONLY) &&
12781
12743
(forceInterpreter || !jitFlags.IsSet (CORJIT_FLAGS::CORJIT_FLAG_MAKEFINALCODE)))
12782
12744
{
12783
12745
if (SUCCEEDED (ret = Interpreter::GenerateInterpreterStub (comp, info, nativeEntry, nativeSizeOfCode)))
@@ -12802,7 +12764,7 @@ CorJitResult invokeCompileMethodHelper(EEJitManager *jitMgr,
12802
12764
// If the JIT fails we keep the IL around and will
12803
12765
// try reJIT the same IL. VSW 525059
12804
12766
//
12805
- if (SUCCEEDED (ret) && !jitFlags. IsSet (CORJIT_FLAGS::CORJIT_FLAG_IMPORT_ONLY) && ! ((CEEJitInfo*)comp)->JitAgain ())
12767
+ if (SUCCEEDED (ret) && !((CEEJitInfo*)comp)->JitAgain ())
12806
12768
{
12807
12769
((CEEJitInfo*)comp)->CompressDebugInfo ();
12808
12770
@@ -12962,14 +12924,6 @@ CORJIT_FLAGS GetDebuggerCompileFlags(Module* pModule, CORJIT_FLAGS flags)
12962
12924
flags.Set (CORJIT_FLAGS::CORJIT_FLAG_DEBUG_CODE);
12963
12925
}
12964
12926
12965
- if (flags.IsSet (CORJIT_FLAGS::CORJIT_FLAG_IMPORT_ONLY))
12966
- {
12967
- // If we are only verifying the method, dont need any debug info and this
12968
- // prevents getVars()/getBoundaries() from being called unnecessarily.
12969
- flags.Clear (CORJIT_FLAGS::CORJIT_FLAG_DEBUG_INFO);
12970
- flags.Clear (CORJIT_FLAGS::CORJIT_FLAG_DEBUG_CODE);
12971
- }
12972
-
12973
12927
return flags;
12974
12928
}
12975
12929
@@ -12987,10 +12941,7 @@ CORJIT_FLAGS GetCompileFlags(MethodDesc * ftn, CORJIT_FLAGS flags, CORINFO_METHO
12987
12941
//
12988
12942
// Get CPU specific flags
12989
12943
//
12990
- if (!flags.IsSet (CORJIT_FLAGS::CORJIT_FLAG_IMPORT_ONLY))
12991
- {
12992
- flags.Add (ExecutionManager::GetEEJitManager ()->GetCPUCompileFlags ());
12993
- }
12944
+ flags.Add (ExecutionManager::GetEEJitManager ()->GetCPUCompileFlags ());
12994
12945
12995
12946
//
12996
12947
// Find the debugger and profiler related flags
@@ -13215,12 +13166,8 @@ PCODE UnsafeJitFunction(PrepareCodeConfig* config,
13215
13166
13216
13167
getMethodInfoHelper (ftn, ftnHnd, ILHeader, &methodInfo);
13217
13168
13218
- // If it's generic then we can only enter through an instantiated md (unless we're just verifying it)
13219
- _ASSERTE (flags.IsSet (CORJIT_FLAGS::CORJIT_FLAG_IMPORT_ONLY) || !ftn->IsGenericMethodDefinition ());
13220
-
13221
- // If it's an instance method then it must not be entered from a generic class
13222
- _ASSERTE (flags.IsSet (CORJIT_FLAGS::CORJIT_FLAG_IMPORT_ONLY) || ftn->IsStatic () ||
13223
- ftn->GetNumGenericClassArgs () == 0 || ftn->HasClassInstantiation ());
13169
+ // If it's generic then we can only enter through an instantiated md
13170
+ _ASSERTE (!ftn->IsGenericMethodDefinition ());
13224
13171
13225
13172
// method attributes and signature are consistant
13226
13173
_ASSERTE (!!ftn->IsStatic () == ((methodInfo.args .callConv & CORINFO_CALLCONV_HASTHIS) == 0 ));
@@ -13257,8 +13204,7 @@ PCODE UnsafeJitFunction(PrepareCodeConfig* config,
13257
13204
13258
13205
for (;;)
13259
13206
{
13260
- CEEJitInfo jitInfo (ftn, ILHeader, jitMgr, flags.IsSet (CORJIT_FLAGS::CORJIT_FLAG_IMPORT_ONLY),
13261
- !flags.IsSet (CORJIT_FLAGS::CORJIT_FLAG_NO_INLINING));
13207
+ CEEJitInfo jitInfo (ftn, ILHeader, jitMgr, !flags.IsSet (CORJIT_FLAGS::CORJIT_FLAG_NO_INLINING));
13262
13208
13263
13209
#if (defined(TARGET_AMD64) || defined(TARGET_ARM64))
13264
13210
#ifdef TARGET_AMD64
@@ -13337,8 +13283,7 @@ PCODE UnsafeJitFunction(PrepareCodeConfig* config,
13337
13283
#ifdef PERF_TRACK_METHOD_JITTIMES
13338
13284
// Because we're not calling QPC enough. I'm not going to track times if we're just importing.
13339
13285
LARGE_INTEGER methodJitTimeStart = {0 };
13340
- if (!flags.IsSet (CORJIT_FLAGS::CORJIT_FLAG_IMPORT_ONLY))
13341
- QueryPerformanceCounter (&methodJitTimeStart);
13286
+ QueryPerformanceCounter (&methodJitTimeStart);
13342
13287
13343
13288
#endif
13344
13289
LOG ((LF_CORDB, LL_EVERYTHING, " Calling invokeCompileMethod...\n " ));
@@ -13363,7 +13308,6 @@ PCODE UnsafeJitFunction(PrepareCodeConfig* config,
13363
13308
#ifdef PERF_TRACK_METHOD_JITTIMES
13364
13309
// store the time in the string buffer. Module name and token are unique enough. Also, do not
13365
13310
// capture importing time, just actual compilation time.
13366
- if (!flags.IsSet (CORJIT_FLAGS::CORJIT_FLAG_IMPORT_ONLY))
13367
13311
{
13368
13312
LARGE_INTEGER methodJitTimeStop;
13369
13313
QueryPerformanceCounter (&methodJitTimeStop);
@@ -13390,8 +13334,7 @@ PCODE UnsafeJitFunction(PrepareCodeConfig* config,
13390
13334
// Note: if we're only importing (ie, verifying/
13391
13335
// checking to make sure we could JIT, but not actually generating code (
13392
13336
// eg, for inlining), then DON'T TELL THE DEBUGGER about this.
13393
- if (!flags.IsSet (CORJIT_FLAGS::CORJIT_FLAG_IMPORT_ONLY) &&
13394
- !flags.IsSet (CORJIT_FLAGS::CORJIT_FLAG_MCJIT_BACKGROUND)
13337
+ if (!flags.IsSet (CORJIT_FLAGS::CORJIT_FLAG_MCJIT_BACKGROUND)
13395
13338
#ifdef FEATURE_STACK_SAMPLING
13396
13339
&& !flags.IsSet (CORJIT_FLAGS::CORJIT_FLAG_SAMPLING_JIT_BACKGROUND)
13397
13340
#endif // FEATURE_STACK_SAMPLING
@@ -13416,12 +13359,6 @@ PCODE UnsafeJitFunction(PrepareCodeConfig* config,
13416
13359
ThrowExceptionForJit (res);
13417
13360
}
13418
13361
13419
- if (flags.IsSet (CORJIT_FLAGS::CORJIT_FLAG_IMPORT_ONLY))
13420
- {
13421
- // We are done
13422
- break ;
13423
- }
13424
-
13425
13362
if (!nativeEntry)
13426
13363
COMPlusThrow (kInvalidProgramException );
13427
13364
@@ -14590,9 +14527,7 @@ InfoAccessType CEEInfo::constructStringLiteral(CORINFO_MODULE_HANDLE scopeHnd,
14590
14527
InfoAccessType CEEInfo::emptyStringLiteral (void ** ppValue)
14591
14528
{
14592
14529
LIMITED_METHOD_CONTRACT;
14593
- _ASSERTE (isVerifyOnly ());
14594
- *ppValue = (void *)0x10 ;
14595
- return IAT_PVALUE;
14530
+ UNREACHABLE (); // only called on derived class.
14596
14531
}
14597
14532
14598
14533
void * CEEInfo::getFieldAddress (CORINFO_FIELD_HANDLE fieldHnd,
@@ -14609,12 +14544,6 @@ void* CEEInfo::getFieldAddress(CORINFO_FIELD_HANDLE fieldHnd,
14609
14544
if (ppIndirection != NULL )
14610
14545
*ppIndirection = NULL ;
14611
14546
14612
- // Do not bother with initialization if we are only verifying the method.
14613
- if (isVerifyOnly ())
14614
- {
14615
- return (void *)0x10 ;
14616
- }
14617
-
14618
14547
JIT_TO_EE_TRANSITION ();
14619
14548
14620
14549
FieldDesc* field = (FieldDesc*)fieldHnd;
@@ -14632,10 +14561,7 @@ CORINFO_CLASS_HANDLE CEEInfo::getStaticFieldCurrentClass(CORINFO_FIELD_HANDLE fi
14632
14561
bool * pIsSpeculative)
14633
14562
{
14634
14563
LIMITED_METHOD_CONTRACT;
14635
- _ASSERTE (isVerifyOnly ());
14636
- if (pIsSpeculative != NULL )
14637
- *pIsSpeculative = true ;
14638
- return NULL ;
14564
+ UNREACHABLE (); // only called on derived class.
14639
14565
}
14640
14566
14641
14567
void * CEEInfo::getMethodSync (CORINFO_METHOD_HANDLE ftnHnd,
0 commit comments