Skip to content

Commit 2df1173

Browse files
fangerertimfel
authored andcommitted
Remove unused argument
(cherry picked from commit a956e0c)
1 parent 8da64fb commit 2df1173

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

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

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,6 @@ protected PBytes getMagicNumberPBytes() {
280280
public abstract static class CreateDynamic extends PythonBinaryBuiltinNode {
281281

282282
@Child private CheckFunctionResultNode checkResultNode;
283-
@Child private HPyCheckFunctionResultNode checkHPyResultNode;
284283

285284
public abstract Object execute(VirtualFrame frame, PythonObject moduleSpec, Object filename);
286285

@@ -317,7 +316,7 @@ private Object run(PythonContext context, ModuleSpec spec) throws IOException, A
317316
if (existingModule != null) {
318317
return existingModule;
319318
}
320-
return CExtContext.loadCExtModule(this, context, spec, getCheckResultNode(), getCheckHPyResultNode());
319+
return CExtContext.loadCExtModule(this, context, spec, getCheckResultNode());
321320
}
322321

323322
@SuppressWarnings({"static-method", "unused"})
@@ -334,14 +333,6 @@ private CheckFunctionResultNode getCheckResultNode() {
334333
}
335334
return checkResultNode;
336335
}
337-
338-
private HPyCheckFunctionResultNode getCheckHPyResultNode() {
339-
if (checkHPyResultNode == null) {
340-
CompilerDirectives.transferToInterpreterAndInvalidate();
341-
checkHPyResultNode = insert(HPyCheckHandleResultNodeGen.create());
342-
}
343-
return checkHPyResultNode;
344-
}
345336
}
346337

347338
@Builtin(name = "exec_dynamic", minNumOfPositionalArgs = 1, doc = "exec_dynamic($module, mod, /)\n--\n\nInitialize an extension module.")

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/common/CExtContext.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
import com.oracle.graal.python.builtins.objects.cext.common.CExtCommonNodes.CheckFunctionResultNode;
6161
import com.oracle.graal.python.builtins.objects.cext.common.LoadCExtException.ApiInitException;
6262
import com.oracle.graal.python.builtins.objects.cext.common.LoadCExtException.ImportException;
63-
import com.oracle.graal.python.builtins.objects.cext.hpy.HPyExternalFunctionNodes.HPyCheckFunctionResultNode;
6463
import com.oracle.graal.python.builtins.objects.cext.hpy.jni.GraalHPyJNIContext;
6564
import com.oracle.graal.python.builtins.objects.exception.ExceptionNodes;
6665
import com.oracle.graal.python.builtins.objects.exception.PBaseException;
@@ -307,15 +306,13 @@ private static String dlopenFlagsToString(int flags) {
307306
* @param checkFunctionResultNode An adopted node instance. This is necessary because the result
308307
* check could raise an exception and only an adopted node will report useful source
309308
* locations.
310-
* @param checkHPyResultNode Similar to {@code checkFunctionResultNode} but for an HPy
311-
* extension.
312309
* @return A Python module.
313310
* @throws IOException If the specified file cannot be loaded.
314311
* @throws ApiInitException If the corresponding native context could not be initialized.
315312
* @throws ImportException If an exception occurred during C extension initialization.
316313
*/
317314
@TruffleBoundary
318-
public static Object loadCExtModule(Node location, PythonContext context, ModuleSpec spec, CheckFunctionResultNode checkFunctionResultNode, HPyCheckFunctionResultNode checkHPyResultNode)
315+
public static Object loadCExtModule(Node location, PythonContext context, ModuleSpec spec, CheckFunctionResultNode checkFunctionResultNode)
319316
throws IOException, ApiInitException, ImportException {
320317

321318
// we always need to load the CPython C API (even for HPy modules)

0 commit comments

Comments
 (0)