Alle boeken

Professioneel

Apps Over Coach Inloggen Begin met lezen

Computer Science · Begrippenlijst

Wat is Three-address code, temporary?

Ook bekend als: three-address code · temporary · quadruple

Definition 7.2 University Computer Science — Year 3 · Hoofdstuk 7 — Intermediate Code and Code Generation

Three-address code is a list of instructions of the forms t=aopbt = a \mathbin{\mathit{op}} b, t=op at = \mathit{op}\,a, t=at = a, loads and stores, labels L ⁣:L\!:, goto L\mathtt{goto}\ L, if arelb goto L\mathtt{if}\ a \mathbin{\mathit{rel}} b\ \mathtt{goto}\ L, calls and returns. Each names at most three places, its addresses: two operands and a result. An operand is a constant or a temporary, a named place for a value with no limit on how many there are; temporaries are also called virtual registers. Stored as a record of an operator and three addresses, an instruction is a quadruple.

The expression of expr.moor as a tree and as quadruples, one per interior node plus the final copy. The temporary beside each node holds its value. The leaves need no instruction: they are variables, already in temporaries, or constants.
The expression of expr.moor as a tree and as quadruples, one per interior node plus the final copy. The temporary beside each node holds its value. The leaves need no instruction: they are variables, already in temporaries, or constants.
Lees in het hoofdstuk →