@@ -3175,76 +3175,7 @@ protected static boolean isMappingOrSequence(Object obj) {
3175
3175
@ ReportPolymorphism
3176
3176
abstract static class PyObjectCallNode extends PythonTernaryBuiltinNode {
3177
3177
3178
- @ Specialization (guards = {"argsLib.isNull(argsObj)" , "kwargsLib.isNull(kwargsObj) || isEmptyDict(kwargsToJavaNode, lenNode, kwargsObj)" }, limit = "3" )
3179
- static Object doNoArgsAndNoKeywords (VirtualFrame frame , Object callableObj , @ SuppressWarnings ("unused" ) Object argsObj , @ SuppressWarnings ("unused" ) Object kwargsObj ,
3180
- @ CachedLibrary ("argsObj" ) @ SuppressWarnings ("unused" ) InteropLibrary argsLib ,
3181
- @ CachedLibrary ("kwargsObj" ) @ SuppressWarnings ("unused" ) InteropLibrary kwargsLib ,
3182
- @ Cached CExtNodes .AsPythonObjectNode callableToJavaNode ,
3183
- @ Cached @ SuppressWarnings ("unused" ) CExtNodes .AsPythonObjectNode kwargsToJavaNode ,
3184
- @ Cached @ SuppressWarnings ("unused" ) HashingCollectionNodes .LenNode lenNode ,
3185
- @ Cached CExtNodes .ToNewRefNode toNewRefNode ,
3186
- @ Cached CallNode callNode ,
3187
- @ Cached GetNativeNullNode getNativeNullNode ,
3188
- @ Cached CExtNodes .ToSulongNode nullToSulongNode ,
3189
- @ Cached TransformExceptionToNativeNode transformExceptionToNativeNode ) {
3190
- try {
3191
- Object callable = callableToJavaNode .execute (callableObj );
3192
- return toNewRefNode .execute (callNode .execute (frame , callable , new Object [0 ], PKeyword .EMPTY_KEYWORDS ));
3193
- } catch (PException e ) {
3194
- transformExceptionToNativeNode .execute (frame , e );
3195
- return nullToSulongNode .execute (getNativeNullNode .execute ());
3196
- }
3197
- }
3198
-
3199
- @ Specialization (guards = {"!argsLib.isNull(argsObj)" , "kwargsLib.isNull(kwargsObj) || isEmptyDict(kwargsToJavaNode, lenNode, kwargsObj)" }, limit = "3" )
3200
- static Object doNoKeywords (VirtualFrame frame , Object callableObj , Object argsObj , @ SuppressWarnings ("unused" ) Object kwargsObj ,
3201
- @ CachedLibrary ("argsObj" ) @ SuppressWarnings ("unused" ) InteropLibrary argsLib ,
3202
- @ CachedLibrary ("kwargsObj" ) @ SuppressWarnings ("unused" ) InteropLibrary kwargsLib ,
3203
- @ Cached ExecutePositionalStarargsNode expandArgsNode ,
3204
- @ Cached CExtNodes .AsPythonObjectNode callableToJavaNode ,
3205
- @ Cached CExtNodes .AsPythonObjectNode argsToJavaNode ,
3206
- @ Cached @ SuppressWarnings ("unused" ) CExtNodes .AsPythonObjectNode kwargsToJavaNode ,
3207
- @ Cached @ SuppressWarnings ("unused" ) HashingCollectionNodes .LenNode lenNode ,
3208
- @ Cached CExtNodes .ToNewRefNode toNewRefNode ,
3209
- @ Cached CallNode callNode ,
3210
- @ Cached GetNativeNullNode getNativeNullNode ,
3211
- @ Cached CExtNodes .ToSulongNode nullToSulongNode ,
3212
- @ Cached TransformExceptionToNativeNode transformExceptionToNativeNode ) {
3213
- try {
3214
- Object callable = callableToJavaNode .execute (callableObj );
3215
- Object [] args = expandArgsNode .executeWith (frame , argsToJavaNode .execute (argsObj ));
3216
- return toNewRefNode .execute (callNode .execute (frame , callable , args , PKeyword .EMPTY_KEYWORDS ));
3217
- } catch (PException e ) {
3218
- // getContext() acts as a branch profile
3219
- transformExceptionToNativeNode .execute (frame , e );
3220
- return nullToSulongNode .execute (getNativeNullNode .execute ());
3221
- }
3222
- }
3223
-
3224
- @ Specialization (guards = {"argsLib.isNull(argsObj)" , "!kwargsLib.isNull(kwargsObj)" , "!isEmptyDict(kwargsToJavaNode, lenNode, kwargsObj)" }, limit = "3" )
3225
- static Object doNoArgs (VirtualFrame frame , Object callableObj , @ SuppressWarnings ("unused" ) Object argsObj , @ SuppressWarnings ("unused" ) Object kwargsObj ,
3226
- @ CachedLibrary ("argsObj" ) @ SuppressWarnings ("unused" ) InteropLibrary argsLib ,
3227
- @ CachedLibrary ("kwargsObj" ) @ SuppressWarnings ("unused" ) InteropLibrary kwargsLib ,
3228
- @ Cached ExpandKeywordStarargsNode expandKwargsNode ,
3229
- @ Cached CExtNodes .AsPythonObjectNode callableToJavaNode ,
3230
- @ Cached @ SuppressWarnings ("unused" ) CExtNodes .AsPythonObjectNode kwargsToJavaNode ,
3231
- @ Cached @ SuppressWarnings ("unused" ) HashingCollectionNodes .LenNode lenNode ,
3232
- @ Cached CExtNodes .ToNewRefNode toNewRefNode ,
3233
- @ Cached CallNode callNode ,
3234
- @ Cached GetNativeNullNode getNativeNullNode ,
3235
- @ Cached CExtNodes .ToSulongNode nullToSulongNode ,
3236
- @ Cached TransformExceptionToNativeNode transformExceptionToNativeNode ) {
3237
- try {
3238
- PKeyword [] keywords = expandKwargsNode .executeWith (kwargsToJavaNode .execute (kwargsObj ));
3239
- Object callable = callableToJavaNode .execute (callableObj );
3240
- return toNewRefNode .execute (callNode .execute (frame , callable , new Object [0 ], keywords ));
3241
- } catch (PException e ) {
3242
- transformExceptionToNativeNode .execute (frame , e );
3243
- return nullToSulongNode .execute (getNativeNullNode .execute ());
3244
- }
3245
- }
3246
-
3247
- @ Specialization (replaces = {"doNoArgsAndNoKeywords" , "doNoKeywords" , "doNoArgs" }, limit = "3" )
3178
+ @ Specialization (limit = "3" )
3248
3179
static Object doGeneric (VirtualFrame frame , Object callableObj , Object argsObj , Object kwargsObj ,
3249
3180
@ CachedLibrary ("argsObj" ) @ SuppressWarnings ("unused" ) InteropLibrary argsLib ,
3250
3181
@ CachedLibrary ("kwargsObj" ) @ SuppressWarnings ("unused" ) InteropLibrary kwargsLib ,
0 commit comments