diff options
| author | Jens Mönig <jens@moenig.org> | 2015-03-02 00:39:13 -0800 |
|---|---|---|
| committer | Jens Mönig <jens@moenig.org> | 2015-03-02 00:39:13 -0800 |
| commit | 168c328836c01d69418621921a50be5d2eea3039 (patch) | |
| tree | f075bc777b8af9285ce0c41e2dbef6e091748430 | |
| parent | b1d78532557371dfc740c078c76c13e8e0f66896 (diff) | |
| download | snap-168c328836c01d69418621921a50be5d2eea3039.tar.gz snap-168c328836c01d69418621921a50be5d2eea3039.zip | |
fixed #730
caching is evil, haha!
| -rw-r--r-- | byob.js | 12 | ||||
| -rwxr-xr-x | history.txt | 4 |
2 files changed, 15 insertions, 1 deletions
@@ -106,7 +106,7 @@ SymbolMorph, isNil*/ // Global stuff //////////////////////////////////////////////////////// -modules.byob = '2015-February-28'; +modules.byob = '2015-March-02'; // Declarations @@ -429,6 +429,7 @@ CustomCommandBlockMorph.prototype.refresh = function () { // find unnahmed upvars and label them // to their internal definition (default) + this.cachedInputs = null; this.inputs().forEach(function (inp, idx) { if (inp instanceof TemplateSlotMorph && inp.contents() === '\u2191') { inp.setContents(def.inputNames()[idx]); @@ -443,6 +444,7 @@ CustomCommandBlockMorph.prototype.restoreInputs = function (oldInputs) { myself = this; if (this.isPrototype) {return; } + this.cachedInputs = null; this.inputs().forEach(function (inp) { old = oldInputs[i]; if (old instanceof ReporterBlockMorph && @@ -460,6 +462,7 @@ CustomCommandBlockMorph.prototype.restoreInputs = function (oldInputs) { } i += 1; }); + this.cachedInputs = null; }; CustomCommandBlockMorph.prototype.refreshDefaults = function () { @@ -472,6 +475,7 @@ CustomCommandBlockMorph.prototype.refreshDefaults = function () { } idx += 1; }); + this.cachedInputs = null; }; CustomCommandBlockMorph.prototype.refreshPrototype = function () { @@ -924,6 +928,9 @@ CustomReporterBlockMorph.prototype.refresh = function () { if (!this.isPrototype) { this.isPredicate = (this.definition.type === 'predicate'); } + if (this.parent instanceof SyntaxElementMorph) { + this.parent.cachedInputs = null; + } this.drawNew(); }; @@ -1865,6 +1872,9 @@ BlockEditorMorph.prototype.context = function (prototypeHat) { if (topBlock === null) { return null; } + topBlock.allChildren().forEach(function (c) { + if (c instanceof BlockMorph) {c.cachedInputs = null; } + }); stackFrame = Process.prototype.reify.call( null, topBlock, diff --git a/history.txt b/history.txt index 1f0ec00..0f92071 100755 --- a/history.txt +++ b/history.txt @@ -2458,3 +2458,7 @@ ______ * Objects: slightly optimize warped / turbo execution * Threads: fixed #715 * BYOB: fixed #716 + +150302 +------ +* BYOB: fixed #730 |
