summaryrefslogtreecommitdiff
path: root/CMP
diff options
context:
space:
mode:
Diffstat (limited to 'CMP')
-rw-r--r--CMP/Activation blocks, Static links, Traductions et Linéarisation.md48
1 files changed, 48 insertions, 0 deletions
diff --git a/CMP/Activation blocks, Static links, Traductions et Linéarisation.md b/CMP/Activation blocks, Static links, Traductions et Linéarisation.md
new file mode 100644
index 0000000..8c8bb39
--- /dev/null
+++ b/CMP/Activation blocks, Static links, Traductions et Linéarisation.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