... | ... | @@ -59,12 +59,11 @@ In compiling case expressions ghc proceeds by first identifying some cases we wa |
|
|
```
|
|
|
IfEqual x1 label1 label2
|
|
|
```
|
|
|
See Note [Two alts + default] for a justification of this rule in Switch.hs -- this will be relevant to our discussions below.
|
|
|
|
|
|
3. Two alternatives [(x1, label1), (x2, label2)] with defLabel which we compile into:
|
|
|
```
|
|
|
IfEqual x1 label1 (IfEqual x2 label2 defLabel)
|
|
|
```
|
|
|
See Note [Two alts + default] for a justification of this rule in Switch.hs -- this will be relevant to our discussions below.
|
|
|
|
|
|
If none of the above apply then we proceed as follows. We split the case numbers into regions based on the location of holes (if two consecutive integers are a distance of > 7 apart then we consider a hole being present between them). So now we have a list of Maps. The intent is that each of those maps will become a MultuWayJump table in the compiled code.
|
|
|
|
... | ... | |