Closed spernsteiner closed 1 year ago
I rebased this onto master
, but a test is now failing
Fixed the test failure by skipping rewrite generation for void*
casts. We can do something more intelligent with those later when we add proper rewriting of malloc
/free
/memcpy
/etc.
This branch refactors
mir_op
to make the generation of conversions more uniform. Ideally, we should callemit_cast_*
in roughly every place wheredataflow::type_check
adds a dataflow edge. This branch doesn't fully implement that, but gets us a little closer.This also adds a new
TypeDesc
type, which bundles upOwnership
,Quantity
, and a pointeeTy
into a complete description of a rewritten pointer type. This is used for some of the newemit_cast_*
machinery.Based on #918 for now; once this is approved, I'll rebase onto
master