git ssb

0+

wanderer🌟 / js-primea-wasm-container



Commit 65956a4f67ff0a428e516d98d400945013684c44

fix lint

wanderer committed on 4/3/2018, 7:32:20 PM
Parent: c90b4a4492bef14bec5b9596dc4e316eb73e8cec

Files changed

index.jschanged
typeCheckWrapper.jschanged
index.jsView
@@ -135,9 +135,9 @@
135135 unwrap: async (ref, cb) => {
136136 const link = self.refs.get(ref, 'link')
137137 const promise = self.actor.tree.graph.tree(link)
138138 await self.pushOpsQueue(promise)
139- const obj = (await promise)['/']
139+ const obj = link['/']
140140 const linkRef = self.refs.add(obj, getType(obj))
141141 self.instance.exports.table.get(cb)(linkRef)
142142 }
143143 },
typeCheckWrapper.jsView
@@ -112,25 +112,25 @@
112112
113113 // check import
114114 importType.push('i32')
115115 importType.push('i32')
116- checkCode.push(i32_const(typeCode))
116+ checkCode.push(i32Const(typeCode))
117117 if (baseType === 'i64') {
118118 importType.push('i32')
119119
120120 // splits an i64 into 2 i32
121121 const spliti64 = [
122- get_local(index),
123- i64_const(32),
124- shr_u(),
125- wrap_i64(),
126- get_local(index),
127- wrap_i64()]
122+ getLocal(index),
123+ i64Const(32),
124+ shrU(),
125+ wrapI64(),
126+ getLocal(index),
127+ wrapI64()]
128128
129129 checkCode = checkCode.concat(spliti64)
130130
131131 const i32wrapCode = [
132- get_local(invokeIndex), {
132+ getLocal(invokeIndex), {
133133 'return_type': 'i64',
134134 'name': 'extend_u/i32'
135135 }, {
136136 'return_type': 'i64',
@@ -139,9 +139,9 @@
139139 }, {
140140 'return_type': 'i64',
141141 'name': 'shl'
142142 },
143- get_local(++invokeIndex), {
143+ getLocal(++invokeIndex), {
144144 'return_type': 'i64',
145145 'name': 'extend_u/i32'
146146 }, {
147147 'return_type': 'i64',
@@ -151,10 +151,10 @@
151151
152152 invokeCode = invokeCode.concat(i32wrapCode)
153153 invokerType.push('i32')
154154 } else {
155- checkCode.push(get_local(index))
156- invokeCode.push(get_local(invokeIndex))
155+ checkCode.push(getLocal(index))
156+ invokeCode.push(getLocal(invokeIndex))
157157 }
158158 invokerType.push('i32')
159159 // check export
160160 checkType.push(baseType)
@@ -163,10 +163,10 @@
163163 invokeIndex++
164164 })
165165
166166 module[7].entries[0].code = checkCode.concat(setGlobals, [call(0), end()])
167- invokeCode.push(i32_const(0))
168- invokeCode.push(call_indirect(3))
167+ invokeCode.push(i32Const(0))
168+ invokeCode.push(callIndirect(3))
169169 invokeCode.push(end())
170170 module[7].entries[1].code = invokeCode
171171 return module
172172 }
@@ -177,9 +177,9 @@
177177 'immediates': index
178178 }
179179 }
180180
181-function call_indirect (index) {
181+function callIndirect (index) {
182182 return {
183183 'name': 'call_indirect',
184184 'immediates': {
185185 'index': index,
@@ -193,39 +193,39 @@
193193 name: 'end'
194194 }
195195 }
196196
197-function get_local (index) {
197+function getLocal (index) {
198198 return {
199199 name: 'get_local',
200200 immediates: index
201201 }
202202 }
203203
204-function i32_const (num) {
204+function i32Const (num) {
205205 return {
206206 'return_type': 'i32',
207207 'name': 'const',
208208 'immediates': num
209209 }
210210 }
211211
212-function i64_const (num) {
212+function i64Const (num) {
213213 return {
214214 'return_type': 'i64',
215215 'name': 'const',
216216 'immediates': num
217217 }
218218 }
219219
220-function shr_u() {
220+function shrU () {
221221 return {
222222 'return_type': 'i64',
223223 'name': 'shr_u'
224224 }
225225 }
226226
227-function wrap_i64() {
227+function wrapI64 () {
228228 return {
229229 'return_type': 'i32',
230230 'name': 'wrap/i64'
231231 }

Built with git-ssb-web