xo-interpreter: vsm work on environments [WIP]
This commit is contained in:
parent
dbf251be6f
commit
3221eef2f8
5 changed files with 72 additions and 2 deletions
|
|
@ -194,6 +194,9 @@ namespace xo {
|
|||
// for VM stack. Only works for code that doesn't rely on fancy
|
||||
// lexical scoping
|
||||
|
||||
// consider separate allocator for reader (i.e. program code)
|
||||
// and data (program execution)
|
||||
|
||||
/** reader: text -> expression **/
|
||||
SchematikaReader reader_;
|
||||
|
||||
|
|
@ -206,6 +209,16 @@ namespace xo {
|
|||
/** expression register **/
|
||||
obj<AExpression> expr_;
|
||||
|
||||
/** environment pointer. Provides bindings
|
||||
* for surrounding lexical scope at this point
|
||||
* in execution
|
||||
**/
|
||||
DLocalEnv * local_env_ = nullptr;
|
||||
/** environment pointer. Maintains bindings
|
||||
* for global variables.
|
||||
**/
|
||||
DGlobalEnv * global_env_ = nullptr;
|
||||
|
||||
/** function to call **/
|
||||
obj<AProcedure> fn_;
|
||||
/** evaluated argument list **/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue