commit 67be5f15acf3f21da992fbbb3d35cab597594003
parent d84d257e349626fc7f3197df33f6419c5ffd8340
Author: Andres Navarro <canavarro82@gmail.com>
Date: Fri, 29 Apr 2011 17:09:38 -0300
Added auto source code info tagging to the continuation constructor & added source code info printing to continuations in kwrite.
Diffstat:
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/kcontinuation.c b/src/kcontinuation.c
@@ -43,5 +43,8 @@ TValue kmake_continuation(klisp_State *K, TValue parent, klisp_Cfunc fn,
}
va_end(argp);
- return gc2cont(new_cont);
+ TValue res = gc2cont(new_cont);
+ /* Add the current source info as source info (may be changed later) */
+ kset_source_info(K, res, kget_csi(K));
+ return res;
}
diff --git a/src/kwrite.c b/src/kwrite.c
@@ -322,6 +322,10 @@ void kwrite_simple(klisp_State *K, TValue obj)
kw_print_name(K, obj);
}
#endif
+ #if KTRACK_SI
+ if (khas_si(obj))
+ kw_print_si(K, obj);
+ #endif
kw_printf(K, "]");
break;
case K_TOPERATIVE: