kopia lustrzana https://github.com/backface/turtlestitch
rodzic
a680e10cb3
commit
b041664205
|
@ -4305,3 +4305,4 @@ Fixes:
|
|||
180909
|
||||
------
|
||||
* new dev version
|
||||
* Threads: fixed #2176 ('arguments' not found for calling empty multi-slots)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<script type="text/javascript" src="morphic.js?version=2018-06-21"></script>
|
||||
<script type="text/javascript" src="widgets.js?version=2018-06-21"></script>
|
||||
<script type="text/javascript" src="blocks.js?version=2018-07-13"></script>
|
||||
<script type="text/javascript" src="threads.js?version=2018-07-19"></script>
|
||||
<script type="text/javascript" src="threads.js?version=2018-09-09"></script>
|
||||
<script type="text/javascript" src="objects.js?version=2018-07-06"></script>
|
||||
<script type="text/javascript" src="gui.js?version=2018-09-09"></script>
|
||||
<script type="text/javascript" src="paint.js?version=2018-06-21"></script>
|
||||
|
|
26
threads.js
26
threads.js
|
@ -62,7 +62,7 @@ StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy,
|
|||
isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph,
|
||||
TableFrameMorph, ColorSlotMorph, isSnapObject*/
|
||||
|
||||
modules.threads = '2018-July-19';
|
||||
modules.threads = '2018-September-09';
|
||||
|
||||
var ThreadManager;
|
||||
var Process;
|
||||
|
@ -1117,7 +1117,13 @@ Process.prototype.evaluate = function (
|
|||
this.readyToYield = (Date.now() - this.lastYield > this.timeout);
|
||||
}
|
||||
|
||||
// assign parameters if any were passed
|
||||
// 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);
|
||||
|
||||
// assign arguments that are actually passed
|
||||
if (parms.length > 0) {
|
||||
|
||||
// assign formal parameters
|
||||
|
@ -1131,10 +1137,6 @@ Process.prototype.evaluate = function (
|
|||
|
||||
// assign implicit parameters if there are no formal ones
|
||||
if (context.inputs.length === 0) {
|
||||
// assign the actual arguments list to the special
|
||||
// parameter ID ['arguments'], to be used for variadic inputs
|
||||
outer.variables.addVar(['arguments'], args);
|
||||
|
||||
// in case there is only one input
|
||||
// assign it to all empty slots
|
||||
if (parms.length === 1) {
|
||||
|
@ -1215,7 +1217,13 @@ Process.prototype.initializeFor = function (context, args) {
|
|||
// remember the receiver
|
||||
this.context = context.receiver;
|
||||
|
||||
// assign parameters if any were passed
|
||||
// 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);
|
||||
|
||||
// assign arguments that are actually passed
|
||||
if (parms.length > 0) {
|
||||
|
||||
// assign formal parameters
|
||||
|
@ -1229,10 +1237,6 @@ Process.prototype.initializeFor = function (context, args) {
|
|||
|
||||
// assign implicit parameters if there are no formal ones
|
||||
if (context.inputs.length === 0) {
|
||||
// assign the actual arguments list to the special
|
||||
// parameter ID ['arguments'], to be used for variadic inputs
|
||||
outer.variables.addVar(['arguments'], args);
|
||||
|
||||
// in case there is only one input
|
||||
// assign it to all empty slots
|
||||
if (parms.length === 1) {
|
||||
|
|
Ładowanie…
Reference in New Issue