summaryrefslogtreecommitdiff
path: root/threads.js
diff options
context:
space:
mode:
authorViraj Mahesh <virajmahesh@gmail.com>2014-07-13 09:47:30 +0400
committerViraj Mahesh <virajmahesh@gmail.com>2014-07-13 09:47:30 +0400
commita7f0de880f691ef32553713187a1b2f3d0cf3756 (patch)
treefd51b3fffa40e04876a7e414f3a995c6a5afb96c /threads.js
parent7daaf1252a651271f170abc0a7a0f532778aad51 (diff)
parentec8b14a3758acfc852a6f02010394bd5814d7272 (diff)
downloadsnap-yow-a7f0de880f691ef32553713187a1b2f3d0cf3756.tar.gz
snap-yow-a7f0de880f691ef32553713187a1b2f3d0cf3756.zip
Merge branch 'master' into extensions
Conflicts: objects.js
Diffstat (limited to 'threads.js')
-rw-r--r--threads.js24
1 files changed, 19 insertions, 5 deletions
diff --git a/threads.js b/threads.js
index 77632d0..d489441 100644
--- a/threads.js
+++ b/threads.js
@@ -83,7 +83,7 @@ ArgLabelMorph, localize, XML_Element, hex_sha512*/
// Global stuff ////////////////////////////////////////////////////////
-modules.threads = '2014-Feb-10';
+modules.threads = '2014-Jun-05';
var ThreadManager;
var Process;
@@ -1482,10 +1482,10 @@ Process.prototype.doSetFastTracking = function (bool) {
if (this.homeContext.receiver) {
ide = this.homeContext.receiver.parentThatIsA(IDE_Morph);
if (ide) {
- if (ide.stage.isFastTracked) {
- ide.stopFastTracking();
- } else {
+ if (bool) {
ide.startFastTracking();
+ } else {
+ ide.stopFastTracking();
}
}
}
@@ -3054,7 +3054,7 @@ VariableFrame.prototype.getVar = function (name, upvars) {
VariableFrame.prototype.addVar = function (name, value) {
this.vars[name] = (value === 0 ? 0
: value === false ? false
- : value === '' ? '' : value || null);
+ : value === '' ? '' : value || 0);
};
VariableFrame.prototype.deleteVar = function (name) {
@@ -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