Skip to content

Commit db87651

Browse files
committed
avoid repeated context lookup
1 parent 3677d98 commit db87651

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/nodes/statement/AbstractImportNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public static final Object importModule(String name, String[] fromList) {
132132
protected final Object importModule(VirtualFrame frame, String name, Object globals, String[] fromList, int level) {
133133
// Look up built-in modules supported by GraalPython
134134
PythonContext context = getContext();
135-
Python3Core core = getContext().getCore();
135+
Python3Core core = context.getCore();
136136
if (!core.isInitialized()) {
137137
PythonModule builtinModule = context.getCore().lookupBuiltinModule(name);
138138
if (builtinModule != null) {

0 commit comments

Comments
 (0)