scratch-vm
scratch-vm copied to clipboard
Scratch VM with a JIT compiler and more features
Resolves #36 Hopefully all my assumptions about the types of blocks are correct so far :crossed_fingers:
Fixes https://github.com/TurboWarp/scratch-gui/issues/637, https://github.com/TurboWarp/scratch-gui/issues/593
Resolves or at least makes good progress on #48 I know you didn't want me to try to avoid big PRs but this kinda all had to be done in...
A simple example is ( ( 1 / 0 ) / ( -0 + -0 ) ) which returns -Infinity in TurboWarp but Infinity in Scratch  See demo project...
Creates two new classes `IntermediateStack` and `IntermediateInput` to replace `Node`. Right now these two classes almost the same, they contain an opcode and an object of inputs that contains all...
Removed all the 'opcode' strings that have to be the same (like `control.if`) between irgen and jsgen and moves them into a shared enum. This also distinguishes between opcodes that...
When a constant number input is passed into the `` block like this:  In Scratch, this script always says false. In TurboWarp, this script says true if you are...
### Expected Behavior Given this script:  The compiler should be able to conclude that `first`, `second`, `nth`, `i` will always be numbers and optimize accordingly: ```js b1.value = 0;...
Move type analysis over. This is necessary for #36