on master help sign in
javascript: inline more functions
commit9d3ea3d2547c3fda2cbf56d51979f16a694c43d5 authorraichoo <raichoo@googlemail.com> dateMon 3 Feb 2014, 00:56 (13 years ago) parent9e9e6cc
1 file changed+6
src/IRTS/CodegenJavaScript.hs+6
src/IRTS/CodegenJavaScript.hs+6
@@ -610,6 +610,7 @@ inlineFunctions js =
610610 JSReturn js@(JSNew "__IDRRT__Con" [JSNum _, JSArray vals])
611611 )
612612 | and $ map (\x -> isJSIdent x || isJSConstant x) vals = Just js
613+
613614 inlineAble' (
614615 JSReturn js@(JSNew "__IDRRT__Cont" [JSFunction [] (
615616 JSReturn (JSApp (JSIdent _) args)
@@ -617,6 +618,11 @@ inlineFunctions js =
617618 )
618619 | and $ map (\x -> isJSIdent x || isJSConstant x) args = Just js
619620
621+ inlineAble' (
622+ JSReturn js@(JSIndex (JSProj (JSApp (JSIdent _) args) "vars") _)
623+ )
624+ | and $ map (\x -> isJSIdent x || isJSConstant x) args = Just js
625+
620626 inlineAble' _ = Nothing
621627
622628 isJSIdent js