diff --git a/HISTORY b/HISTORY index bbdc954..bfdd555 100755 --- a/HISTORY +++ b/HISTORY @@ -1,5 +1,6 @@ Jan. 8 2016 Developing lambda, fixed a lambda scope linkage issue +Developing lambda, fixed an upvalue passing issue Jan. 7 2016 Developing lambda, added parameter and upvalue processing diff --git a/core/my_basic.c b/core/my_basic.c index 8cc5aea..8b51ff2 100755 --- a/core/my_basic.c +++ b/core/my_basic.c @@ -3310,6 +3310,8 @@ int _eval_script_routine(mb_interpreter_t* s, _ls_node_t** l, mb_value_t* va, un } } while(ast); + _out_of_scope(s, running); + result = _proc_args(s, l, running, 0, 0, r, 0, 0, false); if(result != MB_FUNC_OK) goto _exit; @@ -3395,6 +3397,8 @@ int _eval_lambda_routine(mb_interpreter_t* s, _ls_node_t** l, mb_value_t* va, un } } while(ast); + _out_of_scope(s, running); + result = _proc_args(s, l, running, 0, 0, r, 0, 0, false); if(result != MB_FUNC_OK) goto _exit; @@ -6301,6 +6305,7 @@ int _fill_with_upvalue(void* data, void* extra, void* p) { _ls_node_t* nori = _ht_find(tuple->scope->var_dict, (void*)n); if(nori) { _object_t* ovar = _create_object(); + obj = (_object_t*)nori->data; ovar->type = _DT_VAR; ovar->data.variable = (_var_t*)mb_malloc(sizeof(_var_t)); memset(ovar->data.variable, 0, sizeof(_var_t)); diff --git a/output/my_basic.exe b/output/my_basic.exe index 4881de1..0737aa3 100755 Binary files a/output/my_basic.exe and b/output/my_basic.exe differ