• R/O
  • SSH

quipu: Commit

quipu mercurial repository


Commit MetaInfo

Revisionac10c2f3511cbf4273b8e683eab64b82037506f0 (tree)
Zeit2019-10-18 07:17:57
AutorAgustina Arzille <avarzille@rise...>
CommiterAgustina Arzille

Log Message

Simplify 'sp_guard' usage

Ändern Zusammenfassung

Diff

diff -r 624e45ae56c9 -r ac10c2f3511c array.cpp
--- a/array.cpp Thu Oct 17 18:51:24 2019 -0300
+++ b/array.cpp Thu Oct 17 19:17:57 2019 -0300
@@ -161,7 +161,7 @@
161161 }
162162
163163 raw_acc<array> rx (ap->len);
164- sp_guard sg (interp, interp->stklen ());
164+ sp_guard sg (interp);
165165 valref obr (interp, fixint (0));
166166
167167 interp->growstk (ap->len);
@@ -428,7 +428,7 @@
428428 if (save)
429429 info.add_mapping (interp, *info.offset, ax.as_obj ());
430430
431- sp_guard g (interp, interp->stklen ());
431+ sp_guard g (interp);
432432 interp->growstk (len);
433433
434434 for (uint32_t i = 0; i < len; ++i)
diff -r 624e45ae56c9 -r ac10c2f3511c interp.h
--- a/interp.h Thu Oct 17 18:51:24 2019 -0300
+++ b/interp.h Thu Oct 17 19:17:57 2019 -0300
@@ -414,6 +414,10 @@
414414 {
415415 }
416416
417+ sp_guard (interpreter *__interp) : sp_guard (__interp, __interp->stklen ())
418+ {
419+ }
420+
417421 ~sp_guard ()
418422 {
419423 this->interp->stkend = this->interp->stack + this->sp;
diff -r 624e45ae56c9 -r ac10c2f3511c io.cpp
--- a/io.cpp Thu Oct 17 18:51:24 2019 -0300
+++ b/io.cpp Thu Oct 17 19:17:57 2019 -0300
@@ -631,7 +631,7 @@
631631
632632 object reader::read_table (object)
633633 {
634- sp_guard sg (this->interp, this->interp->stklen ());
634+ sp_guard sg (this->interp);
635635 // Push equality and hash functions.
636636 this->interp->push (NIL);
637637 this->interp->push (NIL);
diff -r 624e45ae56c9 -r ac10c2f3511c table.cpp
--- a/table.cpp Thu Oct 17 18:51:24 2019 -0300
+++ b/table.cpp Thu Oct 17 19:17:57 2019 -0300
@@ -866,7 +866,7 @@
866866 object copy_u (interpreter *interp, object obj, bool deep)
867867 {
868868 table::iterator it (interp, obj);
869- sp_guard sg (interp, interp->stklen ());
869+ sp_guard sg (interp);
870870
871871 interp->push (as_table(obj)->cmpfct);
872872 interp->push (as_table(obj)->hashfct);
@@ -938,7 +938,7 @@
938938 if (save)
939939 info.add_mapping (interp, *info.offset, *ret);
940940
941- sp_guard sg (interp, interp->stklen ());
941+ sp_guard sg (interp);
942942 while (true)
943943 {
944944 if (strm->peekb (interp) == PACK_END)
diff -r 624e45ae56c9 -r ac10c2f3511c types.cpp
--- a/types.cpp Thu Oct 17 18:51:24 2019 -0300
+++ b/types.cpp Thu Oct 17 19:17:57 2019 -0300
@@ -370,7 +370,7 @@
370370 auto off = slots_insert (interp, *elem, &xaref(sh, 0), nshared);
371371
372372 if (!fixint_p (slotdef_index (tmp)))
373- {
373+ { // A shared slot that belongs to this type.
374374 slotdef_index(tmp) = fixint (off);
375375 slotdef_index(*elem) = UNBOUND;
376376 slotdef_flags(*elem) &= ~fixint (SLOTDEF_SHARED_FLG);
Show on old repository browser