Skip to content

Commit 136457e

Browse files
committed
better generator names for debugging
1 parent d323b07 commit 136457e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/parser/PythonTreeTranslator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ private ExpressionNode createComprehensionExpression(ParserRuleContext ctx, Pyth
487487

488488
private GeneratorExpressionNode createGeneratorExpressionDefinition(ExpressionNode body, int lineNum) {
489489
FrameDescriptor fd = environment.getCurrentFrame();
490-
String generatorName = "generator_exp:" + lineNum;
490+
String generatorName = source.getName() + ":generator_exp:" + lineNum;
491491
FunctionRootNode funcRoot = factory.createFunctionRoot(body.getSourceSection(), generatorName, true, fd, body, environment.getExecutionCellSlots());
492492
GeneratorTranslator gtran = new GeneratorTranslator(funcRoot, true);
493493
RootCallTarget callTarget = gtran.translate();

0 commit comments

Comments
 (0)