@@ -144,7 +144,6 @@ public abstract static class CallNode extends PythonVarargsBuiltinNode {
144
144
@ Child CallVarargsMethodNode dispatchInit = CallVarargsMethodNode .create ();
145
145
@ Child LookupAttributeInMRONode lookupInit = LookupAttributeInMRONode .create (__INIT__ );
146
146
@ Child GetClassNode getClass = GetClassNode .create ();
147
- @ Child PositionalArgumentsNode createArgs = PositionalArgumentsNode .create ();
148
147
149
148
public static CallNode create () {
150
149
return CallNodeFactory .create ();
@@ -186,7 +185,7 @@ private Object op(PythonClass self, Object[] arguments, PKeyword[] keywords, boo
186
185
Object newMethod = lookupNew .execute (self );
187
186
if (newMethod != PNone .NO_VALUE ) {
188
187
CompilerAsserts .partialEvaluationConstant (doCreateArgs );
189
- Object [] newArgs = doCreateArgs ? createArgs . executeWithArguments (self , arguments ) : arguments ;
188
+ Object [] newArgs = doCreateArgs ? PositionalArgumentsNode . prependArgument (self , arguments , arguments . length ) : arguments ;
190
189
Object newInstance = dispatchNew .execute (newMethod , newArgs , keywords );
191
190
PythonClass newInstanceKlass = getClass .execute (newInstance );
192
191
if (newInstanceKlass == self ) {
@@ -199,7 +198,7 @@ private Object op(PythonClass self, Object[] arguments, PKeyword[] keywords, boo
199
198
if (newMethod != PNone .NO_VALUE ) {
200
199
Object [] initArgs ;
201
200
if (doCreateArgs ) {
202
- initArgs = createArgs . executeWithArguments (newInstance , arguments );
201
+ initArgs = PositionalArgumentsNode . prependArgument (newInstance , arguments , arguments . length );
203
202
} else {
204
203
// XXX: (tfel) is this valid? I think it should be fine...
205
204
arguments [0 ] = newInstance ;
0 commit comments