It's kind of a dumb oversight, really, and hopefully it won't be too big of a fix to make; but it's still the first significant thing I'll have to go back and redo in the VM.
At the moment, lexical scopes exist on the heap. This means that every scope always exists, from the moment the program starts to the moment it terminates. Even if you have a lexical scope that is never entered, any variables it allocates will be chewing up memory.
Worse, this means that recursion is impossible. A function has only one instance of its bound scope, regardless of how many times it gets invoked, or what the call chain looks like. Therefore, any program that tries to do recursive calculations will get incorrect results. Each time the function is invoked, it will just overwrite the existing single instance of the scope on the heap, rather than creating a new scope on the stack.
The fix, of course, is to introduce an execution stack to the VM, and have scopes enter and exit correctly on the stack. Technically everything should be stack allocated right now instead of heap allocated, since I have no explicit heap allocation mechanism built into the language yet.
Being naturally lazy, I'm not particularly excited about having to do all this redesign work. Moreover, I'm not entirely sure how to go about it just yet, since it represents a pretty significant overhaul.
Oh well. It was only a matter of time before I ran into some kind of serious mistake; I am technically a language design newbie, after all [grin]