Commit Graph
3671 Commits
Author SHA1 Message Date
Thomas Weber aed4aceaa9 Don't store generator result 2020-07-07 14:45:04 -05:00
Thomas Weber fd03197786 fix list contains 2020-07-07 14:44:49 -05:00
Thomas Weber 74ca976d2b fixup script stopping blocks 2020-07-07 14:44:22 -05:00
Thomas Weber fa34aa9f6a Remove target global from executor
Just get it from thread
2020-07-07 13:45:47 -05:00
Thomas Weber 4c9eccf536 Convert some strings to numbers for performance 2020-07-07 13:44:58 -05:00
Thomas Weber a5536bfa3c Move script cache to Blocks 2020-07-07 11:05:46 -05:00
Thomas Weber d5546c6b05 dirty hack to fix some wrongful caching 2020-07-06 23:44:49 -05:00
Thomas Weber c6b9df757c Script factories 2020-07-06 23:18:16 -05:00
Thomas Weber da1c8e6abe implement a few more blocks
- looks_size
- motion_direction
- sensing_username
2020-07-06 23:17:40 -05:00
Thomas Weber f0d76864a4 minor cleanup 2020-07-06 23:16:51 -05:00
Thomas Weber d27cc02bae optimizations, bug fixes 2020-07-06 22:13:48 -05:00
Thomas Weber 5c56ba025a transition more things to yielding 2020-07-06 20:42:16 -05:00
Thomas Weber bf32e2e468 Back to a yielding compiler 2020-07-06 19:34:38 -05:00
Thomas Weber 5bec779b4a minor optimizations/fixes 2020-07-06 18:23:16 -05:00
Thomas Weber 3bfc252a0e fix a couple small bugs 2020-06-26 14:44:19 -05:00
Thomas Weber fdad50f397 Get some more things to work in the compiler
- add event_broadcastandwait
- add looks_switchbackdropto
- add looks_backdrops
2020-06-26 12:45:06 -05:00
Thomas Weber 1714ebf5f6 Merge remote-tracking branch 'upstream/develop' into develop 2020-06-26 00:45:18 -05:00
Thomas Weber 930fe68112 More updates to the compiler
- remove unused local variable tracking and utilities
- add some jsdoc to the compiler executor
- improve variable reference finding
- add data_listcontainsitem
- add event_broadcast
- add event_broadcast_menu
2020-06-26 00:14:42 -05:00
Thomas Weber ae5ce527b1 Some smaller bug fixes in the compiler
- throw if toString on asNumber, asString, asBoolean
- log compilation errors again
- add motion_setrotationstyle
- fix operator_divide NaN handling
- fix operator_mod second argument
2020-06-25 23:05:06 -05:00
Thomas Weber 3a8f0a11f5 Implement ScriptCache 2020-06-25 21:40:57 -05:00
Eric Rosenbaum da68c4faf6 Merge pull request #2492 from ericrosenbaum/test-clock-reset
Add a unit test for the clock being reset on runtime dispose
2020-06-25 13:31:39 -04:00
Thomas Weber ab9deb2d09 Smaller fixes/changes
- add looks_say
- add flags for CompiledInput
- add nullabe/NaNable
2020-06-24 12:47:34 -05:00
Thomas Weber bdebad01bd Add a couple more blocks
- add pen_stamp
- add data_insertatlist
2020-06-24 00:37:49 -05:00
Thomas Weber 73309e9fb1 A whole lot of compiler updates
- fix handling of missing inputs
- fix handling of NaN numbers
- fix color optimization
- events -> event (still empty)
- add control_wait_until
- add data_deleteoflist
- add looks_cleargraphiceffects
- add looks_costumenumbername
- add motion_setx
- add motion_sety
- add motion_changexby
- add motion_changeyby
- add operator_letter_of
- add operator_mod
- add operator_length
- add argument_reporter_boolean
- fix procedure_call default values
- add sensing_keypressed
- add sensing_mousedown
- add sensing_keyoptions
- add pen_changePenColorParamBy
- add pen_setPenColorParamTo
- fix pen size
- add pen_menu_colorParam
2020-06-24 00:29:23 -05:00
Thomas Weber c79fa8b96f Remove list item limit
Already ignored by compiled scripts.
2020-06-23 23:02:40 -05:00
Thomas Weber d8c095271f Improve some compiler internals
- fix procedures being compiled more than once
- remove Cast dependency from execute
2020-06-23 23:00:53 -05:00
Thomas Weber 8ecc1ba1c8 re-enable warp
We are about 3-4x slower than forkphorus but still significantly faster than Scratch 3
2020-06-23 19:16:06 -05:00
Thomas Weber 417fe21215 Get quicksort to run
- add control_stop
- fix control_repeatuntil
- fix control_while
- add data_hidelist
- add data_showlist
- add data_deletealloflist
- add data_addtolist
- add data_replaceitemoflist
- add data_lengthoflist
- add data_itemoflist
- add motion_xposition
- add motion_yposition
- fix procedures_call
2020-06-23 18:57:37 -05:00
Eric Rosenbaum 45c95f3370 Move test 2020-06-23 17:13:11 -04:00
Thomas Weber 85d34f03ac Improve procedure support
Supports string arguments
Supports warp
2020-06-22 22:02:28 -05:00
Thomas Weber b93558f850 Basic procedure support 2020-06-22 21:34:47 -05:00
Thomas Weber 4a4ba718c6 pen, colors, thread state 2020-06-22 19:34:30 -05:00
Thomas Weber 7a3e63d30d More blocks and fixes
- fix startHats executing compiled scripts

Now implemented in compiler:
- control_if_else
- control_create_clone_of
- control_delete_this_clone
- control_create_clone_of_menu
- motion_movesteps
- motion_turnright
- motion_turnleft
- motion_ifonedgebounce
- operator_not
- operator_round
- operator_add
- operator_subtract
- operator_multiply
- operator_divide
- operator_mathop (except tan)
- operator_random
- sensing_mousex
- sensing_mousey
- pen_penDown
- pen_penUp
- pen_setPenSizeTo
- pen_changePenSizeBy
- pen_changePenHueBy
2020-06-22 18:29:30 -05:00
Thomas Weber d782dca4b9 add control_wait, timers 2020-06-22 17:07:18 -05:00
Thomas Weber c10a631d2e get some more simple things to sortof work 2020-06-22 16:55:46 -05:00
Eric Rosenbaum 60aeebf668 Test that clock is reset on runtime dispose 2020-06-22 11:56:10 -04:00
Eric Rosenbaum 540d9c676c Merge pull request #2341 from apple502j/patch-9
Clear some stats when disposing runtime
2020-06-22 10:25:41 -04:00
DD Liu f7ab011c30 Merge pull request #2455 from adroitwhiz/filter-pen-blocks
When the stage is selected, hide all pen blocks except "erase all"
2020-06-19 12:47:41 -04:00
adroitwhiz a3a6c11976 Merge pull request #2486 from LLK/revert-2437-patch-12
Revert "Set graphic effect to zero if it's Infinity"
2020-06-18 12:25:05 -04:00
adroitwhiz 3478643f44 Revert "Set graphic effect to zero if it's Infinity" 2020-06-18 12:17:57 -04:00
adroitwhiz 7ec9ce97b9 rerun travis 2020-06-16 16:08:39 -04:00
adroitwhiz 62504cecb9 Hide pen blocks from palette on stage 2020-06-16 16:04:52 -04:00
adroitwhiz 5462fe9966 Merge pull request #2442 from adroitwhiz/filter-extension-blocks
Support extension block filtering per-target
2020-06-16 16:01:51 -04:00
adroitwhiz 8ca737702f Merge pull request #2465 from adroitwhiz/say-think-consistency
Consistently format text bubbles (this time, like 2.0 does)
2020-06-16 16:00:05 -04:00
Thomas Weber 99c570f459 New compiler/runtime model
Use continuations instead of generators
Lots of things taken quite directly from forkphorus/phosphorus
2020-06-14 20:53:09 -05:00
Thomas Weber d62232d744 Get some more basic things to work at all
- add operator_gt
- add operator_lt
- add operator_join
- add sensing_resettimer
- add sensing_touchingobject
- add sensing_timer
- fix casting
2020-06-12 19:18:40 -05:00
Thomas Weber 5d0b150753 Add a lot of new opcodes to the compiler
- add operator_and
- add operator_or
- add motion_gotoxy
- add looks_seteffectto
- fix looks_changeeffectby
- add looks_hide
- add looks_show
- add looks_gotofrontback
- add looks_goforwardbackwardlayers
- add looks_setsizeto
- add data_hidevariable
- add data_showvariable
- add control_repeat_until
2020-06-12 17:02:01 -05:00
Thomas Weber 14f4305c85 You can get some very simple scripts to run now
- fix running scripts without a hat
- fix monitors
- compile-time types are here
- add option enableCompiler to _pushThread
- add text
- add control_if
- add data_setvariableto
- add data_changevariableby
- add operator_equals
2020-06-12 16:18:05 -05:00
DD Liu b67ba75d8b Merge pull request #2437 from apple502j/patch-12
Set graphic effect to zero if it's Infinity
2020-06-11 15:57:22 -04:00
DD Liu 0a02369743 Merge pull request #2470 from LLK/dependabot/npm_and_yarn/scratch-render-0.1.0-prerelease.20200610224308
Bump scratch-render from 0.1.0-prerelease.20200228152431 to 0.1.0-prerelease.20200610224308
2020-06-11 15:07:19 -04:00