File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2700,11 +2700,12 @@ Literal Literal::externalize() const {
27002700}
27012701
27022702Literal Literal::internalize () const {
2703- auto extType = HeapTypes::ext.getBasic (type.getHeapType ().getShared ());
2703+ auto share = type.getHeapType ().getShared ();
2704+ auto extType = HeapTypes::ext.getBasic (share);
27042705 assert (Type::isSubType (type, Type (extType, Nullable)) &&
27052706 " can only internalize external references" );
27062707 if (isNull ()) {
2707- return Literal (std::shared_ptr<GCData>{}, HeapType ::none);
2708+ return Literal (std::shared_ptr<GCData>{}, HeapTypes ::none. getBasic (share) );
27082709 }
27092710 if (gcData->type .isMaybeShared (HeapType::i31)) {
27102711 assert (gcData->values [0 ].type .getHeapType ().isMaybeShared (HeapType::i31));
Original file line number Diff line number Diff line change 1+ (module
2+ (func $shared-null (export " shared-null" ) (result (ref null (shared any)))
3+ ;; The shared null here should remain shared as we internalize it.
4+ (any.convert_extern
5+ (ref.null (shared noextern))
6+ )
7+ )
8+ )
9+
10+ (assert_return (invoke " shared-null" ) (ref.null (shared any)))
11+
You can’t perform that action at this time.
0 commit comments