Skip to content

Commit b19072b

Browse files
committed
bail early for synthetic frame slot ids in PCode varnames
1 parent 7f03b14 commit b19072b

File tree

1 file changed

+4
-1
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/code

1 file changed

+4
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/code/PCode.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
import com.oracle.graal.python.nodes.argument.ReadKeywordNode;
5454
import com.oracle.graal.python.nodes.argument.ReadVarArgsNode;
5555
import com.oracle.graal.python.nodes.argument.ReadVarKeywordsNode;
56+
import com.oracle.graal.python.nodes.frame.FrameSlotIDs;
5657
import com.oracle.graal.python.nodes.frame.WriteIdentifierNode;
5758
import com.oracle.graal.python.nodes.function.FunctionRootNode;
5859
import com.oracle.graal.python.nodes.generator.GeneratorFunctionRootNode;
@@ -282,7 +283,9 @@ private void extractArgStats() {
282283
if (identifier instanceof String) {
283284
String varName = (String) identifier;
284285

285-
if (core.getParser().isIdentifier(core, varName)) {
286+
if (FrameSlotIDs.RETURN_SLOT_ID.equals(varName) || varName.startsWith(FrameSlotIDs.TEMP_LOCAL_PREFIX)) {
287+
// pass
288+
} else if (core.getParser().isIdentifier(core, varName)) {
286289
if (allArgNames.contains(varName)) {
287290
varnamesSet.add(varName);
288291
} else if (!freeVarsSet.contains(varName) && !cellVarsSet.contains(varName)) {

0 commit comments

Comments
 (0)