Re: jump tables and cases

Top Pagina
Bijlagen:
Bericht als e-mail
+ (text/plain)
Delete this message
Reply to this message
Auteur: Stephen Weeks
Datum:  
Aan: MLton
Onderwerp: Re: jump tables and cases

> Then I'm a little confused; If in my source .sml file, I have
>
> case x 
>   of 0 => ...
>    | 1 => ...
>    ...
>    | _ => ...

>
> then what do I have in the CPS IL? A set of transfers corresponding to a
> binary search tree, or a single switch transfer?


You should see
Case { cases = Cases.Int [(0, j0), (1, j1), ...], ... }