diff options
| author | jmoenig <jens@moenig.org> | 2014-05-20 09:34:37 +0200 |
|---|---|---|
| committer | jmoenig <jens@moenig.org> | 2014-05-20 09:34:37 +0200 |
| commit | 295de115a387d24ded700146203c07ba7c522d16 (patch) | |
| tree | 7115b145def9554fb111c48e9a6533323439e4e8 /threads.js | |
| parent | 669d93a62967d88b4c4dd33b919737a386bf958a (diff) | |
| download | snap-295de115a387d24ded700146203c07ba7c522d16.tar.gz snap-295de115a387d24ded700146203c07ba7c522d16.zip | |
Threads: new Variable data structure
for refactoring upvar references, not yet used anywhere
Diffstat (limited to 'threads.js')
| -rw-r--r-- | threads.js | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -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 |
