Ray Schamp
f6c0064235
All linting other than console statements
2016-10-23 22:20:29 -04:00
Ray Schamp
68ed110b49
Pass with eslint --fix
...
Resolved whitespace issues, e.g., space-before-function-paren and key-spacing
2016-10-23 12:41:45 -04:00
Tim Mickel
e49f076fa1
Interpreter fixes, enhancements, features ( #280 )
...
* Thread stepping rework; interp.redraw equivalent
* Add turbo mode and pause mode
* Yielding behavior to match Scratch 2.0
* Implement warp-mode procedure threads
* Add check for recursive call
* Inline wait block timer
* Revert to setInterval and always drawing
* Restore yielding in glide
* 30TPS compatibility mode
* 5-call count recursion limit
* Removing dead primitive code
* To simplify, access runtime.threads inline in `stepThreads`.
* Warp mode/timer fixes; recursive check fixes; clean-up
* Add basic single-stepping
* Add single-stepping speed slider
* Allow yielding threads to run in single-stepping
* Restore inactive threads tracking for block glows
* Add clock pausing during pause mode
* Documentation and clean-up throughout
* Don't look for block glows in `thread.topBlock`.
* Add null check for block glows; rename `_updateScriptGlows` to reflect block glowing
* Use the current executed block for glow, instead of stack
* Add more comments to `stepToProcedure`, and re-arrange to match 2.0
* Tweak to Blocks.prototype.getTopLevelScript
* Revert previous
* Fix threads array to be resilient to changes during `stepThreads`
* Restore inactive threads filtering
* Fix typo in "procedure"
* !! instead of == true
2016-10-17 23:23:16 -04:00
Tim Mickel
8c654bbe60
Procedure blocks ( #264 )
2016-10-13 13:11:26 -04:00
Tim Mickel
9744bcbb70
Clones ( #150 )
...
* Provide property to Clone to distinguish "original" clones
* Provide method to clone a clone's properties
* Don't report clones in the UI target list
* Add target info to Thread
* Allow hats to skip clones (for green flag)
* Green flag skips clones
* Implement "create clone" and hat
* Pass the runtime to sprites and clones (for start hats)
* Clone disposal; trigger hats after drawable initializes.
* Separate stop threads for target; fix handling of stop button
* Remove extraneous `skipClones` property
* Add global clone limit
* Don't allow a non-clone to delete itself.
* Rename `cloneClone` -> `makeClone`
* Variable updates in runtime.js
* Synchronous drawable initialization (until we put it back to promises)
2016-09-15 19:37:12 -04:00
Tim Mickel
5df0acc895
Better glows ( #152 )
...
* Strip out old script glowing in thread management
* Add new tracking mechanism for glowing scripts
* Track parents and use them to determine script glows
* Use top-block for a thread if there's nothing on the stack
* Remove `console.log`
2016-09-08 09:40:53 -04:00
Tim Mickel
39fdbaf983
Add atStackTop helper to Thread
2016-08-23 18:12:19 -04:00
Tim Mickel
de6ba08866
Add single-frame yield mode
2016-07-01 10:44:43 -04:00
Tim Mickel
ec4567aa8a
Simplify logic for Thread status
2016-06-30 18:56:31 -04:00
Tim Mickel
ab6e0d3839
Remove YieldTimers, unused WeDo blocks
2016-06-30 18:56:31 -04:00
Tim Mickel
6daee9a70e
Remove VM-locking yield mode per discussion
2016-06-30 18:56:23 -04:00
Tim Mickel
d44b806b4f
Add blocking yield mode
2016-06-30 18:56:23 -04:00
Tim Mickel
6181bcd5cb
Refactor Thread.peekParentStackFrame
2016-06-30 18:56:23 -04:00
Tim Mickel
d15c93af05
Keep "waiting reporter name" on the stack frame.
...
Also add highlighting for inputs.
2016-06-30 18:56:23 -04:00
Tim Mickel
97f7571c6f
Prototype implementation of yielding reporters
2016-06-30 18:56:23 -04:00
Tim Mickel
190208b620
Clean up yield-timers: support multiple, move logic to Threads.
2016-06-30 18:56:23 -04:00
Tim Mickel
526a260101
Simplify execution by removing nextBlock
...
Everything is managed by the stack, including what the execute() function does.
2016-06-09 17:08:30 -04:00
Tim Mickel
9df470255e
Add helpers to thread object
2016-06-09 14:22:58 -04:00
Tim Mickel
379b2dec79
Stack management, stack frames, forever and repeat
2016-05-03 13:28:24 -04:00
Tim Mickel
4de24cfc30
Implement thread status, YieldTimer, block glow, wait
2016-05-03 11:26:28 -04:00
Tim Mickel
773f2e1bbc
Improve JSDoc on Thread
2016-05-02 13:05:48 -04:00
Tim Mickel
96123f870f
Fix _removeThread documentation and add toggleStack
2016-04-29 17:31:04 -04:00
Tim Mickel
92dab97b84
Add thread management and stepping to runtime
2016-04-26 16:50:49 -04:00
Tim Mickel
b6186a44f3
Add basics for the sequencer and threads
2016-04-26 15:00:45 -04:00
Andrew Sliwinski
981b85e78f
AST create / change / move / delete from blockly
2016-04-26 09:49:52 -04:00
Andrew Sliwinski
f9f47ed103
WIP
2016-04-18 17:20:30 -04:00