@wasmgroundup/emit 0.2.13 → 0.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -81,6 +81,8 @@ declare const instr: {
81
81
  div: number;
82
82
  };
83
83
  f64: {
84
+ load: number;
85
+ store: number;
84
86
  const: number;
85
87
  add: number;
86
88
  sub: number;
@@ -100,7 +102,6 @@ declare const importdesc: {
100
102
  mem(mt: BytecodeFragment): BytecodeFragment;
101
103
  global(gt: BytecodeFragment): BytecodeFragment;
102
104
  };
103
- declare function mem(memtype: BytecodeFragment): BytecodeFragment;
104
105
  declare function memsec(mems: BytecodeFragment[]): (number | BytecodeFragment)[];
105
106
  declare function memtype(limits: BytecodeFragment): BytecodeFragment;
106
107
  declare const limits: {
@@ -127,4 +128,5 @@ declare function data(x: BytecodeFragment, e: BytecodeFragment, bs: BytecodeFrag
127
128
  declare function datasec(segs: BytecodeFragment[]): (number | BytecodeFragment)[];
128
129
  declare function elem(x: BytecodeFragment, e: BytecodeFragment, ys: BytecodeFragment[]): BytecodeFragment[];
129
130
  declare function elemsec(segs: BytecodeFragment[]): (number | BytecodeFragment)[];
130
- export { blocktype, BytecodeFragment, code, codesec, data, datasec, elem, elemsec, elemtype, export_, exportdesc, exportsec, f64, func, funcidx, funcsec, functype, global, globalsec, globaltype, i32, import_, importdesc, importsec, instr, limits, locals, mem, memsec, memtype, module, mut, name, section, start, startsec, table, tableidx, tablesec, tabletype, typeidx, typesec, u32, valtype, vec, };
131
+ declare function memarg(align: number, offset: number): number[][];
132
+ export { blocktype, BytecodeFragment, code, codesec, data, datasec, elem, elemsec, elemtype, export_, exportdesc, exportsec, f64, func, funcidx, funcsec, functype, global, globalsec, globaltype, i32, import_, importdesc, importsec, instr, limits, locals, memarg, memsec, memtype, module, mut, name, section, start, startsec, table, tableidx, tablesec, tabletype, typeidx, typesec, u32, valtype, vec, };
package/dist/index.js CHANGED
@@ -151,6 +151,8 @@ const instr = {
151
151
  div: 0x95,
152
152
  },
153
153
  f64: {
154
+ load: 0x2b,
155
+ store: 0x39,
154
156
  const: 0x44,
155
157
  add: 0xa0,
156
158
  sub: 0xa1,
@@ -230,9 +232,6 @@ const importdesc = {
230
232
  },
231
233
  };
232
234
  const memidx = u32;
233
- function mem(memtype) {
234
- return memtype;
235
- }
236
235
  function memsec(mems) {
237
236
  return section(SECTION_ID_MEMORY, vec(mems));
238
237
  }
@@ -295,4 +294,7 @@ function elem(x, e, ys) {
295
294
  function elemsec(segs) {
296
295
  return section(SECTION_ID_ELEMENT, vec(segs));
297
296
  }
298
- export { blocktype, code, codesec, data, datasec, elem, elemsec, elemtype, export_, exportdesc, exportsec, f64, func, funcidx, funcsec, functype, global, globalsec, globaltype, i32, import_, importdesc, importsec, instr, limits, locals, mem, memsec, memtype, module, mut, name, section, start, startsec, table, tableidx, tablesec, tabletype, typeidx, typesec, u32, valtype, vec, };
297
+ function memarg(align, offset) {
298
+ return [u32(align), u32(offset)];
299
+ }
300
+ export { blocktype, code, codesec, data, datasec, elem, elemsec, elemtype, export_, exportdesc, exportsec, f64, func, funcidx, funcsec, functype, global, globalsec, globaltype, i32, import_, importdesc, importsec, instr, limits, locals, memarg, memsec, memtype, module, mut, name, section, start, startsec, table, tableidx, tablesec, tabletype, typeidx, typesec, u32, valtype, vec, };
package/index.ts CHANGED
@@ -183,6 +183,8 @@ const instr = {
183
183
  div: 0x95,
184
184
  },
185
185
  f64: {
186
+ load: 0x2b,
187
+ store: 0x39,
186
188
  const: 0x44,
187
189
  add: 0xa0,
188
190
  sub: 0xa1,
@@ -279,10 +281,6 @@ const importdesc = {
279
281
 
280
282
  const memidx = u32;
281
283
 
282
- function mem(memtype: BytecodeFragment) {
283
- return memtype;
284
- }
285
-
286
284
  function memsec(mems: BytecodeFragment[]) {
287
285
  return section(SECTION_ID_MEMORY, vec(mems));
288
286
  }
@@ -372,6 +370,10 @@ function elemsec(segs: BytecodeFragment[]) {
372
370
  return section(SECTION_ID_ELEMENT, vec(segs));
373
371
  }
374
372
 
373
+ function memarg(align: number, offset: number) {
374
+ return [u32(align), u32(offset)];
375
+ }
376
+
375
377
  export {
376
378
  blocktype,
377
379
  BytecodeFragment,
@@ -400,7 +402,7 @@ export {
400
402
  instr,
401
403
  limits,
402
404
  locals,
403
- mem,
405
+ memarg,
404
406
  memsec,
405
407
  memtype,
406
408
  module,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wasmgroundup/emit",
3
3
  "description": "A library for creating binary-encoded WebAssembly modules",
4
- "version": "0.2.13",
4
+ "version": "0.2.14",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "repository": {