@wasmgroundup/emit 0.2.11 → 0.2.12

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
@@ -110,16 +110,17 @@ declare const mut: {
110
110
  declare function globaltype(t: any, m: any): any[];
111
111
  declare function global(gt: any, e: any): any[];
112
112
  declare function globalsec(globs: BytecodeFragment[]): (number | BytecodeFragment)[];
113
- declare function tabletype(elemtype: BytecodeFragment, limits: BytecodeFragment): BytecodeFragment[];
113
+ declare function tabletype(elemtype: number, limits: BytecodeFragment): (number | BytecodeFragment)[];
114
114
  declare function table(tabletype: BytecodeFragment): BytecodeFragment;
115
115
  declare function tablesec(tables: BytecodeFragment[]): (number | BytecodeFragment)[];
116
116
  declare const elemtype: {
117
117
  funcref: number;
118
118
  };
119
+ declare const tableidx: typeof u32;
119
120
  declare const start: typeof u32;
120
121
  declare function startsec(st: BytecodeFragment): (number | BytecodeFragment)[];
121
122
  declare function data(x: BytecodeFragment, e: BytecodeFragment, bs: BytecodeFragment[]): BytecodeFragment[];
122
123
  declare function datasec(segs: BytecodeFragment[]): (number | BytecodeFragment)[];
123
124
  declare function elem(x: BytecodeFragment, e: BytecodeFragment, ys: BytecodeFragment[]): BytecodeFragment[];
124
125
  declare function elemsec(segs: BytecodeFragment[]): (number | BytecodeFragment)[];
125
- 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, module, mut, name, section, start, startsec, table, tablesec, tabletype, typeidx, typesec, u32, valtype, vec, };
126
+ 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, module, mut, name, section, start, startsec, table, tableidx, tablesec, tabletype, typeidx, typesec, u32, valtype, vec, };
package/dist/index.js CHANGED
@@ -96,10 +96,6 @@ const exportdesc = {
96
96
  function module(sections) {
97
97
  return [magic(), version(), sections];
98
98
  }
99
- var numtype;
100
- (function (numtype) {
101
- numtype[numtype["i32"] = 127] = "i32";
102
- })(numtype || (numtype = {}));
103
99
  const instr = {
104
100
  nop: 0x01,
105
101
  block: 0x02,
@@ -283,4 +279,4 @@ function elem(x, e, ys) {
283
279
  function elemsec(segs) {
284
280
  return section(SECTION_ID_ELEMENT, vec(segs));
285
281
  }
286
- 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, module, mut, name, section, start, startsec, table, tablesec, tabletype, typeidx, typesec, u32, valtype, vec, };
282
+ 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, module, mut, name, section, start, startsec, table, tableidx, tablesec, tabletype, typeidx, typesec, u32, valtype, vec, };
package/index.ts CHANGED
@@ -126,10 +126,6 @@ function module(sections): BytecodeFragment {
126
126
  return [magic(), version(), sections];
127
127
  }
128
128
 
129
- enum numtype {
130
- i32 = 0x7f,
131
- }
132
-
133
129
  const instr = {
134
130
  nop: 0x01,
135
131
  block: 0x02,
@@ -310,7 +306,7 @@ function globalsec(globs: BytecodeFragment[]) {
310
306
  return section(SECTION_ID_GLOBAL, vec(globs));
311
307
  }
312
308
 
313
- function tabletype(elemtype: BytecodeFragment, limits: BytecodeFragment) {
309
+ function tabletype(elemtype: number, limits: BytecodeFragment) {
314
310
  return [elemtype, limits];
315
311
  }
316
312
 
@@ -396,6 +392,7 @@ export {
396
392
  start,
397
393
  startsec,
398
394
  table,
395
+ tableidx,
399
396
  tablesec,
400
397
  tabletype,
401
398
  typeidx,
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.11",
4
+ "version": "0.2.12",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "repository": {