Add Extern and Intrinsic body types#1088
Conversation
bcde11f to
d58443f
Compare
|
Re argument names, we can't change |
options:
i think I am happy with either of the three options |
|
How about |
|
i think i prefer both as separate variants just because it makes matching on the enum easier, and i handle both cases separately anyways yes this sounds good, ill do it now :) |
79739fe to
d7c8d34
Compare
|
This is ready :D @Nadrieril |
| | Opaque -> Opaque | ||
| | Missing -> Missing | ||
| | Error err -> Error (self#visit_error env err) | ||
| in |
There was a problem hiding this comment.
you could derive that visitor on body, no?
There was a problem hiding this comment.
hmm probably, but anyways this will change in #1102 where the visitor won't be possible, so i'd rather leave this as is
maybe that could change ? |
Add two variants to
Body:Extern(string)andIntrinsic(string)! On the OCaml side, a body isn't just a'body optionanymore: we instead properly translate theBodyenum, to give more information to the client.For now intrinsics are just strings rather than an enum, as I don't have the time to do that part. There is also the question of how we make this enum make sense: some intrinsics actually never get lowered into a function call, and a few of them disappear through the compilation pipeline.
One thing we lose with this change is that we can't get the name of the intrinsic's arguments. This isn't a big deal but in Soteria I generate intrinsic definitions from the ULLBC output, and having names for the arguments is super useful. Maybe we could make a new
Argumenttype that stores a type, optional name (and an ArgAbi?) to keep this information? And thenFunSig.inputswould be aVec<Arg>instead. Let me know.Fixes #982
First step towards #864
ci: use AeneasVerif/aeneas#919
ci: use AeneasVerif/eurydice#395