Commit 90c78a592cb45542546f035167e39d219a6eaaf1
remove debugging
wanderer committed on 1/25/2017, 3:31:00 AMParent: b3c996702f7fd3a979fd479cf4ba92da8c24fda5
Files changed
index.js | changed |
port.js | changed |
vm.js | changed |
index.js | ||
---|---|---|
@@ -8,8 +8,9 @@ | ||
8 | 8 | module.exports = class Kernel { |
9 | 9 | constructor (opts = {}) { |
10 | 10 | const state = this.state = opts.state || new Vertex() |
11 | 11 | state.value = opts.code || state.value |
12 | + this.path = state.path | |
12 | 13 | this.imports = opts.imports || [imports] |
13 | 14 | // RENAME agent |
14 | 15 | this._vm = (opts.codeHandler || codeHandler).init(state.value) |
15 | 16 | this._messageQueue = new MessageQueue(this) |
@@ -51,9 +52,9 @@ | ||
51 | 52 | return this.ports.send(port, message) |
52 | 53 | } |
53 | 54 | |
54 | 55 | setValue (name, value) { |
55 | - return this.state.set(name, value) | |
56 | + this.state.set(name, value) | |
56 | 57 | } |
57 | 58 | |
58 | 59 | getValue (name) { |
59 | 60 | return this.state.get(name) |
port.js | ||
---|---|---|
@@ -19,15 +19,13 @@ | ||
19 | 19 | return dest.recieve(message) |
20 | 20 | } |
21 | 21 | |
22 | 22 | async get (name) { |
23 | - // console.log(name) | |
24 | 23 | const vertex = name === common.PARENT ? this.cache.parent : this.cache.get(name) |
25 | 24 | |
26 | 25 | if (vertex) { |
27 | 26 | return vertex.value |
28 | 27 | } else { |
29 | - // console.log(this.state.path) | |
30 | 28 | const destState = await ( |
31 | 29 | name === common.PARENT |
32 | 30 | ? this.state.getParent() |
33 | 31 | : this.state.get([name])) |
@@ -36,9 +34,8 @@ | ||
36 | 34 | state: destState |
37 | 35 | }) |
38 | 36 | |
39 | 37 | const cache = new Cache(kernel) |
40 | - | |
41 | 38 | kernel.ports.cache = cache |
42 | 39 | if (name === common.PARENT) { |
43 | 40 | cache.set(this.state.name, this.cache) |
44 | 41 | } else { |
Built with git-ssb-web