@intersystems-community/ascot 0.3.0 → 0.3.1

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.
@@ -3522,171 +3522,6 @@ export function instantiate(getCoreModule, imports, instantiateCore = WebAssembl
3522
3522
  Object.defineProperty(rsc0, symbolRscRep, { writable: true, value: rep2});
3523
3523
  }
3524
3524
 
3525
- curResourceBorrows.push(rsc0);
3526
- var ptr3 = (arg1 >>> 0) >>> 0;
3527
- var len3 = arg2;
3528
- var result3 = TEXT_DECODER_UTF8.decode(new Uint8Array(memory0.buffer, ptr3, len3));
3529
- _debugLog('[iface="iris:ascot/imported", function="[method]iris-connection.get-int-or-mac"] [Instruction::CallInterface] (sync, @ enter)');
3530
- const hostProvided = true;
3531
-
3532
- let parentTask;
3533
- let task;
3534
- let subtask;
3535
-
3536
- const createTask = () => {
3537
- const results = createNewCurrentTask({
3538
- componentIdx: -1,
3539
- isAsync: false,
3540
- entryFnName: 'getIntOrMac',
3541
- getCallbackFn: () => null,
3542
- callbackFnName: null,
3543
- errHandling: 'none',
3544
- callingWasmExport: false,
3545
- });
3546
- task = results[0];
3547
- };
3548
-
3549
- taskCreation: {
3550
- parentTask = getCurrentTask(
3551
- 0,
3552
- _getGlobalCurrentTaskMeta(0)?.taskID,
3553
- )?.task;
3554
-
3555
- if (!parentTask) {
3556
- createTask();
3557
- break taskCreation;
3558
- }
3559
-
3560
- createTask();
3561
-
3562
- if (hostProvided) {
3563
- subtask = parentTask.getLatestSubtask();
3564
- if (!subtask) {
3565
- throw new Error(`Missing subtask (in parent task [${parentTask.id()}]) for host import, has the import been lowered? (ensure asyncImports are set properly)`);
3566
- }
3567
- task.setParentSubtask(subtask);
3568
- }
3569
- }
3570
-
3571
-
3572
- const started = await task.enter({ isHost: hostProvided });
3573
- if (!started) {
3574
- _debugLog('[Instruction::CallInterface] failed to enter task', {
3575
- taskID: task.id(),
3576
- subtaskID: task.getParentSubtask()?.id(),
3577
- });
3578
- throw new Error("failed to enter task");
3579
- }
3580
-
3581
- let ret;
3582
-
3583
-
3584
- try {
3585
- ret = await _withGlobalCurrentTaskMetaAsync({
3586
- componentIdx: task.componentIdx(),
3587
- taskID: task.id(),
3588
- fn: () => _trackHostOperation(() => {
3589
- const hostRet = rsc0.getIntOrMac(result3);
3590
- subtask?.setHostPendingResult(hostRet);
3591
- return hostRet;
3592
- }),
3593
- })
3594
- ;
3595
- } catch (err) {
3596
-
3597
- _debugLog('[Instruction::CallInterface] error during async call', {
3598
- taskID: task.id(),
3599
- subtaskID: task.getParentSubtask()?.id(),
3600
- err,
3601
- });
3602
- getOrCreateAsyncState(0).markTrapped(err);
3603
- task.setErrored(err);
3604
- task.reject(err);
3605
- task.exit();
3606
- return task.completionPromise();
3607
-
3608
- }
3609
-
3610
- for (const entry of curResourceBorrows) {
3611
- const rsc = entry.rsc ?? entry;
3612
- if (entry.drop) {
3613
- if (rsc[symbolRscHandle]) {
3614
- entry.drop(rsc[symbolRscHandle]);
3615
- }
3616
- }
3617
- rsc[symbolRscHandle] = undefined;
3618
- }
3619
- curResourceBorrows = [];
3620
- var variant9 = ret;
3621
- switch (variant9.tag) {
3622
- case 'none': {
3623
- dataView(memory0).setInt8(((arg3 >>> 0)) + 0, 0, true);
3624
-
3625
- break;
3626
- }
3627
- case 'some': {
3628
- const e = variant9.val;
3629
- dataView(memory0).setInt8(((arg3 >>> 0)) + 0, 1, true);
3630
- var variant8 = e;
3631
- if (variant8 === null || variant8=== undefined) {
3632
- dataView(memory0).setInt8(((arg3 >>> 0)) + 4, 0, true);
3633
- } else {
3634
- const e = variant8;
3635
- dataView(memory0).setInt8(((arg3 >>> 0)) + 4, 1, true);
3636
- var {text: v4_0, uri: v4_1 } = e;
3637
-
3638
- var encodeRes = _utf8AllocateAndEncode(v4_0, realloc0, memory0);
3639
- var ptr5= encodeRes.ptr;
3640
- var len5 = encodeRes.len;
3641
-
3642
- dataView(memory0).setUint32(((arg3 >>> 0)) + 12, len5, true);
3643
- dataView(memory0).setUint32(((arg3 >>> 0)) + 8, ptr5, true);
3644
- var variant7 = v4_1;
3645
- if (variant7 === null || variant7=== undefined) {
3646
- dataView(memory0).setInt8(((arg3 >>> 0)) + 16, 0, true);
3647
- } else {
3648
- const e = variant7;
3649
- dataView(memory0).setInt8(((arg3 >>> 0)) + 16, 1, true);
3650
-
3651
- var encodeRes = _utf8AllocateAndEncode(e, realloc0, memory0);
3652
- var ptr6= encodeRes.ptr;
3653
- var len6 = encodeRes.len;
3654
-
3655
- dataView(memory0).setUint32(((arg3 >>> 0)) + 24, len6, true);
3656
- dataView(memory0).setUint32(((arg3 >>> 0)) + 20, ptr6, true);
3657
- }
3658
- }
3659
-
3660
- break;
3661
- }
3662
- default: {
3663
- _debugLog("ERROR: invalid value (expected option as object with 'tag' member)", { value: variant9, valueType: typeof variant9});
3664
- throw new TypeError('invalid variant specified for option');
3665
- }
3666
- }
3667
- _debugLog('[iface="iris:ascot/imported", function="[method]iris-connection.get-int-or-mac"][Instruction::Return]', {
3668
- funcName: '[method]iris-connection.get-int-or-mac',
3669
- paramCount: 0,
3670
- async: false,
3671
- postReturn: false
3672
- });
3673
- task.resolve([ret]);
3674
- task.exit();
3675
- }
3676
- _trampoline3.fnName = 'iris:ascot/imported#getIntOrMac';
3677
- _trampoline3.manuallyAsync = true;
3678
-
3679
- const _trampoline4 = async function(arg0, arg1, arg2, arg3) {
3680
- var handle1 = arg0;
3681
-
3682
- var rep2 = handleTable0[(handle1 << 1) + 1] & ~T_FLAG;
3683
- var rsc0 = captureTable0.get(rep2);
3684
- if (!rsc0) {
3685
- rsc0 = Object.create(IrisConnection.prototype);
3686
- Object.defineProperty(rsc0, symbolRscHandle, { writable: true, value: handle1});
3687
- Object.defineProperty(rsc0, symbolRscRep, { writable: true, value: rep2});
3688
- }
3689
-
3690
3525
  curResourceBorrows.push(rsc0);
3691
3526
  var ptr3 = (arg1 >>> 0) >>> 0;
3692
3527
  var len3 = arg2;
@@ -4744,10 +4579,10 @@ export function instantiate(getCoreModule, imports, instantiateCore = WebAssembl
4744
4579
  task.resolve([ret]);
4745
4580
  task.exit();
4746
4581
  }
4747
- _trampoline4.fnName = 'iris:ascot/imported#getCls';
4748
- _trampoline4.manuallyAsync = true;
4582
+ _trampoline3.fnName = 'iris:ascot/imported#getCls';
4583
+ _trampoline3.manuallyAsync = true;
4749
4584
 
4750
- const _trampoline5 = async function(arg0, arg1, arg2, arg3) {
4585
+ const _trampoline4 = async function(arg0, arg1, arg2, arg3) {
4751
4586
  var handle1 = arg0;
4752
4587
 
4753
4588
  var rep2 = handleTable0[(handle1 << 1) + 1] & ~T_FLAG;
@@ -4882,8 +4717,173 @@ export function instantiate(getCoreModule, imports, instantiateCore = WebAssembl
4882
4717
  dataView(memory0).setUint32(((arg3 >>> 0)) + 16, ptr6, true);
4883
4718
  }
4884
4719
  }
4885
- _debugLog('[iface="iris:ascot/imported", function="[method]iris-connection.get-inc"][Instruction::Return]', {
4886
- funcName: '[method]iris-connection.get-inc',
4720
+ _debugLog('[iface="iris:ascot/imported", function="[method]iris-connection.get-inc"][Instruction::Return]', {
4721
+ funcName: '[method]iris-connection.get-inc',
4722
+ paramCount: 0,
4723
+ async: false,
4724
+ postReturn: false
4725
+ });
4726
+ task.resolve([ret]);
4727
+ task.exit();
4728
+ }
4729
+ _trampoline4.fnName = 'iris:ascot/imported#getInc';
4730
+ _trampoline4.manuallyAsync = true;
4731
+
4732
+ const _trampoline5 = async function(arg0, arg1, arg2, arg3) {
4733
+ var handle1 = arg0;
4734
+
4735
+ var rep2 = handleTable0[(handle1 << 1) + 1] & ~T_FLAG;
4736
+ var rsc0 = captureTable0.get(rep2);
4737
+ if (!rsc0) {
4738
+ rsc0 = Object.create(IrisConnection.prototype);
4739
+ Object.defineProperty(rsc0, symbolRscHandle, { writable: true, value: handle1});
4740
+ Object.defineProperty(rsc0, symbolRscRep, { writable: true, value: rep2});
4741
+ }
4742
+
4743
+ curResourceBorrows.push(rsc0);
4744
+ var ptr3 = (arg1 >>> 0) >>> 0;
4745
+ var len3 = arg2;
4746
+ var result3 = TEXT_DECODER_UTF8.decode(new Uint8Array(memory0.buffer, ptr3, len3));
4747
+ _debugLog('[iface="iris:ascot/imported", function="[method]iris-connection.get-int-or-mac"] [Instruction::CallInterface] (sync, @ enter)');
4748
+ const hostProvided = true;
4749
+
4750
+ let parentTask;
4751
+ let task;
4752
+ let subtask;
4753
+
4754
+ const createTask = () => {
4755
+ const results = createNewCurrentTask({
4756
+ componentIdx: -1,
4757
+ isAsync: false,
4758
+ entryFnName: 'getIntOrMac',
4759
+ getCallbackFn: () => null,
4760
+ callbackFnName: null,
4761
+ errHandling: 'none',
4762
+ callingWasmExport: false,
4763
+ });
4764
+ task = results[0];
4765
+ };
4766
+
4767
+ taskCreation: {
4768
+ parentTask = getCurrentTask(
4769
+ 0,
4770
+ _getGlobalCurrentTaskMeta(0)?.taskID,
4771
+ )?.task;
4772
+
4773
+ if (!parentTask) {
4774
+ createTask();
4775
+ break taskCreation;
4776
+ }
4777
+
4778
+ createTask();
4779
+
4780
+ if (hostProvided) {
4781
+ subtask = parentTask.getLatestSubtask();
4782
+ if (!subtask) {
4783
+ throw new Error(`Missing subtask (in parent task [${parentTask.id()}]) for host import, has the import been lowered? (ensure asyncImports are set properly)`);
4784
+ }
4785
+ task.setParentSubtask(subtask);
4786
+ }
4787
+ }
4788
+
4789
+
4790
+ const started = await task.enter({ isHost: hostProvided });
4791
+ if (!started) {
4792
+ _debugLog('[Instruction::CallInterface] failed to enter task', {
4793
+ taskID: task.id(),
4794
+ subtaskID: task.getParentSubtask()?.id(),
4795
+ });
4796
+ throw new Error("failed to enter task");
4797
+ }
4798
+
4799
+ let ret;
4800
+
4801
+
4802
+ try {
4803
+ ret = await _withGlobalCurrentTaskMetaAsync({
4804
+ componentIdx: task.componentIdx(),
4805
+ taskID: task.id(),
4806
+ fn: () => _trackHostOperation(() => {
4807
+ const hostRet = rsc0.getIntOrMac(result3);
4808
+ subtask?.setHostPendingResult(hostRet);
4809
+ return hostRet;
4810
+ }),
4811
+ })
4812
+ ;
4813
+ } catch (err) {
4814
+
4815
+ _debugLog('[Instruction::CallInterface] error during async call', {
4816
+ taskID: task.id(),
4817
+ subtaskID: task.getParentSubtask()?.id(),
4818
+ err,
4819
+ });
4820
+ getOrCreateAsyncState(0).markTrapped(err);
4821
+ task.setErrored(err);
4822
+ task.reject(err);
4823
+ task.exit();
4824
+ return task.completionPromise();
4825
+
4826
+ }
4827
+
4828
+ for (const entry of curResourceBorrows) {
4829
+ const rsc = entry.rsc ?? entry;
4830
+ if (entry.drop) {
4831
+ if (rsc[symbolRscHandle]) {
4832
+ entry.drop(rsc[symbolRscHandle]);
4833
+ }
4834
+ }
4835
+ rsc[symbolRscHandle] = undefined;
4836
+ }
4837
+ curResourceBorrows = [];
4838
+ var variant9 = ret;
4839
+ switch (variant9.tag) {
4840
+ case 'none': {
4841
+ dataView(memory0).setInt8(((arg3 >>> 0)) + 0, 0, true);
4842
+
4843
+ break;
4844
+ }
4845
+ case 'some': {
4846
+ const e = variant9.val;
4847
+ dataView(memory0).setInt8(((arg3 >>> 0)) + 0, 1, true);
4848
+ var variant8 = e;
4849
+ if (variant8 === null || variant8=== undefined) {
4850
+ dataView(memory0).setInt8(((arg3 >>> 0)) + 4, 0, true);
4851
+ } else {
4852
+ const e = variant8;
4853
+ dataView(memory0).setInt8(((arg3 >>> 0)) + 4, 1, true);
4854
+ var {text: v4_0, uri: v4_1 } = e;
4855
+
4856
+ var encodeRes = _utf8AllocateAndEncode(v4_0, realloc0, memory0);
4857
+ var ptr5= encodeRes.ptr;
4858
+ var len5 = encodeRes.len;
4859
+
4860
+ dataView(memory0).setUint32(((arg3 >>> 0)) + 12, len5, true);
4861
+ dataView(memory0).setUint32(((arg3 >>> 0)) + 8, ptr5, true);
4862
+ var variant7 = v4_1;
4863
+ if (variant7 === null || variant7=== undefined) {
4864
+ dataView(memory0).setInt8(((arg3 >>> 0)) + 16, 0, true);
4865
+ } else {
4866
+ const e = variant7;
4867
+ dataView(memory0).setInt8(((arg3 >>> 0)) + 16, 1, true);
4868
+
4869
+ var encodeRes = _utf8AllocateAndEncode(e, realloc0, memory0);
4870
+ var ptr6= encodeRes.ptr;
4871
+ var len6 = encodeRes.len;
4872
+
4873
+ dataView(memory0).setUint32(((arg3 >>> 0)) + 24, len6, true);
4874
+ dataView(memory0).setUint32(((arg3 >>> 0)) + 20, ptr6, true);
4875
+ }
4876
+ }
4877
+
4878
+ break;
4879
+ }
4880
+ default: {
4881
+ _debugLog("ERROR: invalid value (expected option as object with 'tag' member)", { value: variant9, valueType: typeof variant9});
4882
+ throw new TypeError('invalid variant specified for option');
4883
+ }
4884
+ }
4885
+ _debugLog('[iface="iris:ascot/imported", function="[method]iris-connection.get-int-or-mac"][Instruction::Return]', {
4886
+ funcName: '[method]iris-connection.get-int-or-mac',
4887
4887
  paramCount: 0,
4888
4888
  async: false,
4889
4889
  postReturn: false
@@ -4891,7 +4891,7 @@ export function instantiate(getCoreModule, imports, instantiateCore = WebAssembl
4891
4891
  task.resolve([ret]);
4892
4892
  task.exit();
4893
4893
  }
4894
- _trampoline5.fnName = 'iris:ascot/imported#getInc';
4894
+ _trampoline5.fnName = 'iris:ascot/imported#getIntOrMac';
4895
4895
  _trampoline5.manuallyAsync = true;
4896
4896
  let exports2;
4897
4897
  let postReturn0;
@@ -21817,119 +21817,6 @@ export function instantiate(getCoreModule, imports, instantiateCore = WebAssembl
21817
21817
  isManualAsync: _trampoline3.manuallyAsync,
21818
21818
  paramLiftFns: [_liftFlatBorrow.bind(null, 0),_liftFlatStringAny],
21819
21819
  resultLowerFns: [
21820
- _lowerFlatOption({
21821
- caseMetas: [
21822
- [ 'none', null, 0, 0, 0 ],
21823
- [ 'some',
21824
- _lowerFlatOption({
21825
- caseMetas: [
21826
- [ 'none', null, 0, 0, 0 ],
21827
- [ 'some', _lowerFlatRecord({ fieldMetas: [['text', _lowerFlatStringAny, 8, 4 ],['uri',
21828
- _lowerFlatOption({
21829
- caseMetas: [
21830
- [ 'none', null, 0, 0, 0 ],
21831
- [ 'some', _lowerFlatStringAny, 8, 4, 2],
21832
- ],
21833
- variantSize32: 12,
21834
- variantAlign32: 4,
21835
- variantPayloadOffset32: 4,
21836
- variantFlatCount: 3,
21837
- payloadMaybeNull: false,
21838
- })
21839
- , 12, 4 ],], size32: 20, align32: 4 }), 20, 4, 5],
21840
- ],
21841
- variantSize32: 24,
21842
- variantAlign32: 4,
21843
- variantPayloadOffset32: 4,
21844
- variantFlatCount: 6,
21845
- payloadMaybeNull: false,
21846
- })
21847
- , 24, 4, 6],
21848
- ],
21849
- variantSize32: 28,
21850
- variantAlign32: 4,
21851
- variantPayloadOffset32: 4,
21852
- variantFlatCount: 7,
21853
- payloadMaybeNull: true,
21854
- })
21855
- ],
21856
- hasResultPointer: true,
21857
- funcTypeIsAsync: false,
21858
- getCallbackFn: () => null,
21859
- getPostReturnFn: () => null,
21860
- isCancellable: false,
21861
- memoryIdx: 0,
21862
- stringEncoding: 'utf8',
21863
- getMemoryFn: () => memory0,
21864
- getReallocFn: () => realloc0,
21865
- importFn: _trampoline3,
21866
- },
21867
- ))) : _lowerImportBackwardsCompat.bind(
21868
- null,
21869
- {
21870
- trampolineIdx: 3,
21871
- componentIdx: 0,
21872
- isAsync: false,
21873
- isManualAsync: _trampoline3.manuallyAsync,
21874
- paramLiftFns: [_liftFlatBorrow.bind(null, 0),_liftFlatStringAny],
21875
- resultLowerFns: [
21876
- _lowerFlatOption({
21877
- caseMetas: [
21878
- [ 'none', null, 0, 0, 0 ],
21879
- [ 'some',
21880
- _lowerFlatOption({
21881
- caseMetas: [
21882
- [ 'none', null, 0, 0, 0 ],
21883
- [ 'some', _lowerFlatRecord({ fieldMetas: [['text', _lowerFlatStringAny, 8, 4 ],['uri',
21884
- _lowerFlatOption({
21885
- caseMetas: [
21886
- [ 'none', null, 0, 0, 0 ],
21887
- [ 'some', _lowerFlatStringAny, 8, 4, 2],
21888
- ],
21889
- variantSize32: 12,
21890
- variantAlign32: 4,
21891
- variantPayloadOffset32: 4,
21892
- variantFlatCount: 3,
21893
- payloadMaybeNull: false,
21894
- })
21895
- , 12, 4 ],], size32: 20, align32: 4 }), 20, 4, 5],
21896
- ],
21897
- variantSize32: 24,
21898
- variantAlign32: 4,
21899
- variantPayloadOffset32: 4,
21900
- variantFlatCount: 6,
21901
- payloadMaybeNull: false,
21902
- })
21903
- , 24, 4, 6],
21904
- ],
21905
- variantSize32: 28,
21906
- variantAlign32: 4,
21907
- variantPayloadOffset32: 4,
21908
- variantFlatCount: 7,
21909
- payloadMaybeNull: true,
21910
- })
21911
- ],
21912
- hasResultPointer: true,
21913
- funcTypeIsAsync: false,
21914
- getCallbackFn: () => null,
21915
- getPostReturnFn: () => null,
21916
- isCancellable: false,
21917
- memoryIdx: 0,
21918
- stringEncoding: 'utf8',
21919
- getMemoryFn: () => memory0,
21920
- getReallocFn: () => realloc0,
21921
- importFn: _trampoline3,
21922
- },
21923
- );
21924
- let trampoline4 = _trampoline4.manuallyAsync ? new WebAssembly.Suspending(_suspendingImport(0, _lowerImportBackwardsCompat.bind(
21925
- null,
21926
- {
21927
- trampolineIdx: 4,
21928
- componentIdx: 0,
21929
- isAsync: false,
21930
- isManualAsync: _trampoline4.manuallyAsync,
21931
- paramLiftFns: [_liftFlatBorrow.bind(null, 0),_liftFlatStringAny],
21932
- resultLowerFns: [
21933
21820
  _lowerFlatOption({
21934
21821
  caseMetas: [
21935
21822
  [ 'none', null, 0, 0, 0 ],
@@ -22473,15 +22360,15 @@ export function instantiate(getCoreModule, imports, instantiateCore = WebAssembl
22473
22360
  stringEncoding: 'utf8',
22474
22361
  getMemoryFn: () => memory0,
22475
22362
  getReallocFn: () => realloc0,
22476
- importFn: _trampoline4,
22363
+ importFn: _trampoline3,
22477
22364
  },
22478
22365
  ))) : _lowerImportBackwardsCompat.bind(
22479
22366
  null,
22480
22367
  {
22481
- trampolineIdx: 4,
22368
+ trampolineIdx: 3,
22482
22369
  componentIdx: 0,
22483
22370
  isAsync: false,
22484
- isManualAsync: _trampoline4.manuallyAsync,
22371
+ isManualAsync: _trampoline3.manuallyAsync,
22485
22372
  paramLiftFns: [_liftFlatBorrow.bind(null, 0),_liftFlatStringAny],
22486
22373
  resultLowerFns: [
22487
22374
  _lowerFlatOption({
@@ -23027,16 +22914,16 @@ export function instantiate(getCoreModule, imports, instantiateCore = WebAssembl
23027
22914
  stringEncoding: 'utf8',
23028
22915
  getMemoryFn: () => memory0,
23029
22916
  getReallocFn: () => realloc0,
23030
- importFn: _trampoline4,
22917
+ importFn: _trampoline3,
23031
22918
  },
23032
22919
  );
23033
- let trampoline5 = _trampoline5.manuallyAsync ? new WebAssembly.Suspending(_suspendingImport(0, _lowerImportBackwardsCompat.bind(
22920
+ let trampoline4 = _trampoline4.manuallyAsync ? new WebAssembly.Suspending(_suspendingImport(0, _lowerImportBackwardsCompat.bind(
23034
22921
  null,
23035
22922
  {
23036
- trampolineIdx: 5,
22923
+ trampolineIdx: 4,
23037
22924
  componentIdx: 0,
23038
22925
  isAsync: false,
23039
- isManualAsync: _trampoline5.manuallyAsync,
22926
+ isManualAsync: _trampoline4.manuallyAsync,
23040
22927
  paramLiftFns: [_liftFlatBorrow.bind(null, 0),_liftFlatStringAny],
23041
22928
  resultLowerFns: [
23042
22929
  _lowerFlatOption({
@@ -23072,15 +22959,15 @@ export function instantiate(getCoreModule, imports, instantiateCore = WebAssembl
23072
22959
  stringEncoding: 'utf8',
23073
22960
  getMemoryFn: () => memory0,
23074
22961
  getReallocFn: () => realloc0,
23075
- importFn: _trampoline5,
22962
+ importFn: _trampoline4,
23076
22963
  },
23077
22964
  ))) : _lowerImportBackwardsCompat.bind(
23078
22965
  null,
23079
22966
  {
23080
- trampolineIdx: 5,
22967
+ trampolineIdx: 4,
23081
22968
  componentIdx: 0,
23082
22969
  isAsync: false,
23083
- isManualAsync: _trampoline5.manuallyAsync,
22970
+ isManualAsync: _trampoline4.manuallyAsync,
23084
22971
  paramLiftFns: [_liftFlatBorrow.bind(null, 0),_liftFlatStringAny],
23085
22972
  resultLowerFns: [
23086
22973
  _lowerFlatOption({
@@ -23116,6 +23003,119 @@ export function instantiate(getCoreModule, imports, instantiateCore = WebAssembl
23116
23003
  stringEncoding: 'utf8',
23117
23004
  getMemoryFn: () => memory0,
23118
23005
  getReallocFn: () => realloc0,
23006
+ importFn: _trampoline4,
23007
+ },
23008
+ );
23009
+ let trampoline5 = _trampoline5.manuallyAsync ? new WebAssembly.Suspending(_suspendingImport(0, _lowerImportBackwardsCompat.bind(
23010
+ null,
23011
+ {
23012
+ trampolineIdx: 5,
23013
+ componentIdx: 0,
23014
+ isAsync: false,
23015
+ isManualAsync: _trampoline5.manuallyAsync,
23016
+ paramLiftFns: [_liftFlatBorrow.bind(null, 0),_liftFlatStringAny],
23017
+ resultLowerFns: [
23018
+ _lowerFlatOption({
23019
+ caseMetas: [
23020
+ [ 'none', null, 0, 0, 0 ],
23021
+ [ 'some',
23022
+ _lowerFlatOption({
23023
+ caseMetas: [
23024
+ [ 'none', null, 0, 0, 0 ],
23025
+ [ 'some', _lowerFlatRecord({ fieldMetas: [['text', _lowerFlatStringAny, 8, 4 ],['uri',
23026
+ _lowerFlatOption({
23027
+ caseMetas: [
23028
+ [ 'none', null, 0, 0, 0 ],
23029
+ [ 'some', _lowerFlatStringAny, 8, 4, 2],
23030
+ ],
23031
+ variantSize32: 12,
23032
+ variantAlign32: 4,
23033
+ variantPayloadOffset32: 4,
23034
+ variantFlatCount: 3,
23035
+ payloadMaybeNull: false,
23036
+ })
23037
+ , 12, 4 ],], size32: 20, align32: 4 }), 20, 4, 5],
23038
+ ],
23039
+ variantSize32: 24,
23040
+ variantAlign32: 4,
23041
+ variantPayloadOffset32: 4,
23042
+ variantFlatCount: 6,
23043
+ payloadMaybeNull: false,
23044
+ })
23045
+ , 24, 4, 6],
23046
+ ],
23047
+ variantSize32: 28,
23048
+ variantAlign32: 4,
23049
+ variantPayloadOffset32: 4,
23050
+ variantFlatCount: 7,
23051
+ payloadMaybeNull: true,
23052
+ })
23053
+ ],
23054
+ hasResultPointer: true,
23055
+ funcTypeIsAsync: false,
23056
+ getCallbackFn: () => null,
23057
+ getPostReturnFn: () => null,
23058
+ isCancellable: false,
23059
+ memoryIdx: 0,
23060
+ stringEncoding: 'utf8',
23061
+ getMemoryFn: () => memory0,
23062
+ getReallocFn: () => realloc0,
23063
+ importFn: _trampoline5,
23064
+ },
23065
+ ))) : _lowerImportBackwardsCompat.bind(
23066
+ null,
23067
+ {
23068
+ trampolineIdx: 5,
23069
+ componentIdx: 0,
23070
+ isAsync: false,
23071
+ isManualAsync: _trampoline5.manuallyAsync,
23072
+ paramLiftFns: [_liftFlatBorrow.bind(null, 0),_liftFlatStringAny],
23073
+ resultLowerFns: [
23074
+ _lowerFlatOption({
23075
+ caseMetas: [
23076
+ [ 'none', null, 0, 0, 0 ],
23077
+ [ 'some',
23078
+ _lowerFlatOption({
23079
+ caseMetas: [
23080
+ [ 'none', null, 0, 0, 0 ],
23081
+ [ 'some', _lowerFlatRecord({ fieldMetas: [['text', _lowerFlatStringAny, 8, 4 ],['uri',
23082
+ _lowerFlatOption({
23083
+ caseMetas: [
23084
+ [ 'none', null, 0, 0, 0 ],
23085
+ [ 'some', _lowerFlatStringAny, 8, 4, 2],
23086
+ ],
23087
+ variantSize32: 12,
23088
+ variantAlign32: 4,
23089
+ variantPayloadOffset32: 4,
23090
+ variantFlatCount: 3,
23091
+ payloadMaybeNull: false,
23092
+ })
23093
+ , 12, 4 ],], size32: 20, align32: 4 }), 20, 4, 5],
23094
+ ],
23095
+ variantSize32: 24,
23096
+ variantAlign32: 4,
23097
+ variantPayloadOffset32: 4,
23098
+ variantFlatCount: 6,
23099
+ payloadMaybeNull: false,
23100
+ })
23101
+ , 24, 4, 6],
23102
+ ],
23103
+ variantSize32: 28,
23104
+ variantAlign32: 4,
23105
+ variantPayloadOffset32: 4,
23106
+ variantFlatCount: 7,
23107
+ payloadMaybeNull: true,
23108
+ })
23109
+ ],
23110
+ hasResultPointer: true,
23111
+ funcTypeIsAsync: false,
23112
+ getCallbackFn: () => null,
23113
+ getPostReturnFn: () => null,
23114
+ isCancellable: false,
23115
+ memoryIdx: 0,
23116
+ stringEncoding: 'utf8',
23117
+ getMemoryFn: () => memory0,
23118
+ getReallocFn: () => realloc0,
23119
23119
  importFn: _trampoline5,
23120
23120
  },
23121
23121
  );
@@ -23127,9 +23127,9 @@ export function instantiate(getCoreModule, imports, instantiateCore = WebAssembl
23127
23127
  '[resource-new]workspace': Object.assign(_guardMayLeave(0, trampoline1), { _jcoMaySuspend: false }),
23128
23128
  },
23129
23129
  'iris:ascot/imported': {
23130
- '[method]iris-connection.get-cls': Object.assign(exports0['1'], { _jcoMaySuspend: false }),
23131
- '[method]iris-connection.get-inc': Object.assign(exports0['2'], { _jcoMaySuspend: false }),
23132
- '[method]iris-connection.get-int-or-mac': Object.assign(exports0['0'], { _jcoMaySuspend: false }),
23130
+ '[method]iris-connection.get-cls': Object.assign(exports0['0'], { _jcoMaySuspend: false }),
23131
+ '[method]iris-connection.get-inc': Object.assign(exports0['1'], { _jcoMaySuspend: false }),
23132
+ '[method]iris-connection.get-int-or-mac': Object.assign(exports0['2'], { _jcoMaySuspend: false }),
23133
23133
  '[resource-drop]iris-connection': Object.assign(_guardMayLeave(0, trampoline0), { _jcoMaySuspend: false }),
23134
23134
  },
23135
23135
  }));
@@ -1,8 +1,4 @@
1
1
  /** @module Interface iris:ascot/common **/
2
- export interface RoutineSource {
3
- text: string,
4
- uri?: string,
5
- }
6
2
  export interface Position {
7
3
  line: number,
8
4
  character: number,
@@ -147,6 +143,10 @@ export interface ClassInfo {
147
143
  isDatatype?: boolean,
148
144
  uri?: string,
149
145
  }
146
+ export interface RoutineSource {
147
+ text: string,
148
+ uri?: string,
149
+ }
150
150
  export interface Location {
151
151
  uri: string,
152
152
  range: Range,
@@ -1,6 +1,6 @@
1
1
  /** @module Interface iris:ascot/imported **/
2
- export type RoutineSource = import('./iris-ascot-common.js').RoutineSource;
3
2
  export type ClassInfo = import('./iris-ascot-common.js').ClassInfo;
3
+ export type RoutineSource = import('./iris-ascot-common.js').RoutineSource;
4
4
  export type Option<T> = { tag: 'none' } | { tag: 'some', val: T };
5
5
 
6
6
  export class IrisConnection {
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intersystems-community/ascot",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "ascot, a type checker and code intelligence engine for InterSystems ObjectScript, for Node and other JS consumers.",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "keywords": [