objdiff-wasm 3.4.1 → 3.4.2

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.
Binary file
package/dist/objdiff.js CHANGED
@@ -126,7 +126,7 @@ const handleTable0 = [
126
126
  ];
127
127
  const finalizationRegistry0 = finalizationRegistryCreate((handle)=>{
128
128
  const { rep } = rscTableRemove(handleTable0, handle);
129
- exports0['3'](rep);
129
+ exports0['2'](rep);
130
130
  });
131
131
  handleTables[0] = handleTable0;
132
132
  const trampoline0 = rscTableCreateOwn.bind(null, handleTable0);
@@ -136,12 +136,12 @@ const handleTable1 = [
136
136
  ];
137
137
  const finalizationRegistry1 = finalizationRegistryCreate((handle)=>{
138
138
  const { rep } = rscTableRemove(handleTable1, handle);
139
- exports0['2'](rep);
139
+ exports0['3'](rep);
140
140
  });
141
141
  handleTables[1] = handleTable1;
142
142
  const trampoline1 = rscTableCreateOwn.bind(null, handleTable1);
143
143
  function trampoline2(handle) {
144
- const handleEntry = rscTableRemove(handleTable0, handle);
144
+ const handleEntry = rscTableRemove(handleTable1, handle);
145
145
  if (handleEntry.own) exports0['3'](handleEntry.rep);
146
146
  }
147
147
  const handleTable2 = [
@@ -326,15 +326,15 @@ Object$1.parse = function(arg0, arg1, arg2) {
326
326
  writable: true,
327
327
  value: handle5
328
328
  });
329
- finalizationRegistry1.register(rsc4, handle5, rsc4);
329
+ finalizationRegistry0.register(rsc4, handle5, rsc4);
330
330
  Object.defineProperty(rsc4, symbolDispose, {
331
331
  writable: true,
332
332
  value: function() {
333
- finalizationRegistry1.unregister(rsc4);
334
- rscTableRemove(handleTable1, handle5);
333
+ finalizationRegistry0.unregister(rsc4);
334
+ rscTableRemove(handleTable0, handle5);
335
335
  rsc4[symbolDispose] = emptyFunc;
336
336
  rsc4[symbolRscHandle] = void 0;
337
- exports0['2'](handleTable1[(handle5 << 1) + 1] & ~T_FLAG);
337
+ exports0['2'](handleTable0[(handle5 << 1) + 1] & ~T_FLAG);
338
338
  }
339
339
  });
340
340
  variant7 = {
@@ -362,8 +362,8 @@ Object$1.parse = function(arg0, arg1, arg2) {
362
362
  let diffMethodObjectHash;
363
363
  Object$1.prototype.hash = function() {
364
364
  var handle1 = this[symbolRscHandle];
365
- if (!handle1 || (handleTable1[(handle1 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "Object" resource.');
366
- var handle0 = handleTable1[(handle1 << 1) + 1] & ~T_FLAG;
365
+ if (!handle1 || (handleTable0[(handle1 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "Object" resource.');
366
+ var handle0 = handleTable0[(handle1 << 1) + 1] & ~T_FLAG;
367
367
  const ret = diffMethodObjectHash(handle0);
368
368
  return BigInt.asUintN(64, ret);
369
369
  };
@@ -375,8 +375,8 @@ class ObjectDiff {
375
375
  }
376
376
  ObjectDiff.prototype.findSymbol = function(arg1, arg2) {
377
377
  var handle1 = this[symbolRscHandle];
378
- if (!handle1 || (handleTable0[(handle1 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "ObjectDiff" resource.');
379
- var handle0 = handleTable0[(handle1 << 1) + 1] & ~T_FLAG;
378
+ if (!handle1 || (handleTable1[(handle1 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "ObjectDiff" resource.');
379
+ var handle0 = handleTable1[(handle1 << 1) + 1] & ~T_FLAG;
380
380
  var ptr2 = utf8Encode(arg1, realloc0, memory0);
381
381
  var len2 = utf8EncodedLen;
382
382
  var variant4 = arg2;
@@ -541,8 +541,8 @@ ObjectDiff.prototype.findSymbol = function(arg1, arg2) {
541
541
  let diffMethodObjectDiffGetSymbol;
542
542
  ObjectDiff.prototype.getSymbol = function(arg1) {
543
543
  var handle1 = this[symbolRscHandle];
544
- if (!handle1 || (handleTable0[(handle1 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "ObjectDiff" resource.');
545
- var handle0 = handleTable0[(handle1 << 1) + 1] & ~T_FLAG;
544
+ if (!handle1 || (handleTable1[(handle1 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "ObjectDiff" resource.');
545
+ var handle0 = handleTable1[(handle1 << 1) + 1] & ~T_FLAG;
546
546
  const ret = diffMethodObjectDiffGetSymbol(handle0, toUint32(arg1));
547
547
  let variant13;
548
548
  switch(dataView(memory0).getUint8(ret + 0, true)){
@@ -697,8 +697,8 @@ function runDiff(arg0, arg1, arg2, arg3) {
697
697
  } else {
698
698
  const e = variant2;
699
699
  var handle1 = e[symbolRscHandle];
700
- if (!handle1 || (handleTable1[(handle1 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "Object" resource.');
701
- var handle0 = handleTable1[(handle1 << 1) + 1] & ~T_FLAG;
700
+ if (!handle1 || (handleTable0[(handle1 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "Object" resource.');
701
+ var handle0 = handleTable0[(handle1 << 1) + 1] & ~T_FLAG;
702
702
  variant2_0 = 1;
703
703
  variant2_1 = handle0;
704
704
  }
@@ -711,8 +711,8 @@ function runDiff(arg0, arg1, arg2, arg3) {
711
711
  } else {
712
712
  const e = variant5;
713
713
  var handle4 = e[symbolRscHandle];
714
- if (!handle4 || (handleTable1[(handle4 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "Object" resource.');
715
- var handle3 = handleTable1[(handle4 << 1) + 1] & ~T_FLAG;
714
+ if (!handle4 || (handleTable0[(handle4 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "Object" resource.');
715
+ var handle3 = handleTable0[(handle4 << 1) + 1] & ~T_FLAG;
716
716
  variant5_0 = 1;
717
717
  variant5_1 = handle3;
718
718
  }
@@ -785,15 +785,15 @@ function runDiff(arg0, arg1, arg2, arg3) {
785
785
  writable: true,
786
786
  value: handle18
787
787
  });
788
- finalizationRegistry0.register(rsc17, handle18, rsc17);
788
+ finalizationRegistry1.register(rsc17, handle18, rsc17);
789
789
  Object.defineProperty(rsc17, symbolDispose, {
790
790
  writable: true,
791
791
  value: function() {
792
- finalizationRegistry0.unregister(rsc17);
793
- rscTableRemove(handleTable0, handle18);
792
+ finalizationRegistry1.unregister(rsc17);
793
+ rscTableRemove(handleTable1, handle18);
794
794
  rsc17[symbolDispose] = emptyFunc;
795
795
  rsc17[symbolRscHandle] = void 0;
796
- exports0['3'](handleTable0[(handle18 << 1) + 1] & ~T_FLAG);
796
+ exports0['3'](handleTable1[(handle18 << 1) + 1] & ~T_FLAG);
797
797
  }
798
798
  });
799
799
  variant19 = rsc17;
@@ -813,15 +813,15 @@ function runDiff(arg0, arg1, arg2, arg3) {
813
813
  writable: true,
814
814
  value: handle21
815
815
  });
816
- finalizationRegistry0.register(rsc20, handle21, rsc20);
816
+ finalizationRegistry1.register(rsc20, handle21, rsc20);
817
817
  Object.defineProperty(rsc20, symbolDispose, {
818
818
  writable: true,
819
819
  value: function() {
820
- finalizationRegistry0.unregister(rsc20);
821
- rscTableRemove(handleTable0, handle21);
820
+ finalizationRegistry1.unregister(rsc20);
821
+ rscTableRemove(handleTable1, handle21);
822
822
  rsc20[symbolDispose] = emptyFunc;
823
823
  rsc20[symbolRscHandle] = void 0;
824
- exports0['3'](handleTable0[(handle21 << 1) + 1] & ~T_FLAG);
824
+ exports0['3'](handleTable1[(handle21 << 1) + 1] & ~T_FLAG);
825
825
  }
826
826
  });
827
827
  variant22 = rsc20;
@@ -858,8 +858,8 @@ function runDiff(arg0, arg1, arg2, arg3) {
858
858
  let displayDisplaySections;
859
859
  function displaySections(arg0, arg1, arg2) {
860
860
  var handle1 = arg0[symbolRscHandle];
861
- if (!handle1 || (handleTable0[(handle1 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "ObjectDiff" resource.');
862
- var handle0 = handleTable0[(handle1 << 1) + 1] & ~T_FLAG;
861
+ if (!handle1 || (handleTable1[(handle1 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "ObjectDiff" resource.');
862
+ var handle0 = handleTable1[(handle1 << 1) + 1] & ~T_FLAG;
863
863
  var { regex: v2_0, mapping: v2_1 } = arg1;
864
864
  var variant4 = v2_0;
865
865
  let variant4_0;
@@ -951,8 +951,8 @@ function displaySections(arg0, arg1, arg2) {
951
951
  let displayDisplaySymbol;
952
952
  function displaySymbol(arg0, arg1) {
953
953
  var handle1 = arg0[symbolRscHandle];
954
- if (!handle1 || (handleTable0[(handle1 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "ObjectDiff" resource.');
955
- var handle0 = handleTable0[(handle1 << 1) + 1] & ~T_FLAG;
954
+ if (!handle1 || (handleTable1[(handle1 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "ObjectDiff" resource.');
955
+ var handle0 = handleTable1[(handle1 << 1) + 1] & ~T_FLAG;
956
956
  const ret = displayDisplaySymbol(handle0, toUint32(arg1));
957
957
  var ptr2 = dataView(memory0).getInt32(ret + 4, true);
958
958
  var len2 = dataView(memory0).getInt32(ret + 8, true);
@@ -1128,8 +1128,8 @@ function displaySymbol(arg0, arg1) {
1128
1128
  let displayDisplayInstructionRow;
1129
1129
  function displayInstructionRow(arg0, arg1, arg2, arg3) {
1130
1130
  var handle1 = arg0[symbolRscHandle];
1131
- if (!handle1 || (handleTable0[(handle1 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "ObjectDiff" resource.');
1132
- var handle0 = handleTable0[(handle1 << 1) + 1] & ~T_FLAG;
1131
+ if (!handle1 || (handleTable1[(handle1 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "ObjectDiff" resource.');
1132
+ var handle0 = handleTable1[(handle1 << 1) + 1] & ~T_FLAG;
1133
1133
  var handle3 = arg3[symbolRscHandle];
1134
1134
  if (!handle3 || (handleTable2[(handle3 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "DiffConfig" resource.');
1135
1135
  var handle2 = handleTable2[(handle3 << 1) + 1] & ~T_FLAG;
@@ -1334,8 +1334,8 @@ function displayInstructionRow(arg0, arg1, arg2, arg3) {
1334
1334
  let displaySymbolContext;
1335
1335
  function symbolContext(arg0, arg1) {
1336
1336
  var handle1 = arg0[symbolRscHandle];
1337
- if (!handle1 || (handleTable0[(handle1 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "ObjectDiff" resource.');
1338
- var handle0 = handleTable0[(handle1 << 1) + 1] & ~T_FLAG;
1337
+ if (!handle1 || (handleTable1[(handle1 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "ObjectDiff" resource.');
1338
+ var handle0 = handleTable1[(handle1 << 1) + 1] & ~T_FLAG;
1339
1339
  const ret = displaySymbolContext(handle0, toUint32(arg1));
1340
1340
  var len8 = dataView(memory0).getInt32(ret + 4, true);
1341
1341
  var base8 = dataView(memory0).getInt32(ret + 0, true);
@@ -1415,8 +1415,8 @@ function symbolContext(arg0, arg1) {
1415
1415
  let displaySymbolHover;
1416
1416
  function symbolHover(arg0, arg1) {
1417
1417
  var handle1 = arg0[symbolRscHandle];
1418
- if (!handle1 || (handleTable0[(handle1 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "ObjectDiff" resource.');
1419
- var handle0 = handleTable0[(handle1 << 1) + 1] & ~T_FLAG;
1418
+ if (!handle1 || (handleTable1[(handle1 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "ObjectDiff" resource.');
1419
+ var handle0 = handleTable1[(handle1 << 1) + 1] & ~T_FLAG;
1420
1420
  const ret = displaySymbolHover(handle0, toUint32(arg1));
1421
1421
  var len6 = dataView(memory0).getInt32(ret + 4, true);
1422
1422
  var base6 = dataView(memory0).getInt32(ret + 0, true);
@@ -1480,8 +1480,8 @@ function symbolHover(arg0, arg1) {
1480
1480
  let displayInstructionContext;
1481
1481
  function instructionContext(arg0, arg1, arg2, arg3) {
1482
1482
  var handle1 = arg0[symbolRscHandle];
1483
- if (!handle1 || (handleTable0[(handle1 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "ObjectDiff" resource.');
1484
- var handle0 = handleTable0[(handle1 << 1) + 1] & ~T_FLAG;
1483
+ if (!handle1 || (handleTable1[(handle1 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "ObjectDiff" resource.');
1484
+ var handle0 = handleTable1[(handle1 << 1) + 1] & ~T_FLAG;
1485
1485
  var handle3 = arg3[symbolRscHandle];
1486
1486
  if (!handle3 || (handleTable2[(handle3 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "DiffConfig" resource.');
1487
1487
  var handle2 = handleTable2[(handle3 << 1) + 1] & ~T_FLAG;
@@ -1564,8 +1564,8 @@ function instructionContext(arg0, arg1, arg2, arg3) {
1564
1564
  let displayInstructionHover;
1565
1565
  function instructionHover(arg0, arg1, arg2, arg3) {
1566
1566
  var handle1 = arg0[symbolRscHandle];
1567
- if (!handle1 || (handleTable0[(handle1 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "ObjectDiff" resource.');
1568
- var handle0 = handleTable0[(handle1 << 1) + 1] & ~T_FLAG;
1567
+ if (!handle1 || (handleTable1[(handle1 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "ObjectDiff" resource.');
1568
+ var handle0 = handleTable1[(handle1 << 1) + 1] & ~T_FLAG;
1569
1569
  var handle3 = arg3[symbolRscHandle];
1570
1570
  if (!handle3 || (handleTable2[(handle3 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "DiffConfig" resource.');
1571
1571
  var handle2 = handleTable2[(handle3 << 1) + 1] & ~T_FLAG;
@@ -1632,8 +1632,8 @@ function instructionHover(arg0, arg1, arg2, arg3) {
1632
1632
  let displayDisplayDataRow;
1633
1633
  function displayDataRow(arg0, arg1, arg2) {
1634
1634
  var handle1 = arg0[symbolRscHandle];
1635
- if (!handle1 || (handleTable0[(handle1 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "ObjectDiff" resource.');
1636
- var handle0 = handleTable0[(handle1 << 1) + 1] & ~T_FLAG;
1635
+ if (!handle1 || (handleTable1[(handle1 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "ObjectDiff" resource.');
1636
+ var handle0 = handleTable1[(handle1 << 1) + 1] & ~T_FLAG;
1637
1637
  const ret = displayDisplayDataRow(handle0, toUint32(arg1), toUint32(arg2));
1638
1638
  var len4 = dataView(memory0).getInt32(ret + 12, true);
1639
1639
  var base4 = dataView(memory0).getInt32(ret + 8, true);
@@ -1705,8 +1705,8 @@ function displayDataRow(arg0, arg1, arg2) {
1705
1705
  let displayDataContext;
1706
1706
  function dataContext(arg0, arg1, arg2) {
1707
1707
  var handle1 = arg0[symbolRscHandle];
1708
- if (!handle1 || (handleTable0[(handle1 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "ObjectDiff" resource.');
1709
- var handle0 = handleTable0[(handle1 << 1) + 1] & ~T_FLAG;
1708
+ if (!handle1 || (handleTable1[(handle1 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "ObjectDiff" resource.');
1709
+ var handle0 = handleTable1[(handle1 << 1) + 1] & ~T_FLAG;
1710
1710
  const ret = displayDataContext(handle0, toUint32(arg1), toUint32(arg2));
1711
1711
  var len8 = dataView(memory0).getInt32(ret + 4, true);
1712
1712
  var base8 = dataView(memory0).getInt32(ret + 0, true);
@@ -1786,8 +1786,8 @@ function dataContext(arg0, arg1, arg2) {
1786
1786
  let displayDataHover;
1787
1787
  function dataHover(arg0, arg1, arg2) {
1788
1788
  var handle1 = arg0[symbolRscHandle];
1789
- if (!handle1 || (handleTable0[(handle1 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "ObjectDiff" resource.');
1790
- var handle0 = handleTable0[(handle1 << 1) + 1] & ~T_FLAG;
1789
+ if (!handle1 || (handleTable1[(handle1 << 1) + 1] & T_FLAG) === 0) throw new TypeError('Resource error: Not a valid "ObjectDiff" resource.');
1790
+ var handle0 = handleTable1[(handle1 << 1) + 1] & ~T_FLAG;
1791
1791
  const ret = displayDataHover(handle0, toUint32(arg1), toUint32(arg2));
1792
1792
  var len6 = dataView(memory0).getInt32(ret + 4, true);
1793
1793
  var base6 = dataView(memory0).getInt32(ret + 0, true);
@@ -1858,8 +1858,8 @@ const $init = (()=>{
1858
1858
  '[export]objdiff:core/diff': {
1859
1859
  '[resource-drop]object-diff': trampoline2,
1860
1860
  '[resource-new]diff-config': trampoline3,
1861
- '[resource-new]object': trampoline1,
1862
- '[resource-new]object-diff': trampoline0
1861
+ '[resource-new]object': trampoline0,
1862
+ '[resource-new]object-diff': trampoline1
1863
1863
  },
1864
1864
  'wasi:logging/logging@0.1.0-draft': {
1865
1865
  log: exports0['0']
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "objdiff-wasm",
3
- "version": "3.4.1",
3
+ "version": "3.4.2",
4
4
  "description": "A local diffing tool for decompilation projects.",
5
5
  "author": {
6
6
  "name": "Luke Street",