From 147394e7692bdf77f041e4b9bd9ff0daac1ee9c7 Mon Sep 17 00:00:00 2001 From: marcellus Date: Fri, 6 Jun 2025 12:58:05 +0200 Subject: notes: 2025-06-06 12:58:05 from w11 --- ... links, Traductions et Lin\303\251arisation.md" | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 "CMP/Activation blocks, Static links, Traductions et Lin\303\251arisation.md" (limited to 'CMP') diff --git "a/CMP/Activation blocks, Static links, Traductions et Lin\303\251arisation.md" "b/CMP/Activation blocks, Static links, Traductions et Lin\303\251arisation.md" new file mode 100644 index 0000000..8c8bb39 --- /dev/null +++ "b/CMP/Activation blocks, Static links, Traductions et Lin\303\251arisation.md" @@ -0,0 +1,48 @@ +# Blocs d'activation +## Memory Hierarchy + +| Type | Desc | +| ------------ | ----------------------------------- | +| Registers | Small memory units built on the CPU | +| L1 | Last main memory access results | +| L2 | MB | +| Memory (RAM) | RAM | +| Storage | Disks | + +## Register overflow +**Memory allocation must be dynamic** +### Dynamic memory allocation +- *Global* +- *Automatic* +- *Heap*: + - User controlled + - Garbage collected +## `spim` Memory model +![[Pasted image 20250513142247.png]] + +## Stack management +Function calls: stack process +Or: Call Tree dfs + +## Activation blocks contents +- arguments : incoming +- local variables : user automatic variables +- return address : where to return +- saved registers : caller's environment to restore +- temp : compiler automatic variables, spills +- static links : when needed +Layout suggested by the constructor + +## Frame & stack pointer +Frame : debut de bloc +Stack : fin de bloc + +# Static links +A mechanism : +- Computed at compile time +- that produces code +- that will be used at runtime +$\rightarrow$ Sert à remonter au premier lien avant les appels recursifs pour chopper des variables + +# Translating expressions +How to translate the expression $\alpha < \beta$ in HIR? \ No newline at end of file -- cgit v1.2.3