• R/O
  • SSH

quipu: Commit

quipu mercurial repository


Commit MetaInfo

Revision0fef660ef8574ceae6287cf012af12152111edc6 (tree)
Time2018-05-20 15:25:01
AuthorAgustina Arzille <avarzille@rise...>
CommiterAgustina Arzille

Log Message

Fix tail calls in native functions

Change Summary

Incremental Difference

diff -r 83712b433793 -r 0fef660ef857 compiler.cpp
--- a/compiler.cpp Fri May 18 17:44:25 2018 -0300
+++ b/compiler.cpp Sun May 20 06:25:01 2018 +0000
@@ -2219,7 +2219,7 @@
22192219 #endif
22202220
22212221 if (cdp != 0)
2222- { // Restored from an exception caught.
2222+ { // Restored from a caught exception.
22232223 top_frame = cdp->topf;
22242224 nargs = as_int (stack[interp->cur_frame - 3]);
22252225 bp = interp->cur_frame - interpreter::frame_overhead - nargs;
@@ -2335,7 +2335,7 @@
23352335 {
23362336 if (native_fct_p (fn))
23372337 {
2338- as_native_fct(fn)->call (interp, n);
2338+ as_native_fct(fn)->call (interp, &stack[sp - n], n);
23392339 sp -= n;
23402340 stack[sp - 1] = retval;
23412341 locals = U_PREV_LC ();
Show on old repository browser