Skip to content

Commit 7482bc9

Browse files
committed
don't unnecessarily pass "null" frame arguments
1 parent 0c47b01 commit 7482bc9

File tree

5 files changed

+6
-10
lines changed

5 files changed

+6
-10
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ protected Source doBytesLike(Object pattern, String flags,
150150
abstract static class TRegexCallCompile extends PythonTernaryBuiltinNode {
151151

152152
@Specialization
153-
Object call(Object pattern, Object flags, PFunction fallbackCompiler,
153+
Object call(VirtualFrame frame, Object pattern, Object flags, PFunction fallbackCompiler,
154154
@Cached BranchProfile potentialSyntaxError,
155155
@Cached BranchProfile syntaxError,
156156
@Cached BranchProfile unsupportedRegexError,
@@ -167,7 +167,7 @@ Object call(Object pattern, Object flags, PFunction fallbackCompiler,
167167
if (compiledRegexLib.isNull(compiledRegex)) {
168168
unsupportedRegexError.enter();
169169
if (context.getLanguage().getEngineOption(PythonOptions.TRegexUsesSREFallback)) {
170-
return callFallbackCompilerNode.execute(fallbackCompiler, pattern, flags);
170+
return callFallbackCompilerNode.execute(frame, fallbackCompiler, pattern, flags);
171171
} else {
172172
throw raise(ValueError, "regular expression not supported, no fallback engine present");
173173
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ public static Object lookupAttributeImpl(VirtualFrame frame, Object receiver, St
898898
try {
899899
Object getAttrFunc = lookup.execute(receiver, __GETATTRIBUTE__);
900900
try {
901-
return callNode.execute(getAttrFunc, receiver, name);
901+
return callNode.execute(frame, getAttrFunc, receiver, name);
902902
} catch (PException pe) {
903903
pe.expect(AttributeError, isAttrErrorProfile1);
904904
getAttrFunc = lookup.execute(receiver, __GETATTR__);

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/module/ModuleBuiltins.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ Object dir(VirtualFrame frame, PythonModule self,
159159
HashingStorage dictStorage = getDictStorageNode.execute((PHashingCollection) dict);
160160
Object dirFunc = hashLib.getItem(dictStorage, __DIR__);
161161
if (dirFunc != null) {
162-
return callNode.execute(dirFunc);
162+
return callNode.execute(frame, dirFunc);
163163
} else {
164164
return constructListNode.execute(dict);
165165
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/classes/AbstractObjectGetBasesNode.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@ public final PTuple execute(VirtualFrame frame, Object cls) {
7474
return executeInternal(frame, cls);
7575
}
7676

77-
public final PTuple execute(Object cls) {
78-
return executeInternal(null, cls);
79-
}
80-
8177
@Specialization(guards = "!isUncached()")
8278
PTuple getBasesCached(VirtualFrame frame, Object cls,
8379
@Cached("create(__GETATTRIBUTE__)") LookupAndCallBinaryNode getAttributeNode,

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/statement/RaiseNode.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ static void setCause(@SuppressWarnings("unused") VirtualFrame frame, PBaseExcept
7676

7777
// raise * from <class>
7878
@Specialization(guards = "lib.isLazyPythonClass(causeClass)")
79-
static void setCause(@SuppressWarnings("unused") VirtualFrame frame, PBaseException exception, Object causeClass,
79+
static void setCause(VirtualFrame frame, PBaseException exception, Object causeClass,
8080
@Cached BranchProfile baseCheckFailedProfile,
8181
@Cached ValidExceptionNode validException,
8282
@Cached CallNode callConstructor,
@@ -86,7 +86,7 @@ static void setCause(@SuppressWarnings("unused") VirtualFrame frame, PBaseExcept
8686
baseCheckFailedProfile.enter();
8787
throw raise.raise(PythonBuiltinClassType.TypeError, ErrorMessages.EXCEPTION_CAUSES_MUST_DERIVE_FROM_BASE_EX);
8888
}
89-
Object cause = callConstructor.execute(causeClass);
89+
Object cause = callConstructor.execute(frame, causeClass);
9090
if (cause instanceof PBaseException) {
9191
exception.setCause((PBaseException) cause);
9292
} else {

0 commit comments

Comments
 (0)