| 1 |
= RSSA |
| 2 |
|
| 3 |
<<RSSA#>> is an <<IntermediateLanguage#>>, translated from <<SSA2#>> by |
| 4 |
<<ToRSSA#>>, optimized by <<RSSASimplify#>>, and translated by |
| 5 |
<<ToMachine#>> to <<Machine#>>. |
| 6 |
|
| 7 |
== Description |
| 8 |
|
| 9 |
<<RSSA#>> is a <<IntermediateLanguage#>> that makes representation |
| 10 |
decisions explicit. |
| 11 |
|
| 12 |
== Implementation |
| 13 |
|
| 14 |
* https://github.com/MLton/mlton/blob/master/mlton/backend/rssa.sig[`rssa.sig`] |
| 15 |
* https://github.com/MLton/mlton/blob/master/mlton/backend/rssa.fun[`rssa.fun`] |
| 16 |
|
| 17 |
== Type Checking |
| 18 |
|
| 19 |
The new type language is aimed at expressing bit-level control over |
| 20 |
layout and associated packing of data representations. There are |
| 21 |
singleton types that denote constants, other atomic types for things |
| 22 |
like integers and reals, and arbitrary sum types and sequence (tuple) |
| 23 |
types. The big change to the type system is that type checking is now |
| 24 |
based on subtyping, not type equality. So, for example, the singleton |
| 25 |
type `0xFFFFEEBB` whose only inhabitant is the eponymous constant is a |
| 26 |
subtype of the type `Word32`. |
| 27 |
|
| 28 |
== Details and Notes |
| 29 |
|
| 30 |
SSA is an abbreviation for Static Single Assignment. The <<RSSA#>> |
| 31 |
<<IntermediateLanguage#>> is a variant of SSA. |