Skip to content

Commit 88dbd34

Browse files
committed
Avoid creating source sections to get code filename
1 parent 106f690 commit 88dbd34

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ private static void setRootNodeFileName(RootNode rootNode, TruffleString filenam
225225
@TruffleBoundary
226226
public static TruffleString extractFileName(RootNode rootNode) {
227227
RootNode funcRootNode = rootNodeForExtraction(rootNode);
228-
SourceSection src = funcRootNode.getSourceSection();
229228

230229
PythonContext context = PythonContext.get(rootNode);
231230
TruffleString filename;
@@ -242,6 +241,7 @@ public static TruffleString extractFileName(RootNode rootNode) {
242241
// for compiled modules, _imp._fix_co_filename will set the filename
243242
return filename;
244243
}
244+
SourceSection src = funcRootNode.getSourceSection();
245245
String jFilename;
246246
if (src != null) {
247247
jFilename = getSourceSectionFileName(src);

0 commit comments

Comments
 (0)