kopia lustrzana https://github.com/backface/turtlestitch
optimized special list shadowing
rodzic
5fe4b11cce
commit
0a187e5be9
|
@ -8,7 +8,7 @@
|
|||
<script type="text/javascript" src="src/symbols.js?version=2020-05-28"></script>
|
||||
<script type="text/javascript" src="src/widgets.js?version=2020-05-06"></script>
|
||||
<script type="text/javascript" src="src/blocks.js?version=2020-06-04"></script>
|
||||
<script type="text/javascript" src="src/threads.js?version=2020-06-10"></script>
|
||||
<script type="text/javascript" src="src/threads.js?version=2020-06-11"></script>
|
||||
<script type="text/javascript" src="src/objects.js?version=2020-06-09"></script>
|
||||
<script type="text/javascript" src="src/gui.js?version=2020-06-08"></script>
|
||||
<script type="text/javascript" src="src/paint.js?version=2020-05-17"></script>
|
||||
|
|
|
@ -61,7 +61,7 @@ StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy, Map,
|
|||
isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph, Color,
|
||||
TableFrameMorph, ColorSlotMorph, isSnapObject, newCanvas, Symbol, SVG_Costume*/
|
||||
|
||||
modules.threads = '2020-June-10';
|
||||
modules.threads = '2020-June-11';
|
||||
|
||||
var ThreadManager;
|
||||
var Process;
|
||||
|
@ -1824,13 +1824,16 @@ Process.prototype.doReplaceInList = function (index, list, element) {
|
|||
Process.prototype.shadowListAttribute = function (list) {
|
||||
// private - check whether the list is an attribute that needs to be
|
||||
// shadowed. Use only on typed lists for performance.
|
||||
var rcvr = this.blockReceiver();
|
||||
if (list === rcvr.costumes) {
|
||||
rcvr.shadowAttribute('costumes');
|
||||
list = rcvr.costumes;
|
||||
} else if (list === rcvr.sounds) {
|
||||
rcvr.shadowAttribute('sounds');
|
||||
list = rcvr.sounds;
|
||||
var rcvr;
|
||||
if (list.type === 'costume' || list.type === 'sound') {
|
||||
rcvr = this.blockReceiver();
|
||||
if (list === rcvr.costumes) {
|
||||
rcvr.shadowAttribute('costumes');
|
||||
list = rcvr.costumes;
|
||||
} else if (list === rcvr.sounds) {
|
||||
rcvr.shadowAttribute('sounds');
|
||||
list = rcvr.sounds;
|
||||
}
|
||||
}
|
||||
return list;
|
||||
};
|
||||
|
|
Ładowanie…
Reference in New Issue