[Quipu-dev] quipu/quipu: Small fix in non-tail return

Back to archive index

scmno****@osdn***** scmno****@osdn*****
Fri Jun 22 07:41:37 JST 2018


changeset 5f55cf594b99 in quipu/quipu
details: http://hg.osdn.jp/view/quipu/quipu?cmd=changeset;node=5f55cf594b99
user: Agustina Arzille <avarz****@riseu*****>
date: Thu Jun 21 19:41:25 2018 -0300
description: Small fix in non-tail return

diffstat:

 eval.cpp |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (24 lines):

diff -r bbdac73d676b -r 5f55cf594b99 eval.cpp
--- a/eval.cpp	Tue Jun 19 17:43:55 2018 -0300
+++ b/eval.cpp	Thu Jun 21 19:41:25 2018 -0300
@@ -469,17 +469,17 @@
 
     OP_(RET):
       retval = r_stkend (1);
+      stkend = stack + interp->cur_frame;
       if ((interp->cur_frame = as_int (stack[lastf - 4])) == top_frame)
         return (retval);
 
-      stkend = stack + lastf - (interpreter::frame_size +
-        as_int (stack[lastf - 3]));
       fn = stack[interp->cur_frame - interpreter::frame_size -
         as_int (stack[interp->cur_frame - 3]) - 1];
-      r_stkend(1) = retval;
 
       lastf = interp->cur_frame - ((fn & EXTRA_BIT) ? as_int (fn) : 0);
       nargs = as_int (stack[lastf - 3]);
+      stkend -= nargs + interpreter::frame_size;
+      r_stkend(1) = retval;
       bp = lastf - (interpreter::frame_size + nargs);
       fn = stack[bp - 1];
 




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