From 295de115a387d24ded700146203c07ba7c522d16 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Tue, 20 May 2014 09:34:37 +0200 Subject: Threads: new Variable data structure for refactoring upvar references, not yet used anywhere --- history.txt | 1 + threads.js | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/history.txt b/history.txt index 960daf1..c49f5f8 100755 --- a/history.txt +++ b/history.txt @@ -2130,3 +2130,4 @@ ______ ------ * 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 +* Threads: new Variable data structure, for refactoring upvar references, not yet used anywhere diff --git a/threads.js b/threads.js index b82a8c5..21147a3 100644 --- a/threads.js +++ b/threads.js @@ -83,7 +83,7 @@ ArgLabelMorph, localize, XML_Element, hex_sha512*/ // Global stuff //////////////////////////////////////////////////////// -modules.threads = '2014-May-02'; +modules.threads = '2014-May-20'; var ThreadManager; var Process; @@ -3110,6 +3110,20 @@ VariableFrame.prototype.allNames = function () { 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 /////////////////////////////////////////////////////////// // ... quasi-inherits some features from VariableFrame -- cgit v1.3.1