turned dictionary key for 'arguments' parameter binding into a Symbol

pull/89/head
jmoenig 2019-04-22 17:04:12 +02:00
rodzic cfd419de46
commit 2ce7caf4f4
3 zmienionych plików z 11 dodań i 8 usunięć

Wyświetl plik

@ -67,6 +67,9 @@
* German
* French
### 2019-04-22
* Threads: fixed variable binding for "arguments", turned dictionary key into a Symbol
### 2019-04-12
* Objects: enabled text-variables as inputs for graphic effects / pen attributes
* updated amination library with graphic effects and audio attributes

Wyświetl plik

@ -7,7 +7,7 @@
<script type="text/javascript" src="src/morphic.js?version=2019-02-07"></script>
<script type="text/javascript" src="src/widgets.js?version=2019-04-05"></script>
<script type="text/javascript" src="src/blocks.js?version=2019-04-11"></script>
<script type="text/javascript" src="src/threads.js?version=2019-04-11"></script>
<script type="text/javascript" src="src/threads.js?version=2019-04-22"></script>
<script type="text/javascript" src="src/objects.js?version=2019-04-12"></script>
<script type="text/javascript" src="src/gui.js?version=2019-04-10"></script>
<script type="text/javascript" src="src/paint.js?version=2019-02-22"></script>

Wyświetl plik

@ -60,9 +60,9 @@ degrees, detect, nop, radians, ReporterSlotMorph, CSlotMorph, RingMorph, Sound,
IDE_Morph, ArgLabelMorph, localize, XML_Element, hex_sha512, TableDialogMorph,
StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy,
isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph, Color,
TableFrameMorph, ColorSlotMorph, isSnapObject, Map, newCanvas*/
TableFrameMorph, ColorSlotMorph, isSnapObject, Map, newCanvas, Symbol*/
modules.threads = '2019-April-11';
modules.threads = '2019-April-22';
var ThreadManager;
var Process;
@ -1018,7 +1018,7 @@ Process.prototype.reify = function (topBlock, parameterNames, isCustomBlock) {
context.expression.allEmptySlots().forEach(function (slot) {
i += 1;
if (slot instanceof MultiArgMorph) {
slot.bindingID = ['arguments'];
slot.bindingID = Symbol.for('arguments');
} else {
slot.bindingID = i;
}
@ -1120,8 +1120,8 @@ Process.prototype.evaluate = function (
// assign arguments to parameters
// assign the actual arguments list to the special
// parameter ID ['arguments'], to be used for variadic inputs
outer.variables.addVar(['arguments'], args);
// parameter ID Symbol.for('arguments'), to be used for variadic inputs
outer.variables.addVar(Symbol.for('arguments'), args);
// assign arguments that are actually passed
if (parms.length > 0) {
@ -1220,8 +1220,8 @@ Process.prototype.initializeFor = function (context, args) {
// assign arguments to parameters
// assign the actual arguments list to the special
// parameter ID ['arguments'], to be used for variadic inputs
outer.variables.addVar(['arguments'], args);
// parameter ID Symbol.for('arguments'), to be used for variadic inputs
outer.variables.addVar(Symbol.for('arguments'), args);
// assign arguments that are actually passed
if (parms.length > 0) {