git ssb

0+

wanderer🌟 / js-primea-hypervisor



Commit f81bb8556fa6aa6f9f6415c3c465c3ccb538bec7

fix travis

Signed-off-by: wanderer <mjbecze@gmail.com>
wanderer committed on 3/23/2018, 2:04:51 AM
Parent: 2f1d81adf2eec8e0c13058fae79efee1a6af4a58

Files changed

package.jsonchanged
wasmContainer.jschanged
package.jsonView
@@ -30,9 +30,9 @@
3030 "contributors": "Alex Beregszaszi <alex@rtfs.hu>",
3131 "license": "MPL-2.0",
3232 "dependencies": {
3333 "binary-search-insert": "^1.0.3",
34- "borc": "git+ssh://git@github.com:dignifiedquire/borc.git#fix/nested-array",
34+ "borc": "git+https://github.com:dignifiedquire/borc.git#fix/nested-array",
3535 "events": "^2.0.0",
3636 "primea-annotations": "0.0.1",
3737 "reference-map": "^1.2.3",
3838 "safe-buffer": "^5.1.1",
wasmContainer.jsView
@@ -66,10 +66,9 @@
6666 meterType: 'i32'
6767 })
6868
6969 // initialize the globals
70- let numOfGlobals = json.persist.length
71- if (numOfGlobals) {
70+ if (json.persist.length) {
7271 moduleJSON = injectGlobals(moduleJSON, json.persist)
7372 }
7473 // recompile the wasm
7574 wasm = json2wasm(moduleJSON)
@@ -193,9 +192,9 @@
193192 },
194193 metering: {
195194 usegas: amount => {
196195 this.actor.incrementTicks(amount)
197- // funcRef.gas -= amount
196+ funcRef.gas -= amount
198197 if (funcRef.gas < 0) {
199198 throw new Error('out of gas! :(')
200199 }
201200 }
@@ -249,15 +248,16 @@
249248
250249 // store globals
251250 numOfGlobals = this.json.persist.length
252251 if (numOfGlobals) {
253- this.actor.storage = []
252+ const storage = []
254253 this.instance.exports.getter_globals()
255254 const mem = this.get32Memory(0, numOfGlobals)
256255 while (numOfGlobals--) {
257256 const ref = mem[numOfGlobals]
258- this.actor.storage.push(this.refs.get(ref, this.json.persist[numOfGlobals].type))
257+ storage.push(this.refs.get(ref, this.json.persist[numOfGlobals].type))
259258 }
259+ this.actor.storage = storage
260260 }
261261
262262 this.refs.clear()
263263 }

Built with git-ssb-web