mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-29 15:39:39 -04:00
elevate stack block id and frame info into thread
- Add pointer member to thread. This is the current executing block. - Add stackFrame member to thread. This is the current frame information like procedure parameters. This is a step potentially towards stack-less threads. With further modifications we could have stack and stackFrames be null if a script does not call a procedure.
This commit is contained in:
parent
ffcd0e6518
commit
e1254bd8c7
8 changed files with 197 additions and 156 deletions
test/unit
|
@ -40,7 +40,7 @@ test('popStack', t => {
|
|||
const th = new Thread('arbitraryString');
|
||||
th.pushStack('arbitraryString');
|
||||
t.strictEquals(th.popStack(), 'arbitraryString');
|
||||
t.strictEquals(th.popStack(), undefined);
|
||||
t.strictEquals(th.popStack(), null);
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue