Thomas Weber
67cb7cfc5d
Remove unnecessary string casts
2025-10-08 18:42:43 -05:00
Thomas Weber
07309b6ebf
Use more specific type for string length
2025-10-08 17:15:44 -05:00
Thomas Weber
d09f82a2fe
Add new test case that does some simple string operations
2025-10-08 17:15:24 -05:00
Thomas Weber
2ac7095947
Optimize loops with provably-integer iteration counts
2025-10-04 20:05:31 -05:00
Tacodiva
8fe321c357
Make types for blocks which returns ints more spercific
2025-09-28 12:30:32 +10:00
Thomas Weber
2244b26773
Discard old state after calling yielding procedure
2025-09-24 16:48:01 -05:00
Thomas Weber
4a8a5ad901
Add test case for 7ed29f5801
2025-09-22 19:30:23 -05:00
Thomas Weber
214b86a063
Add test case for d8c73c71d2
2025-09-22 19:29:06 -05:00
Thomas Weber
445a129939
Add test case for 7cc8f580b3
2025-09-22 19:28:17 -05:00
Thomas Weber
c372e925a5
Add test case for 6a37fee386
2025-09-22 19:27:08 -05:00
Thomas Weber
5a90e13981
Fix TypeState#after setting variable types to undefined
...
If a variable existed in `this` but not in `other`, its resulting type
would be set to undefined. Changing it to use the type from `this`
seems to fix https://github.com/TurboWarp/scratch-vm/issues/273 .
2025-09-22 18:41:48 -05:00
Thomas Weber
40715dc259
Add test case for https://github.com/TurboWarp/scratch-vm/issues/276
2025-09-22 18:41:48 -05:00
Thomas Weber
2639653647
Revert "Fix #273 "
...
This reverts commit c16be25178 .
Caused https://github.com/TurboWarp/scratch-vm/issues/276
2025-09-22 18:41:38 -05:00
Thomas Weber
44e2589e65
Fix https://github.com/TurboWarp/scratch-vm/issues/277
...
Need to clear the state before analyzing the condition as the condition
may be re-evaluated after yielding.
2025-09-22 18:40:34 -05:00
Tacodiva
749e923378
Fix #272 (thanks @Geotale)
2025-09-21 23:10:50 +10:00
Tacodiva
c16be25178
Fix #273
2025-09-21 22:59:56 +10:00
Tacodiva
cc96ee8c70
Fix -0 being turned into 0 in the type matrix test
2025-09-21 22:59:06 +10:00
Thomas Weber
cd353ca31e
Merge pull request #268 from TurboWarp/fix-analyzeLoopedBlock-infinite-loop
...
Give up analyzing looped stack after 10000 iterations
2025-09-20 13:57:52 -05:00
Thomas Weber
fa035541da
Give up analyzing looped stack after 10000 iterations
...
Temporary fix for an infinite loop, to be properly fixed later
2025-09-20 13:53:41 -05:00
Thomas Weber
5b027b995e
Fix motion_turnleft and motion_turnright missing type casts
2025-09-15 18:01:45 -05:00
Tacodiva
7cc8f580b3
Fix yielding loop arguments not re-analyzing
2025-09-08 17:08:23 +10:00
Tacodiva
d8c73c71d2
Account for stop this script in type analysis and add test
2025-09-08 15:28:11 +10:00
Tacodiva
fbca1bf49b
Fixed NaN = 0 wrongly reporting true, and add a test
2025-09-08 11:48:55 +10:00
Tacodiva
b8defadedb
Merge remote-tracking branch 'origin/develop' into HEAD
2025-09-07 11:56:25 +10:00
ghost
5bc497aabb
Add blockShape option to extensions ( #210 )
2025-05-20 21:48:52 -05:00
Thomas Weber
f957e1c6c1
Fix Mouse.postData error if called before project loads
2025-05-20 13:29:44 -05:00
Thomas Weber
ba9ae068ca
Don't compress formats that are already compressed ( #258 )
...
Closes https://github.com/TurboWarp/scratch-vm/issues/253
2025-05-13 21:45:21 -05:00
Thomas Weber
b8520ccd9a
Fix visual report error when thread target does not match editing target
...
Fixes #252
2025-03-27 13:34:21 -05:00
Thomas Weber
7ef5e29c16
interpreter: fix skipped blocks in recursive procedures using "stop this script"
...
Closes https://github.com/TurboWarp/scratch-vm/issues/249
Regression from 20f25f252c
2025-03-07 01:21:08 -06:00
Thomas Weber
2d29cdc63a
Quit VM when execute test times out
...
A future test project will be designed such that failing to
quit the VM after timing out would severely inhibit the
performance of the other tests.
2025-03-07 01:11:17 -06:00
Muffin
cd63c87f07
js: reset variable types after compatibility layer call
...
Fixes https://github.com/TurboWarp/scratch-vm/issues/245
2025-02-11 00:49:36 -06:00
Thomas Weber
af3b7513a4
ir: Match vanilla quirks when handling variable or list fields with null ID
2025-01-18 00:29:09 -06:00
Thomas Weber
2c9d301da2
ir: Fix variable cache collision when variable or list field has null ID
...
Fixes https://github.com/TurboWarp/scratch-vm/issues/239
2025-01-18 00:09:09 -06:00
Thomas Weber
c3b60f6fb6
Add Scratch.download API
2024-12-22 17:46:17 -06:00
Thomas Weber
fdd954c012
Add URL argument to Scratch.canDownload
...
This lets us filter out javascript: URLs
2024-12-22 17:46:09 -06:00
Thomas Weber
1a578aa44e
Add canDownload API
...
https://github.com/TurboWarp/scratch-gui/issues/969
2024-12-22 11:51:26 -06:00
Muffin
9e6993de27
Add restricted fonts and case insensitivity to font manager ( #231 )
2024-11-02 21:39:44 -05:00
Tacodiva
df65b01cde
Merge branch 'origin/develop' into next-next
2024-09-26 11:50:09 +10:00
Muffin
179030ad49
Don't eagerly cast boolean arguments to boolean ( #223 )
...
Fixes https://github.com/TurboWarp/scratch-vm/issues/222
2024-09-08 11:56:47 -05:00
Muffin
99ff662f7f
Don't emit STAGE_SIZE_CHANGED if stage size didn't change
...
and also fix the other STAGE_SIZE_CHANGED event test to
actually test that it is being fired when there is a change
2024-07-31 15:16:44 -05:00
Tacodiva
59cc74c10b
Fix imports :c
2024-07-28 20:31:07 +10:00
Muffin
658ef8aba7
Add test for sb3 creation being deterministic over time
2024-07-18 12:44:49 -05:00
Tacodiva
1dc9aadf3f
Fix issue when setting variables to InputType.ANY and add test
2024-06-25 18:25:47 +10:00
Tacodiva
02806b654a
Linty linty code
2024-06-17 10:37:37 +10:00
Tacodiva
41e8167573
Fix snapshot tests falling back to "script" instead of the procedure variant
2024-06-17 10:06:33 +10:00
Tacodiva
71b75aad51
Add type assertion checking
2024-06-16 13:50:39 +10:00
Tacodiva
9d28fccb99
Add operator type testing
2024-06-16 13:50:30 +10:00
Tacodiva
fffb72b09d
Upgraded Type Analysis
2024-06-16 13:10:14 +10:00
Muffin
30a614dfc4
Expose compatibility layer stack frame on thread
...
For https://github.com/TurboWarp/scratch-vm/issues/212
2024-06-14 14:32:35 -05:00
Muffin
16415ba5cd
Use procedure variant in snapshots instead of just procedure code
2024-05-23 14:22:43 -05:00