File tree 1 file changed +4
-5
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/object
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 55
55
import com .oracle .truffle .api .object .Shape ;
56
56
import com .oracle .truffle .api .object .dsl .Layout ;
57
57
58
- import org .graalvm .nativeimage .ImageInfo ;
59
-
60
58
@ ExportLibrary (PythonObjectLibrary .class )
61
59
public class PythonObject extends PythonAbstractObject {
62
60
public static final HiddenKey HAS_DICT = new HiddenKey ("has_dict" );
@@ -242,9 +240,10 @@ protected static interface PythonObjectLayout {
242
240
private static final Shape emptyShape = PythonObjectLayoutImpl .INSTANCE .createPythonObjectShape (null ).getShape ();
243
241
244
242
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;
248
247
return PythonObjectLayoutImpl .INSTANCE .createPythonObjectShape (klass ).getShape ();
249
248
}
250
249
You can’t perform that action at this time.
0 commit comments