mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-19 07:45:09 +00:00
design of the storage allocation policy
ALLOCATION: design of the storage allocation policy
This commit is contained in:
12
compiler/notes/ALLOCATION
Normal file
12
compiler/notes/ALLOCATION
Normal file
@@ -0,0 +1,12 @@
|
||||
Strategy for allocating storage:
|
||||
|
||||
1. Allocate stack for variables which HAVE to have it.
|
||||
|
||||
2. Assign 'known' locations for variables at the end of branches.
|
||||
2a if the variable is in follow_vars, use that location
|
||||
2b if the variable is not then use goalinfo derived information
|
||||
ELSE use stack location ELSE panic
|
||||
|
||||
3. Assign inbetween locations for eager code generation:
|
||||
use 2a, 2b, allocate 'any' free register.
|
||||
|
||||
Reference in New Issue
Block a user