1. Sean Wilkinson
  2. quanah

Commits

Sean Wilkinson  committed 84b9d97

More preservation of special properties during remote distribution ...

  • Participants
  • Parent commits a4efbfe
  • Branches master

Comments (0)

Files changed (1)

File src/quanah.js

View file
         var f, first, x;
      // Step 1: copy the computation's function and data into fresh instances,
      // define some error handlers, and write the copies to the "filesystem".
-        f = avar({val: obj.f});
+     // If special property values have been added to `x`, they will be copied
+     // onto `f` and `x` via the "copy constructor" idiom. Note that special
+     // properties defined for `f` will be overwritten ...
+        f = avar(obj.x);
+        f.val = obj.f;
         first = true;
         x = avar(obj.x);
         f.onerror = x.onerror = function (message) {
          // `task` to "inherit" system-specific properties such as QMachine's
          // `box` property automatically. My design here reflects the idea that
          // the execution should follow the data.
-            var task = avar(x);
+            var task = avar(obj.x);
             task.key = uuid();
             task.status = 'waiting';
             task.val = {f: f.key, x: x.key};