Skip to content
  • Yorick Peterse's avatar
    Restore Boolean "if" instruction cleanup · ddedead0
    Yorick Peterse authored
    By introducing the virtual "if" instruction we can clean up Boolean so
    that we no longer have to refine the True and False instances. If we
    also clean up Nil in a similar way it becomes easier to rewrite the
    compiler in Inko, as it no longer needs to support the refining of
    random objects.
    
    This was originally introduced in
    ecd11a07, but later reverted. In this
    commit we re-introduce these changes. Refining True and False makes
    various compiler internals in the self-hosting compiler less efficient,
    as it has to support refining any object even when this only happens for
    True, False, and Nil. By cleaning up True and False we can reduce this
    down to just Nil, making it easier to find a way of cleaning that up
    too.
    ddedead0