kopia lustrzana https://github.com/backface/turtlestitch
Threads: new Variable data structure
for refactoring upvar references, not yet used anywherepull/3/merge
rodzic
669d93a629
commit
295de115a3
|
@ -2130,3 +2130,4 @@ ______
|
||||||
------
|
------
|
||||||
* Morphic: Prevent default action for ctrl-/cmd-key event
|
* Morphic: Prevent default action for ctrl-/cmd-key event
|
||||||
* Snap.html: Focus the world canvas on startup, so Snap reacts to keyboard events right away
|
* Snap.html: Focus the world canvas on startup, so Snap reacts to keyboard events right away
|
||||||
|
* Threads: new Variable data structure, for refactoring upvar references, not yet used anywhere
|
||||||
|
|
16
threads.js
16
threads.js
|
@ -83,7 +83,7 @@ ArgLabelMorph, localize, XML_Element, hex_sha512*/
|
||||||
|
|
||||||
// Global stuff ////////////////////////////////////////////////////////
|
// Global stuff ////////////////////////////////////////////////////////
|
||||||
|
|
||||||
modules.threads = '2014-May-02';
|
modules.threads = '2014-May-20';
|
||||||
|
|
||||||
var ThreadManager;
|
var ThreadManager;
|
||||||
var Process;
|
var Process;
|
||||||
|
@ -3110,6 +3110,20 @@ VariableFrame.prototype.allNames = function () {
|
||||||
return answer;
|
return answer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Variable /////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
function Variable(value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
Variable.prototype.toString = function () {
|
||||||
|
return 'a Variable [' + this.value + ']';
|
||||||
|
};
|
||||||
|
|
||||||
|
Variable.prototype.copy = function () {
|
||||||
|
return new Variable(this.value);
|
||||||
|
};
|
||||||
|
|
||||||
// UpvarReference ///////////////////////////////////////////////////////////
|
// UpvarReference ///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// ... quasi-inherits some features from VariableFrame
|
// ... quasi-inherits some features from VariableFrame
|
||||||
|
|
Ładowanie…
Reference in New Issue