javascript: inline simple functions
commit4070d2b2345e978e73e3f72c5cca7c06a777775f
authorraichoo <raichoo@googlemail.com>
dateMon 3 Feb 2014, 00:23 (13 years ago)
parent4f4aea2
src/IRTS/CodegenJavaScript.hs+6
@@ -609,6 +609,12 @@ inlineFunctions js =
609609 JSReturn js@(JSNew "__IDRRT__Con" [JSNum _, JSArray vals])
610610 )
611611 | and $ map isJSIdent vals = Just js
612+ inlineAble' (
613+ JSReturn js@(JSNew "__IDRRT__Cont" [JSFunction [] (
614+ JSReturn (JSApp (JSIdent _) args)
615+ )])
616+ )
617+ | and $ map isJSIdent args = Just js
612618
613619 inlineAble' _ = Nothing
614620