Alle boeken

Professioneel

Apps Over Coach Inloggen Begin met lezen

Computer Science · Begrippenlijst

Wat is Jumping code, label generation?

Ook bekend als: jumping code · label generation · back-patching

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

The jumping code of a condition ee for two labels LtL_{\mathrm{t}} and LfL_{\mathrm{f}} is code that evaluates as much of ee as needed and then jumps to LtL_{\mathrm{t}} if ee is true and to LfL_{\mathrm{f}} if it is false. The labels are made before the code that jumps to them, with fresh numbers: this is label generation. A one-pass generator that emits machine words directly cannot name a label it has not placed yet; it emits the jump with an empty target, records it, and fills the target in when the label’s address is known, which is back-patching.

Lees in het hoofdstuk →