quipu mercurial repository
Revision | 48bd33581d020fa396475e80d9b8dd863084f806 (tree) |
---|---|
Zeit | 2019-06-25 04:10:20 |
Autor | Agustina Arzille <avarzille@rise...> |
Commiter | Agustina Arzille |
Cleanup after last refactor
@@ -2178,7 +2178,7 @@ | ||
2178 | 2178 | |
2179 | 2179 | static int |
2180 | 2180 | flatten_array_args (bc_compiler& bc, cons *syms, |
2181 | - object bindings, bool& curr_dynamic, int *cntp) | |
2181 | + object bindings, bool& curr_dynamic, int& nvframes) | |
2182 | 2182 | { |
2183 | 2183 | const array *ap = as_array (bindings); |
2184 | 2184 | int ret = 0; |
@@ -2188,7 +2188,7 @@ | ||
2188 | 2188 | if (array_p (ap->data[i])) |
2189 | 2189 | { |
2190 | 2190 | int rx = flatten_array_args (bc, syms + ret, ap->data[i], |
2191 | - curr_dynamic, cntp); | |
2191 | + curr_dynamic, nvframes); | |
2192 | 2192 | ret += rx, syms += rx; |
2193 | 2193 | } |
2194 | 2194 | else |
@@ -2202,7 +2202,7 @@ | ||
2202 | 2202 | bc.emit (OPX_(VFRAME)); |
2203 | 2203 | bc.cur_f().stkdisp += 2; |
2204 | 2204 | curr_dynamic = true; |
2205 | - ++*cntp; | |
2205 | + ++nvframes; | |
2206 | 2206 | ADD_BIND (syms, fixint (0), ret); |
2207 | 2207 | ADD_BIND (syms, fixint (0), ret); |
2208 | 2208 | } |
@@ -2318,10 +2318,9 @@ | ||
2318 | 2318 | !fct_p (*se = symval (setf))) |
2319 | 2319 | this->interp->raise ("runtime-error", "let: setf is not bound"); |
2320 | 2320 | |
2321 | - int n = flatten_array_args (*this, | |
2322 | - syms + nbinds, sym, curr_dynamic, &nvframes); | |
2321 | + nbinds += flatten_array_args (*this, | |
2322 | + syms + nbinds, sym, curr_dynamic, nvframes); | |
2323 | 2323 | |
2324 | - nbinds += n; | |
2325 | 2324 | // Expand the (let [x y ...] (expr)) into (setf [x y ...] (expr)) |
2326 | 2325 | *se = QP_CALL (this->interp, *se, xcar (bindings), xcadr (bindings)); |
2327 | 2326 | this->compile_in (env, false, *se); |