Hotel at day 4 - a vm and some confusion
Didn't do much yesterday, but this morning I awoke really early; couldn't sleep anymore. As I lay awake, thinking about hotel, I figured what the heck, lets go for a vm straight! Got out of bed and coded the first idea. This evening I finished it. Well, finished is a big word, what used to work in the evaluator now works again in the vm, and the evaluator is now a parser that emits bytecode. But it is very, very rough.
So, unfortunately, implementing proper scopes is still next. The confusion that is mentioned in the title comes from the fact I don't really see (anymore?) what to do when a scope is called, because recursive functions and closures actually require a private instance of their scope. That basically means there is a scope created on compile time, and one when they are activated, it must be copied or something. And what about scopes that cannot be called? I constantly jump between two ways of looking at this. Lets see where the code brings me, if anywhere.
That is all, just a quick update.
Last modified: 2007-11-19 20:18 GMT