File tree Expand file tree Collapse file tree 1 file changed +4
-4
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
-4
lines changed Original file line number Diff line number Diff line change 60
60
import com .oracle .graal .python .nodes .frame .FrameSlotIDs ;
61
61
import com .oracle .graal .python .nodes .frame .GlobalNode ;
62
62
import com .oracle .graal .python .nodes .function .FunctionDefinitionNode ;
63
+ import com .oracle .graal .python .nodes .function .GeneratorExpressionNode ;
63
64
import com .oracle .graal .python .nodes .generator .GeneratorFunctionRootNode ;
64
65
import com .oracle .graal .python .nodes .literal .SimpleLiteralNode ;
65
66
import com .oracle .truffle .api .CompilerDirectives ;
@@ -245,13 +246,12 @@ private static Object[] extractConstants(RootNode rootNode) {
245
246
public boolean visit (Node node ) {
246
247
if (node instanceof SimpleLiteralNode ) {
247
248
constants .add (((SimpleLiteralNode ) node ).getValue ());
248
- return false ;
249
249
} else if (node instanceof FunctionDefinitionNode ) {
250
250
constants .add (new PCode (PythonBuiltinClassType .PCode , ((FunctionDefinitionNode ) node ).getCallTarget ()));
251
- return false ;
252
- } else {
253
- return true ;
251
+ } else if (node instanceof GeneratorExpressionNode ) {
252
+ constants .add (new PCode (PythonBuiltinClassType .PCode , ((GeneratorExpressionNode ) node ).getCallTarget ()));
254
253
}
254
+ return true ;
255
255
}
256
256
});
257
257
return constants .toArray ();
You can’t perform that action at this time.
0 commit comments