| summaryrefslogtreecommitdiff |
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2021-12-27 22:32:32 +0100 |
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2021-12-27 22:32:32 +0100 |
| commit | 18ebe6e6ca4299b7f903426502c5a5fb73747c81 (patch) | |
| tree | 7a310a4c8330b04c0d61a69e11650452896851eb /src/Tonkadur/Compute.elm | |
| parent | 7c727df4fb7e15e396959f59048f22bb346aef13 (diff) | |
...
Diffstat (limited to 'src/Tonkadur/Compute.elm')
| -rw-r--r-- | src/Tonkadur/Compute.elm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Tonkadur/Compute.elm b/src/Tonkadur/Compute.elm index 489ab3b..2a3410f 100644 --- a/src/Tonkadur/Compute.elm +++ b/src/Tonkadur/Compute.elm @@ -160,7 +160,10 @@ newline : Tonkadur.Types.State -> Tonkadur.Types.Value newline state = (TextValue Newline) next_allocable_address : Tonkadur.Types.State -> Tonkadur.Types.Value -next_allocable_address state = (IntValue state.next_allocable_address) +next_allocable_address state = + if (List.isEmpty state.freed_addresses) + then (PointerValue [(".alloc." ++ (String.fromInt state.allocated_data))]) + else (PointerValue [state.freed_addresses[0]]) operation : ( Tonkadur.Types.State -> |


