[Quipu-dev] quipu/quipu: Rename 'ONEXIT' to 'ATEXIT'

Back to archive index
scmno****@osdn***** scmno****@osdn*****
Mon Dec 2 04:12:22 JST 2019


changeset 657deab3e018 in quipu/quipu
details: http://hg.osdn.jp/view/quipu/quipu?cmd=changeset;node=657deab3e018
user: Agustina Arzille <avarz****@riseu*****>
date: Sun Dec 01 19:12:11 2019 +0000
description: Rename 'ONEXIT' to 'ATEXIT'

diffstat:

 builtins.cpp |  10 ++++++----
 defs.h       |   2 +-
 memory.cpp   |   3 ++-
 stream.cpp   |   2 +-
 4 files changed, 10 insertions(+), 7 deletions(-)

diffs (78 lines):

diff -r ca8c959386ce -r 657deab3e018 builtins.cpp
--- a/builtins.cpp	Fri Nov 22 19:18:12 2019 -0300
+++ b/builtins.cpp	Sun Dec 01 19:12:11 2019 +0000
@@ -1479,9 +1479,9 @@
   else if (!symbol_p (sym))
     interp->raise ("type-error", "first argument must be a symbol or nil");
 
-  interp->aux = symval (sym);
-  if (interp->aux != UNBOUND)
-    qp_return (interp->aux);
+  object ret = symval (sym);
+  if (ret != UNBOUND)
+    qp_return (ret);
   else if (argc == 2)
     qp_return (argv[1]);
   else
@@ -1752,6 +1752,8 @@
 // (raise [object])
 static DEFBUILTIN (raise_fct)
 {
+  interp->cur_frame = as_int (interp->stack[interp->cur_frame - 4]);
+
   if (argc == 1)
     {
       object exc = *argv;
@@ -1762,7 +1764,7 @@
   else if (interp->last_err.value == NIL)
     interp->raise ("runtime-error", "no exception to reraise");
   interp->raise (interp->last_err.value);
-  return (fixint (0));
+  return (fixint (0));   // NOTREACHED.
 }
 
 static DEFBUILTIN (isa_fct)
diff -r ca8c959386ce -r 657deab3e018 defs.h
--- a/defs.h	Fri Nov 22 19:18:12 2019 -0300
+++ b/defs.h	Sun Dec 01 19:12:11 2019 +0000
@@ -332,7 +332,7 @@
   FLAGS_GCWIP       = 1 << 2,
   FLAGS_FINALIZABLE = 1 << 3,
   FLAGS_CONST       = 1 << 4,
-  FLAGS_ONEXIT      = 1 << 5
+  FLAGS_ATEXIT      = 1 << 5
 };
 
 // Flags for the 'nzap' interface.
diff -r ca8c959386ce -r 657deab3e018 memory.cpp
--- a/memory.cpp	Fri Nov 22 19:18:12 2019 -0300
+++ b/memory.cpp	Sun Dec 01 19:12:11 2019 +0000
@@ -174,7 +174,7 @@
 
   void add_obj (varobj *vp)
     {
-      uintptr_t idx = (vp->vo_full & FLAGS_ONEXIT) / FLAGS_ONEXIT;
+      uintptr_t idx = (vp->vo_full & FLAGS_ATEXIT) / FLAGS_ATEXIT;
       this->sets[idx].add (&vp->gc_link);
     }
 
@@ -319,6 +319,7 @@
           if (qp_unlikely (vp->flagged_p (out.gcbit)))
             { /* This object survived even though it's not in the black set,
                * most likely because of a write barrier. */
+              // XXX: is this needed ?
               vp->vo_full = (vp->vo_full & ~GC_MASK) | out.gcbit;
               out.black.add_obj (vp);
             }
diff -r ca8c959386ce -r 657deab3e018 stream.cpp
--- a/stream.cpp	Fri Nov 22 19:18:12 2019 -0300
+++ b/stream.cpp	Sun Dec 01 19:12:11 2019 +0000
@@ -549,7 +549,7 @@
   if (!ret)
     llio_close (osfd);
   else if (ret->io_flags & STRM_WRITE)
-    ret->vo_full |= FLAGS_ONEXIT;
+    ret->vo_full |= FLAGS_ATEXIT;
 
   return (ret);
 }



More information about the Quipu-dev mailing list
Back to archive index