Changed the way how Melo-ing variables works #8
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "improvements/melo"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
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.