File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/object Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 5555import com .oracle .truffle .api .object .Shape ;
5656import com .oracle .truffle .api .object .dsl .Layout ;
5757
58- import org .graalvm .nativeimage .ImageInfo ;
59-
6058@ ExportLibrary (PythonObjectLibrary .class )
6159public class PythonObject extends PythonAbstractObject {
6260 public static final HiddenKey HAS_DICT = new HiddenKey ("has_dict" );
@@ -242,9 +240,10 @@ protected static interface PythonObjectLayout {
242240 private static final Shape emptyShape = PythonObjectLayoutImpl .INSTANCE .createPythonObjectShape (null ).getShape ();
243241
244242 public static Shape freshShape (LazyPythonClass klass ) {
245- if (!ImageInfo .inImageCode ()) {
246- assert (PythonLanguage .getCurrent ().singleContextAssumption .isValid () && klass != null ) || klass instanceof PythonBuiltinClassType ;
247- }
243+ // GR-17243: I would like to enable this assertion, but it breaks
244+ // building native images under some circumstances.
245+ // assert (PythonLanguage.getCurrent().singleContextAssumption.isValid()
246+ // && klass != null) || klass instanceof PythonBuiltinClassType;
248247 return PythonObjectLayoutImpl .INSTANCE .createPythonObjectShape (klass ).getShape ();
249248 }
250249
You can’t perform that action at this time.
0 commit comments