on master help sign in
javascript: added cases to optimizer
commit46ac3d08b6baa8aba800fbff67069c79cb73f223 authorraichoo <raichoo@googlemail.com> dateFri 17 Jan 2014, 18:45 (13 years ago) parent31f2014
1 file changed+6
src/IRTS/CodegenJavaScript.hs+6
src/IRTS/CodegenJavaScript.hs+6
@@ -544,6 +544,12 @@ reduceLoop reduced (cons, program) =
544544 reduceCall funs (JSProj obj field) =
545545 JSProj (reduceCall funs obj) field
546546
547+ reduceCall funs (JSIndex obj idx) =
548+ JSIndex (reduceCall funs obj) (reduceCall funs idx)
549+
550+ reduceCall funs (JSOp op rhs lhs) =
551+ JSOp op (reduceCall funs rhs) (reduceCall funs lhs)
552+
547553 reduceCall funs (JSCond conds) =
548554 JSCond $ map (reduceCall funs *** reduceCall funs) conds
549555