Skip to content

Commit 269bb82

Browse files
committed
Rename callFunction to callObject
1 parent 8f6d7d8 commit 269bb82

File tree

9 files changed

+16
-16
lines changed

9 files changed

+16
-16
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/BuiltinFunctions.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1592,16 +1592,16 @@ PNone printAllGiven(VirtualFrame frame, Object[] values, String sep, String end,
15921592
int lastValue = values.length - 1;
15931593
Object writeMethod = fileLib.lookupAttributeStrict(file, frame, "write");
15941594
for (int i = 0; i < lastValue; i++) {
1595-
methodLib.callFunction(writeMethod, frame, valueLib.asPString(values[i]));
1596-
methodLib.callFunction(writeMethod, frame, sep);
1595+
methodLib.callObject(writeMethod, frame, valueLib.asPString(values[i]));
1596+
methodLib.callObject(writeMethod, frame, sep);
15971597
}
15981598
if (lastValue >= 0) {
1599-
methodLib.callFunction(writeMethod, frame, valueLib.asPString(values[lastValue]));
1599+
methodLib.callObject(writeMethod, frame, valueLib.asPString(values[lastValue]));
16001600
}
1601-
methodLib.callFunction(writeMethod, frame, end);
1601+
methodLib.callObject(writeMethod, frame, end);
16021602
if (flush) {
16031603
Object flushMethod = fileLib.lookupAttributeStrict(file, frame, "flush");
1604-
methodLib.callFunction(flushMethod, frame);
1604+
methodLib.callObject(flushMethod, frame);
16051605
}
16061606
return PNone.NONE;
16071607
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/PythonAbstractObject.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,7 @@ public static Object lookupAttributeImpl(Object type, String name, boolean stric
10551055
}
10561056

10571057
@ExportMessage
1058-
public Object callFunctionWithState(ThreadState state, Object[] arguments,
1058+
public Object callObjectWithState(ThreadState state, Object[] arguments,
10591059
@Shared("gotState") @Cached ConditionProfile gotState,
10601060
@Exclusive @Cached CallNode callNode) {
10611061
VirtualFrame frame = null;
@@ -1121,7 +1121,7 @@ public Object lookupAndCallRegularMethodWithState(ThreadState state, String meth
11211121
@CachedLibrary("this") PythonObjectLibrary plib,
11221122
@Shared("methodLib") @CachedLibrary(limit = "2") PythonObjectLibrary methodLib) {
11231123
Object method = plib.lookupAttributeStrictWithState(this, state, methodName);
1124-
return methodLib.callFunctionWithState(method, state, arguments);
1124+
return methodLib.callObjectWithState(method, state, arguments);
11251125
}
11261126

11271127
@ExportMessage

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/object/DefaultPythonBooleanExports.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,6 @@ public static Object lookupAndCallRegularMethodWithState(Boolean receiver, Threa
316316
@CachedLibrary("receiver") PythonObjectLibrary plib,
317317
@Shared("methodLib") @CachedLibrary(limit = "2") PythonObjectLibrary methodLib) {
318318
Object method = plib.lookupAttributeStrictWithState(receiver, state, methodName);
319-
return methodLib.callFunctionWithState(method, state, arguments);
319+
return methodLib.callObjectWithState(method, state, arguments);
320320
}
321321
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/object/DefaultPythonDoubleExports.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,6 @@ public static Object lookupAndCallRegularMethodWithState(Double receiver, Thread
239239
@CachedLibrary("receiver") PythonObjectLibrary plib,
240240
@Shared("methodLib") @CachedLibrary(limit = "2") PythonObjectLibrary methodLib) {
241241
Object method = plib.lookupAttributeStrictWithState(receiver, state, methodName);
242-
return methodLib.callFunctionWithState(method, state, arguments);
242+
return methodLib.callObjectWithState(method, state, arguments);
243243
}
244244
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/object/DefaultPythonIntegerExports.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,6 @@ public static Object lookupAndCallRegularMethodWithState(Integer receiver, Threa
313313
@CachedLibrary("receiver") PythonObjectLibrary plib,
314314
@Shared("methodLib") @CachedLibrary(limit = "2") PythonObjectLibrary methodLib) {
315315
Object method = plib.lookupAttributeStrictWithState(receiver, state, methodName);
316-
return methodLib.callFunctionWithState(method, state, arguments);
316+
return methodLib.callObjectWithState(method, state, arguments);
317317
}
318318
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/object/DefaultPythonLongExports.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,6 @@ public static Object lookupAndCallRegularMethodWithState(Long receiver, ThreadSt
344344
@CachedLibrary("receiver") PythonObjectLibrary plib,
345345
@Shared("methodLib") @CachedLibrary(limit = "2") PythonObjectLibrary methodLib) {
346346
Object method = plib.lookupAttributeStrictWithState(receiver, state, methodName);
347-
return methodLib.callFunctionWithState(method, state, arguments);
347+
return methodLib.callObjectWithState(method, state, arguments);
348348
}
349349
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/object/DefaultPythonObjectExports.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,6 @@ public static Object lookupAndCallRegularMethodWithState(Object receiver, Thread
359359
@CachedLibrary("receiver") PythonObjectLibrary plib,
360360
@Shared("methodLib") @CachedLibrary(limit = "2") PythonObjectLibrary methodLib) {
361361
Object method = plib.lookupAttributeStrictWithState(receiver, state, methodName);
362-
return methodLib.callFunctionWithState(method, state, arguments);
362+
return methodLib.callObjectWithState(method, state, arguments);
363363
}
364364
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/object/DefaultPythonStringExports.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,6 @@ public static Object lookupAndCallRegularMethodWithState(String receiver, Thread
228228
@CachedLibrary("receiver") PythonObjectLibrary plib,
229229
@Shared("methodLib") @CachedLibrary(limit = "2") PythonObjectLibrary methodLib) {
230230
Object method = plib.lookupAttributeStrictWithState(receiver, state, methodName);
231-
return methodLib.callFunctionWithState(method, state, arguments);
231+
return methodLib.callObjectWithState(method, state, arguments);
232232
}
233233
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/object/PythonObjectLibrary.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -670,18 +670,18 @@ protected Object lookupAttributeOnTypeInternal(Object receiver, String name, boo
670670
/**
671671
* Call a callable object.
672672
*/
673-
public final Object callFunction(Object callable, VirtualFrame frame, Object... arguments) {
673+
public final Object callObject(Object callable, VirtualFrame frame, Object... arguments) {
674674
ThreadState state = null;
675675
if (profileHasFrame(frame)) {
676676
state = PArguments.getThreadState(frame);
677677
}
678-
return callFunctionWithState(callable, state, arguments);
678+
return callObjectWithState(callable, state, arguments);
679679
}
680680

681681
/**
682682
* Call a callable object.
683683
*/
684-
public Object callFunctionWithState(Object callable, ThreadState state, Object... arguments) {
684+
public Object callObjectWithState(Object callable, ThreadState state, Object... arguments) {
685685
throw PRaiseNode.getUncached().raise(TypeError, ErrorMessages.OBJ_ISNT_CALLABLE, callable);
686686
}
687687

0 commit comments

Comments
 (0)