File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -374,7 +374,7 @@ struct LegalizeAndPruneJSInterface : public LegalizeJSInterface {
374374 }
375375
376376 // The params are allowed to be multivalue, but not the results. Otherwise
377- // look for SIMD.
377+ // look for SIMD etc .
378378 auto sig = func->type .getSignature ();
379379 auto illegal = isIllegal (sig.results );
380380 illegal =
@@ -409,7 +409,8 @@ struct LegalizeAndPruneJSInterface : public LegalizeJSInterface {
409409
410410 bool isIllegal (Type type) {
411411 auto features = type.getFeatures ();
412- return features.hasSIMD () || features.hasMultivalue ();
412+ return features.hasSIMD () || features.hasMultivalue () ||
413+ features.hasExceptionHandling ();
413414 }
414415};
415416
Original file line number Diff line number Diff line change 128128
129129 ;; CHECK: (type $3 (func (result i32 i32)))
130130
131- ;; CHECK: (type $4 (func (param i32 )))
131+ ;; CHECK: (type $4 (func (result exnref )))
132132
133- ;; CHECK: (type $5 (func (param i32 i32) (result i32 )))
133+ ;; CHECK: (type $5 (func (param i32)))
134134
135- ;; CHECK: (import "env" "setTempRet0" (func $setTempRet0 (type $4) (param i32)))
135+ ;; CHECK: (type $6 (func (param i32 i32) (result i32)))
136+
137+ ;; CHECK: (import "env" "setTempRet0" (func $setTempRet0 (type $5) (param i32)))
136138
137139 ;; CHECK: (export "export-64" (func $legalstub$export-64))
138140
167169 ;; This will be pruned.
168170 (unreachable )
169171 )
172+
173+ ;; CHECK: (func $export-exn (type $4) (result exnref)
174+ ;; CHECK-NEXT: (ref.null noexn)
175+ ;; CHECK-NEXT: )
176+ (func $export-exn (export " export-exn" ) (result exnref)
177+ ;; This will be pruned.
178+ (ref.null noexn)
179+ )
170180)
171181
172- ;; CHECK: (func $legalstub$export-64 (type $5 ) (param $0 i32) (param $1 i32) (result i32)
182+ ;; CHECK: (func $legalstub$export-64 (type $6 ) (param $0 i32) (param $1 i32) (result i32)
173183;; CHECK-NEXT: (local $2 i64)
174184;; CHECK-NEXT: (local.set $2
175185;; CHECK-NEXT: (call $export-64
You can’t perform that action at this time.
0 commit comments