Given we have had to deal with linking sooner rather than later, we now need the ability to emit .flo instead of FlatLowered from a Cairo compiler. For features that we do not currently support in .flo, these should be dropped and issues filed, but for things we do, the primary work will be to map between constructs and to map between typing.
This has to cope with arbitrary Cairo source and not just our polyfills, even though the initial version is to make our polyfills work.
Spec
[x] Examine the get-lowering tool—provided as part of the Cairo repo—as this does the majority of the process we care about (source -> Salsa -> FlatLowered) and then prints it to the console.
[ ] Convert this FlatLowered to .flo.
[ ] This should come with tests of all the conversions that assert the correctness of each conversion, with particular focus around the correctness of type information.
[ ] Once FlatLowered -> FLO and FLO -> FlatLowered are available, test that conversion doesn't lose any semantic structure.
Description
Given we have had to deal with linking sooner rather than later, we now need the ability to emit
.flo
instead ofFlatLowered
from a Cairo compiler. For features that we do not currently support in.flo
, these should be dropped and issues filed, but for things we do, the primary work will be to map between constructs and to map between typing.This has to cope with arbitrary Cairo source and not just our polyfills, even though the initial version is to make our polyfills work.
Spec
get-lowering
tool—provided as part of the Cairo repo—as this does the majority of the process we care about (source -> Salsa ->FlatLowered
) and then prints it to the console.FlatLowered
to.flo
.FlatLowered
->FLO
andFLO
->FlatLowered
are available, test that conversion doesn't lose any semantic structure.