mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-08-13 06:49:19 -04:00
turn reporter tree into instruction sequence
Turn the reporter tree execute walks into a sequence of block functions. After calling a block function store the reported value in the arguments object its depending block will use. - Set the reported value on the thread. There is only ever one "just" reported value, which is read and stored elsewhere after being reported.
This commit is contained in:
parent
e0ec1ad08f
commit
05291aa254
4 changed files with 230 additions and 194 deletions
src/engine
|
@ -194,7 +194,7 @@ class Sequencer {
|
|||
//
|
||||
// this.runtime.profiler.start(executeProfilerId, null);
|
||||
this.runtime.profiler.records.push(
|
||||
this.runtime.profiler.START, executeProfilerId, null, performance.now());
|
||||
this.runtime.profiler.START, executeProfilerId, null, 0);
|
||||
}
|
||||
if (thread.target === null) {
|
||||
this.retireThread(thread);
|
||||
|
@ -203,7 +203,7 @@ class Sequencer {
|
|||
}
|
||||
if (this.runtime.profiler !== null) {
|
||||
// this.runtime.profiler.stop();
|
||||
this.runtime.profiler.records.push(this.runtime.profiler.STOP, performance.now());
|
||||
this.runtime.profiler.records.push(this.runtime.profiler.STOP, 0);
|
||||
}
|
||||
thread.blockGlowInFrame = currentBlockId;
|
||||
// If the thread has yielded or is waiting, yield to other threads.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue