on master help sign in
javascript: inline more functions
commit9e9e6cc8e41468007ee37ebd488ffe5cc62d68fd authorraichoo <raichoo@googlemail.com> dateMon 3 Feb 2014, 00:46 (13 years ago) parent064e6d1
1 file changed+2−2
src/IRTS/CodegenJavaScript.hs+2−2
src/IRTS/CodegenJavaScript.hs+2−2
@@ -609,13 +609,13 @@ inlineFunctions js =
609609 inlineAble' (
610610 JSReturn js@(JSNew "__IDRRT__Con" [JSNum _, JSArray vals])
611611 )
612− | and $ map isJSIdent vals = Just js
612+ | and $ map (\x -> isJSIdent x || isJSConstant x) vals = Just js
613613 inlineAble' (
614614 JSReturn js@(JSNew "__IDRRT__Cont" [JSFunction [] (
615615 JSReturn (JSApp (JSIdent _) args)
616616 )])
617617 )
618− | and $ map isJSIdent args = Just js
618+ | and $ map (\x -> isJSIdent x || isJSConstant x) args = Just js
619619
620620 inlineAble' _ = Nothing
621621