Some Debugging

This evening I fixed some more bugs in my script interpreter, and got a new optimization working.

  • A mistake in the implementation of the parse-time instantiation of variables was causing variables in deeply nested scopes to be instantiated multiple times, and variables were leaking out of their proper scopes.
  • By an oversight it was possible to declare void type variables. This wasn't really a problem in and of itself, but since it's useless and most likely to cause confusion it is now explicitly prohibited.
  • Conditionals and loops whose bodies are explicitly delimited in the script with braces, but which only contain a single line of code now no longer carry the overhead of being treated as blocks with a single expression with the unnecessary block object being removed.

I doubt that an end user will ever notice details specifically, but I feel so proud to see the interpreter gaining the brains to detect problems and ways to be more efficient and then display helpful messages or act silently on the user's behalf, respectively.

No Comments

Comment on this post