File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/code Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -189,6 +189,8 @@ private static Set<Object> asSet(Object[] objects) {
189
189
private static String [] extractFreeVars (RootNode rootNode ) {
190
190
if (rootNode instanceof PClosureRootNode ) {
191
191
return ((PClosureRootNode ) rootNode ).getFreeVars ();
192
+ } else if (rootNode instanceof PBytecodeRootNode ) {
193
+ return ((PBytecodeRootNode ) rootNode ).getCodeUnit ().freevars ;
192
194
} else {
193
195
return PythonUtils .EMPTY_STRING_ARRAY ;
194
196
}
@@ -197,6 +199,8 @@ private static String[] extractFreeVars(RootNode rootNode) {
197
199
private static String [] extractCellVars (RootNode rootNode ) {
198
200
if (rootNode instanceof PClosureFunctionRootNode ) {
199
201
return ((PClosureFunctionRootNode ) rootNode ).getCellVars ();
202
+ } else if (rootNode instanceof PBytecodeRootNode ) {
203
+ return ((PBytecodeRootNode ) rootNode ).getCodeUnit ().cellvars ;
200
204
} else {
201
205
return PythonUtils .EMPTY_STRING_ARRAY ;
202
206
}
You can’t perform that action at this time.
0 commit comments