]> ocean-lang.org Git - ocean/commitdiff
oceani: add an 'interp' case for Func
authorNeilBrown <neil@brown.name>
Sun, 7 Nov 2021 00:04:34 +0000 (11:04 +1100)
committerNeilBrown <neil@brown.name>
Mon, 8 Nov 2021 09:56:36 +0000 (20:56 +1100)
For Func we jut call interp_exec on b->right.
This ensures that interp_exec() gets called on each exec, so
it can do cleanup (in future patch).

Signed-off-by: NeilBrown <neil@brown.name>
csrc/oceani.mdc

index 1be7c673c010a31c9737fcfb959abc4861afb956..c820d39153674dcc75fcb2fa5022e60c2624ffce 100644 (file)
@@ -4503,13 +4503,16 @@ analysis is a bit more interesting at this level.
                        }
                        al = cast(binode, al->right);
                }
-               v = interp_exec(c, p->right, &vtype);
+               v = interp_exec(c, p, &vtype);
                free_value(vtype, &v);
        }
 
 ###### interp binode cases
-       case List:
-       case Func: abort();     // NOTEST
+       case List: abort();     // NOTEST
+
+       case Func:
+               rv = interp_exec(c, b->right, &rvtype);
+               break;
 
 ## And now to test it out.