| summaryrefslogtreecommitdiff |
diff options
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 -> |


