A word is the value a temporarytemporary nanofilA temporary is a function-local IR name, tmp(N), holding one word of one class. Parameters, phis and instructions define temporaries; operands read them. Names are ground terms, compared only for equality: no logic variable appears in IR. holds at run time: an integer, a pointer (an address with its capabilitycapability Fil-CA capability is the authority half of a Fil-C pointer: which object, if any, its address may be used to access. In the model a capability is an identity, never bounds; the object's current bounds live in its region, so freeing through one alias empties what every alias sees.), or a limit's opaque snapshot. The temporary's classclass nanofilA value's machine type, one letter: w and l integers (32 and 64 bits), s, d and x floats, p a pointer with its capability, and in checked IR a (a proven address) and f (a proven function) (ir:class/3). says how it is read.
| interp.pl | Values.v | Classes |
|---|
| an integer | WInt | w, l; also p for an integer argument with no pointer term |
ptrAddr, Cap | WPtr of a ptr | p, a, f |
limitCap, Size | WLimit | l, a limitlimit nanofillimit(Size) of a pointer P0 is an opaque class-l snapshot of P0's capability and its object's bounds; check_limit(0, Size, Rights, Align) of [P, U] is exactly a check of P, whose bounds are tested natively against the snapshot U rather than the object's header (plus the free flag, and read-only for a write). A hoisted limit makes a loop's bounds test cheap.'s snapshot |
word is a sum over classes: being well classed is a boolean fact about a word (word_at_class, interp:word_at_class/3interp.plword_at_class+K, ?X0, ?XX is the word X0 taken at class K, its low bits(K) bits; a p word is itself.), not an index of its type, as formal.md decided.
The subtlety: "word" has other meanings nearby. In ir.pl's class table, w is "a word", a 32-bit integer, beside l, "a long"; in the backends a word is an 8-byte machine word, as in a frame's homeshome nanofilA home is the 8-byte frame word that holds a temporary, a phi's shadow or a pointer's address word in the stack-homed stream amd64_regs starts from (guide.md, 12. Register homes). Scalar homes are w or l only; float temporaries are kept out of them.. And the integer at class p exists only for main's canonical arguments (interp:class_arg/2interp.plclass_arg+K, ?XX is an argument of class K. A p argument is ptr(Addr, Cap), or an integer address with no pointer term (main.pl's canonical arguments): a defaulty case that comes from outside this module, so the cut stays. An unknown p argument is ptr(_, _).): every operation that needs a pointer is stuck on it.
Defined in Values.v.