File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
crates/environ/src/component
tests/misc_testsuite/component-model Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -411,7 +411,16 @@ impl ComponentTypesBuilder {
411411 Table ( ty) => EntityType :: Table ( self . convert_table_type ( ty) ?) ,
412412 Memory ( ty) => EntityType :: Memory ( ( * ty) . into ( ) ) ,
413413 Global ( ty) => EntityType :: Global ( self . convert_global_type ( ty) ?) ,
414- Tag ( _) => bail ! ( "exceptions proposal not implemented" ) ,
414+ Tag ( id) => {
415+ let func = self . module_types_builder_mut ( ) . intern_type ( types, * id) ?;
416+ let exc = self
417+ . module_types_builder_mut ( )
418+ . define_exception_type_for_tag ( func) ;
419+ EntityType :: Tag ( crate :: types:: Tag {
420+ signature : func. into ( ) ,
421+ exception : exc. into ( ) ,
422+ } )
423+ }
415424 FuncExact ( _) => bail ! ( "custom-descriptors proposal not implemented" ) ,
416425 } )
417426 }
Original file line number Diff line number Diff line change 11;; ! reference_types = true
2+ ;; ! exceptions = true
23
34(component $foo
45 (core module (export " a-module" ))
477478
478479 (core instance (instantiate $import_globals (with " " (instance $m ))))
479480)
481+
482+ (component $tag-module
483+ (core module (export " m" )
484+ (tag (export " t" ) (param i32 ))))
485+ (component
486+ (import " tag-module" (instance
487+ (export " m"
488+ (core module
489+ (export " t" (tag (param i32 ))))))))
You can’t perform that action at this time.
0 commit comments