Skip to content

Compiler: Lower level Code.Switch #1495

Closed
@hhugo

Description

@hhugo

Code.Switch currently deal with both immediate and block/tagged values.
I feel we could simplify things a bit by adding an explicit condition on is_int and have Switch just dispatch on a variable immediate value

In other words, I means turning

B1: Switch(x,A1,A2)

Into

B1: Cond(isInt x, B2, B3)
B2: Switch(x, A1)
B3: let x' = tag x; Switch (x', A2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions