Skip to content

Commit 142807f

Browse files
committed
Remove unnecessary error profiles
1 parent 1c3ac6e commit 142807f

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/capi/PyGILStateNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
import com.oracle.truffle.api.library.ExportLibrary;
5050
import com.oracle.truffle.api.library.ExportMessage;
5151

52-
public class PyGILStateNodes {
52+
public abstract class PyGILStateNodes {
5353
/**
5454
* A simple executable interop object that acquires the GIL if not acquired already. This cannot
5555
* be implemented as a Python built-in function in {@code PythonCextBuiltins} because if the

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/capi/PyProcsWrapper.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070
import com.oracle.truffle.api.library.CachedLibrary;
7171
import com.oracle.truffle.api.library.ExportLibrary;
7272
import com.oracle.truffle.api.library.ExportMessage;
73-
import com.oracle.truffle.api.profiles.BranchProfile;
7473
import com.oracle.truffle.api.profiles.ConditionProfile;
7574
import com.oracle.truffle.llvm.spi.NativeTypeLibrary;
7675

@@ -178,7 +177,6 @@ protected int execute(Object[] arguments,
178177
@Cached CallTernaryMethodNode callTernaryMethodNode,
179178
@Cached ToJavaNode toJavaNode,
180179
@Cached ConditionProfile arityProfile,
181-
@Cached BranchProfile errorProfile,
182180
@Cached TransformExceptionToNativeNode transformExceptionToNativeNode,
183181
@Exclusive @Cached GilNode gil) throws ArityException {
184182
boolean mustRelease = gil.acquire();
@@ -191,7 +189,6 @@ protected int execute(Object[] arguments,
191189
callTernaryMethodNode.execute(null, lib.getDelegate(this), toJavaNode.execute(arguments[0]), toJavaNode.execute(arguments[1]), toJavaNode.execute(arguments[2]));
192190
return 0;
193191
} catch (PException e) {
194-
errorProfile.enter();
195192
transformExceptionToNativeNode.execute(null, e);
196193
return -1;
197194
}
@@ -219,7 +216,6 @@ static int init(InitWrapper self, Object[] arguments,
219216
@Cached ExpandKeywordStarargsNode expandKwargsNode,
220217
@Cached CallVarargsMethodNode callNode,
221218
@Cached ToJavaNode toJavaNode,
222-
@Cached BranchProfile errorProfile,
223219
@Cached TransformExceptionToNativeNode transformExceptionToNativeNode,
224220
@Exclusive @Cached GilNode gil) {
225221
boolean mustRelease = gil.acquire();
@@ -236,7 +232,6 @@ static int init(InitWrapper self, Object[] arguments,
236232
callNode.execute(null, lib.getDelegate(self), pArgs, kwArgsArray);
237233
return 0;
238234
} catch (PException e) {
239-
errorProfile.enter();
240235
transformExceptionToNativeNode.execute(null, e);
241236
return -1;
242237
}
@@ -271,7 +266,6 @@ static Object call(TernaryFunctionWrapper self, Object[] arguments,
271266
@Cached CallVarargsMethodNode callNode,
272267
@Cached ToJavaNode toJavaNode,
273268
@Cached ToNewRefNode toSulongNode,
274-
@Cached BranchProfile errorProfile,
275269
@Cached TransformExceptionToNativeNode transformExceptionToNativeNode,
276270
@Cached GetNativeNullNode getNativeNullNode,
277271
@Exclusive @Cached GilNode gil) {
@@ -289,7 +283,6 @@ static Object call(TernaryFunctionWrapper self, Object[] arguments,
289283
Object result = callNode.execute(null, lib.getDelegate(self), pArgs, kwArgsArray);
290284
return toSulongNode.execute(result);
291285
} catch (PException e) {
292-
errorProfile.enter();
293286
transformExceptionToNativeNode.execute(null, e);
294287
return getNativeNullNode.execute();
295288
}

0 commit comments

Comments
 (0)