Keep the current environment scope chain in the js_State struct.

Create script (global/eval code) functions without a scope (they're
not closures) and run them with js_eval so they can execute with the
current scope chain.

Normal functions still have a scope and are run with js_call.
Compile global/eval code as script objects rather than regular functions.

Handle scoping rules ath the js_call level instead of having to use
separate functions to call on the objects.
Remember file name and line where a function object came from.

Make "debugger" statement useful: dump current function bytecode,
stack, and environment scope chain.