mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-01-09 14:32:07 -05:00
Commenting improvements
This commit is contained in:
parent
173f0615d3
commit
b21c9edf04
1 changed files with 4 additions and 4 deletions
|
@ -45,22 +45,22 @@ var execute = function (sequencer, thread) {
|
|||
for (var inputName in inputs) {
|
||||
var input = inputs[inputName];
|
||||
var inputBlockId = input.block;
|
||||
// Is there a value for this input waiting in the stack frame?
|
||||
// Is there no value for this input waiting in the stack frame?
|
||||
if (typeof currentStackFrame.reported[inputName] === 'undefined') {
|
||||
// Otherwise, we need to evaluate the block.
|
||||
// If there's not, we need to evaluate the block.
|
||||
// Push to the stack to evaluate this input.
|
||||
thread.pushStack(inputBlockId);
|
||||
if (DEBUG_BLOCK_CALLS) {
|
||||
console.time('Yielding reporter evaluation');
|
||||
console.time('Reporter evaluation');
|
||||
}
|
||||
runtime.glowBlock(inputBlockId, true);
|
||||
// Save name of input for `Thread.pushReportedValue`.
|
||||
currentStackFrame.waitingReporter = inputName;
|
||||
execute(sequencer, thread);
|
||||
if (thread.status === Thread.STATUS_YIELD) {
|
||||
// Reporter yielded; don't pop stack and wait for it to unyield.
|
||||
// The value will be populated once the reporter unyields,
|
||||
// and passed up to the currentStackFrame on next execution.
|
||||
// Save name of this input to be filled by child `util.report`.
|
||||
return;
|
||||
}
|
||||
runtime.glowBlock(inputBlockId, false);
|
||||
|
|
Loading…
Reference in a new issue