mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-18 15:26:31 +00:00
13 lines
416 B
Plaintext
13 lines
416 B
Plaintext
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.
|
|
|