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

don't use branchCount for extension substack compilation #182

Closed CST1229 closed 9 months ago

CST1229 commented 9 months ago

Resolves

Resolves 🗨︎(extremely minor parity issue) Compiler uses branchCount for startBranch

Proposed Changes

Makes the compiler use all inputs starting with SUBSTACK for extension C block compilation rather than relying on the block info's branchCount.

Reason for Changes

This fixes a minor parity issue with the interpreter where if the number of SUBSTACK inputs in a block was more than its branchCount (e.g for blocks with mutators), the extra substacks didn't compile.

Test Coverage

Haven't touched tests.

GarboMuffin commented 9 months ago

just like last time github won't let me push to this pull request

i cherry-picked this into develop, hopefully that still gives you commit credit?

CubesterYT commented 9 months ago

Maybe it doesn't let merging because CSTs fork is a fork of the original scratch VM?

GarboMuffin commented 9 months ago

in hindsight i would've been able to just press the merge button instead of cherry-picking since all i had to do was write tests

CST1229 commented 9 months ago

just like last time github won't let me push to this pull request

actually it may be related to weird git stuff (because i'm making a branch based off of turbowarp on a fork based on vanilla)