on master help sign in
javascript: collapse nested continuations
commit43828d9622d3a7b8629f310d025be41bf803a5c7 authorraichoo <raichoo@googlemail.com> dateSun 9 Feb 2014, 15:11 (13 years ago) parent27c5ac6
1 file changed+5
src/IRTS/CodegenJavaScript.hs+5
src/IRTS/CodegenJavaScript.hs+5
@@ -1124,6 +1124,11 @@ evalCons js =
11241124 collapseCont js = transformJS match js
11251125 where
11261126 match :: JS -> JS
1127+ match (JSNew "__IDRRT__Cont" [JSFunction [] (
1128+ JSReturn ret@(JSNew "__IDRRT__Cont" [JSFunction [] _])
1129+ )]) = collapseCont ret
1130+
1131+
11271132 match (JSNew "__IDRRT__Cont" [JSFunction [] (
11281133 JSReturn (JSIdent name)
11291134 )]) = JSIdent name