mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-08-12 22:42:03 -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
|
@ -137,7 +137,7 @@ test('retireThread', t => {
|
|||
const r = new Runtime();
|
||||
const s = new Sequencer(r);
|
||||
const th = generateThread(r);
|
||||
t.strictEquals(th.stack.length, 12);
|
||||
t.strictEquals(th.stack.length, 11);
|
||||
s.retireThread(th);
|
||||
t.strictEquals(th.stack.length, 0);
|
||||
t.strictEquals(th.status, Thread.STATUS_DONE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue