File tree 4 files changed +12
-16
lines changed
libraries/System.Private.CoreLib/src/System
4 files changed +12
-16
lines changed Original file line number Diff line number Diff line change @@ -3625,14 +3625,18 @@ class Compiler
3625
3625
3626
3626
// Return true if call is a recursive call; return false otherwise.
3627
3627
// Note when inlining, this looks for calls back to the root method.
3628
- bool gtIsRecursiveCall (GenTreeCall* call)
3628
+ bool gtIsRecursiveCall (GenTreeCall* call, bool useInlineRoot = true )
3629
3629
{
3630
- return gtIsRecursiveCall (call->gtCallMethHnd );
3630
+ return gtIsRecursiveCall (call->gtCallMethHnd , useInlineRoot );
3631
3631
}
3632
3632
3633
- bool gtIsRecursiveCall (CORINFO_METHOD_HANDLE callMethodHandle)
3633
+ bool gtIsRecursiveCall (CORINFO_METHOD_HANDLE callMethodHandle, bool useInlineRoot = true )
3634
3634
{
3635
- return (callMethodHandle == impInlineRoot ()->info .compMethodHnd );
3635
+ if (useInlineRoot)
3636
+ {
3637
+ return callMethodHandle == impInlineRoot ()->info .compMethodHnd ;
3638
+ }
3639
+ return callMethodHandle == info.compMethodHnd ;
3636
3640
}
3637
3641
3638
3642
// -------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -835,7 +835,7 @@ GenTree* Compiler::addRangeCheckIfNeeded(
835
835
)
836
836
{
837
837
assert (!immOp->IsCnsIntOrI ());
838
- assert (varTypeIsUnsigned (immOp));
838
+ assert (varTypeIsIntegral (immOp));
839
839
840
840
return addRangeCheckForHWIntrinsic (immOp, immLowerBound, immUpperBound);
841
841
}
Original file line number Diff line number Diff line change @@ -2886,7 +2886,7 @@ GenTree* Compiler::impIntrinsic(GenTree* newobjThis,
2886
2886
if (isIntrinsic)
2887
2887
{
2888
2888
// The recursive non-virtual calls to Jit intrinsics are must-expand by convention.
2889
- mustExpand = gtIsRecursiveCall(method) && !(methodFlags & CORINFO_FLG_VIRTUAL);
2889
+ mustExpand = gtIsRecursiveCall(method, false ) && !(methodFlags & CORINFO_FLG_VIRTUAL);
2890
2890
}
2891
2891
else
2892
2892
{
@@ -10135,7 +10135,7 @@ NamedIntrinsic Compiler::lookupNamedIntrinsic(CORINFO_METHOD_HANDLE method)
10135
10135
assert(strcmp(className, "Vector`1") == 0);
10136
10136
result = NI_Vector_GetCount;
10137
10137
}
10138
- else if (gtIsRecursiveCall(method))
10138
+ else if (gtIsRecursiveCall(method, false ))
10139
10139
{
10140
10140
// For the framework itself, any recursive intrinsics will either be
10141
10141
// only supported on a single platform or will be guarded by a relevant
@@ -10370,7 +10370,7 @@ NamedIntrinsic Compiler::lookupNamedIntrinsic(CORINFO_METHOD_HANDLE method)
10370
10370
10371
10371
result = NI_Vector_GetCount;
10372
10372
}
10373
- else if (gtIsRecursiveCall(method))
10373
+ else if (gtIsRecursiveCall(method, false ))
10374
10374
{
10375
10375
// For the framework itself, any recursive intrinsics will either be
10376
10376
// only supported on a single platform or will be guarded by a relevant
Original file line number Diff line number Diff line change @@ -127,20 +127,12 @@ public virtual Type[] GetGenericParameterConstraints()
127
127
protected virtual bool IsMarshalByRefImpl ( ) => false ;
128
128
public bool IsPrimitive
129
129
{
130
- #if NATIVEAOT
131
- // https://github.com/dotnet/runtime/issues/97272
132
- [ MethodImpl ( MethodImplOptions . NoOptimization ) ]
133
- #endif
134
130
[ Intrinsic ]
135
131
get => IsPrimitiveImpl ( ) ;
136
132
}
137
133
protected abstract bool IsPrimitiveImpl ( ) ;
138
134
public bool IsValueType
139
135
{
140
- #if NATIVEAOT
141
- // https://github.com/dotnet/runtime/issues/97272
142
- [ MethodImpl ( MethodImplOptions . NoOptimization ) ]
143
- #endif
144
136
[ Intrinsic ]
145
137
get => IsValueTypeImpl ( ) ;
146
138
}
You can’t perform that action at this time.
0 commit comments