TurtleScript
asm.js Verification Service
by C. Scott Ananian
This is a single-pass type-checker and verification service for
asm.js
using the
TurtleScript
implementation in
asm-llvm.js
(
github
). It is based on the 17 March 2013
asm.js
spec
with the following fixes:
Result of % should be intish
Add a special case for
expr % constant
.
Redundant parameter type coercions are disallowed
Negative numeric literals
Semicolon insertion explicitly allowed
Arbitrary parenthesization of expressions
Mutable foreign imports
Comma-separated global program variable declarations
! and ~~
Required coercion of call parameters
Unsigned is not a subtype of extern
Call expressions coerced based on grammatical form
Remove 'unknown' type for foreign function returns
1e3 is a valid integer literal, but 1e-3 is not
Operands of binary - should be double, not doublish
Paste your
asm.js
code here:
Type check