61
61
* @author tim
62
62
*/
63
63
abstract class ApplyKeywordsNode extends PNodeWithContext {
64
- public abstract Object [] execute (String calleeName , Arity calleeArity , Object [] arguments , PKeyword [] keywords );
64
+ public abstract Object [] execute (Object callee , Arity calleeArity , Object [] arguments , PKeyword [] keywords );
65
65
66
66
public static ApplyKeywordsNode create () {
67
67
return ApplyKeywordsNodeGen .create ();
@@ -77,7 +77,7 @@ SearchNamedParameterNode createSearchNamedParameterNode() {
77
77
78
78
@ Specialization (guards = {"kwLen == keywords.length" , "calleeArity == cachedArity" })
79
79
@ ExplodeLoop
80
- Object [] applyCached (String calleeName , @ SuppressWarnings ("unused" ) Arity calleeArity , Object [] arguments , PKeyword [] keywords ,
80
+ Object [] applyCached (Object callee , @ SuppressWarnings ("unused" ) Arity calleeArity , Object [] arguments , PKeyword [] keywords ,
81
81
@ Cached ("keywords.length" ) int kwLen ,
82
82
@ SuppressWarnings ("unused" ) @ Cached ("calleeArity" ) Arity cachedArity ,
83
83
@ Cached ("cachedArity.takesVarKeywordArgs()" ) boolean takesVarKwds ,
@@ -104,7 +104,7 @@ Object[] applyCached(String calleeName, @SuppressWarnings("unused") Arity callee
104
104
105
105
if (kwIdx != -1 ) {
106
106
if (PArguments .getArgument (arguments , kwIdx ) != null ) {
107
- throw raise (PythonBuiltinClassType .TypeError , "%s() got multiple values for argument '%s'" , calleeName , name );
107
+ throw raise (PythonBuiltinClassType .TypeError , "%s() got multiple values for argument '%s'" , CreateArgumentsNode . getName ( callee ) , name );
108
108
}
109
109
PArguments .setArgument (arguments , kwIdx , kwArg .getValue ());
110
110
} else if (takesVarKwds ) {
@@ -119,7 +119,7 @@ Object[] applyCached(String calleeName, @SuppressWarnings("unused") Arity callee
119
119
}
120
120
121
121
@ Specialization (replaces = "applyCached" )
122
- Object [] applyUncached (String calleeName , Arity calleeArity , Object [] arguments , PKeyword [] keywords ,
122
+ Object [] applyUncached (Object callee , Arity calleeArity , Object [] arguments , PKeyword [] keywords ,
123
123
@ Cached ("createSearchNamedParameterNode()" ) SearchNamedParameterNode searchParamNode ,
124
124
@ Cached ("createSearchNamedParameterNode()" ) SearchNamedParameterNode searchKwNode ) {
125
125
boolean takesVarKwds = calleeArity .takesVarKeywordArgs ();
@@ -144,7 +144,7 @@ Object[] applyUncached(String calleeName, Arity calleeArity, Object[] arguments,
144
144
145
145
if (kwIdx != -1 ) {
146
146
if (PArguments .getArgument (arguments , kwIdx ) != null ) {
147
- throw raise (PythonBuiltinClassType .TypeError , "%s() got multiple values for argument '%s'" , calleeName , name );
147
+ throw raise (PythonBuiltinClassType .TypeError , "%s() got multiple values for argument '%s'" , CreateArgumentsNode . getName ( callee ) , name );
148
148
}
149
149
PArguments .setArgument (arguments , kwIdx , kwArg .getValue ());
150
150
} else if (takesVarKwds ) {
0 commit comments