Changed the way how Melo-ing variables works #8

Merged
Ghost merged 3 commits from improvements/melo into master 2022-04-23 11:54:23 +00:00

So, Melo-ing variable in AbleScript is currently just setting a flag on it, keeping the value alive. And AbleScript currently has no way how do delete variables (except dropping the stack frame), so, I changed Variable to be an enum of Ref(ValueRef) or Melo. So, if the value is set to the Melo variant, ValueRef is dropped (and likely gets deallocated, as there is currently no way to copy references with variables). And if you Melo again, the variable will get erased from the top-most stackframe containing it.

So, Melo-ing variable in AbleScript is currently just setting a flag on it, keeping the value alive. And AbleScript currently has no way how do delete variables (except dropping the stack frame), so, I changed Variable to be an enum of Ref(ValueRef) or Melo. So, if the value is set to the Melo variant, ValueRef is dropped (and likely gets deallocated, as there is currently no way to copy references with variables). And if you Melo again, the variable will get erased from the top-most stackframe containing it.
Ghost added 3 commits 2022-04-22 19:44:29 +00:00
b0e8acd438 Reimplemented Melo
- Variable made into enum of `ValueRef or Melo`
- Melo-ing variable causes dropping of the Rc, decreasing reference count
Ghost merged commit 45bb1ade84 into master 2022-04-23 11:54:23 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: AbleScript/ablescript#8
There is no content yet.