Skip to content

Commit 507e0fa

Browse files
committed
[GR-29105] Perf regression in meso:euler11 on multicontext configuration.
PullRequest: graalpython/1587
2 parents feb4b81 + ee6a09c commit 507e0fa

File tree

1 file changed

+2
-3
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/type

1 file changed

+2
-3
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/type/TypeBuiltins.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,6 @@ public abstract static class CallNode extends PythonVarargsBuiltinNode {
337337
@CompilationFinal private ConditionProfile hasNew = ConditionProfile.createBinaryProfile();
338338
@CompilationFinal private ConditionProfile hasInit = ConditionProfile.createBinaryProfile();
339339
@CompilationFinal private ConditionProfile gotInitResult = ConditionProfile.createBinaryProfile();
340-
@CompilationFinal private ConditionProfile needsInit = ConditionProfile.createBinaryProfile();
341340

342341
@CompilationFinal private boolean newWasDescriptor = false;
343342

@@ -487,7 +486,7 @@ private Object op(VirtualFrame frame, Object self, Object[] arguments, PKeyword[
487486
// see typeobject.c#type_call()
488487
// Ugly exception: when the call was type(something),
489488
// don't call tp_init on the result.
490-
if (needsInit.profile(!(arguments.length == 2 && arguments[0] == PythonBuiltinClassType.PythonClass && keywords.length == 0))) {
489+
if (!(self == PythonBuiltinClassType.PythonClass && arguments.length == 2 && keywords.length == 0)) {
491490
callInit(lib, newInstance, self, frame, doCreateArgs, arguments, keywords);
492491
}
493492
return newInstance;
@@ -496,7 +495,7 @@ private Object op(VirtualFrame frame, Object self, Object[] arguments, PKeyword[
496495
}
497496
}
498497

499-
private void callInit(PythonObjectLibrary lib, Object newInstance, Object self, VirtualFrame frame, boolean doCreateArgs, Object[] arguments, PKeyword[] keywords) throws PException {
498+
private void callInit(PythonObjectLibrary lib, Object newInstance, Object self, VirtualFrame frame, boolean doCreateArgs, Object[] arguments, PKeyword[] keywords) {
500499
Object newInstanceKlass = lib.getLazyPythonClass(newInstance);
501500
if (isSubType(newInstanceKlass, self)) {
502501
Object initMethod = getInitNode().execute(frame, newInstanceKlass, newInstance);

0 commit comments

Comments
 (0)