adam-mcdaniel / oakc

A portable programming language with a compact intermediate representation
Apache License 2.0
725 stars 21 forks source link

Made TirConstant the same as HirConstant, and moved conditional compilation to TIR #88

Closed adam-mcdaniel closed 4 years ago

adam-mcdaniel commented 4 years ago

This needed to be done for the same reason as #74: structures need to be made available to TIR to determine their movability. Structures defined in if compiler flag blocks could not be processed by TIR (before this PR). To fix this, I made some adjustments to TIR to allow conditional compilation statements to be computed before HIR. This completely fixes the issue of not being able to import structures from other files.