Skip to content

Commit b1aac6d

Browse files
committed
ugly workaround for allocation reporter assertion
1 parent 1b2c300 commit b1aac6d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,9 @@ private PythonContext getContext() {
167167
}
168168

169169
private boolean reportAllocations() {
170-
return getContext() != null && allocationReporter != null;
170+
// tfel: the allocation reporter has an assertion that it is a PE constant. How the reporter
171+
// works is subject to change, but until such time we don't report allocations if it isn't
172+
return getContext() != null && allocationReporter != null && CompilerDirectives.isPartialEvaluationConstant(allocationReporter);
171173
}
172174

173175
/*

0 commit comments

Comments
 (0)