• R/O
  • SSH

quipu: Commit

quipu mercurial repository


Commit MetaInfo

Revision48bd33581d020fa396475e80d9b8dd863084f806 (tree)
Zeit2019-06-25 04:10:20
AutorAgustina Arzille <avarzille@rise...>
CommiterAgustina Arzille

Log Message

Cleanup after last refactor

Ändern Zusammenfassung

Diff

diff -r 642ee5782914 -r 48bd33581d02 compiler.cpp
--- a/compiler.cpp Mon Jun 24 16:06:31 2019 -0300
+++ b/compiler.cpp Mon Jun 24 16:10:20 2019 -0300
@@ -2178,7 +2178,7 @@
21782178
21792179 static int
21802180 flatten_array_args (bc_compiler& bc, cons *syms,
2181- object bindings, bool& curr_dynamic, int *cntp)
2181+ object bindings, bool& curr_dynamic, int& nvframes)
21822182 {
21832183 const array *ap = as_array (bindings);
21842184 int ret = 0;
@@ -2188,7 +2188,7 @@
21882188 if (array_p (ap->data[i]))
21892189 {
21902190 int rx = flatten_array_args (bc, syms + ret, ap->data[i],
2191- curr_dynamic, cntp);
2191+ curr_dynamic, nvframes);
21922192 ret += rx, syms += rx;
21932193 }
21942194 else
@@ -2202,7 +2202,7 @@
22022202 bc.emit (OPX_(VFRAME));
22032203 bc.cur_f().stkdisp += 2;
22042204 curr_dynamic = true;
2205- ++*cntp;
2205+ ++nvframes;
22062206 ADD_BIND (syms, fixint (0), ret);
22072207 ADD_BIND (syms, fixint (0), ret);
22082208 }
@@ -2318,10 +2318,9 @@
23182318 !fct_p (*se = symval (setf)))
23192319 this->interp->raise ("runtime-error", "let: setf is not bound");
23202320
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);
23232323
2324- nbinds += n;
23252324 // Expand the (let [x y ...] (expr)) into (setf [x y ...] (expr))
23262325 *se = QP_CALL (this->interp, *se, xcar (bindings), xcadr (bindings));
23272326 this->compile_in (env, false, *se);
Show on old repository browser