TurboWarp / scratch-vm

Scratch VM with a JIT compiler and more features
https://turbowarp.org/
Mozilla Public License 2.0
75 stars 72 forks source link

Compiler Support #206

Closed 0832k12 closed 5 months ago

0832k12 commented 5 months ago

Let extensions access the compiler. like this: image image

FurryR commented 5 months ago

Duplicate issue (https://github.com/TurboWarp/scratch-vm/pull/181). Maybe you can ask for more exports.

0832k12 commented 5 months ago

🧠

LilyMakesThings commented 5 months ago

Extensions can access the compiler already (and they are soon to be "supported"), but you won't receive any help with them.

Extensions are designed in such a way that you aren't supposed to need to access the compiler, because if you were able to it'd suddenly become 2 extensions essentially, which means 2 environments all the blocks have to be tested in, and it becomes double the work.

With how they're written at the moment, all the functions and such are verified to work in both the interpreter and the compiler and there's not much need to test each environment, except some rare cases.

Some extensions have blocks that genuinely cannot work without access to the compiler and in those cases, said exports do exist. However they don't come with documentation nor instruction on how to use them, and if they break, that's your fault.