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:
Michael "Z" Goddard 2019-04-25 10:40:08 -04:00
parent ffcd0e6518
commit e1254bd8c7
No known key found for this signature in database
GPG key ID: 762CD40DD5349872
8 changed files with 197 additions and 156 deletions

View file

@ -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();
});