on master help sign in
javascript: handle tailcalls for FFI
commit8742224f5606080d910428987312991ca118365e authorraichoo <raichoo@googlemail.com> dateFri 31 May 2013, 17:01 (13 years ago) parent32377c4
1 file changed+3−1
js/Runtime-common.js+3−1
js/Runtime-common.js+3−1
@@ -18,7 +18,9 @@ __IDRRT__.Forgot = new __IDRRT__.Type('Forgot');
1818__IDRRT__.Tailcall = function(f) { this.f = f };
1919__IDRRT__.ffiWrap = function(fid) {
2020 return function(arg) {
21− return __IDR__.APPLY0(fid, arg);
21+ return __IDRRT__.tailcall(function(){
22+ return __IDR__.APPLY0(fid, arg);
23+ });
2224 };
2325};
2426