[PATCH] D54873: [WebAssembly] Make signature index not a part of EventType

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 3 14:52:20 PST 2018


sbc100 added a comment.

In D54873#1317509 <https://reviews.llvm.org/D54873#1317509>, @aheejin wrote:

> In D54873#1316963 <https://reviews.llvm.org/D54873#1316963>, @sbc100 wrote:
>
> > > And why do we need this for specifying events themselves and for importing events?
> >
> > I mean event imports need to specify their "type" and non-imported events also need to specify their "type".  And in both cases the type needs to include the signature.  So I think we should have a unified "eventType" that includes the signature index.
>
>
> I can drop this CL, but I still don't understand what you meant by this part. Currently imported exception's sigindex is handled fine. The below is obj2yaml's result if I don't define the `__cpp_exception` symbol:
>
>   - Type:            IMPORT                                                      
>     Imports:                                                                     
>       ...                                    
>       - Module:          env                                                     
>         Field:           __cpp_exception                                         
>         Kind:            EVENT                                                   
>         SigIndex:        1                                                       
>         EventAttribute:  0 
>   
>
> As you see in `WasmImport` definition in this CL, `SigIndex` is now out of `union` and every type can set it optionally, so there's no problem for events having sigindex there.
>
>   struct WasmImport {                                                              
>     StringRef Module;                                                              
>     StringRef Field;                                                               
>     uint8_t Kind;                                                                  
>     uint32_t SigIndex;                                                             
>     union {                                                                        
>       WasmGlobalType Global;                                                       
>       WasmTable Table;                                                             
>       WasmLimits Memory;                                                           
>       WasmEventType Event;                                                         
>     };                                                                             
>   };
>


But what about non-imported events?  They need signature too right?


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54873/new/

https://reviews.llvm.org/D54873





More information about the llvm-commits mailing list