Paul Kaplan
0f82e2a84d
Be more cautious about parsing json.
2017-12-14 14:23:16 -05:00
Paul Kaplan
256d7b3d6c
Parse the warp
property from the mutation instead of using directly.
2017-12-13 15:53:55 -05:00
Eric Rosenbaum
25ded4cff7
Fix spelling of coloUrTertiary
2017-12-11 17:01:23 -05:00
chrisgarrity
f51cf9877e
Preliminary localization ( #777 )
...
* localize the block and menu strings in the pen extension
* adds .tx/config to be able to push translations to transifex
* includes format-message to localize strings and extracting them.
* add setLocale function to VM to allow GUI to pass in locale data.
* refresh block definitions when the locale changes.
### Still to be decided
For now just extracting messages from the pen extension into their own file. We’ll need to decide if each category gets its own file, or group all the strings into one resource.
2017-12-11 15:41:45 -05:00
Chris Willis-Ford
e7bbad60e8
Merge pull request #793 from cwillisf/remove-threads-safely
...
Make _removeThread safe during thread iteration
2017-12-06 17:18:10 -08:00
Paul Kaplan
e6bd474720
Merge pull request #845 from kchadha/broadcast-msg-extra-create-bugfix
...
Broadcast Msg Bugfix
2017-12-05 15:38:12 -05:00
Paul Kaplan
bb69d157cd
Merge pull request #832 from paulkaplan/custom-procedure-updates
...
Updates for editable custom procedures
2017-12-05 15:37:56 -05:00
Karishma Chadha
34b0aff637
Bugfix for scratch-gui issue #994 , where executing a broadcast block from the flyout was creating a conflicting variable, causing a fatal error.
2017-12-04 18:01:29 -05:00
sjhuang26
eede8105d1
Clear answer on green flag
2017-12-01 20:06:55 -05:00
Paul Kaplan
a9e95f3b01
Merge pull request #829 from kchadha/broadcast-message-typed-variable
...
Broadcast message functionality
2017-12-01 11:51:38 -05:00
Paul Kaplan
5a53323715
Update to use explicit procedure names and ids
2017-11-29 12:00:00 -05:00
Karishma Chadha
e5378d323d
Adding unit tests for new lookupOrCreate funciton, fixing a bug that came up during testing (using lookupVariableById on a null target). Skipping integration tests that do not work right now because SB2 import of broadcast message blocks has not been implemented yet.
2017-11-29 10:43:07 -05:00
Paul Kaplan
80b4dab104
Decode the encoded argument information
2017-11-29 10:34:59 -05:00
Karishma Chadha
b674a0c047
Code cleanup and refactoring, and getting scratch3_event broadcast functionality to look up the variable name instead of getting it ad-hoc.
2017-11-28 22:33:27 -05:00
Karishma Chadha
0a15190b85
Broadcast message functionality (works with creating new messages, and switching back and forth between them as well). This commit includes a temporary workaround for the issue where the default broadcast message, 'message1' wasn't triggering a var_create event (filed in LLK/scratch-blocks#1258 ).
2017-11-21 16:48:48 -05:00
DD Liu
58dd57fe48
Merge pull request #784 from fsih/perSpriteMonitors
...
Execute monitors on a given target ID when block is sprite-specific
2017-11-21 10:23:53 -05:00
DD
ec9d8094bd
fix review comments
2017-11-20 17:23:59 -05:00
DD
6d26023104
revert unnecessary changes'
...
:
2017-11-20 13:00:37 -05:00
griffpatch
6ed2ca6caa
Cache Block Inputs & Procedure Definitions
...
* Cache Block Inputs & Procedure Definitions
* @mzgoddard requested changes on this pull request
* Move all caching into a single reusable field _cache.
* Invalidate 'all' caches on any change.
* Use 'typeof' instead of hasOwnProperty.
* Take caching out of Block and use lookup instead.
2017-11-20 10:22:51 -05:00
Christopher Willis-Ford
b19af399fa
Make _removeThread safe during thread iteration
...
Before: `_removeThread` stops a thread and immediately removes it from
the runtime's thread array. If this happens while iterating over the
thread array, such as in the case of clone deletion, some elements of
the array can be missed.
After: `_removeThread` has been renamed to `_stopThread`. It still stops
the thread immediately but it no longer removes the thread from the
runtime's thread array. Instead, `_stopThread` marks the thread for
later removal. Such threads are removed at the top of the next `_step`.
2017-11-17 12:56:25 -08:00
DD Liu
2d9722e69c
Merge pull request #787 from fsih/deleteMonitorBlocks
...
Delete monitor block when variable is deleted
2017-11-16 17:20:26 -05:00
DD
255e160ebb
Change it so we dont have to do string manipulation on IDs to get data out of events
2017-11-16 17:19:51 -05:00
Paul Kaplan
bbb8904467
Merge pull request #789 from paulkaplan/custom-procedure-update
...
Update naming and implementation for custom procedure blocks
2017-11-16 17:07:03 -05:00
Paul Kaplan
34dfbb50ba
Update naming and implementation for custom procedure blocks
2017-11-16 14:17:08 -05:00
Michael "Z" Goddard
3d92553459
Return restarted threads in list from startHats
...
Add restarted threads to the list of newThreads returned by startHats.
2017-11-16 11:23:51 -05:00
Michael "Z" Goddard
9864403bc9
A thread in the runtime but with the DONE status is not active
...
return false from isActiveThread if thread's status is done even when
its contained in the runtime threads list. As it is done, the thread
will not be run until either its replaced by a new copy of the thread
or the thread is removed from the list and another is added at a later
time.
2017-11-16 11:23:51 -05:00
kchadha
9df3b8ad86
Merge pull request #780 from mzgoddard/runtime-profiler
...
Runtime profiler
2017-11-16 10:02:37 -05:00
DD
0958db2618
Move data to blocks files
2017-11-15 17:53:43 -05:00
Paul Kaplan
1e27d21b15
Merge pull request #782 from kchadha/list-typed-variable
...
List typed variable
2017-11-15 12:48:56 -05:00
DD
c8d5ba1d5e
Delete block does nothing if the block doesnt exist
2017-11-15 11:56:49 -05:00
DD
aa0064948a
Delete monitor block when variable is deleted
2017-11-15 11:37:27 -05:00
Karishma Chadha
fe86e38210
Addressing PR review comments.
2017-11-15 09:17:20 -05:00
DD
757dccd565
Move is sprite specific verification into VM in a temporary way. Remove monitors when their sprites are deleted.
2017-11-14 18:25:54 -05:00
Michael "Z" Goddard
f73dae828e
Add enableProfiling and disableProfiling to Runtime
2017-11-14 14:57:32 -05:00
Michael "Z" Goddard
516d4f6f30
Add Profiler events to Runtime, Sequencer and execute
2017-11-14 14:57:32 -05:00
Michael "Z" Goddard
a5b55a5128
Add runtime Profiler
...
Profile internal virtual machine performance down to which blocks take
how long.
2017-11-14 14:57:31 -05:00
DD
9048a9b9e7
Pipe through whether a monitor is sprite-specific
2017-11-14 12:20:24 -05:00
Karishma Chadha
386045f033
Some code cleanup.
2017-11-13 16:55:57 -05:00
Karishma Chadha
26d4a3a069
Refactoring representation of variable type.
2017-11-13 16:29:38 -05:00
Karishma Chadha
038a65b460
Finishing up lists.
2017-11-13 14:24:30 -05:00
Karishma Chadha
b18938963f
Fixing linting errors
2017-11-13 14:22:36 -05:00
Karishma Chadha
70959cc7f5
First cut at turning lists into typed variables
2017-11-09 17:19:34 -05:00
Andrew Sliwinski
3fa1599b90
Merge pull request #701 from Scimonster/variable-xml-names
...
Correctly deserialize HTML entities in block DOM
2017-11-08 08:03:56 -05:00
Ray Schamp
b07bbd4745
Merge pull request #765 from mzgoddard/execute-is-promise-deopt
...
Write src/engine/execute so it can be optimized
2017-11-07 12:19:58 -05:00
Ray Schamp
180e545b4e
Merge pull request #766 from mzgoddard/execute-handle-report-block-utility
...
Extract handleReport and BlockUtility from inside the execute function
2017-11-07 12:19:23 -05:00
Ray Schamp
5290570fc5
Merge pull request #758 from mzgoddard/done-threads-indexof
...
Constant time check if a thread is in doneThreads
2017-11-07 10:30:15 -05:00
Michael "Z" Goddard
bbe7981703
Extract blockUtility from execute to reduce allocations
...
blockUtility as an object literal inside execute creates 11 objects,
one for the object, and 10 for the function closures. As a separate
object and allocated once, setting its sequencer and thread members,
block functions can share the same util object. Extract blockUtility to
cut down on allocations.
2017-11-07 10:21:51 -05:00
Michael "Z" Goddard
78847de660
Extract handleReport and add arguments to prevent closure alloc
...
`handleReport` inside `src/engine/execute.js`'s `execute` method needs
to allocate a closure to be able to refer to the higher scoped
variables. `execute` is called frequently that this has a noticable
impact on memory allocation and later collection. Extract handleReport
and add arguments to prevent the allocation.
2017-11-07 10:21:51 -05:00
Andrew Sliwinski
1efc312c36
Merge pull request #767 from mzgoddard/docs-blocks-param-names
...
Replace duplicate documentation on getProcedureParamNames
2017-11-06 19:34:51 -05:00
Michael "Z" Goddard
888da915a5
Replace duplicate documentation on getProcedureParamNames
...
Replace the duplicate getProcedureDefintion documentation block above
getProcedureParamNames.
2017-11-06 17:28:34 -05:00