Mercurial > urweb
comparison src/jscomp.sml @ 1619:15e0c935c91b
Catching integer divisions by zero
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sat, 03 Dec 2011 09:44:07 -0500 |
parents | 94ef0b07066a |
children | 43f22a8f76cc |
comparison
equal
deleted
inserted
replaced
1618:705cb41ac7d0 | 1619:15e0c935c91b |
---|---|
704 | "+" => "plus" | 704 | "+" => "plus" |
705 | "-" => "minus" | 705 | "-" => "minus" |
706 | "*" => "times" | 706 | "*" => "times" |
707 | "/" => (case bi of Int => "divInt" | NotInt => "div") | 707 | "/" => (case bi of Int => "divInt" | NotInt => "div") |
708 | "%" => (case bi of Int => "modInt" | NotInt => "mod") | 708 | "%" => (case bi of Int => "modInt" | NotInt => "mod") |
709 | "fdiv" => "div" | |
710 | "fmod" => "mod" | |
709 | "<" => "lt" | 711 | "<" => "lt" |
710 | "<=" => "le" | 712 | "<=" => "le" |
711 | "strcmp" => "strcmp" | 713 | "strcmp" => "strcmp" |
712 | _ => raise Fail ("Jscomp: Unknown binary operator " ^ s) | 714 | _ => raise Fail ("Jscomp: Unknown binary operator " ^ s) |
713 | 715 |