sql.js 1.10.1 → 1.10.3

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.
@@ -1164,7 +1164,9 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
1164
1164
  return new StatementIterator(sql, this);
1165
1165
  };
1166
1166
 
1167
- /** Exports the contents of the database to a binary array
1167
+ /** Exports the contents of the database to a binary array. This
1168
+ * operation will close and re-open the database which will cause
1169
+ * any pragmas to be set back to their default values.
1168
1170
  @return {Uint8Array} An array of bytes of the SQLite3 database file
1169
1171
  */
1170
1172
  Database.prototype["export"] = function exportDatabase() {
@@ -1878,10 +1880,10 @@ function writeStackCookie() {
1878
1880
  // The stack grow downwards towards _emscripten_stack_get_end.
1879
1881
  // We write cookies to the final two words in the stack and detect if they are
1880
1882
  // ever overwritten.
1881
- HEAPU32[((max)>>2)] = 0x02135467;
1882
- HEAPU32[(((max)+(4))>>2)] = 0x89BACDFE;
1883
+ HEAPU32[((max)>>2)] = 0x02135467;checkInt32(0x02135467);
1884
+ HEAPU32[(((max)+(4))>>2)] = 0x89BACDFE;checkInt32(0x89BACDFE);
1883
1885
  // Also test the global address 0 for integrity.
1884
- HEAPU32[((0)>>2)] = 1668509029;
1886
+ HEAPU32[((0)>>2)] = 1668509029;checkInt32(1668509029);
1885
1887
  }
1886
1888
 
1887
1889
  function checkStackCookie() {
@@ -1935,6 +1937,8 @@ function initRuntime() {
1935
1937
 
1936
1938
  checkStackCookie();
1937
1939
 
1940
+ setStackLimits();
1941
+
1938
1942
 
1939
1943
  if (!Module["noFSInit"] && !FS.init.initialized)
1940
1944
  FS.init();
@@ -2394,6 +2398,31 @@ function unexportedRuntimeSymbol(sym) {
2394
2398
  }
2395
2399
  }
2396
2400
 
2401
+ var MAX_UINT8 = (2 ** 8) - 1;
2402
+ var MAX_UINT16 = (2 ** 16) - 1;
2403
+ var MAX_UINT32 = (2 ** 32) - 1;
2404
+ var MAX_UINT53 = (2 ** 53) - 1;
2405
+ var MAX_UINT64 = (2 ** 64) - 1;
2406
+
2407
+ var MIN_INT8 = - (2 ** ( 8 - 1)) + 1;
2408
+ var MIN_INT16 = - (2 ** (16 - 1)) + 1;
2409
+ var MIN_INT32 = - (2 ** (32 - 1)) + 1;
2410
+ var MIN_INT53 = - (2 ** (53 - 1)) + 1;
2411
+ var MIN_INT64 = - (2 ** (64 - 1)) + 1;
2412
+
2413
+ function checkInt(value, bits, min, max) {
2414
+ assert(Number.isInteger(Number(value)), `attempt to write non-integer (${value}) into integer heap`);
2415
+ assert(value <= max, `value (${value}) too large to write as ${bits}-bit value`);
2416
+ assert(value >= min, `value (${value}) too small to write as ${bits}-bit value`);
2417
+ }
2418
+
2419
+ var checkInt1 = (value) => checkInt(value, 1, 1);
2420
+ var checkInt8 = (value) => checkInt(value, 8, MIN_INT8, MAX_UINT8);
2421
+ var checkInt16 = (value) => checkInt(value, 16, MIN_INT16, MAX_UINT16);
2422
+ var checkInt32 = (value) => checkInt(value, 32, MIN_INT32, MAX_UINT32);
2423
+ var checkInt53 = (value) => checkInt(value, 53, MIN_INT53, MAX_UINT53);
2424
+ var checkInt64 = (value) => checkInt(value, 64, MIN_INT64, MAX_UINT64);
2425
+
2397
2426
  // Used by XXXXX_DEBUG settings to output debug messages.
2398
2427
  function dbg(text) {
2399
2428
  // TODO(sbc): Make this configurable somehow. Its not always convenient for
@@ -2448,6 +2477,12 @@ function dbg(text) {
2448
2477
  return '0x' + ptr.toString(16).padStart(8, '0');
2449
2478
  };
2450
2479
 
2480
+ var setStackLimits = () => {
2481
+ var stackLow = _emscripten_stack_get_base();
2482
+ var stackHigh = _emscripten_stack_get_end();
2483
+ ___set_stack_limits(stackLow, stackHigh);
2484
+ };
2485
+
2451
2486
 
2452
2487
  /**
2453
2488
  * @param {number} ptr
@@ -2457,10 +2492,10 @@ function dbg(text) {
2457
2492
  function setValue(ptr, value, type = 'i8') {
2458
2493
  if (type.endsWith('*')) type = '*';
2459
2494
  switch (type) {
2460
- case 'i1': HEAP8[((ptr)>>0)] = value; break;
2461
- case 'i8': HEAP8[((ptr)>>0)] = value; break;
2462
- case 'i16': HEAP16[((ptr)>>1)] = value; break;
2463
- case 'i32': HEAP32[((ptr)>>2)] = value; break;
2495
+ case 'i1': HEAP8[((ptr)>>0)] = value;checkInt8(value); break;
2496
+ case 'i8': HEAP8[((ptr)>>0)] = value;checkInt8(value); break;
2497
+ case 'i16': HEAP16[((ptr)>>1)] = value;checkInt16(value); break;
2498
+ case 'i32': HEAP32[((ptr)>>2)] = value;checkInt32(value); break;
2464
2499
  case 'i64': abort('to do setValue(i64) use WASM_BIGINT');
2465
2500
  case 'float': HEAPF32[((ptr)>>2)] = value; break;
2466
2501
  case 'double': HEAPF64[((ptr)>>3)] = value; break;
@@ -2555,6 +2590,16 @@ function dbg(text) {
2555
2590
  abort(`Assertion failed: ${UTF8ToString(condition)}, at: ` + [filename ? UTF8ToString(filename) : 'unknown filename', line, func ? UTF8ToString(func) : 'unknown function']);
2556
2591
  };
2557
2592
 
2593
+
2594
+
2595
+ var ___handle_stack_overflow = (requested) => {
2596
+ var base = _emscripten_stack_get_base();
2597
+ var end = _emscripten_stack_get_end();
2598
+ abort(`stack overflow (Attempt to set SP to ${ptrToString(requested)}` +
2599
+ `, with stack limits [${ptrToString(end)} - ${ptrToString(base)}` +
2600
+ ']). If you require more stack space build with -sSTACK_SIZE=<bytes>');
2601
+ };
2602
+
2558
2603
  var PATH = {
2559
2604
  isAbs:(path) => path.charAt(0) === '/',
2560
2605
  splitPath:(filename) => {
@@ -5307,25 +5352,25 @@ function dbg(text) {
5307
5352
  }
5308
5353
  throw e;
5309
5354
  }
5310
- HEAP32[((buf)>>2)] = stat.dev;
5311
- HEAP32[(((buf)+(4))>>2)] = stat.mode;
5312
- HEAPU32[(((buf)+(8))>>2)] = stat.nlink;
5313
- HEAP32[(((buf)+(12))>>2)] = stat.uid;
5314
- HEAP32[(((buf)+(16))>>2)] = stat.gid;
5315
- HEAP32[(((buf)+(20))>>2)] = stat.rdev;
5316
- (tempI64 = [stat.size>>>0,(tempDouble = stat.size,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(24))>>2)] = tempI64[0],HEAP32[(((buf)+(28))>>2)] = tempI64[1]);
5317
- HEAP32[(((buf)+(32))>>2)] = 4096;
5318
- HEAP32[(((buf)+(36))>>2)] = stat.blocks;
5355
+ HEAP32[((buf)>>2)] = stat.dev;checkInt32(stat.dev);
5356
+ HEAP32[(((buf)+(4))>>2)] = stat.mode;checkInt32(stat.mode);
5357
+ HEAPU32[(((buf)+(8))>>2)] = stat.nlink;checkInt32(stat.nlink);
5358
+ HEAP32[(((buf)+(12))>>2)] = stat.uid;checkInt32(stat.uid);
5359
+ HEAP32[(((buf)+(16))>>2)] = stat.gid;checkInt32(stat.gid);
5360
+ HEAP32[(((buf)+(20))>>2)] = stat.rdev;checkInt32(stat.rdev);
5361
+ (tempI64 = [stat.size>>>0,(tempDouble = stat.size,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(24))>>2)] = tempI64[0],HEAP32[(((buf)+(28))>>2)] = tempI64[1]);checkInt64(stat.size);
5362
+ HEAP32[(((buf)+(32))>>2)] = 4096;checkInt32(4096);
5363
+ HEAP32[(((buf)+(36))>>2)] = stat.blocks;checkInt32(stat.blocks);
5319
5364
  var atime = stat.atime.getTime();
5320
5365
  var mtime = stat.mtime.getTime();
5321
5366
  var ctime = stat.ctime.getTime();
5322
- (tempI64 = [Math.floor(atime / 1000)>>>0,(tempDouble = Math.floor(atime / 1000),(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(40))>>2)] = tempI64[0],HEAP32[(((buf)+(44))>>2)] = tempI64[1]);
5323
- HEAPU32[(((buf)+(48))>>2)] = (atime % 1000) * 1000;
5324
- (tempI64 = [Math.floor(mtime / 1000)>>>0,(tempDouble = Math.floor(mtime / 1000),(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(56))>>2)] = tempI64[0],HEAP32[(((buf)+(60))>>2)] = tempI64[1]);
5325
- HEAPU32[(((buf)+(64))>>2)] = (mtime % 1000) * 1000;
5326
- (tempI64 = [Math.floor(ctime / 1000)>>>0,(tempDouble = Math.floor(ctime / 1000),(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(72))>>2)] = tempI64[0],HEAP32[(((buf)+(76))>>2)] = tempI64[1]);
5327
- HEAPU32[(((buf)+(80))>>2)] = (ctime % 1000) * 1000;
5328
- (tempI64 = [stat.ino>>>0,(tempDouble = stat.ino,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(88))>>2)] = tempI64[0],HEAP32[(((buf)+(92))>>2)] = tempI64[1]);
5367
+ (tempI64 = [Math.floor(atime / 1000)>>>0,(tempDouble = Math.floor(atime / 1000),(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(40))>>2)] = tempI64[0],HEAP32[(((buf)+(44))>>2)] = tempI64[1]);checkInt64(Math.floor(atime / 1000));
5368
+ HEAPU32[(((buf)+(48))>>2)] = (atime % 1000) * 1000;checkInt32((atime % 1000) * 1000);
5369
+ (tempI64 = [Math.floor(mtime / 1000)>>>0,(tempDouble = Math.floor(mtime / 1000),(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(56))>>2)] = tempI64[0],HEAP32[(((buf)+(60))>>2)] = tempI64[1]);checkInt64(Math.floor(mtime / 1000));
5370
+ HEAPU32[(((buf)+(64))>>2)] = (mtime % 1000) * 1000;checkInt32((mtime % 1000) * 1000);
5371
+ (tempI64 = [Math.floor(ctime / 1000)>>>0,(tempDouble = Math.floor(ctime / 1000),(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(72))>>2)] = tempI64[0],HEAP32[(((buf)+(76))>>2)] = tempI64[1]);checkInt64(Math.floor(ctime / 1000));
5372
+ HEAPU32[(((buf)+(80))>>2)] = (ctime % 1000) * 1000;checkInt32((ctime % 1000) * 1000);
5373
+ (tempI64 = [stat.ino>>>0,(tempDouble = stat.ino,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(88))>>2)] = tempI64[0],HEAP32[(((buf)+(92))>>2)] = tempI64[1]);checkInt64(stat.ino);
5329
5374
  return 0;
5330
5375
  },
5331
5376
  doMsync(addr, stream, len, flags, offset) {
@@ -5421,7 +5466,7 @@ function dbg(text) {
5421
5466
  }
5422
5467
 
5423
5468
  var setErrNo = (value) => {
5424
- HEAP32[((___errno_location())>>2)] = value;
5469
+ HEAP32[((___errno_location())>>2)] = value;checkInt32(value);
5425
5470
  return value;
5426
5471
  };
5427
5472
 
@@ -5457,7 +5502,7 @@ function dbg(text) {
5457
5502
  var arg = SYSCALLS.getp();
5458
5503
  var offset = 0;
5459
5504
  // We're always unlocked.
5460
- HEAP16[(((arg)+(offset))>>1)] = 2;
5505
+ HEAP16[(((arg)+(offset))>>1)] = 2;checkInt16(2);
5461
5506
  return 0;
5462
5507
  }
5463
5508
  case 6:
@@ -5708,24 +5753,24 @@ function dbg(text) {
5708
5753
 
5709
5754
 
5710
5755
  var date = new Date(time*1000);
5711
- HEAP32[((tmPtr)>>2)] = date.getSeconds();
5712
- HEAP32[(((tmPtr)+(4))>>2)] = date.getMinutes();
5713
- HEAP32[(((tmPtr)+(8))>>2)] = date.getHours();
5714
- HEAP32[(((tmPtr)+(12))>>2)] = date.getDate();
5715
- HEAP32[(((tmPtr)+(16))>>2)] = date.getMonth();
5716
- HEAP32[(((tmPtr)+(20))>>2)] = date.getFullYear()-1900;
5717
- HEAP32[(((tmPtr)+(24))>>2)] = date.getDay();
5756
+ HEAP32[((tmPtr)>>2)] = date.getSeconds();checkInt32(date.getSeconds());
5757
+ HEAP32[(((tmPtr)+(4))>>2)] = date.getMinutes();checkInt32(date.getMinutes());
5758
+ HEAP32[(((tmPtr)+(8))>>2)] = date.getHours();checkInt32(date.getHours());
5759
+ HEAP32[(((tmPtr)+(12))>>2)] = date.getDate();checkInt32(date.getDate());
5760
+ HEAP32[(((tmPtr)+(16))>>2)] = date.getMonth();checkInt32(date.getMonth());
5761
+ HEAP32[(((tmPtr)+(20))>>2)] = date.getFullYear()-1900;checkInt32(date.getFullYear()-1900);
5762
+ HEAP32[(((tmPtr)+(24))>>2)] = date.getDay();checkInt32(date.getDay());
5718
5763
 
5719
5764
  var yday = ydayFromDate(date)|0;
5720
- HEAP32[(((tmPtr)+(28))>>2)] = yday;
5721
- HEAP32[(((tmPtr)+(36))>>2)] = -(date.getTimezoneOffset() * 60);
5765
+ HEAP32[(((tmPtr)+(28))>>2)] = yday;checkInt32(yday);
5766
+ HEAP32[(((tmPtr)+(36))>>2)] = -(date.getTimezoneOffset() * 60);checkInt32(-(date.getTimezoneOffset() * 60));
5722
5767
 
5723
5768
  // Attention: DST is in December in South, and some regions don't have DST at all.
5724
5769
  var start = new Date(date.getFullYear(), 0, 1);
5725
5770
  var summerOffset = new Date(date.getFullYear(), 6, 1).getTimezoneOffset();
5726
5771
  var winterOffset = start.getTimezoneOffset();
5727
5772
  var dst = (summerOffset != winterOffset && date.getTimezoneOffset() == Math.min(winterOffset, summerOffset))|0;
5728
- HEAP32[(((tmPtr)+(32))>>2)] = dst;
5773
+ HEAP32[(((tmPtr)+(32))>>2)] = dst;checkInt32(dst);
5729
5774
  ;
5730
5775
  }
5731
5776
 
@@ -5744,7 +5789,7 @@ function dbg(text) {
5744
5789
  var stream = SYSCALLS.getStreamFromFD(fd);
5745
5790
  var res = FS.mmap(stream, len, offset, prot, flags);
5746
5791
  var ptr = res.ptr;
5747
- HEAP32[((allocated)>>2)] = res.allocated;
5792
+ HEAP32[((allocated)>>2)] = res.allocated;checkInt32(res.allocated);
5748
5793
  HEAPU32[((addr)>>2)] = ptr;
5749
5794
  return 0;
5750
5795
  } catch (e) {
@@ -5803,9 +5848,9 @@ function dbg(text) {
5803
5848
  // Coordinated Universal Time (UTC) and local standard time."), the same
5804
5849
  // as returned by stdTimezoneOffset.
5805
5850
  // See http://pubs.opengroup.org/onlinepubs/009695399/functions/tzset.html
5806
- HEAPU32[((timezone)>>2)] = stdTimezoneOffset * 60;
5851
+ HEAPU32[((timezone)>>2)] = stdTimezoneOffset * 60;checkInt32(stdTimezoneOffset * 60);
5807
5852
 
5808
- HEAP32[((daylight)>>2)] = Number(winterOffset != summerOffset);
5853
+ HEAP32[((daylight)>>2)] = Number(winterOffset != summerOffset);checkInt32(Number(winterOffset != summerOffset));
5809
5854
 
5810
5855
  function extractZone(date) {
5811
5856
  var match = date.toTimeString().match(/\(([A-Za-z ]+)\)$/);
@@ -5817,14 +5862,18 @@ function dbg(text) {
5817
5862
  var summerNamePtr = stringToNewUTF8(summerName);
5818
5863
  if (summerOffset < winterOffset) {
5819
5864
  // Northern hemisphere
5820
- HEAPU32[((tzname)>>2)] = winterNamePtr;
5821
- HEAPU32[(((tzname)+(4))>>2)] = summerNamePtr;
5865
+ HEAPU32[((tzname)>>2)] = winterNamePtr;checkInt32(winterNamePtr);
5866
+ HEAPU32[(((tzname)+(4))>>2)] = summerNamePtr;checkInt32(summerNamePtr);
5822
5867
  } else {
5823
- HEAPU32[((tzname)>>2)] = summerNamePtr;
5824
- HEAPU32[(((tzname)+(4))>>2)] = winterNamePtr;
5868
+ HEAPU32[((tzname)>>2)] = summerNamePtr;checkInt32(summerNamePtr);
5869
+ HEAPU32[(((tzname)+(4))>>2)] = winterNamePtr;checkInt32(winterNamePtr);
5825
5870
  }
5826
5871
  };
5827
5872
 
5873
+ var _abort = () => {
5874
+ abort('native code called abort()');
5875
+ };
5876
+
5828
5877
  var _emscripten_date_now = () => Date.now();
5829
5878
 
5830
5879
  var getHeapMax = () =>
@@ -5845,6 +5894,7 @@ function dbg(text) {
5845
5894
  var _emscripten_memcpy_js = (dest, src, num) => HEAPU8.copyWithin(dest, src, src + num);
5846
5895
 
5847
5896
 
5897
+
5848
5898
  var growMemory = (size) => {
5849
5899
  var b = wasmMemory.buffer;
5850
5900
  var pages = (size - b.byteLength + 65535) / 65536;
@@ -5904,7 +5954,10 @@ function dbg(text) {
5904
5954
 
5905
5955
  var newSize = Math.min(maxHeapSize, alignUp(Math.max(requestedSize, overGrownHeapSize), 65536));
5906
5956
 
5957
+ var t0 = _emscripten_get_now();
5907
5958
  var replacement = growMemory(newSize);
5959
+ var t1 = _emscripten_get_now();
5960
+ dbg(`Heap resize call from ${oldSize} to ${newSize} took ${(t1 - t0)} msecs. Success: ${!!replacement}`);
5908
5961
  if (replacement) {
5909
5962
 
5910
5963
  return true;
@@ -5954,17 +6007,17 @@ function dbg(text) {
5954
6007
  var stringToAscii = (str, buffer) => {
5955
6008
  for (var i = 0; i < str.length; ++i) {
5956
6009
  assert(str.charCodeAt(i) === (str.charCodeAt(i) & 0xff));
5957
- HEAP8[((buffer++)>>0)] = str.charCodeAt(i);
6010
+ HEAP8[((buffer++)>>0)] = str.charCodeAt(i);checkInt8(str.charCodeAt(i));
5958
6011
  }
5959
6012
  // Null-terminate the string
5960
- HEAP8[((buffer)>>0)] = 0;
6013
+ HEAP8[((buffer)>>0)] = 0;checkInt8(0);
5961
6014
  };
5962
6015
 
5963
6016
  var _environ_get = (__environ, environ_buf) => {
5964
6017
  var bufSize = 0;
5965
6018
  getEnvStrings().forEach((string, i) => {
5966
6019
  var ptr = environ_buf + bufSize;
5967
- HEAPU32[(((__environ)+(i*4))>>2)] = ptr;
6020
+ HEAPU32[(((__environ)+(i*4))>>2)] = ptr;checkInt32(ptr);
5968
6021
  stringToAscii(string, ptr);
5969
6022
  bufSize += string.length + 1;
5970
6023
  });
@@ -5974,10 +6027,10 @@ function dbg(text) {
5974
6027
 
5975
6028
  var _environ_sizes_get = (penviron_count, penviron_buf_size) => {
5976
6029
  var strings = getEnvStrings();
5977
- HEAPU32[((penviron_count)>>2)] = strings.length;
6030
+ HEAPU32[((penviron_count)>>2)] = strings.length;checkInt32(strings.length);
5978
6031
  var bufSize = 0;
5979
6032
  strings.forEach((string) => bufSize += string.length + 1);
5980
- HEAPU32[((penviron_buf_size)>>2)] = bufSize;
6033
+ HEAPU32[((penviron_buf_size)>>2)] = bufSize;checkInt32(bufSize);
5981
6034
  return 0;
5982
6035
  };
5983
6036
 
@@ -6008,10 +6061,10 @@ function dbg(text) {
6008
6061
  FS.isLink(stream.mode) ? 7 :
6009
6062
  4;
6010
6063
  }
6011
- HEAP8[((pbuf)>>0)] = type;
6012
- HEAP16[(((pbuf)+(2))>>1)] = flags;
6013
- (tempI64 = [rightsBase>>>0,(tempDouble = rightsBase,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((pbuf)+(8))>>2)] = tempI64[0],HEAP32[(((pbuf)+(12))>>2)] = tempI64[1]);
6014
- (tempI64 = [rightsInheriting>>>0,(tempDouble = rightsInheriting,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((pbuf)+(16))>>2)] = tempI64[0],HEAP32[(((pbuf)+(20))>>2)] = tempI64[1]);
6064
+ HEAP8[((pbuf)>>0)] = type;checkInt8(type);
6065
+ HEAP16[(((pbuf)+(2))>>1)] = flags;checkInt16(flags);
6066
+ (tempI64 = [rightsBase>>>0,(tempDouble = rightsBase,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((pbuf)+(8))>>2)] = tempI64[0],HEAP32[(((pbuf)+(12))>>2)] = tempI64[1]);checkInt64(rightsBase);
6067
+ (tempI64 = [rightsInheriting>>>0,(tempDouble = rightsInheriting,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((pbuf)+(16))>>2)] = tempI64[0],HEAP32[(((pbuf)+(20))>>2)] = tempI64[1]);checkInt64(rightsInheriting);
6015
6068
  return 0;
6016
6069
  } catch (e) {
6017
6070
  if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
@@ -6042,7 +6095,7 @@ function dbg(text) {
6042
6095
 
6043
6096
  var stream = SYSCALLS.getStreamFromFD(fd);
6044
6097
  var num = doReadv(stream, iov, iovcnt);
6045
- HEAPU32[((pnum)>>2)] = num;
6098
+ HEAPU32[((pnum)>>2)] = num;checkInt32(num);
6046
6099
  return 0;
6047
6100
  } catch (e) {
6048
6101
  if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
@@ -6060,7 +6113,7 @@ function dbg(text) {
6060
6113
  if (isNaN(offset)) return 61;
6061
6114
  var stream = SYSCALLS.getStreamFromFD(fd);
6062
6115
  FS.llseek(stream, offset, whence);
6063
- (tempI64 = [stream.position>>>0,(tempDouble = stream.position,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[((newOffset)>>2)] = tempI64[0],HEAP32[(((newOffset)+(4))>>2)] = tempI64[1]);
6116
+ (tempI64 = [stream.position>>>0,(tempDouble = stream.position,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[((newOffset)>>2)] = tempI64[0],HEAP32[(((newOffset)+(4))>>2)] = tempI64[1]);checkInt64(stream.position);
6064
6117
  if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; // reset readdir state
6065
6118
  return 0;
6066
6119
  } catch (e) {
@@ -6106,7 +6159,7 @@ function dbg(text) {
6106
6159
 
6107
6160
  var stream = SYSCALLS.getStreamFromFD(fd);
6108
6161
  var num = doWritev(stream, iov, iovcnt);
6109
- HEAPU32[((pnum)>>2)] = num;
6162
+ HEAPU32[((pnum)>>2)] = num;checkInt32(num);
6110
6163
  return 0;
6111
6164
  } catch (e) {
6112
6165
  if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
@@ -6411,6 +6464,7 @@ function dbg(text) {
6411
6464
 
6412
6465
 
6413
6466
 
6467
+
6414
6468
  /** @param {string=} sig */
6415
6469
  var addFunction = (func, sig) => {
6416
6470
  assert(typeof func != 'undefined');
@@ -6423,6 +6477,13 @@ function dbg(text) {
6423
6477
 
6424
6478
  // It's not in the table, add it now.
6425
6479
 
6480
+ // Make sure functionsInTableMap is actually up to date, that is, that this
6481
+ // function is not actually in the wasm Table despite not being tracked in
6482
+ // functionsInTableMap.
6483
+ for (var i = 0; i < wasmTable.length; i++) {
6484
+ assert(getWasmTableEntry(i) != func, 'function in Table but not functionsInTableMap');
6485
+ }
6486
+
6426
6487
  var ret = getEmptyTableSlot();
6427
6488
 
6428
6489
  // Set the new value.
@@ -6497,6 +6558,8 @@ var wasmImports = {
6497
6558
  /** @export */
6498
6559
  __assert_fail: ___assert_fail,
6499
6560
  /** @export */
6561
+ __handle_stack_overflow: ___handle_stack_overflow,
6562
+ /** @export */
6500
6563
  __syscall_chmod: ___syscall_chmod,
6501
6564
  /** @export */
6502
6565
  __syscall_faccessat: ___syscall_faccessat,
@@ -6541,6 +6604,8 @@ var wasmImports = {
6541
6604
  /** @export */
6542
6605
  _tzset_js: __tzset_js,
6543
6606
  /** @export */
6607
+ abort: _abort,
6608
+ /** @export */
6544
6609
  emscripten_date_now: _emscripten_date_now,
6545
6610
  /** @export */
6546
6611
  emscripten_get_heap_max: _emscripten_get_heap_max,
@@ -6574,8 +6639,13 @@ var _sqlite3_value_text = Module['_sqlite3_value_text'] = createExportWrapper('s
6574
6639
  var ___errno_location = createExportWrapper('__errno_location');
6575
6640
  var _sqlite3_prepare_v2 = Module['_sqlite3_prepare_v2'] = createExportWrapper('sqlite3_prepare_v2');
6576
6641
  var _sqlite3_step = Module['_sqlite3_step'] = createExportWrapper('sqlite3_step');
6577
- var _sqlite3_finalize = Module['_sqlite3_finalize'] = createExportWrapper('sqlite3_finalize');
6578
6642
  var _sqlite3_reset = Module['_sqlite3_reset'] = createExportWrapper('sqlite3_reset');
6643
+ var _sqlite3_exec = Module['_sqlite3_exec'] = createExportWrapper('sqlite3_exec');
6644
+ var _sqlite3_finalize = Module['_sqlite3_finalize'] = createExportWrapper('sqlite3_finalize');
6645
+ var _sqlite3_column_name = Module['_sqlite3_column_name'] = createExportWrapper('sqlite3_column_name');
6646
+ var _sqlite3_column_text = Module['_sqlite3_column_text'] = createExportWrapper('sqlite3_column_text');
6647
+ var _sqlite3_column_type = Module['_sqlite3_column_type'] = createExportWrapper('sqlite3_column_type');
6648
+ var _sqlite3_errmsg = Module['_sqlite3_errmsg'] = createExportWrapper('sqlite3_errmsg');
6579
6649
  var _sqlite3_clear_bindings = Module['_sqlite3_clear_bindings'] = createExportWrapper('sqlite3_clear_bindings');
6580
6650
  var _sqlite3_value_blob = Module['_sqlite3_value_blob'] = createExportWrapper('sqlite3_value_blob');
6581
6651
  var _sqlite3_value_bytes = Module['_sqlite3_value_bytes'] = createExportWrapper('sqlite3_value_bytes');
@@ -6595,9 +6665,6 @@ var _sqlite3_data_count = Module['_sqlite3_data_count'] = createExportWrapper('s
6595
6665
  var _sqlite3_column_blob = Module['_sqlite3_column_blob'] = createExportWrapper('sqlite3_column_blob');
6596
6666
  var _sqlite3_column_bytes = Module['_sqlite3_column_bytes'] = createExportWrapper('sqlite3_column_bytes');
6597
6667
  var _sqlite3_column_double = Module['_sqlite3_column_double'] = createExportWrapper('sqlite3_column_double');
6598
- var _sqlite3_column_text = Module['_sqlite3_column_text'] = createExportWrapper('sqlite3_column_text');
6599
- var _sqlite3_column_type = Module['_sqlite3_column_type'] = createExportWrapper('sqlite3_column_type');
6600
- var _sqlite3_column_name = Module['_sqlite3_column_name'] = createExportWrapper('sqlite3_column_name');
6601
6668
  var _sqlite3_bind_blob = Module['_sqlite3_bind_blob'] = createExportWrapper('sqlite3_bind_blob');
6602
6669
  var _sqlite3_bind_double = Module['_sqlite3_bind_double'] = createExportWrapper('sqlite3_bind_double');
6603
6670
  var _sqlite3_bind_int = Module['_sqlite3_bind_int'] = createExportWrapper('sqlite3_bind_int');
@@ -6605,8 +6672,6 @@ var _sqlite3_bind_text = Module['_sqlite3_bind_text'] = createExportWrapper('sql
6605
6672
  var _sqlite3_bind_parameter_index = Module['_sqlite3_bind_parameter_index'] = createExportWrapper('sqlite3_bind_parameter_index');
6606
6673
  var _sqlite3_sql = Module['_sqlite3_sql'] = createExportWrapper('sqlite3_sql');
6607
6674
  var _sqlite3_normalized_sql = Module['_sqlite3_normalized_sql'] = createExportWrapper('sqlite3_normalized_sql');
6608
- var _sqlite3_errmsg = Module['_sqlite3_errmsg'] = createExportWrapper('sqlite3_errmsg');
6609
- var _sqlite3_exec = Module['_sqlite3_exec'] = createExportWrapper('sqlite3_exec');
6610
6675
  var _sqlite3_changes = Module['_sqlite3_changes'] = createExportWrapper('sqlite3_changes');
6611
6676
  var _sqlite3_close_v2 = Module['_sqlite3_close_v2'] = createExportWrapper('sqlite3_close_v2');
6612
6677
  var _sqlite3_create_function_v2 = Module['_sqlite3_create_function_v2'] = createExportWrapper('sqlite3_create_function_v2');
@@ -6625,6 +6690,7 @@ var stackSave = createExportWrapper('stackSave');
6625
6690
  var stackRestore = createExportWrapper('stackRestore');
6626
6691
  var stackAlloc = createExportWrapper('stackAlloc');
6627
6692
  var _emscripten_stack_get_current = () => (_emscripten_stack_get_current = wasmExports['emscripten_stack_get_current'])();
6693
+ var ___set_stack_limits = Module['___set_stack_limits'] = createExportWrapper('__set_stack_limits');
6628
6694
  var dynCall_iiiij = Module['dynCall_iiiij'] = createExportWrapper('dynCall_iiiij');
6629
6695
  var dynCall_iij = Module['dynCall_iij'] = createExportWrapper('dynCall_iij');
6630
6696
  var dynCall_iijii = Module['dynCall_iijii'] = createExportWrapper('dynCall_iijii');
@@ -6830,6 +6896,7 @@ var unexportedSymbols = [
6830
6896
  'getHeapMax',
6831
6897
  'growMemory',
6832
6898
  'ENV',
6899
+ 'setStackLimits',
6833
6900
  'MONTH_DAYS_REGULAR',
6834
6901
  'MONTH_DAYS_LEAP',
6835
6902
  'MONTH_DAYS_REGULAR_CUMULATIVE',
Binary file
package/dist/sql-wasm.js CHANGED
@@ -159,13 +159,13 @@ e:function(a){try{var b=U(a);na(b);return 0}catch(c){if("undefined"==typeof W||"
159
159
  return 0}catch(d){if("undefined"==typeof W||"ErrnoError"!==d.name)throw d;return d.Ka}},x:function(a,b,c,d){try{a:{var e=U(a);a=b;for(var h,k=b=0;k<c;k++){var r=E[a>>2],y=E[a+4>>2];a+=8;var v=fc(e,p,r,y,h);if(0>v){var F=-1;break a}b+=v;if(v<y)break;"undefined"!==typeof h&&(h+=v)}F=b}E[d>>2]=F;return 0}catch(H){if("undefined"==typeof W||"ErrnoError"!==H.name)throw H;return H.Ka}},m:function(a,b,c,d,e){b=Pc(b,c);try{if(isNaN(b))return 61;var h=U(a);ec(h,b,d);J=[h.position>>>0,(I=h.position,1<=+Math.abs(I)?
160
160
  0<I?+Math.floor(I/4294967296)>>>0:~~+Math.ceil((I-+(~~I>>>0))/4294967296)>>>0:0)];D[e>>2]=J[0];D[e+4>>2]=J[1];h.hb&&0===b&&0===d&&(h.hb=null);return 0}catch(k){if("undefined"==typeof W||"ErrnoError"!==k.name)throw k;return k.Ka}},D:function(a){try{var b=U(a);return b.Ha?.fsync?b.Ha.fsync(b):0}catch(c){if("undefined"==typeof W||"ErrnoError"!==c.name)throw c;return c.Ka}},u:function(a,b,c,d){try{a:{var e=U(a);a=b;for(var h,k=b=0;k<c;k++){var r=E[a>>2],y=E[a+4>>2];a+=8;var v=ma(e,p,r,y,h);if(0>v){var F=
161
161
  -1;break a}b+=v;"undefined"!==typeof h&&(h+=v)}F=b}E[d>>2]=F;return 0}catch(H){if("undefined"==typeof W||"ErrnoError"!==H.name)throw H;return H.Ka}}},Z=function(){function a(c){Z=c.exports;La=Z.I;Qa();Y=Z.Aa;Sa.unshift(Z.J);G--;f.monitorRunDependencies?.(G);0==G&&(null!==Wa&&(clearInterval(Wa),Wa=null),Xa&&(c=Xa,Xa=null,c()));return Z}var b={a:$c};G++;f.monitorRunDependencies?.(G);if(f.instantiateWasm)try{return f.instantiateWasm(b,a)}catch(c){return B(`Module.instantiateWasm callback failed with error: ${c}`),
162
- !1}db(b,function(c){a(c.instance)});return{}}();f._sqlite3_free=a=>(f._sqlite3_free=Z.K)(a);f._sqlite3_value_text=a=>(f._sqlite3_value_text=Z.L)(a);var Zc=()=>(Zc=Z.M)();f._sqlite3_prepare_v2=(a,b,c,d,e)=>(f._sqlite3_prepare_v2=Z.N)(a,b,c,d,e);f._sqlite3_step=a=>(f._sqlite3_step=Z.O)(a);f._sqlite3_finalize=a=>(f._sqlite3_finalize=Z.P)(a);f._sqlite3_reset=a=>(f._sqlite3_reset=Z.Q)(a);f._sqlite3_clear_bindings=a=>(f._sqlite3_clear_bindings=Z.R)(a);f._sqlite3_value_blob=a=>(f._sqlite3_value_blob=Z.S)(a);
163
- f._sqlite3_value_bytes=a=>(f._sqlite3_value_bytes=Z.T)(a);f._sqlite3_value_double=a=>(f._sqlite3_value_double=Z.U)(a);f._sqlite3_value_int=a=>(f._sqlite3_value_int=Z.V)(a);f._sqlite3_value_type=a=>(f._sqlite3_value_type=Z.W)(a);f._sqlite3_result_blob=(a,b,c,d)=>(f._sqlite3_result_blob=Z.X)(a,b,c,d);f._sqlite3_result_double=(a,b)=>(f._sqlite3_result_double=Z.Y)(a,b);f._sqlite3_result_error=(a,b,c)=>(f._sqlite3_result_error=Z.Z)(a,b,c);f._sqlite3_result_int=(a,b)=>(f._sqlite3_result_int=Z._)(a,b);
164
- f._sqlite3_result_int64=(a,b,c)=>(f._sqlite3_result_int64=Z.$)(a,b,c);f._sqlite3_result_null=a=>(f._sqlite3_result_null=Z.aa)(a);f._sqlite3_result_text=(a,b,c,d)=>(f._sqlite3_result_text=Z.ba)(a,b,c,d);f._sqlite3_aggregate_context=(a,b)=>(f._sqlite3_aggregate_context=Z.ca)(a,b);f._sqlite3_column_count=a=>(f._sqlite3_column_count=Z.da)(a);f._sqlite3_data_count=a=>(f._sqlite3_data_count=Z.ea)(a);f._sqlite3_column_blob=(a,b)=>(f._sqlite3_column_blob=Z.fa)(a,b);
165
- f._sqlite3_column_bytes=(a,b)=>(f._sqlite3_column_bytes=Z.ga)(a,b);f._sqlite3_column_double=(a,b)=>(f._sqlite3_column_double=Z.ha)(a,b);f._sqlite3_column_text=(a,b)=>(f._sqlite3_column_text=Z.ia)(a,b);f._sqlite3_column_type=(a,b)=>(f._sqlite3_column_type=Z.ja)(a,b);f._sqlite3_column_name=(a,b)=>(f._sqlite3_column_name=Z.ka)(a,b);f._sqlite3_bind_blob=(a,b,c,d,e)=>(f._sqlite3_bind_blob=Z.la)(a,b,c,d,e);f._sqlite3_bind_double=(a,b,c)=>(f._sqlite3_bind_double=Z.ma)(a,b,c);
166
- f._sqlite3_bind_int=(a,b,c)=>(f._sqlite3_bind_int=Z.na)(a,b,c);f._sqlite3_bind_text=(a,b,c,d,e)=>(f._sqlite3_bind_text=Z.oa)(a,b,c,d,e);f._sqlite3_bind_parameter_index=(a,b)=>(f._sqlite3_bind_parameter_index=Z.pa)(a,b);f._sqlite3_sql=a=>(f._sqlite3_sql=Z.qa)(a);f._sqlite3_normalized_sql=a=>(f._sqlite3_normalized_sql=Z.ra)(a);f._sqlite3_errmsg=a=>(f._sqlite3_errmsg=Z.sa)(a);f._sqlite3_exec=(a,b,c,d,e)=>(f._sqlite3_exec=Z.ta)(a,b,c,d,e);f._sqlite3_changes=a=>(f._sqlite3_changes=Z.ua)(a);
167
- f._sqlite3_close_v2=a=>(f._sqlite3_close_v2=Z.va)(a);f._sqlite3_create_function_v2=(a,b,c,d,e,h,k,r,y)=>(f._sqlite3_create_function_v2=Z.wa)(a,b,c,d,e,h,k,r,y);f._sqlite3_open=(a,b)=>(f._sqlite3_open=Z.xa)(a,b);var ea=f._malloc=a=>(ea=f._malloc=Z.ya)(a),ca=f._free=a=>(ca=f._free=Z.za)(a);f._RegisterExtensionFunctions=a=>(f._RegisterExtensionFunctions=Z.Ba)(a);var Gb=(a,b)=>(Gb=Z.Ca)(a,b),pa=()=>(pa=Z.Da)(),sa=a=>(sa=Z.Ea)(a),x=a=>(x=Z.Fa)(a);f.stackAlloc=x;f.stackSave=pa;f.stackRestore=sa;
168
- f.cwrap=(a,b,c,d)=>{var e=!c||c.every(h=>"number"===h||"boolean"===h);return"string"!==b&&e&&!d?f["_"+a]:function(){return Wc(a,b,c,arguments)}};f.addFunction=xa;f.removeFunction=ua;f.UTF8ToString=ra;f.ALLOC_NORMAL=ba;f.allocate=aa;f.allocateUTF8OnStack=ta;var ad;Xa=function bd(){ad||cd();ad||(Xa=bd)};
162
+ !1}db(b,function(c){a(c.instance)});return{}}();f._sqlite3_free=a=>(f._sqlite3_free=Z.K)(a);f._sqlite3_value_text=a=>(f._sqlite3_value_text=Z.L)(a);var Zc=()=>(Zc=Z.M)();f._sqlite3_prepare_v2=(a,b,c,d,e)=>(f._sqlite3_prepare_v2=Z.N)(a,b,c,d,e);f._sqlite3_step=a=>(f._sqlite3_step=Z.O)(a);f._sqlite3_reset=a=>(f._sqlite3_reset=Z.P)(a);f._sqlite3_exec=(a,b,c,d,e)=>(f._sqlite3_exec=Z.Q)(a,b,c,d,e);f._sqlite3_finalize=a=>(f._sqlite3_finalize=Z.R)(a);
163
+ f._sqlite3_column_name=(a,b)=>(f._sqlite3_column_name=Z.S)(a,b);f._sqlite3_column_text=(a,b)=>(f._sqlite3_column_text=Z.T)(a,b);f._sqlite3_column_type=(a,b)=>(f._sqlite3_column_type=Z.U)(a,b);f._sqlite3_errmsg=a=>(f._sqlite3_errmsg=Z.V)(a);f._sqlite3_clear_bindings=a=>(f._sqlite3_clear_bindings=Z.W)(a);f._sqlite3_value_blob=a=>(f._sqlite3_value_blob=Z.X)(a);f._sqlite3_value_bytes=a=>(f._sqlite3_value_bytes=Z.Y)(a);f._sqlite3_value_double=a=>(f._sqlite3_value_double=Z.Z)(a);
164
+ f._sqlite3_value_int=a=>(f._sqlite3_value_int=Z._)(a);f._sqlite3_value_type=a=>(f._sqlite3_value_type=Z.$)(a);f._sqlite3_result_blob=(a,b,c,d)=>(f._sqlite3_result_blob=Z.aa)(a,b,c,d);f._sqlite3_result_double=(a,b)=>(f._sqlite3_result_double=Z.ba)(a,b);f._sqlite3_result_error=(a,b,c)=>(f._sqlite3_result_error=Z.ca)(a,b,c);f._sqlite3_result_int=(a,b)=>(f._sqlite3_result_int=Z.da)(a,b);f._sqlite3_result_int64=(a,b,c)=>(f._sqlite3_result_int64=Z.ea)(a,b,c);
165
+ f._sqlite3_result_null=a=>(f._sqlite3_result_null=Z.fa)(a);f._sqlite3_result_text=(a,b,c,d)=>(f._sqlite3_result_text=Z.ga)(a,b,c,d);f._sqlite3_aggregate_context=(a,b)=>(f._sqlite3_aggregate_context=Z.ha)(a,b);f._sqlite3_column_count=a=>(f._sqlite3_column_count=Z.ia)(a);f._sqlite3_data_count=a=>(f._sqlite3_data_count=Z.ja)(a);f._sqlite3_column_blob=(a,b)=>(f._sqlite3_column_blob=Z.ka)(a,b);f._sqlite3_column_bytes=(a,b)=>(f._sqlite3_column_bytes=Z.la)(a,b);
166
+ f._sqlite3_column_double=(a,b)=>(f._sqlite3_column_double=Z.ma)(a,b);f._sqlite3_bind_blob=(a,b,c,d,e)=>(f._sqlite3_bind_blob=Z.na)(a,b,c,d,e);f._sqlite3_bind_double=(a,b,c)=>(f._sqlite3_bind_double=Z.oa)(a,b,c);f._sqlite3_bind_int=(a,b,c)=>(f._sqlite3_bind_int=Z.pa)(a,b,c);f._sqlite3_bind_text=(a,b,c,d,e)=>(f._sqlite3_bind_text=Z.qa)(a,b,c,d,e);f._sqlite3_bind_parameter_index=(a,b)=>(f._sqlite3_bind_parameter_index=Z.ra)(a,b);f._sqlite3_sql=a=>(f._sqlite3_sql=Z.sa)(a);
167
+ f._sqlite3_normalized_sql=a=>(f._sqlite3_normalized_sql=Z.ta)(a);f._sqlite3_changes=a=>(f._sqlite3_changes=Z.ua)(a);f._sqlite3_close_v2=a=>(f._sqlite3_close_v2=Z.va)(a);f._sqlite3_create_function_v2=(a,b,c,d,e,h,k,r,y)=>(f._sqlite3_create_function_v2=Z.wa)(a,b,c,d,e,h,k,r,y);f._sqlite3_open=(a,b)=>(f._sqlite3_open=Z.xa)(a,b);var ea=f._malloc=a=>(ea=f._malloc=Z.ya)(a),ca=f._free=a=>(ca=f._free=Z.za)(a);f._RegisterExtensionFunctions=a=>(f._RegisterExtensionFunctions=Z.Ba)(a);
168
+ var Gb=(a,b)=>(Gb=Z.Ca)(a,b),pa=()=>(pa=Z.Da)(),sa=a=>(sa=Z.Ea)(a),x=a=>(x=Z.Fa)(a);f.stackAlloc=x;f.stackSave=pa;f.stackRestore=sa;f.cwrap=(a,b,c,d)=>{var e=!c||c.every(h=>"number"===h||"boolean"===h);return"string"!==b&&e&&!d?f["_"+a]:function(){return Wc(a,b,c,arguments)}};f.addFunction=xa;f.removeFunction=ua;f.UTF8ToString=ra;f.ALLOC_NORMAL=ba;f.allocate=aa;f.allocateUTF8OnStack=ta;var ad;Xa=function bd(){ad||cd();ad||(Xa=bd)};
169
169
  function cd(){function a(){if(!ad&&(ad=!0,f.calledRun=!0,!Ma)){f.noFSInit||hc||(hc=!0,gc(),f.stdin=f.stdin,f.stdout=f.stdout,f.stderr=f.stderr,f.stdin?ic("stdin",f.stdin):Zb("/dev/tty","/dev/stdin"),f.stdout?ic("stdout",null,f.stdout):Zb("/dev/tty","/dev/stdout"),f.stderr?ic("stderr",null,f.stderr):Zb("/dev/tty1","/dev/stderr"),la("/dev/stdin",0),la("/dev/stdout",1),la("/dev/stderr",1));Lb=!1;eb(Sa);if(f.onRuntimeInitialized)f.onRuntimeInitialized();if(f.postRun)for("function"==typeof f.postRun&&
170
170
  (f.postRun=[f.postRun]);f.postRun.length;){var b=f.postRun.shift();Ta.unshift(b)}eb(Ta)}}if(!(0<G)){if(f.preRun)for("function"==typeof f.preRun&&(f.preRun=[f.preRun]);f.preRun.length;)Va();eb(Ra);0<G||(f.setStatus?(f.setStatus("Running..."),setTimeout(function(){setTimeout(function(){f.setStatus("")},1);a()},1)):a())}}if(f.preInit)for("function"==typeof f.preInit&&(f.preInit=[f.preInit]);0<f.preInit.length;)f.preInit.pop()();cd();
171
171
 
Binary file
Binary file
Binary file
Binary file