diff lib/js/urweb.js @ 1360:02fc16faecf3

[De]serialization of times in JavaScript; proper integer division in JavaScript; Basis.crypt; Top.mkRead'; more aggressive Mono-level inlining, for values of function-y types
author Adam Chlipala <adam@chlipala.net>
date Thu, 23 Dec 2010 17:46:40 -0500
parents 0d8bd8ae8417
children 449a12b82db7
line wrap: on
line diff
--- a/lib/js/urweb.js	Thu Dec 23 11:23:31 2010 -0500
+++ b/lib/js/urweb.js	Thu Dec 23 17:46:40 2010 -0500
@@ -19,7 +19,9 @@
 function minus(x, y) { return x - y; }
 function times(x, y) { return x * y; }
 function div(x, y) { return x / y; }
+function divInt(x, y) { var n = x / y; return n < 0 ? Math.ceil(n) : Math.floor(n); }
 function mod(x, y) { return x % y; }
+function modInt(x, y) { var n = x % y; return n < 0 ? Math.ceil(n) : Math.floor(n); }
 function lt(x, y) { return x < y; }
 function le(x, y) { return x <= y; }