[−][src]Module inc::immediate
Runtime representation of typed scheme values
Immediate values (values that can be fit in one machine word) are tagged for distinguising them from heap allocated pointers. The last 3 bits effectively serve as the runtime type of the value. Always using 3 bits is a simpler approach than the multi bit technique the paper uses. This is a very efficient and low overhead technique at the cost of losing precision - completely acceptable for types like characters and booleans but having to live with 61bit numerics instead of native 64 and some overhead for operations like multiplication & division.
See the paper for details. See tests for examples.
Constants
BOOL | |
CHAR | |
FALSE | |
MASK | |
NIL | |
NUM | |
SHIFT | |
TRUE |
Functions
n | |
to | Immediate representation of an expression. |