File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2473,8 +2473,11 @@ struct OptimizeInstructions
24732473 return ;
24742474 }
24752475
2476- if (curr->desc && trapOnNull (curr, curr->desc )) {
2477- return ;
2476+ if (curr->desc ) {
2477+ skipNonNullCast (curr->desc , curr);
2478+ if (trapOnNull (curr, curr->desc )) {
2479+ return ;
2480+ }
24782481 }
24792482
24802483 Builder builder (*getModule ());
@@ -2603,6 +2606,13 @@ struct OptimizeInstructions
26032606 }
26042607 }
26052608
2609+ void visitBrOn (BrOn* curr) {
2610+ if (curr->desc ) {
2611+ skipNonNullCast (curr->desc , curr);
2612+ trapOnNull (curr, curr->desc );
2613+ }
2614+ }
2615+
26062616 void visitRefIsNull (RefIsNull* curr) {
26072617 if (curr->type == Type::unreachable) {
26082618 return ;
@@ -2692,6 +2702,11 @@ struct OptimizeInstructions
26922702 }
26932703 }
26942704
2705+ void visitRefGetDesc (RefGetDesc* curr) {
2706+ skipNonNullCast (curr->ref , curr);
2707+ trapOnNull (curr, curr->ref );
2708+ }
2709+
26952710 void visitTupleExtract (TupleExtract* curr) {
26962711 if (curr->type == Type::unreachable) {
26972712 return ;
You can’t perform that action at this time.
0 commit comments