mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-01-09 22:42:31 -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) {
|
for (var inputName in inputs) {
|
||||||
var input = inputs[inputName];
|
var input = inputs[inputName];
|
||||||
var inputBlockId = input.block;
|
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') {
|
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.
|
// Push to the stack to evaluate this input.
|
||||||
thread.pushStack(inputBlockId);
|
thread.pushStack(inputBlockId);
|
||||||
if (DEBUG_BLOCK_CALLS) {
|
if (DEBUG_BLOCK_CALLS) {
|
||||||
console.time('Yielding reporter evaluation');
|
console.time('Reporter evaluation');
|
||||||
}
|
}
|
||||||
runtime.glowBlock(inputBlockId, true);
|
runtime.glowBlock(inputBlockId, true);
|
||||||
|
// Save name of input for `Thread.pushReportedValue`.
|
||||||
currentStackFrame.waitingReporter = inputName;
|
currentStackFrame.waitingReporter = inputName;
|
||||||
execute(sequencer, thread);
|
execute(sequencer, thread);
|
||||||
if (thread.status === Thread.STATUS_YIELD) {
|
if (thread.status === Thread.STATUS_YIELD) {
|
||||||
// Reporter yielded; don't pop stack and wait for it to unyield.
|
// Reporter yielded; don't pop stack and wait for it to unyield.
|
||||||
// The value will be populated once the reporter unyields,
|
// The value will be populated once the reporter unyields,
|
||||||
// and passed up to the currentStackFrame on next execution.
|
// and passed up to the currentStackFrame on next execution.
|
||||||
// Save name of this input to be filled by child `util.report`.
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
runtime.glowBlock(inputBlockId, false);
|
runtime.glowBlock(inputBlockId, false);
|
||||||
|
|
Loading…
Reference in a new issue