Merge pull request from adroitwhiz/no-shadow-ops

Remove BlockCached._shadowOps
This commit is contained in:
adroitwhiz 2020-05-12 16:35:03 -04:00 committed by GitHub
commit 1ba3181a9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -267,13 +267,6 @@ class BlockCached {
*/
this._parentValues = null;
/**
* A sequence of shadow value operations that can be performed in any
* order and are easier to perform given that they are static.
* @type {Array<BlockCached>}
*/
this._shadowOps = [];
/**
* A sequence of non-shadow operations that can must be performed. This
* list recreates the order this block and its children are executed.
@ -359,7 +352,6 @@ class BlockCached {
continue;
}
this._shadowOps.push(...inputCached._shadowOps);
this._ops.push(...inputCached._ops);
inputCached._parentKey = inputName;
inputCached._parentValues = this._argValues;
@ -374,9 +366,7 @@ class BlockCached {
// The final operation is this block itself. At the top most block is a
// command block or a block that is being run as a monitor.
if (!this._isHat && this._isShadowBlock) {
this._shadowOps.push(this);
} else if (this._definedBlockFunction) {
if (this._definedBlockFunction) {
this._ops.push(this);
}
}