Skip to content

Commit 3b6d682

Browse files
committed
fix access to factory in zipimporter
1 parent 4c26b08 commit 3b6d682

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/zipimporter/ZipImporterBuiltins.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ public abstract static class ReprNode extends StrNode {
244244
@GenerateNodeFactory
245245
public abstract static class FindModuleNode extends PythonTernaryBuiltinNode {
246246
/**
247-
*
247+
*
248248
* @param self
249249
* @param fullname
250250
* @param path This optional argument is ignored. It’s there for compatibility with the
@@ -416,7 +416,7 @@ public Object doit(PZipImporter self, String fullname,
416416
PDict sysModules = (PDict) sysModule.getAttribute("modules");
417417
PythonModule module = (PythonModule) sysModules.getItem(fullname);
418418
if (module == null) {
419-
module = getCore().factory().createPythonModule(fullname);
419+
module = factory().createPythonModule(fullname);
420420
sysModules.setItem(fullname, module);
421421
}
422422

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/object/PythonObjectFactory.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116
import com.oracle.graal.python.runtime.sequence.storage.LongSequenceStorage;
117117
import com.oracle.graal.python.runtime.sequence.storage.SequenceStorage;
118118
import com.oracle.graal.python.runtime.sequence.storage.SequenceStorageFactory;
119+
import com.oracle.truffle.api.CompilerAsserts;
119120
import com.oracle.truffle.api.CompilerDirectives;
120121
import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
121122
import com.oracle.truffle.api.RootCallTarget;
@@ -144,6 +145,7 @@ public static PythonObjectFactory create() {
144145
@SuppressWarnings("static-method")
145146
public final <T> T trace(T allocatedObject) {
146147
if (reportAllocations()) {
148+
CompilerAsserts.partialEvaluationConstant(this);
147149
allocationReporter.onEnter(null, 0, AllocationReporter.SIZE_UNKNOWN);
148150
allocationReporter.onReturnValue(allocatedObject, 0, AllocationReporter.SIZE_UNKNOWN);
149151
}

0 commit comments

Comments
 (0)