qsharp-lang 1.27.0 → 1.27.2-dev
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/README.md +5 -22
- package/dist/cancellation.js +3 -1
- package/dist/compiler/compiler.d.ts +1 -1
- package/dist/compiler/compiler.js +1 -0
- package/dist/compiler/events.d.ts +1 -1
- package/dist/compiler/events.js +4 -4
- package/dist/compiler/{worker-browser.js → worker.js} +3 -2
- package/dist/data-structures/legacyCircuitUpdate.js +1 -1
- package/dist/debug-service/debug-service.d.ts +2 -2
- package/dist/debug-service/debug-service.js +2 -0
- package/dist/debug-service/{worker-browser.js → worker.js} +3 -2
- package/dist/diagnostics.js +1 -0
- package/dist/language-service/language-service.d.ts +2 -2
- package/dist/language-service/language-service.js +4 -1
- package/dist/language-service/{worker-browser.js → worker.js} +3 -2
- package/dist/main.d.ts +33 -11
- package/dist/main.js +115 -31
- package/dist/node.d.ts +1 -0
- package/dist/node.js +10 -0
- package/dist/project.js +1 -0
- package/dist/utils.js +2 -2
- package/dist/workers/{browser.d.ts → main.d.ts} +3 -10
- package/dist/workers/{common.js → main.js} +40 -139
- package/dist/workers/{common.d.ts → types.d.ts} +3 -26
- package/dist/workers/types.js +3 -0
- package/dist/workers/worker.d.ts +9 -0
- package/dist/workers/worker.js +176 -0
- package/docs/Microsoft.Quantum.Core/IsRangeEmpty.md +1 -1
- package/docs/Microsoft.Quantum.Core/Length.md +1 -1
- package/docs/Microsoft.Quantum.Core/RangeEnd.md +1 -1
- package/docs/Microsoft.Quantum.Core/RangeStart.md +1 -1
- package/docs/Microsoft.Quantum.Core/Repeated.md +1 -1
- package/docs/Microsoft.Quantum.Core/index.md +1 -1
- package/docs/Std.Arithmetic/AddLE.md +1 -1
- package/docs/Std.Arithmetic/ApplyIfEqualL.md +1 -1
- package/docs/Std.Arithmetic/ApplyIfEqualLE.md +1 -1
- package/docs/Std.Arithmetic/ApplyIfGreaterL.md +1 -1
- package/docs/Std.Arithmetic/ApplyIfGreaterLE.md +1 -1
- package/docs/Std.Arithmetic/ApplyIfGreaterOrEqualL.md +1 -1
- package/docs/Std.Arithmetic/ApplyIfGreaterOrEqualLE.md +1 -1
- package/docs/Std.Arithmetic/ApplyIfLessL.md +1 -1
- package/docs/Std.Arithmetic/ApplyIfLessLE.md +1 -1
- package/docs/Std.Arithmetic/ApplyIfLessOrEqualL.md +1 -1
- package/docs/Std.Arithmetic/ApplyIfLessOrEqualLE.md +1 -1
- package/docs/Std.Arithmetic/FourierTDIncByLE.md +1 -1
- package/docs/Std.Arithmetic/IncByI.md +1 -1
- package/docs/Std.Arithmetic/IncByIUsingIncByLE.md +1 -1
- package/docs/Std.Arithmetic/IncByL.md +1 -1
- package/docs/Std.Arithmetic/IncByLE.md +1 -1
- package/docs/Std.Arithmetic/IncByLEUsingAddLE.md +1 -1
- package/docs/Std.Arithmetic/IncByLUsingIncByLE.md +1 -1
- package/docs/Std.Arithmetic/LookAheadDKRSAddLE.md +1 -1
- package/docs/Std.Arithmetic/MAJ.md +1 -1
- package/docs/Std.Arithmetic/ReflectAboutInteger.md +1 -1
- package/docs/Std.Arithmetic/RippleCarryCGAddLE.md +1 -1
- package/docs/Std.Arithmetic/RippleCarryCGIncByLE.md +1 -1
- package/docs/Std.Arithmetic/RippleCarryTTKIncByLE.md +1 -1
- package/docs/Std.Arithmetic/index.md +1 -1
- package/docs/Std.Arrays/All.md +1 -1
- package/docs/Std.Arrays/Any.md +1 -1
- package/docs/Std.Arrays/Chunks.md +1 -1
- package/docs/Std.Arrays/CircularlyShifted.md +1 -1
- package/docs/Std.Arrays/ColumnAt.md +1 -1
- package/docs/Std.Arrays/Count.md +1 -1
- package/docs/Std.Arrays/Diagonal.md +1 -1
- package/docs/Std.Arrays/DrawMany.md +1 -1
- package/docs/Std.Arrays/Enumerated.md +1 -1
- package/docs/Std.Arrays/Excluding.md +1 -1
- package/docs/Std.Arrays/Filtered.md +1 -1
- package/docs/Std.Arrays/FlatMapped.md +1 -1
- package/docs/Std.Arrays/Flattened.md +1 -1
- package/docs/Std.Arrays/Fold.md +1 -1
- package/docs/Std.Arrays/ForEach.md +1 -1
- package/docs/Std.Arrays/Head.md +1 -1
- package/docs/Std.Arrays/HeadAndRest.md +1 -1
- package/docs/Std.Arrays/IndexOf.md +1 -1
- package/docs/Std.Arrays/IndexRange.md +1 -1
- package/docs/Std.Arrays/Interleaved.md +1 -1
- package/docs/Std.Arrays/IsEmpty.md +1 -1
- package/docs/Std.Arrays/IsRectangularArray.md +1 -1
- package/docs/Std.Arrays/IsSorted.md +1 -1
- package/docs/Std.Arrays/IsSquareArray.md +1 -1
- package/docs/Std.Arrays/Mapped.md +1 -1
- package/docs/Std.Arrays/MappedByIndex.md +1 -1
- package/docs/Std.Arrays/MappedOverRange.md +1 -1
- package/docs/Std.Arrays/Most.md +1 -1
- package/docs/Std.Arrays/MostAndTail.md +1 -1
- package/docs/Std.Arrays/Padded.md +1 -1
- package/docs/Std.Arrays/Partitioned.md +1 -1
- package/docs/Std.Arrays/Rest.md +1 -1
- package/docs/Std.Arrays/Reversed.md +1 -1
- package/docs/Std.Arrays/SequenceI.md +1 -1
- package/docs/Std.Arrays/SequenceL.md +1 -1
- package/docs/Std.Arrays/Sorted.md +1 -1
- package/docs/Std.Arrays/Subarray.md +1 -1
- package/docs/Std.Arrays/Swapped.md +1 -1
- package/docs/Std.Arrays/Tail.md +1 -1
- package/docs/Std.Arrays/Transposed.md +1 -1
- package/docs/Std.Arrays/Unzipped.md +1 -1
- package/docs/Std.Arrays/Where.md +1 -1
- package/docs/Std.Arrays/Windows.md +1 -1
- package/docs/Std.Arrays/Zipped.md +1 -1
- package/docs/Std.Arrays/index.md +1 -1
- package/docs/Std.Canon/ApplyCNOTChain.md +1 -1
- package/docs/Std.Canon/ApplyControlledOnBitString.md +1 -1
- package/docs/Std.Canon/ApplyControlledOnInt.md +1 -1
- package/docs/Std.Canon/ApplyOperationPowerA.md +1 -1
- package/docs/Std.Canon/ApplyOperationPowerCA.md +1 -1
- package/docs/Std.Canon/ApplyP.md +1 -1
- package/docs/Std.Canon/ApplyPauli.md +1 -1
- package/docs/Std.Canon/ApplyPauliFromBitString.md +1 -1
- package/docs/Std.Canon/ApplyPauliFromInt.md +1 -1
- package/docs/Std.Canon/ApplyQFT.md +1 -1
- package/docs/Std.Canon/ApplyQPE.md +1 -1
- package/docs/Std.Canon/ApplyToEach.md +1 -1
- package/docs/Std.Canon/ApplyToEachA.md +1 -1
- package/docs/Std.Canon/ApplyToEachC.md +1 -1
- package/docs/Std.Canon/ApplyToEachCA.md +1 -1
- package/docs/Std.Canon/ApplyXorInPlace.md +1 -1
- package/docs/Std.Canon/ApplyXorInPlaceL.md +1 -1
- package/docs/Std.Canon/CX.md +1 -1
- package/docs/Std.Canon/CY.md +1 -1
- package/docs/Std.Canon/CZ.md +1 -1
- package/docs/Std.Canon/Fst.md +1 -1
- package/docs/Std.Canon/MapPauliAxis.md +1 -1
- package/docs/Std.Canon/Relabel.md +1 -1
- package/docs/Std.Canon/Snd.md +1 -1
- package/docs/Std.Canon/SwapReverseRegister.md +1 -1
- package/docs/Std.Canon/index.md +1 -1
- package/docs/Std.Convert/BigIntAsBoolArray.md +1 -1
- package/docs/Std.Convert/BigIntAsInt.md +1 -1
- package/docs/Std.Convert/BoolArrayAsBigInt.md +1 -1
- package/docs/Std.Convert/BoolArrayAsInt.md +1 -1
- package/docs/Std.Convert/BoolArrayAsResultArray.md +1 -1
- package/docs/Std.Convert/BoolAsResult.md +1 -1
- package/docs/Std.Convert/ComplexAsComplexPolar.md +1 -1
- package/docs/Std.Convert/ComplexPolarAsComplex.md +1 -1
- package/docs/Std.Convert/DoubleAsStringWithPrecision.md +1 -1
- package/docs/Std.Convert/IntAsBigInt.md +1 -1
- package/docs/Std.Convert/IntAsBoolArray.md +1 -1
- package/docs/Std.Convert/IntAsDouble.md +1 -1
- package/docs/Std.Convert/ResultArrayAsBoolArray.md +1 -1
- package/docs/Std.Convert/ResultArrayAsInt.md +1 -1
- package/docs/Std.Convert/ResultAsBool.md +1 -1
- package/docs/Std.Convert/index.md +1 -1
- package/docs/Std.Core/Complex.md +1 -1
- package/docs/Std.Core/Length.md +1 -1
- package/docs/Std.Core/Repeated.md +1 -1
- package/docs/Std.Core/index.md +1 -1
- package/docs/Std.Diagnostics/ApplyIdleNoise.md +1 -1
- package/docs/Std.Diagnostics/BitFlipNoise.md +1 -1
- package/docs/Std.Diagnostics/CheckAllZero.md +1 -1
- package/docs/Std.Diagnostics/CheckOperationsAreEqual.md +1 -1
- package/docs/Std.Diagnostics/CheckZero.md +1 -1
- package/docs/Std.Diagnostics/ConfigurePauliNoise.md +1 -1
- package/docs/Std.Diagnostics/ConfigureQubitLoss.md +1 -1
- package/docs/Std.Diagnostics/DepolarizingNoise.md +1 -1
- package/docs/Std.Diagnostics/DumpMachine.md +1 -1
- package/docs/Std.Diagnostics/DumpOperation.md +1 -1
- package/docs/Std.Diagnostics/DumpRegister.md +1 -1
- package/docs/Std.Diagnostics/Fact.md +5 -5
- package/docs/Std.Diagnostics/NoNoise.md +1 -1
- package/docs/Std.Diagnostics/PhaseFlipNoise.md +1 -1
- package/docs/Std.Diagnostics/PostSelectZ.md +1 -1
- package/docs/Std.Diagnostics/StartCountingFunction.md +1 -1
- package/docs/Std.Diagnostics/StartCountingOperation.md +1 -1
- package/docs/Std.Diagnostics/StartCountingQubits.md +1 -1
- package/docs/Std.Diagnostics/StopCountingFunction.md +1 -1
- package/docs/Std.Diagnostics/StopCountingOperation.md +1 -1
- package/docs/Std.Diagnostics/StopCountingQubits.md +1 -1
- package/docs/Std.Diagnostics/index.md +2 -2
- package/docs/Std.Intrinsic/AND.md +1 -1
- package/docs/Std.Intrinsic/ApplyUnitary.md +1 -1
- package/docs/Std.Intrinsic/CCNOT.md +1 -1
- package/docs/Std.Intrinsic/CNOT.md +1 -1
- package/docs/Std.Intrinsic/Exp.md +1 -1
- package/docs/Std.Intrinsic/H.md +1 -1
- package/docs/Std.Intrinsic/I.md +1 -1
- package/docs/Std.Intrinsic/M.md +1 -1
- package/docs/Std.Intrinsic/Measure.md +1 -1
- package/docs/Std.Intrinsic/Message.md +1 -1
- package/docs/Std.Intrinsic/R.md +1 -1
- package/docs/Std.Intrinsic/R1.md +1 -1
- package/docs/Std.Intrinsic/R1Frac.md +1 -1
- package/docs/Std.Intrinsic/RFrac.md +1 -1
- package/docs/Std.Intrinsic/Reset.md +1 -1
- package/docs/Std.Intrinsic/ResetAll.md +1 -1
- package/docs/Std.Intrinsic/Rx.md +1 -1
- package/docs/Std.Intrinsic/Rxx.md +1 -1
- package/docs/Std.Intrinsic/Ry.md +1 -1
- package/docs/Std.Intrinsic/Ryy.md +1 -1
- package/docs/Std.Intrinsic/Rz.md +1 -1
- package/docs/Std.Intrinsic/Rzz.md +1 -1
- package/docs/Std.Intrinsic/S.md +1 -1
- package/docs/Std.Intrinsic/SWAP.md +1 -1
- package/docs/Std.Intrinsic/SX.md +1 -1
- package/docs/Std.Intrinsic/T.md +1 -1
- package/docs/Std.Intrinsic/X.md +1 -1
- package/docs/Std.Intrinsic/Y.md +1 -1
- package/docs/Std.Intrinsic/Z.md +1 -1
- package/docs/Std.Intrinsic/index.md +1 -1
- package/docs/Std.Logical/Xor.md +1 -1
- package/docs/Std.Logical/index.md +1 -1
- package/docs/Std.Math/AbsComplex.md +1 -1
- package/docs/Std.Math/AbsComplexPolar.md +1 -1
- package/docs/Std.Math/AbsD.md +1 -1
- package/docs/Std.Math/AbsI.md +1 -1
- package/docs/Std.Math/AbsL.md +1 -1
- package/docs/Std.Math/AbsSquaredComplex.md +1 -1
- package/docs/Std.Math/AbsSquaredComplexPolar.md +1 -1
- package/docs/Std.Math/ApproximateFactorial.md +1 -1
- package/docs/Std.Math/ArcCos.md +1 -1
- package/docs/Std.Math/ArcCosh.md +1 -1
- package/docs/Std.Math/ArcSin.md +1 -1
- package/docs/Std.Math/ArcSinh.md +1 -1
- package/docs/Std.Math/ArcTan.md +1 -1
- package/docs/Std.Math/ArcTan2.md +1 -1
- package/docs/Std.Math/ArcTanh.md +1 -1
- package/docs/Std.Math/ArgComplex.md +1 -1
- package/docs/Std.Math/ArgComplexPolar.md +1 -1
- package/docs/Std.Math/Binom.md +1 -1
- package/docs/Std.Math/BitSizeI.md +1 -1
- package/docs/Std.Math/BitSizeL.md +1 -1
- package/docs/Std.Math/Ceiling.md +1 -1
- package/docs/Std.Math/Complex.md +1 -1
- package/docs/Std.Math/ComplexPolar.md +1 -1
- package/docs/Std.Math/ContinuedFractionConvergentI.md +1 -1
- package/docs/Std.Math/ContinuedFractionConvergentL.md +1 -1
- package/docs/Std.Math/Cos.md +1 -1
- package/docs/Std.Math/Cosh.md +1 -1
- package/docs/Std.Math/DivRemI.md +1 -1
- package/docs/Std.Math/DivRemL.md +1 -1
- package/docs/Std.Math/DividedByC.md +1 -1
- package/docs/Std.Math/DividedByCP.md +1 -1
- package/docs/Std.Math/E.md +1 -1
- package/docs/Std.Math/ExpModI.md +1 -1
- package/docs/Std.Math/ExpModL.md +1 -1
- package/docs/Std.Math/ExtendedGreatestCommonDivisorI.md +1 -1
- package/docs/Std.Math/ExtendedGreatestCommonDivisorL.md +1 -1
- package/docs/Std.Math/FactorialI.md +1 -1
- package/docs/Std.Math/FactorialL.md +1 -1
- package/docs/Std.Math/Floor.md +1 -1
- package/docs/Std.Math/GreatestCommonDivisorI.md +1 -1
- package/docs/Std.Math/GreatestCommonDivisorL.md +1 -1
- package/docs/Std.Math/HammingWeightI.md +1 -1
- package/docs/Std.Math/InverseModI.md +1 -1
- package/docs/Std.Math/InverseModL.md +1 -1
- package/docs/Std.Math/IsCoprimeI.md +1 -1
- package/docs/Std.Math/IsCoprimeL.md +1 -1
- package/docs/Std.Math/IsInfinite.md +1 -1
- package/docs/Std.Math/IsNaN.md +1 -1
- package/docs/Std.Math/LargestFixedPoint.md +1 -1
- package/docs/Std.Math/Lg.md +1 -1
- package/docs/Std.Math/Log.md +1 -1
- package/docs/Std.Math/Log10.md +1 -1
- package/docs/Std.Math/LogFactorialD.md +1 -1
- package/docs/Std.Math/LogGammaD.md +1 -1
- package/docs/Std.Math/LogOf2.md +1 -1
- package/docs/Std.Math/Max.md +1 -1
- package/docs/Std.Math/MaxD.md +1 -1
- package/docs/Std.Math/MaxI.md +1 -1
- package/docs/Std.Math/MaxL.md +1 -1
- package/docs/Std.Math/Min.md +1 -1
- package/docs/Std.Math/MinD.md +1 -1
- package/docs/Std.Math/MinI.md +1 -1
- package/docs/Std.Math/MinL.md +1 -1
- package/docs/Std.Math/MinusC.md +1 -1
- package/docs/Std.Math/MinusCP.md +1 -1
- package/docs/Std.Math/ModulusI.md +1 -1
- package/docs/Std.Math/ModulusL.md +1 -1
- package/docs/Std.Math/NegationC.md +1 -1
- package/docs/Std.Math/NegationCP.md +1 -1
- package/docs/Std.Math/PI.md +1 -1
- package/docs/Std.Math/PNorm.md +1 -1
- package/docs/Std.Math/PNormalized.md +1 -1
- package/docs/Std.Math/PlusC.md +1 -1
- package/docs/Std.Math/PlusCP.md +1 -1
- package/docs/Std.Math/PowC.md +1 -1
- package/docs/Std.Math/PowCP.md +1 -1
- package/docs/Std.Math/RealMod.md +1 -1
- package/docs/Std.Math/Round.md +1 -1
- package/docs/Std.Math/RoundHalfAwayFromZero.md +1 -1
- package/docs/Std.Math/SignD.md +1 -1
- package/docs/Std.Math/SignI.md +1 -1
- package/docs/Std.Math/SignL.md +1 -1
- package/docs/Std.Math/Sin.md +1 -1
- package/docs/Std.Math/Sinh.md +1 -1
- package/docs/Std.Math/SmallestFixedPoint.md +1 -1
- package/docs/Std.Math/Sqrt.md +1 -1
- package/docs/Std.Math/SquaredNorm.md +1 -1
- package/docs/Std.Math/Tan.md +1 -1
- package/docs/Std.Math/Tanh.md +1 -1
- package/docs/Std.Math/TimesC.md +1 -1
- package/docs/Std.Math/TimesCP.md +1 -1
- package/docs/Std.Math/TrailingZeroCountI.md +1 -1
- package/docs/Std.Math/TrailingZeroCountL.md +1 -1
- package/docs/Std.Math/Truncate.md +1 -1
- package/docs/Std.Math/index.md +1 -1
- package/docs/Std.Measurement/IsLossResult.md +1 -1
- package/docs/Std.Measurement/MResetEachZ.md +1 -1
- package/docs/Std.Measurement/MResetX.md +1 -1
- package/docs/Std.Measurement/MResetY.md +1 -1
- package/docs/Std.Measurement/MResetZ.md +1 -1
- package/docs/Std.Measurement/MResetZChecked.md +1 -1
- package/docs/Std.Measurement/MeasureAllZ.md +1 -1
- package/docs/Std.Measurement/MeasureEachZ.md +1 -1
- package/docs/Std.Measurement/MeasureInteger.md +1 -1
- package/docs/Std.Measurement/index.md +1 -1
- package/docs/Std.Random/DrawRandomBool.md +1 -1
- package/docs/Std.Random/DrawRandomDouble.md +1 -1
- package/docs/Std.Random/DrawRandomInt.md +1 -1
- package/docs/Std.Random/index.md +1 -1
- package/docs/Std.Range/IsRangeEmpty.md +1 -1
- package/docs/Std.Range/RangeEnd.md +1 -1
- package/docs/Std.Range/RangeReverse.md +1 -1
- package/docs/Std.Range/RangeStart.md +1 -1
- package/docs/Std.Range/RangeStep.md +1 -1
- package/docs/Std.Range/index.md +1 -1
- package/docs/Std.ResourceEstimation/AccountForEstimates.md +1 -1
- package/docs/Std.ResourceEstimation/AuxQubitCount.md +1 -1
- package/docs/Std.ResourceEstimation/BeginEstimateCaching.md +1 -1
- package/docs/Std.ResourceEstimation/BeginRepeatEstimates.md +1 -1
- package/docs/Std.ResourceEstimation/CczCount.md +1 -1
- package/docs/Std.ResourceEstimation/EnableMemoryComputeArchitecture.md +1 -1
- package/docs/Std.ResourceEstimation/EndEstimateCaching.md +1 -1
- package/docs/Std.ResourceEstimation/EndRepeatEstimates.md +1 -1
- package/docs/Std.ResourceEstimation/LeastFrequentlyUsed.md +1 -1
- package/docs/Std.ResourceEstimation/LeastRecentlyUsed.md +1 -1
- package/docs/Std.ResourceEstimation/MeasurementCount.md +1 -1
- package/docs/Std.ResourceEstimation/PSSPCLayout.md +1 -1
- package/docs/Std.ResourceEstimation/RepeatEstimates.md +1 -1
- package/docs/Std.ResourceEstimation/RotationCount.md +1 -1
- package/docs/Std.ResourceEstimation/RotationDepth.md +1 -1
- package/docs/Std.ResourceEstimation/SingleVariant.md +1 -1
- package/docs/Std.ResourceEstimation/TCount.md +1 -1
- package/docs/Std.ResourceEstimation/index.md +1 -1
- package/docs/Std.StatePreparation/ApproximatelyPreparePureStateCP.md +1 -1
- package/docs/Std.StatePreparation/PreparePureStateD.md +1 -1
- package/docs/Std.StatePreparation/PrepareUniformSuperposition.md +1 -1
- package/docs/Std.StatePreparation/index.md +1 -1
- package/docs/Std.TableLookup/Select.md +1 -1
- package/docs/Std.TableLookup/index.md +1 -1
- package/docs/index.md +1 -1
- package/lib/web/qsc_wasm.d.ts +3 -3
- package/lib/web/qsc_wasm.js +6 -6
- package/lib/web/qsc_wasm_bg.wasm +0 -0
- package/package.json +11 -8
- package/ux/circuit-vis/draggable.ts +1 -1
- package/ux/circuit-vis/sqore.ts +2 -1
- package/ux/report.ts +1 -1
- package/ux/resultsTable.tsx +1 -2
- package/ux/saveImage.tsx +1 -2
- package/ux/tsconfig.json +3 -2
- package/dist/browser.d.ts +0 -32
- package/dist/browser.js +0 -126
- package/dist/compiler/worker-node.d.ts +0 -1
- package/dist/compiler/worker-node.js +0 -5
- package/dist/debug-service/worker-node.d.ts +0 -1
- package/dist/debug-service/worker-node.js +0 -5
- package/dist/language-service/worker-node.d.ts +0 -1
- package/dist/language-service/worker-node.js +0 -5
- package/dist/workers/browser.js +0 -67
- package/dist/workers/node.d.ts +0 -20
- package/dist/workers/node.js +0 -56
- package/lib/nodejs/qsc_wasm.cjs +0 -1614
- package/lib/nodejs/qsc_wasm.d.cts +0 -383
- package/lib/nodejs/qsc_wasm_bg.wasm +0 -0
- /package/dist/compiler/{worker-browser.d.ts → worker.d.ts} +0 -0
- /package/dist/debug-service/{worker-browser.d.ts → worker.d.ts} +0 -0
- /package/dist/language-service/{worker-browser.d.ts → worker.d.ts} +0 -0
package/lib/nodejs/qsc_wasm.cjs
DELETED
|
@@ -1,1614 +0,0 @@
|
|
|
1
|
-
/* @ts-self-types="./qsc_wasm.d.ts" */
|
|
2
|
-
|
|
3
|
-
class DebugService {
|
|
4
|
-
__destroy_into_raw() {
|
|
5
|
-
const ptr = this.__wbg_ptr;
|
|
6
|
-
this.__wbg_ptr = 0;
|
|
7
|
-
DebugServiceFinalization.unregister(this);
|
|
8
|
-
return ptr;
|
|
9
|
-
}
|
|
10
|
-
free() {
|
|
11
|
-
const ptr = this.__destroy_into_raw();
|
|
12
|
-
wasm.__wbg_debugservice_free(ptr, 0);
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* @returns {IQuantumStateList}
|
|
16
|
-
*/
|
|
17
|
-
capture_quantum_state() {
|
|
18
|
-
const ret = wasm.debugservice_capture_quantum_state(this.__wbg_ptr);
|
|
19
|
-
return takeObject(ret);
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* @param {Function} event_cb
|
|
23
|
-
* @param {Uint32Array} ids
|
|
24
|
-
* @returns {IStructStepResult}
|
|
25
|
-
*/
|
|
26
|
-
eval_continue(event_cb, ids) {
|
|
27
|
-
try {
|
|
28
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
29
|
-
const ptr0 = passArray32ToWasm0(ids, wasm.__wbindgen_export);
|
|
30
|
-
const len0 = WASM_VECTOR_LEN;
|
|
31
|
-
wasm.debugservice_eval_continue(retptr, this.__wbg_ptr, addBorrowedObject(event_cb), ptr0, len0);
|
|
32
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
33
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
34
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
35
|
-
if (r2) {
|
|
36
|
-
throw takeObject(r1);
|
|
37
|
-
}
|
|
38
|
-
return takeObject(r0);
|
|
39
|
-
} finally {
|
|
40
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
41
|
-
heap[stack_pointer++] = undefined;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* @param {Function} event_cb
|
|
46
|
-
* @param {Uint32Array} ids
|
|
47
|
-
* @returns {IStructStepResult}
|
|
48
|
-
*/
|
|
49
|
-
eval_next(event_cb, ids) {
|
|
50
|
-
try {
|
|
51
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
52
|
-
const ptr0 = passArray32ToWasm0(ids, wasm.__wbindgen_export);
|
|
53
|
-
const len0 = WASM_VECTOR_LEN;
|
|
54
|
-
wasm.debugservice_eval_next(retptr, this.__wbg_ptr, addBorrowedObject(event_cb), ptr0, len0);
|
|
55
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
56
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
57
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
58
|
-
if (r2) {
|
|
59
|
-
throw takeObject(r1);
|
|
60
|
-
}
|
|
61
|
-
return takeObject(r0);
|
|
62
|
-
} finally {
|
|
63
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
64
|
-
heap[stack_pointer++] = undefined;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* @param {Function} event_cb
|
|
69
|
-
* @param {Uint32Array} ids
|
|
70
|
-
* @returns {IStructStepResult}
|
|
71
|
-
*/
|
|
72
|
-
eval_step_in(event_cb, ids) {
|
|
73
|
-
try {
|
|
74
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
75
|
-
const ptr0 = passArray32ToWasm0(ids, wasm.__wbindgen_export);
|
|
76
|
-
const len0 = WASM_VECTOR_LEN;
|
|
77
|
-
wasm.debugservice_eval_step_in(retptr, this.__wbg_ptr, addBorrowedObject(event_cb), ptr0, len0);
|
|
78
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
79
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
80
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
81
|
-
if (r2) {
|
|
82
|
-
throw takeObject(r1);
|
|
83
|
-
}
|
|
84
|
-
return takeObject(r0);
|
|
85
|
-
} finally {
|
|
86
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
87
|
-
heap[stack_pointer++] = undefined;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* @param {Function} event_cb
|
|
92
|
-
* @param {Uint32Array} ids
|
|
93
|
-
* @returns {IStructStepResult}
|
|
94
|
-
*/
|
|
95
|
-
eval_step_out(event_cb, ids) {
|
|
96
|
-
try {
|
|
97
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
98
|
-
const ptr0 = passArray32ToWasm0(ids, wasm.__wbindgen_export);
|
|
99
|
-
const len0 = WASM_VECTOR_LEN;
|
|
100
|
-
wasm.debugservice_eval_step_out(retptr, this.__wbg_ptr, addBorrowedObject(event_cb), ptr0, len0);
|
|
101
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
102
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
103
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
104
|
-
if (r2) {
|
|
105
|
-
throw takeObject(r1);
|
|
106
|
-
}
|
|
107
|
-
return takeObject(r0);
|
|
108
|
-
} finally {
|
|
109
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
110
|
-
heap[stack_pointer++] = undefined;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* @param {string} path
|
|
115
|
-
* @returns {IBreakpointSpanList}
|
|
116
|
-
*/
|
|
117
|
-
get_breakpoints(path) {
|
|
118
|
-
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
119
|
-
const len0 = WASM_VECTOR_LEN;
|
|
120
|
-
const ret = wasm.debugservice_get_breakpoints(this.__wbg_ptr, ptr0, len0);
|
|
121
|
-
return takeObject(ret);
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* @returns {any}
|
|
125
|
-
*/
|
|
126
|
-
get_circuit() {
|
|
127
|
-
try {
|
|
128
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
129
|
-
wasm.debugservice_get_circuit(retptr, this.__wbg_ptr);
|
|
130
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
131
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
132
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
133
|
-
if (r2) {
|
|
134
|
-
throw takeObject(r1);
|
|
135
|
-
}
|
|
136
|
-
return takeObject(r0);
|
|
137
|
-
} finally {
|
|
138
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* @param {number} frame_id
|
|
143
|
-
* @returns {IVariableList}
|
|
144
|
-
*/
|
|
145
|
-
get_locals(frame_id) {
|
|
146
|
-
const ret = wasm.debugservice_get_locals(this.__wbg_ptr, frame_id);
|
|
147
|
-
return takeObject(ret);
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* @returns {IStackFrameList}
|
|
151
|
-
*/
|
|
152
|
-
get_stack_frames() {
|
|
153
|
-
const ret = wasm.debugservice_get_stack_frames(this.__wbg_ptr);
|
|
154
|
-
return takeObject(ret);
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* @param {IProgramConfig} program
|
|
158
|
-
* @param {string | null} [entry]
|
|
159
|
-
* @returns {string}
|
|
160
|
-
*/
|
|
161
|
-
load_program(program, entry) {
|
|
162
|
-
let deferred2_0;
|
|
163
|
-
let deferred2_1;
|
|
164
|
-
try {
|
|
165
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
166
|
-
var ptr0 = isLikeNone(entry) ? 0 : passStringToWasm0(entry, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
167
|
-
var len0 = WASM_VECTOR_LEN;
|
|
168
|
-
wasm.debugservice_load_program(retptr, this.__wbg_ptr, addHeapObject(program), ptr0, len0);
|
|
169
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
170
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
171
|
-
deferred2_0 = r0;
|
|
172
|
-
deferred2_1 = r1;
|
|
173
|
-
return getStringFromWasm0(r0, r1);
|
|
174
|
-
} finally {
|
|
175
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
176
|
-
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
constructor() {
|
|
180
|
-
const ret = wasm.debugservice_new();
|
|
181
|
-
this.__wbg_ptr = ret >>> 0;
|
|
182
|
-
DebugServiceFinalization.register(this, this.__wbg_ptr, this);
|
|
183
|
-
return this;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
if (Symbol.dispose) DebugService.prototype[Symbol.dispose] = DebugService.prototype.free;
|
|
187
|
-
exports.DebugService = DebugService;
|
|
188
|
-
|
|
189
|
-
class LanguageService {
|
|
190
|
-
__destroy_into_raw() {
|
|
191
|
-
const ptr = this.__wbg_ptr;
|
|
192
|
-
this.__wbg_ptr = 0;
|
|
193
|
-
LanguageServiceFinalization.unregister(this);
|
|
194
|
-
return ptr;
|
|
195
|
-
}
|
|
196
|
-
free() {
|
|
197
|
-
const ptr = this.__destroy_into_raw();
|
|
198
|
-
wasm.__wbg_languageservice_free(ptr, 0);
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* @param {string} uri
|
|
202
|
-
* @param {string} language_id
|
|
203
|
-
*/
|
|
204
|
-
close_document(uri, language_id) {
|
|
205
|
-
const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
206
|
-
const len0 = WASM_VECTOR_LEN;
|
|
207
|
-
const ptr1 = passStringToWasm0(language_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
208
|
-
const len1 = WASM_VECTOR_LEN;
|
|
209
|
-
wasm.languageservice_close_document(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
210
|
-
}
|
|
211
|
-
/**
|
|
212
|
-
* @param {string} notebook_uri
|
|
213
|
-
*/
|
|
214
|
-
close_notebook_document(notebook_uri) {
|
|
215
|
-
const ptr0 = passStringToWasm0(notebook_uri, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
216
|
-
const len0 = WASM_VECTOR_LEN;
|
|
217
|
-
wasm.languageservice_close_notebook_document(this.__wbg_ptr, ptr0, len0);
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* @param {string} uri
|
|
221
|
-
* @param {IRange} range
|
|
222
|
-
* @returns {ICodeAction[]}
|
|
223
|
-
*/
|
|
224
|
-
get_code_actions(uri, range) {
|
|
225
|
-
try {
|
|
226
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
227
|
-
const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
228
|
-
const len0 = WASM_VECTOR_LEN;
|
|
229
|
-
wasm.languageservice_get_code_actions(retptr, this.__wbg_ptr, ptr0, len0, addHeapObject(range));
|
|
230
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
231
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
232
|
-
var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
233
|
-
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
234
|
-
return v2;
|
|
235
|
-
} finally {
|
|
236
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
/**
|
|
240
|
-
* @param {string} uri
|
|
241
|
-
* @returns {ICodeLens[]}
|
|
242
|
-
*/
|
|
243
|
-
get_code_lenses(uri) {
|
|
244
|
-
try {
|
|
245
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
246
|
-
const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
247
|
-
const len0 = WASM_VECTOR_LEN;
|
|
248
|
-
wasm.languageservice_get_code_lenses(retptr, this.__wbg_ptr, ptr0, len0);
|
|
249
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
250
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
251
|
-
var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
252
|
-
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
253
|
-
return v2;
|
|
254
|
-
} finally {
|
|
255
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
/**
|
|
259
|
-
* @param {string} uri
|
|
260
|
-
* @param {IPosition} position
|
|
261
|
-
* @returns {ICompletionList}
|
|
262
|
-
*/
|
|
263
|
-
get_completions(uri, position) {
|
|
264
|
-
const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
265
|
-
const len0 = WASM_VECTOR_LEN;
|
|
266
|
-
const ret = wasm.languageservice_get_completions(this.__wbg_ptr, ptr0, len0, addHeapObject(position));
|
|
267
|
-
return takeObject(ret);
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* @param {string} uri
|
|
271
|
-
* @param {IPosition} position
|
|
272
|
-
* @returns {ILocation | undefined}
|
|
273
|
-
*/
|
|
274
|
-
get_definition(uri, position) {
|
|
275
|
-
const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
276
|
-
const len0 = WASM_VECTOR_LEN;
|
|
277
|
-
const ret = wasm.languageservice_get_definition(this.__wbg_ptr, ptr0, len0, addHeapObject(position));
|
|
278
|
-
return takeObject(ret);
|
|
279
|
-
}
|
|
280
|
-
/**
|
|
281
|
-
* @param {string} uri
|
|
282
|
-
* @returns {ITextEdit[]}
|
|
283
|
-
*/
|
|
284
|
-
get_format_changes(uri) {
|
|
285
|
-
try {
|
|
286
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
287
|
-
const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
288
|
-
const len0 = WASM_VECTOR_LEN;
|
|
289
|
-
wasm.languageservice_get_format_changes(retptr, this.__wbg_ptr, ptr0, len0);
|
|
290
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
291
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
292
|
-
var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
293
|
-
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
294
|
-
return v2;
|
|
295
|
-
} finally {
|
|
296
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
/**
|
|
300
|
-
* @param {string} uri
|
|
301
|
-
* @param {IPosition} position
|
|
302
|
-
* @returns {IHover | undefined}
|
|
303
|
-
*/
|
|
304
|
-
get_hover(uri, position) {
|
|
305
|
-
const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
306
|
-
const len0 = WASM_VECTOR_LEN;
|
|
307
|
-
const ret = wasm.languageservice_get_hover(this.__wbg_ptr, ptr0, len0, addHeapObject(position));
|
|
308
|
-
return takeObject(ret);
|
|
309
|
-
}
|
|
310
|
-
/**
|
|
311
|
-
* @param {string} uri
|
|
312
|
-
* @param {IPosition} position
|
|
313
|
-
* @param {boolean} include_declaration
|
|
314
|
-
* @returns {ILocation[]}
|
|
315
|
-
*/
|
|
316
|
-
get_references(uri, position, include_declaration) {
|
|
317
|
-
try {
|
|
318
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
319
|
-
const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
320
|
-
const len0 = WASM_VECTOR_LEN;
|
|
321
|
-
wasm.languageservice_get_references(retptr, this.__wbg_ptr, ptr0, len0, addHeapObject(position), include_declaration);
|
|
322
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
323
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
324
|
-
var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
325
|
-
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
326
|
-
return v2;
|
|
327
|
-
} finally {
|
|
328
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
/**
|
|
332
|
-
* @param {string} uri
|
|
333
|
-
* @param {IPosition} position
|
|
334
|
-
* @param {string} new_name
|
|
335
|
-
* @returns {IWorkspaceEdit}
|
|
336
|
-
*/
|
|
337
|
-
get_rename(uri, position, new_name) {
|
|
338
|
-
const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
339
|
-
const len0 = WASM_VECTOR_LEN;
|
|
340
|
-
const ptr1 = passStringToWasm0(new_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
341
|
-
const len1 = WASM_VECTOR_LEN;
|
|
342
|
-
const ret = wasm.languageservice_get_rename(this.__wbg_ptr, ptr0, len0, addHeapObject(position), ptr1, len1);
|
|
343
|
-
return takeObject(ret);
|
|
344
|
-
}
|
|
345
|
-
/**
|
|
346
|
-
* @param {string} uri
|
|
347
|
-
* @param {IPosition} position
|
|
348
|
-
* @returns {ISignatureHelp | undefined}
|
|
349
|
-
*/
|
|
350
|
-
get_signature_help(uri, position) {
|
|
351
|
-
const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
352
|
-
const len0 = WASM_VECTOR_LEN;
|
|
353
|
-
const ret = wasm.languageservice_get_signature_help(this.__wbg_ptr, ptr0, len0, addHeapObject(position));
|
|
354
|
-
return takeObject(ret);
|
|
355
|
-
}
|
|
356
|
-
constructor() {
|
|
357
|
-
const ret = wasm.languageservice_new();
|
|
358
|
-
this.__wbg_ptr = ret >>> 0;
|
|
359
|
-
LanguageServiceFinalization.register(this, this.__wbg_ptr, this);
|
|
360
|
-
return this;
|
|
361
|
-
}
|
|
362
|
-
/**
|
|
363
|
-
* @param {string} uri
|
|
364
|
-
* @param {IPosition} position
|
|
365
|
-
* @returns {ITextEdit | undefined}
|
|
366
|
-
*/
|
|
367
|
-
prepare_rename(uri, position) {
|
|
368
|
-
const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
369
|
-
const len0 = WASM_VECTOR_LEN;
|
|
370
|
-
const ret = wasm.languageservice_prepare_rename(this.__wbg_ptr, ptr0, len0, addHeapObject(position));
|
|
371
|
-
return takeObject(ret);
|
|
372
|
-
}
|
|
373
|
-
/**
|
|
374
|
-
* @param {(uri: string, version: number | undefined, diagnostics: VSDiagnostic[]) => void} diagnostics_callback
|
|
375
|
-
* @param {(callables: ITestDescriptor[]) => void} test_callables_callback
|
|
376
|
-
* @param {IProjectHost} host
|
|
377
|
-
* @returns {Promise<any>}
|
|
378
|
-
*/
|
|
379
|
-
start_background_work(diagnostics_callback, test_callables_callback, host) {
|
|
380
|
-
try {
|
|
381
|
-
const ret = wasm.languageservice_start_background_work(this.__wbg_ptr, addBorrowedObject(diagnostics_callback), addBorrowedObject(test_callables_callback), addHeapObject(host));
|
|
382
|
-
return takeObject(ret);
|
|
383
|
-
} finally {
|
|
384
|
-
heap[stack_pointer++] = undefined;
|
|
385
|
-
heap[stack_pointer++] = undefined;
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
stop_background_work() {
|
|
389
|
-
wasm.languageservice_stop_background_work(this.__wbg_ptr);
|
|
390
|
-
}
|
|
391
|
-
/**
|
|
392
|
-
* @param {IWorkspaceConfiguration} config
|
|
393
|
-
*/
|
|
394
|
-
update_configuration(config) {
|
|
395
|
-
wasm.languageservice_update_configuration(this.__wbg_ptr, addHeapObject(config));
|
|
396
|
-
}
|
|
397
|
-
/**
|
|
398
|
-
* @param {string} uri
|
|
399
|
-
* @param {number} version
|
|
400
|
-
* @param {string} text
|
|
401
|
-
* @param {string} language_id
|
|
402
|
-
*/
|
|
403
|
-
update_document(uri, version, text, language_id) {
|
|
404
|
-
const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
405
|
-
const len0 = WASM_VECTOR_LEN;
|
|
406
|
-
const ptr1 = passStringToWasm0(text, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
407
|
-
const len1 = WASM_VECTOR_LEN;
|
|
408
|
-
const ptr2 = passStringToWasm0(language_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
409
|
-
const len2 = WASM_VECTOR_LEN;
|
|
410
|
-
wasm.languageservice_update_document(this.__wbg_ptr, ptr0, len0, version, ptr1, len1, ptr2, len2);
|
|
411
|
-
}
|
|
412
|
-
/**
|
|
413
|
-
* @param {string} notebook_uri
|
|
414
|
-
* @param {INotebookMetadata} notebook_metadata
|
|
415
|
-
* @param {ICell[]} cells
|
|
416
|
-
*/
|
|
417
|
-
update_notebook_document(notebook_uri, notebook_metadata, cells) {
|
|
418
|
-
const ptr0 = passStringToWasm0(notebook_uri, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
419
|
-
const len0 = WASM_VECTOR_LEN;
|
|
420
|
-
const ptr1 = passArrayJsValueToWasm0(cells, wasm.__wbindgen_export);
|
|
421
|
-
const len1 = WASM_VECTOR_LEN;
|
|
422
|
-
wasm.languageservice_update_notebook_document(this.__wbg_ptr, ptr0, len0, addHeapObject(notebook_metadata), ptr1, len1);
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
if (Symbol.dispose) LanguageService.prototype[Symbol.dispose] = LanguageService.prototype.free;
|
|
426
|
-
exports.LanguageService = LanguageService;
|
|
427
|
-
|
|
428
|
-
/**
|
|
429
|
-
* a minimal implementation for interacting with async JS filesystem callbacks to
|
|
430
|
-
* load project files
|
|
431
|
-
*/
|
|
432
|
-
class ProjectLoader {
|
|
433
|
-
__destroy_into_raw() {
|
|
434
|
-
const ptr = this.__wbg_ptr;
|
|
435
|
-
this.__wbg_ptr = 0;
|
|
436
|
-
ProjectLoaderFinalization.unregister(this);
|
|
437
|
-
return ptr;
|
|
438
|
-
}
|
|
439
|
-
free() {
|
|
440
|
-
const ptr = this.__destroy_into_raw();
|
|
441
|
-
wasm.__wbg_projectloader_free(ptr, 0);
|
|
442
|
-
}
|
|
443
|
-
/**
|
|
444
|
-
* @param {string} file_path
|
|
445
|
-
* @param {string | null} [source]
|
|
446
|
-
* @returns {Promise<IProjectConfig>}
|
|
447
|
-
*/
|
|
448
|
-
load_openqasm_project(file_path, source) {
|
|
449
|
-
const ptr0 = passStringToWasm0(file_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
450
|
-
const len0 = WASM_VECTOR_LEN;
|
|
451
|
-
var ptr1 = isLikeNone(source) ? 0 : passStringToWasm0(source, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
452
|
-
var len1 = WASM_VECTOR_LEN;
|
|
453
|
-
const ret = wasm.projectloader_load_openqasm_project(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
454
|
-
return takeObject(ret);
|
|
455
|
-
}
|
|
456
|
-
/**
|
|
457
|
-
* @param {string} directory
|
|
458
|
-
* @returns {Promise<IProjectConfig>}
|
|
459
|
-
*/
|
|
460
|
-
load_project_with_deps(directory) {
|
|
461
|
-
const ptr0 = passStringToWasm0(directory, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
462
|
-
const len0 = WASM_VECTOR_LEN;
|
|
463
|
-
const ret = wasm.projectloader_load_project_with_deps(this.__wbg_ptr, ptr0, len0);
|
|
464
|
-
return takeObject(ret);
|
|
465
|
-
}
|
|
466
|
-
/**
|
|
467
|
-
* @param {IProjectHost} project_host
|
|
468
|
-
*/
|
|
469
|
-
constructor(project_host) {
|
|
470
|
-
const ret = wasm.projectloader_new(addHeapObject(project_host));
|
|
471
|
-
this.__wbg_ptr = ret >>> 0;
|
|
472
|
-
ProjectLoaderFinalization.register(this, this.__wbg_ptr, this);
|
|
473
|
-
return this;
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
if (Symbol.dispose) ProjectLoader.prototype[Symbol.dispose] = ProjectLoader.prototype.free;
|
|
477
|
-
exports.ProjectLoader = ProjectLoader;
|
|
478
|
-
|
|
479
|
-
/**
|
|
480
|
-
* @enum {0 | 1 | 2 | 3 | 4 | 5}
|
|
481
|
-
*/
|
|
482
|
-
const StepResultId = Object.freeze({
|
|
483
|
-
BreakpointHit: 0, "0": "BreakpointHit",
|
|
484
|
-
Next: 1, "1": "Next",
|
|
485
|
-
StepIn: 2, "2": "StepIn",
|
|
486
|
-
StepOut: 3, "3": "StepOut",
|
|
487
|
-
Return: 4, "4": "Return",
|
|
488
|
-
Fail: 5, "5": "Fail",
|
|
489
|
-
});
|
|
490
|
-
exports.StepResultId = StepResultId;
|
|
491
|
-
|
|
492
|
-
/**
|
|
493
|
-
* @param {string} solution_code
|
|
494
|
-
* @param {any} exercise_sources_js
|
|
495
|
-
* @param {Function} event_cb
|
|
496
|
-
* @returns {boolean}
|
|
497
|
-
*/
|
|
498
|
-
function check_exercise_solution(solution_code, exercise_sources_js, event_cb) {
|
|
499
|
-
try {
|
|
500
|
-
const ptr0 = passStringToWasm0(solution_code, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
501
|
-
const len0 = WASM_VECTOR_LEN;
|
|
502
|
-
const ret = wasm.check_exercise_solution(ptr0, len0, addHeapObject(exercise_sources_js), addBorrowedObject(event_cb));
|
|
503
|
-
return ret !== 0;
|
|
504
|
-
} finally {
|
|
505
|
-
heap[stack_pointer++] = undefined;
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
exports.check_exercise_solution = check_exercise_solution;
|
|
509
|
-
|
|
510
|
-
/**
|
|
511
|
-
* @param {IProgramConfig | null} [additional_program]
|
|
512
|
-
* @returns {IDocFile[]}
|
|
513
|
-
*/
|
|
514
|
-
function generate_docs(additional_program) {
|
|
515
|
-
try {
|
|
516
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
517
|
-
wasm.generate_docs(retptr, isLikeNone(additional_program) ? 0 : addHeapObject(additional_program));
|
|
518
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
519
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
520
|
-
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
521
|
-
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
522
|
-
return v1;
|
|
523
|
-
} finally {
|
|
524
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
525
|
-
}
|
|
526
|
-
}
|
|
527
|
-
exports.generate_docs = generate_docs;
|
|
528
|
-
|
|
529
|
-
/**
|
|
530
|
-
* @param {string} code
|
|
531
|
-
* @param {string[]} language_features
|
|
532
|
-
* @returns {string}
|
|
533
|
-
*/
|
|
534
|
-
function get_ast(code, language_features) {
|
|
535
|
-
let deferred4_0;
|
|
536
|
-
let deferred4_1;
|
|
537
|
-
try {
|
|
538
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
539
|
-
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
540
|
-
const len0 = WASM_VECTOR_LEN;
|
|
541
|
-
const ptr1 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export);
|
|
542
|
-
const len1 = WASM_VECTOR_LEN;
|
|
543
|
-
wasm.get_ast(retptr, ptr0, len0, ptr1, len1);
|
|
544
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
545
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
546
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
547
|
-
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
548
|
-
var ptr3 = r0;
|
|
549
|
-
var len3 = r1;
|
|
550
|
-
if (r3) {
|
|
551
|
-
ptr3 = 0; len3 = 0;
|
|
552
|
-
throw takeObject(r2);
|
|
553
|
-
}
|
|
554
|
-
deferred4_0 = ptr3;
|
|
555
|
-
deferred4_1 = len3;
|
|
556
|
-
return getStringFromWasm0(ptr3, len3);
|
|
557
|
-
} finally {
|
|
558
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
559
|
-
wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
exports.get_ast = get_ast;
|
|
563
|
-
|
|
564
|
-
/**
|
|
565
|
-
* @param {IProgramConfig} program
|
|
566
|
-
* @param {IOperationInfo | null | undefined} operation
|
|
567
|
-
* @param {ICircuitConfig} config
|
|
568
|
-
* @returns {any}
|
|
569
|
-
*/
|
|
570
|
-
function get_circuit(program, operation, config) {
|
|
571
|
-
try {
|
|
572
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
573
|
-
wasm.get_circuit(retptr, addHeapObject(program), isLikeNone(operation) ? 0 : addHeapObject(operation), addHeapObject(config));
|
|
574
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
575
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
576
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
577
|
-
if (r2) {
|
|
578
|
-
throw takeObject(r1);
|
|
579
|
-
}
|
|
580
|
-
return takeObject(r0);
|
|
581
|
-
} finally {
|
|
582
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
exports.get_circuit = get_circuit;
|
|
586
|
-
|
|
587
|
-
/**
|
|
588
|
-
* @param {IProgramConfig} program
|
|
589
|
-
* @param {string} expr
|
|
590
|
-
* @param {string} params
|
|
591
|
-
* @returns {string}
|
|
592
|
-
*/
|
|
593
|
-
function get_estimates(program, expr, params) {
|
|
594
|
-
let deferred4_0;
|
|
595
|
-
let deferred4_1;
|
|
596
|
-
try {
|
|
597
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
598
|
-
const ptr0 = passStringToWasm0(expr, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
599
|
-
const len0 = WASM_VECTOR_LEN;
|
|
600
|
-
const ptr1 = passStringToWasm0(params, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
601
|
-
const len1 = WASM_VECTOR_LEN;
|
|
602
|
-
wasm.get_estimates(retptr, addHeapObject(program), ptr0, len0, ptr1, len1);
|
|
603
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
604
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
605
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
606
|
-
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
607
|
-
var ptr3 = r0;
|
|
608
|
-
var len3 = r1;
|
|
609
|
-
if (r3) {
|
|
610
|
-
ptr3 = 0; len3 = 0;
|
|
611
|
-
throw takeObject(r2);
|
|
612
|
-
}
|
|
613
|
-
deferred4_0 = ptr3;
|
|
614
|
-
deferred4_1 = len3;
|
|
615
|
-
return getStringFromWasm0(ptr3, len3);
|
|
616
|
-
} finally {
|
|
617
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
618
|
-
wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
exports.get_estimates = get_estimates;
|
|
622
|
-
|
|
623
|
-
/**
|
|
624
|
-
* @param {string} code
|
|
625
|
-
* @param {string[]} language_features
|
|
626
|
-
* @returns {string}
|
|
627
|
-
*/
|
|
628
|
-
function get_hir(code, language_features) {
|
|
629
|
-
let deferred4_0;
|
|
630
|
-
let deferred4_1;
|
|
631
|
-
try {
|
|
632
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
633
|
-
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
634
|
-
const len0 = WASM_VECTOR_LEN;
|
|
635
|
-
const ptr1 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export);
|
|
636
|
-
const len1 = WASM_VECTOR_LEN;
|
|
637
|
-
wasm.get_hir(retptr, ptr0, len0, ptr1, len1);
|
|
638
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
639
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
640
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
641
|
-
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
642
|
-
var ptr3 = r0;
|
|
643
|
-
var len3 = r1;
|
|
644
|
-
if (r3) {
|
|
645
|
-
ptr3 = 0; len3 = 0;
|
|
646
|
-
throw takeObject(r2);
|
|
647
|
-
}
|
|
648
|
-
deferred4_0 = ptr3;
|
|
649
|
-
deferred4_1 = len3;
|
|
650
|
-
return getStringFromWasm0(ptr3, len3);
|
|
651
|
-
} finally {
|
|
652
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
653
|
-
wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
exports.get_hir = get_hir;
|
|
657
|
-
|
|
658
|
-
/**
|
|
659
|
-
* @param {string} name
|
|
660
|
-
* @returns {string | undefined}
|
|
661
|
-
*/
|
|
662
|
-
function get_library_source_content(name) {
|
|
663
|
-
try {
|
|
664
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
665
|
-
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
666
|
-
const len0 = WASM_VECTOR_LEN;
|
|
667
|
-
wasm.get_library_source_content(retptr, ptr0, len0);
|
|
668
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
669
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
670
|
-
let v2;
|
|
671
|
-
if (r0 !== 0) {
|
|
672
|
-
v2 = getStringFromWasm0(r0, r1).slice();
|
|
673
|
-
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
674
|
-
}
|
|
675
|
-
return v2;
|
|
676
|
-
} finally {
|
|
677
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
exports.get_library_source_content = get_library_source_content;
|
|
681
|
-
|
|
682
|
-
/**
|
|
683
|
-
* @returns {string}
|
|
684
|
-
*/
|
|
685
|
-
function get_library_summaries() {
|
|
686
|
-
let deferred1_0;
|
|
687
|
-
let deferred1_1;
|
|
688
|
-
try {
|
|
689
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
690
|
-
wasm.get_library_summaries(retptr);
|
|
691
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
692
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
693
|
-
deferred1_0 = r0;
|
|
694
|
-
deferred1_1 = r1;
|
|
695
|
-
return getStringFromWasm0(r0, r1);
|
|
696
|
-
} finally {
|
|
697
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
698
|
-
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
exports.get_library_summaries = get_library_summaries;
|
|
702
|
-
|
|
703
|
-
/**
|
|
704
|
-
* @param {IProgramConfig} program
|
|
705
|
-
* @returns {string}
|
|
706
|
-
*/
|
|
707
|
-
function get_qir(program) {
|
|
708
|
-
let deferred2_0;
|
|
709
|
-
let deferred2_1;
|
|
710
|
-
try {
|
|
711
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
712
|
-
wasm.get_qir(retptr, addHeapObject(program));
|
|
713
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
714
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
715
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
716
|
-
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
717
|
-
var ptr1 = r0;
|
|
718
|
-
var len1 = r1;
|
|
719
|
-
if (r3) {
|
|
720
|
-
ptr1 = 0; len1 = 0;
|
|
721
|
-
throw takeObject(r2);
|
|
722
|
-
}
|
|
723
|
-
deferred2_0 = ptr1;
|
|
724
|
-
deferred2_1 = len1;
|
|
725
|
-
return getStringFromWasm0(ptr1, len1);
|
|
726
|
-
} finally {
|
|
727
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
728
|
-
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
729
|
-
}
|
|
730
|
-
}
|
|
731
|
-
exports.get_qir = get_qir;
|
|
732
|
-
|
|
733
|
-
/**
|
|
734
|
-
* @param {IProgramConfig} program
|
|
735
|
-
* @returns {string[]}
|
|
736
|
-
*/
|
|
737
|
-
function get_rir(program) {
|
|
738
|
-
try {
|
|
739
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
740
|
-
wasm.get_rir(retptr, addHeapObject(program));
|
|
741
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
742
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
743
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
744
|
-
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
745
|
-
if (r3) {
|
|
746
|
-
throw takeObject(r2);
|
|
747
|
-
}
|
|
748
|
-
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
749
|
-
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
750
|
-
return v1;
|
|
751
|
-
} finally {
|
|
752
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
|
-
exports.get_rir = get_rir;
|
|
756
|
-
|
|
757
|
-
/**
|
|
758
|
-
* @param {string} file_name
|
|
759
|
-
* @param {string} source
|
|
760
|
-
* @returns {string | undefined}
|
|
761
|
-
*/
|
|
762
|
-
function get_target_profile_from_entry_point(file_name, source) {
|
|
763
|
-
try {
|
|
764
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
765
|
-
const ptr0 = passStringToWasm0(file_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
766
|
-
const len0 = WASM_VECTOR_LEN;
|
|
767
|
-
const ptr1 = passStringToWasm0(source, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
768
|
-
const len1 = WASM_VECTOR_LEN;
|
|
769
|
-
wasm.get_target_profile_from_entry_point(retptr, ptr0, len0, ptr1, len1);
|
|
770
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
771
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
772
|
-
let v3;
|
|
773
|
-
if (r0 !== 0) {
|
|
774
|
-
v3 = getStringFromWasm0(r0, r1).slice();
|
|
775
|
-
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
776
|
-
}
|
|
777
|
-
return v3;
|
|
778
|
-
} finally {
|
|
779
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
780
|
-
}
|
|
781
|
-
}
|
|
782
|
-
exports.get_target_profile_from_entry_point = get_target_profile_from_entry_point;
|
|
783
|
-
|
|
784
|
-
/**
|
|
785
|
-
* @returns {string}
|
|
786
|
-
*/
|
|
787
|
-
function git_hash() {
|
|
788
|
-
let deferred1_0;
|
|
789
|
-
let deferred1_1;
|
|
790
|
-
try {
|
|
791
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
792
|
-
wasm.git_hash(retptr);
|
|
793
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
794
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
795
|
-
deferred1_0 = r0;
|
|
796
|
-
deferred1_1 = r1;
|
|
797
|
-
return getStringFromWasm0(r0, r1);
|
|
798
|
-
} finally {
|
|
799
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
800
|
-
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
801
|
-
}
|
|
802
|
-
}
|
|
803
|
-
exports.git_hash = git_hash;
|
|
804
|
-
|
|
805
|
-
/**
|
|
806
|
-
* @param {any} callback
|
|
807
|
-
* @param {number} level
|
|
808
|
-
*/
|
|
809
|
-
function initLogging(callback, level) {
|
|
810
|
-
try {
|
|
811
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
812
|
-
wasm.initLogging(retptr, addHeapObject(callback), level);
|
|
813
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
814
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
815
|
-
if (r1) {
|
|
816
|
-
throw takeObject(r0);
|
|
817
|
-
}
|
|
818
|
-
} finally {
|
|
819
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
exports.initLogging = initLogging;
|
|
823
|
-
|
|
824
|
-
/**
|
|
825
|
-
* @param {IProgramConfig} program
|
|
826
|
-
* @param {string} expr
|
|
827
|
-
* @param {Function} event_cb
|
|
828
|
-
* @param {number} shots
|
|
829
|
-
* @returns {boolean}
|
|
830
|
-
*/
|
|
831
|
-
function run(program, expr, event_cb, shots) {
|
|
832
|
-
try {
|
|
833
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
834
|
-
const ptr0 = passStringToWasm0(expr, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
835
|
-
const len0 = WASM_VECTOR_LEN;
|
|
836
|
-
wasm.run(retptr, addHeapObject(program), ptr0, len0, addBorrowedObject(event_cb), shots);
|
|
837
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
838
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
839
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
840
|
-
if (r2) {
|
|
841
|
-
throw takeObject(r1);
|
|
842
|
-
}
|
|
843
|
-
return r0 !== 0;
|
|
844
|
-
} finally {
|
|
845
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
846
|
-
heap[stack_pointer++] = undefined;
|
|
847
|
-
}
|
|
848
|
-
}
|
|
849
|
-
exports.run = run;
|
|
850
|
-
|
|
851
|
-
/**
|
|
852
|
-
* @param {IProgramConfig} program
|
|
853
|
-
* @param {string} expr
|
|
854
|
-
* @param {Function} event_cb
|
|
855
|
-
* @param {number} shots
|
|
856
|
-
* @param {any} pauliNoise
|
|
857
|
-
* @param {any} qubitLoss
|
|
858
|
-
* @returns {boolean}
|
|
859
|
-
*/
|
|
860
|
-
function runWithNoise(program, expr, event_cb, shots, pauliNoise, qubitLoss) {
|
|
861
|
-
try {
|
|
862
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
863
|
-
const ptr0 = passStringToWasm0(expr, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
864
|
-
const len0 = WASM_VECTOR_LEN;
|
|
865
|
-
wasm.runWithNoise(retptr, addHeapObject(program), ptr0, len0, addBorrowedObject(event_cb), shots, addBorrowedObject(pauliNoise), addBorrowedObject(qubitLoss));
|
|
866
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
867
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
868
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
869
|
-
if (r2) {
|
|
870
|
-
throw takeObject(r1);
|
|
871
|
-
}
|
|
872
|
-
return r0 !== 0;
|
|
873
|
-
} finally {
|
|
874
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
875
|
-
heap[stack_pointer++] = undefined;
|
|
876
|
-
heap[stack_pointer++] = undefined;
|
|
877
|
-
heap[stack_pointer++] = undefined;
|
|
878
|
-
}
|
|
879
|
-
}
|
|
880
|
-
exports.runWithNoise = runWithNoise;
|
|
881
|
-
|
|
882
|
-
/**
|
|
883
|
-
* @param {number} level
|
|
884
|
-
*/
|
|
885
|
-
function setLogLevel(level) {
|
|
886
|
-
wasm.setLogLevel(level);
|
|
887
|
-
}
|
|
888
|
-
exports.setLogLevel = setLogLevel;
|
|
889
|
-
|
|
890
|
-
function __wbg_get_imports() {
|
|
891
|
-
const import0 = {
|
|
892
|
-
__proto__: null,
|
|
893
|
-
__wbg_Error_83742b46f01ce22d: function(arg0, arg1) {
|
|
894
|
-
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
895
|
-
return addHeapObject(ret);
|
|
896
|
-
},
|
|
897
|
-
__wbg_Number_a5a435bd7bbec835: function(arg0) {
|
|
898
|
-
const ret = Number(getObject(arg0));
|
|
899
|
-
return ret;
|
|
900
|
-
},
|
|
901
|
-
__wbg_String_8564e559799eccda: function(arg0, arg1) {
|
|
902
|
-
const ret = String(getObject(arg1));
|
|
903
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
904
|
-
const len1 = WASM_VECTOR_LEN;
|
|
905
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
906
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
907
|
-
},
|
|
908
|
-
__wbg___wbindgen_bigint_get_as_i64_447a76b5c6ef7bda: function(arg0, arg1) {
|
|
909
|
-
const v = getObject(arg1);
|
|
910
|
-
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
911
|
-
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
912
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
913
|
-
},
|
|
914
|
-
__wbg___wbindgen_boolean_get_c0f3f60bac5a78d1: function(arg0) {
|
|
915
|
-
const v = getObject(arg0);
|
|
916
|
-
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
917
|
-
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
918
|
-
},
|
|
919
|
-
__wbg___wbindgen_debug_string_5398f5bb970e0daa: function(arg0, arg1) {
|
|
920
|
-
const ret = debugString(getObject(arg1));
|
|
921
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
922
|
-
const len1 = WASM_VECTOR_LEN;
|
|
923
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
924
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
925
|
-
},
|
|
926
|
-
__wbg___wbindgen_in_41dbb8413020e076: function(arg0, arg1) {
|
|
927
|
-
const ret = getObject(arg0) in getObject(arg1);
|
|
928
|
-
return ret;
|
|
929
|
-
},
|
|
930
|
-
__wbg___wbindgen_is_bigint_e2141d4f045b7eda: function(arg0) {
|
|
931
|
-
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
932
|
-
return ret;
|
|
933
|
-
},
|
|
934
|
-
__wbg___wbindgen_is_function_3c846841762788c1: function(arg0) {
|
|
935
|
-
const ret = typeof(getObject(arg0)) === 'function';
|
|
936
|
-
return ret;
|
|
937
|
-
},
|
|
938
|
-
__wbg___wbindgen_is_object_781bc9f159099513: function(arg0) {
|
|
939
|
-
const val = getObject(arg0);
|
|
940
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
941
|
-
return ret;
|
|
942
|
-
},
|
|
943
|
-
__wbg___wbindgen_is_string_7ef6b97b02428fae: function(arg0) {
|
|
944
|
-
const ret = typeof(getObject(arg0)) === 'string';
|
|
945
|
-
return ret;
|
|
946
|
-
},
|
|
947
|
-
__wbg___wbindgen_is_undefined_52709e72fb9f179c: function(arg0) {
|
|
948
|
-
const ret = getObject(arg0) === undefined;
|
|
949
|
-
return ret;
|
|
950
|
-
},
|
|
951
|
-
__wbg___wbindgen_jsval_eq_ee31bfad3e536463: function(arg0, arg1) {
|
|
952
|
-
const ret = getObject(arg0) === getObject(arg1);
|
|
953
|
-
return ret;
|
|
954
|
-
},
|
|
955
|
-
__wbg___wbindgen_jsval_loose_eq_5bcc3bed3c69e72b: function(arg0, arg1) {
|
|
956
|
-
const ret = getObject(arg0) == getObject(arg1);
|
|
957
|
-
return ret;
|
|
958
|
-
},
|
|
959
|
-
__wbg___wbindgen_number_get_34bb9d9dcfa21373: function(arg0, arg1) {
|
|
960
|
-
const obj = getObject(arg1);
|
|
961
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
962
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
963
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
964
|
-
},
|
|
965
|
-
__wbg___wbindgen_string_get_395e606bd0ee4427: function(arg0, arg1) {
|
|
966
|
-
const obj = getObject(arg1);
|
|
967
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
968
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
969
|
-
var len1 = WASM_VECTOR_LEN;
|
|
970
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
971
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
972
|
-
},
|
|
973
|
-
__wbg___wbindgen_throw_6ddd609b62940d55: function(arg0, arg1) {
|
|
974
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
975
|
-
},
|
|
976
|
-
__wbg__wbg_cb_unref_6b5b6b8576d35cb1: function(arg0) {
|
|
977
|
-
getObject(arg0)._wbg_cb_unref();
|
|
978
|
-
},
|
|
979
|
-
__wbg_call_2d781c1f4d5c0ef8: function() { return handleError(function (arg0, arg1, arg2) {
|
|
980
|
-
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
981
|
-
return addHeapObject(ret);
|
|
982
|
-
}, arguments); },
|
|
983
|
-
__wbg_call_e133b57c9155d22c: function() { return handleError(function (arg0, arg1) {
|
|
984
|
-
const ret = getObject(arg0).call(getObject(arg1));
|
|
985
|
-
return addHeapObject(ret);
|
|
986
|
-
}, arguments); },
|
|
987
|
-
__wbg_call_f858478a02f9600f: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
988
|
-
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4));
|
|
989
|
-
return addHeapObject(ret);
|
|
990
|
-
}, arguments); },
|
|
991
|
-
__wbg_crypto_38df2bab126b63dc: function(arg0) {
|
|
992
|
-
const ret = getObject(arg0).crypto;
|
|
993
|
-
return addHeapObject(ret);
|
|
994
|
-
},
|
|
995
|
-
__wbg_done_08ce71ee07e3bd17: function(arg0) {
|
|
996
|
-
const ret = getObject(arg0).done;
|
|
997
|
-
return ret;
|
|
998
|
-
},
|
|
999
|
-
__wbg_entries_e8a20ff8c9757101: function(arg0) {
|
|
1000
|
-
const ret = Object.entries(getObject(arg0));
|
|
1001
|
-
return addHeapObject(ret);
|
|
1002
|
-
},
|
|
1003
|
-
__wbg_fetchGithub_07b18f4c1d353ded: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) {
|
|
1004
|
-
const ret = getObject(arg0).fetchGithub(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), getStringFromWasm0(arg5, arg6), getStringFromWasm0(arg7, arg8));
|
|
1005
|
-
return addHeapObject(ret);
|
|
1006
|
-
}, arguments); },
|
|
1007
|
-
__wbg_findManifestDirectory_033c7b5017798748: function(arg0, arg1, arg2) {
|
|
1008
|
-
const ret = getObject(arg0).findManifestDirectory(getStringFromWasm0(arg1, arg2));
|
|
1009
|
-
return addHeapObject(ret);
|
|
1010
|
-
},
|
|
1011
|
-
__wbg_from_4bdf88943703fd48: function(arg0) {
|
|
1012
|
-
const ret = Array.from(getObject(arg0));
|
|
1013
|
-
return addHeapObject(ret);
|
|
1014
|
-
},
|
|
1015
|
-
__wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
|
|
1016
|
-
getObject(arg0).getRandomValues(getObject(arg1));
|
|
1017
|
-
}, arguments); },
|
|
1018
|
-
__wbg_get_326e41e095fb2575: function() { return handleError(function (arg0, arg1) {
|
|
1019
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
1020
|
-
return addHeapObject(ret);
|
|
1021
|
-
}, arguments); },
|
|
1022
|
-
__wbg_get_a8ee5c45dabc1b3b: function(arg0, arg1) {
|
|
1023
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
1024
|
-
return addHeapObject(ret);
|
|
1025
|
-
},
|
|
1026
|
-
__wbg_get_stack_trace_limit_19dd44bb32fdd0bb: function() {
|
|
1027
|
-
const ret = Error.stackTraceLimit;
|
|
1028
|
-
return isLikeNone(ret) ? 0x100000001 : (ret) >>> 0;
|
|
1029
|
-
},
|
|
1030
|
-
__wbg_get_unchecked_329cfe50afab7352: function(arg0, arg1) {
|
|
1031
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
1032
|
-
return addHeapObject(ret);
|
|
1033
|
-
},
|
|
1034
|
-
__wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
|
|
1035
|
-
const ret = getObject(arg0)[getObject(arg1)];
|
|
1036
|
-
return addHeapObject(ret);
|
|
1037
|
-
},
|
|
1038
|
-
__wbg_instanceof_ArrayBuffer_101e2bf31071a9f6: function(arg0) {
|
|
1039
|
-
let result;
|
|
1040
|
-
try {
|
|
1041
|
-
result = getObject(arg0) instanceof ArrayBuffer;
|
|
1042
|
-
} catch (_) {
|
|
1043
|
-
result = false;
|
|
1044
|
-
}
|
|
1045
|
-
const ret = result;
|
|
1046
|
-
return ret;
|
|
1047
|
-
},
|
|
1048
|
-
__wbg_instanceof_Error_4691a5b466e32a80: function(arg0) {
|
|
1049
|
-
let result;
|
|
1050
|
-
try {
|
|
1051
|
-
result = getObject(arg0) instanceof Error;
|
|
1052
|
-
} catch (_) {
|
|
1053
|
-
result = false;
|
|
1054
|
-
}
|
|
1055
|
-
const ret = result;
|
|
1056
|
-
return ret;
|
|
1057
|
-
},
|
|
1058
|
-
__wbg_instanceof_Map_f194b366846aca0c: function(arg0) {
|
|
1059
|
-
let result;
|
|
1060
|
-
try {
|
|
1061
|
-
result = getObject(arg0) instanceof Map;
|
|
1062
|
-
} catch (_) {
|
|
1063
|
-
result = false;
|
|
1064
|
-
}
|
|
1065
|
-
const ret = result;
|
|
1066
|
-
return ret;
|
|
1067
|
-
},
|
|
1068
|
-
__wbg_instanceof_Uint8Array_740438561a5b956d: function(arg0) {
|
|
1069
|
-
let result;
|
|
1070
|
-
try {
|
|
1071
|
-
result = getObject(arg0) instanceof Uint8Array;
|
|
1072
|
-
} catch (_) {
|
|
1073
|
-
result = false;
|
|
1074
|
-
}
|
|
1075
|
-
const ret = result;
|
|
1076
|
-
return ret;
|
|
1077
|
-
},
|
|
1078
|
-
__wbg_isArray_33b91feb269ff46e: function(arg0) {
|
|
1079
|
-
const ret = Array.isArray(getObject(arg0));
|
|
1080
|
-
return ret;
|
|
1081
|
-
},
|
|
1082
|
-
__wbg_isArray_42f3245bcac28e65: function(arg0) {
|
|
1083
|
-
const ret = Array.isArray(getObject(arg0));
|
|
1084
|
-
return ret;
|
|
1085
|
-
},
|
|
1086
|
-
__wbg_isSafeInteger_ecd6a7f9c3e053cd: function(arg0) {
|
|
1087
|
-
const ret = Number.isSafeInteger(getObject(arg0));
|
|
1088
|
-
return ret;
|
|
1089
|
-
},
|
|
1090
|
-
__wbg_iterator_d8f549ec8fb061b1: function() {
|
|
1091
|
-
const ret = Symbol.iterator;
|
|
1092
|
-
return addHeapObject(ret);
|
|
1093
|
-
},
|
|
1094
|
-
__wbg_length_b3416cf66a5452c8: function(arg0) {
|
|
1095
|
-
const ret = getObject(arg0).length;
|
|
1096
|
-
return ret;
|
|
1097
|
-
},
|
|
1098
|
-
__wbg_length_ea16607d7b61445b: function(arg0) {
|
|
1099
|
-
const ret = getObject(arg0).length;
|
|
1100
|
-
return ret;
|
|
1101
|
-
},
|
|
1102
|
-
__wbg_listDirectory_3abb3a7342129e7c: function(arg0, arg1, arg2) {
|
|
1103
|
-
const ret = getObject(arg0).listDirectory(getStringFromWasm0(arg1, arg2));
|
|
1104
|
-
return addHeapObject(ret);
|
|
1105
|
-
},
|
|
1106
|
-
__wbg_message_00d63f20c41713dd: function(arg0) {
|
|
1107
|
-
const ret = getObject(arg0).message;
|
|
1108
|
-
return addHeapObject(ret);
|
|
1109
|
-
},
|
|
1110
|
-
__wbg_msCrypto_bd5a034af96bcba6: function(arg0) {
|
|
1111
|
-
const ret = getObject(arg0).msCrypto;
|
|
1112
|
-
return addHeapObject(ret);
|
|
1113
|
-
},
|
|
1114
|
-
__wbg_new_49af1fa01cd4d19b: function() {
|
|
1115
|
-
const ret = new Error();
|
|
1116
|
-
return addHeapObject(ret);
|
|
1117
|
-
},
|
|
1118
|
-
__wbg_new_49d5571bd3f0c4d4: function() {
|
|
1119
|
-
const ret = new Map();
|
|
1120
|
-
return addHeapObject(ret);
|
|
1121
|
-
},
|
|
1122
|
-
__wbg_new_5f486cdf45a04d78: function(arg0) {
|
|
1123
|
-
const ret = new Uint8Array(getObject(arg0));
|
|
1124
|
-
return addHeapObject(ret);
|
|
1125
|
-
},
|
|
1126
|
-
__wbg_new_a70fbab9066b301f: function() {
|
|
1127
|
-
const ret = new Array();
|
|
1128
|
-
return addHeapObject(ret);
|
|
1129
|
-
},
|
|
1130
|
-
__wbg_new_ab79df5bd7c26067: function() {
|
|
1131
|
-
const ret = new Object();
|
|
1132
|
-
return addHeapObject(ret);
|
|
1133
|
-
},
|
|
1134
|
-
__wbg_new_typed_aaaeaf29cf802876: function(arg0, arg1) {
|
|
1135
|
-
try {
|
|
1136
|
-
var state0 = {a: arg0, b: arg1};
|
|
1137
|
-
var cb0 = (arg0, arg1) => {
|
|
1138
|
-
const a = state0.a;
|
|
1139
|
-
state0.a = 0;
|
|
1140
|
-
try {
|
|
1141
|
-
return __wasm_bindgen_func_elem_7517(a, state0.b, arg0, arg1);
|
|
1142
|
-
} finally {
|
|
1143
|
-
state0.a = a;
|
|
1144
|
-
}
|
|
1145
|
-
};
|
|
1146
|
-
const ret = new Promise(cb0);
|
|
1147
|
-
return addHeapObject(ret);
|
|
1148
|
-
} finally {
|
|
1149
|
-
state0.a = state0.b = 0;
|
|
1150
|
-
}
|
|
1151
|
-
},
|
|
1152
|
-
__wbg_new_with_length_825018a1616e9e55: function(arg0) {
|
|
1153
|
-
const ret = new Uint8Array(arg0 >>> 0);
|
|
1154
|
-
return addHeapObject(ret);
|
|
1155
|
-
},
|
|
1156
|
-
__wbg_next_11b99ee6237339e3: function() { return handleError(function (arg0) {
|
|
1157
|
-
const ret = getObject(arg0).next();
|
|
1158
|
-
return addHeapObject(ret);
|
|
1159
|
-
}, arguments); },
|
|
1160
|
-
__wbg_next_e01a967809d1aa68: function(arg0) {
|
|
1161
|
-
const ret = getObject(arg0).next;
|
|
1162
|
-
return addHeapObject(ret);
|
|
1163
|
-
},
|
|
1164
|
-
__wbg_node_84ea875411254db1: function(arg0) {
|
|
1165
|
-
const ret = getObject(arg0).node;
|
|
1166
|
-
return addHeapObject(ret);
|
|
1167
|
-
},
|
|
1168
|
-
__wbg_packageGraphSources_41adf6632e94af6f: function(arg0) {
|
|
1169
|
-
const ret = getObject(arg0).packageGraphSources;
|
|
1170
|
-
return addHeapObject(ret);
|
|
1171
|
-
},
|
|
1172
|
-
__wbg_process_44c7a14e11e9f69e: function(arg0) {
|
|
1173
|
-
const ret = getObject(arg0).process;
|
|
1174
|
-
return addHeapObject(ret);
|
|
1175
|
-
},
|
|
1176
|
-
__wbg_profile_edbf563ae3d57e6d: function(arg0, arg1) {
|
|
1177
|
-
const ret = getObject(arg1).profile;
|
|
1178
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1179
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1180
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1181
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1182
|
-
},
|
|
1183
|
-
__wbg_projectType_3d7f26604be90e3c: function(arg0, arg1) {
|
|
1184
|
-
const ret = getObject(arg1).projectType;
|
|
1185
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1186
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1187
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1188
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1189
|
-
},
|
|
1190
|
-
__wbg_prototypesetcall_d62e5099504357e6: function(arg0, arg1, arg2) {
|
|
1191
|
-
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
1192
|
-
},
|
|
1193
|
-
__wbg_queueMicrotask_0c399741342fb10f: function(arg0) {
|
|
1194
|
-
const ret = getObject(arg0).queueMicrotask;
|
|
1195
|
-
return addHeapObject(ret);
|
|
1196
|
-
},
|
|
1197
|
-
__wbg_queueMicrotask_a082d78ce798393e: function(arg0) {
|
|
1198
|
-
queueMicrotask(getObject(arg0));
|
|
1199
|
-
},
|
|
1200
|
-
__wbg_randomFillSync_6c25eac9869eb53c: function() { return handleError(function (arg0, arg1) {
|
|
1201
|
-
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
1202
|
-
}, arguments); },
|
|
1203
|
-
__wbg_readFile_5cf1797fcdea6a2c: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1204
|
-
const ret = getObject(arg0).readFile(getStringFromWasm0(arg1, arg2));
|
|
1205
|
-
return addHeapObject(ret);
|
|
1206
|
-
}, arguments); },
|
|
1207
|
-
__wbg_require_b4edbdcf3e2a1ef0: function() { return handleError(function () {
|
|
1208
|
-
const ret = module.require;
|
|
1209
|
-
return addHeapObject(ret);
|
|
1210
|
-
}, arguments); },
|
|
1211
|
-
__wbg_resolvePath_6e40d08df0c5e326: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1212
|
-
const ret = getObject(arg0).resolvePath(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1213
|
-
return addHeapObject(ret);
|
|
1214
|
-
}, arguments); },
|
|
1215
|
-
__wbg_resolve_ae8d83246e5bcc12: function(arg0) {
|
|
1216
|
-
const ret = Promise.resolve(getObject(arg0));
|
|
1217
|
-
return addHeapObject(ret);
|
|
1218
|
-
},
|
|
1219
|
-
__wbg_set_282384002438957f: function(arg0, arg1, arg2) {
|
|
1220
|
-
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
1221
|
-
},
|
|
1222
|
-
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
1223
|
-
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
1224
|
-
},
|
|
1225
|
-
__wbg_set_bf7251625df30a02: function(arg0, arg1, arg2) {
|
|
1226
|
-
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
1227
|
-
return addHeapObject(ret);
|
|
1228
|
-
},
|
|
1229
|
-
__wbg_set_stack_trace_limit_a6b4f5c23511a229: function(arg0) {
|
|
1230
|
-
Error.stackTraceLimit = arg0 >>> 0;
|
|
1231
|
-
},
|
|
1232
|
-
__wbg_stack_948d41d68c41fac5: function(arg0, arg1) {
|
|
1233
|
-
const ret = getObject(arg1).stack;
|
|
1234
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1235
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1236
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1237
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1238
|
-
},
|
|
1239
|
-
__wbg_static_accessor_GLOBAL_8adb955bd33fac2f: function() {
|
|
1240
|
-
const ret = typeof global === 'undefined' ? null : global;
|
|
1241
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1242
|
-
},
|
|
1243
|
-
__wbg_static_accessor_GLOBAL_THIS_ad356e0db91c7913: function() {
|
|
1244
|
-
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
1245
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1246
|
-
},
|
|
1247
|
-
__wbg_static_accessor_SELF_f207c857566db248: function() {
|
|
1248
|
-
const ret = typeof self === 'undefined' ? null : self;
|
|
1249
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1250
|
-
},
|
|
1251
|
-
__wbg_static_accessor_WINDOW_bb9f1ba69d61b386: function() {
|
|
1252
|
-
const ret = typeof window === 'undefined' ? null : window;
|
|
1253
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1254
|
-
},
|
|
1255
|
-
__wbg_subarray_a068d24e39478a8a: function(arg0, arg1, arg2) {
|
|
1256
|
-
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1257
|
-
return addHeapObject(ret);
|
|
1258
|
-
},
|
|
1259
|
-
__wbg_then_098abe61755d12f6: function(arg0, arg1) {
|
|
1260
|
-
const ret = getObject(arg0).then(getObject(arg1));
|
|
1261
|
-
return addHeapObject(ret);
|
|
1262
|
-
},
|
|
1263
|
-
__wbg_then_9e335f6dd892bc11: function(arg0, arg1, arg2) {
|
|
1264
|
-
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
1265
|
-
return addHeapObject(ret);
|
|
1266
|
-
},
|
|
1267
|
-
__wbg_value_21fc78aab0322612: function(arg0) {
|
|
1268
|
-
const ret = getObject(arg0).value;
|
|
1269
|
-
return addHeapObject(ret);
|
|
1270
|
-
},
|
|
1271
|
-
__wbg_versions_276b2795b1c6a219: function(arg0) {
|
|
1272
|
-
const ret = getObject(arg0).versions;
|
|
1273
|
-
return addHeapObject(ret);
|
|
1274
|
-
},
|
|
1275
|
-
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
1276
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 2104, function: Function { arguments: [Externref], shim_idx: 2105, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1277
|
-
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_7037, __wasm_bindgen_func_elem_7039);
|
|
1278
|
-
return addHeapObject(ret);
|
|
1279
|
-
},
|
|
1280
|
-
__wbindgen_cast_0000000000000002: function(arg0) {
|
|
1281
|
-
// Cast intrinsic for `F64 -> Externref`.
|
|
1282
|
-
const ret = arg0;
|
|
1283
|
-
return addHeapObject(ret);
|
|
1284
|
-
},
|
|
1285
|
-
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
1286
|
-
// Cast intrinsic for `I64 -> Externref`.
|
|
1287
|
-
const ret = arg0;
|
|
1288
|
-
return addHeapObject(ret);
|
|
1289
|
-
},
|
|
1290
|
-
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
1291
|
-
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
1292
|
-
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
1293
|
-
return addHeapObject(ret);
|
|
1294
|
-
},
|
|
1295
|
-
__wbindgen_cast_0000000000000005: function(arg0, arg1) {
|
|
1296
|
-
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1297
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
1298
|
-
return addHeapObject(ret);
|
|
1299
|
-
},
|
|
1300
|
-
__wbindgen_cast_0000000000000006: function(arg0) {
|
|
1301
|
-
// Cast intrinsic for `U64 -> Externref`.
|
|
1302
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
1303
|
-
return addHeapObject(ret);
|
|
1304
|
-
},
|
|
1305
|
-
__wbindgen_object_clone_ref: function(arg0) {
|
|
1306
|
-
const ret = getObject(arg0);
|
|
1307
|
-
return addHeapObject(ret);
|
|
1308
|
-
},
|
|
1309
|
-
__wbindgen_object_drop_ref: function(arg0) {
|
|
1310
|
-
takeObject(arg0);
|
|
1311
|
-
},
|
|
1312
|
-
};
|
|
1313
|
-
return {
|
|
1314
|
-
__proto__: null,
|
|
1315
|
-
"./qsc_wasm_bg.js": import0,
|
|
1316
|
-
};
|
|
1317
|
-
}
|
|
1318
|
-
|
|
1319
|
-
function __wasm_bindgen_func_elem_7039(arg0, arg1, arg2) {
|
|
1320
|
-
try {
|
|
1321
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1322
|
-
wasm.__wasm_bindgen_func_elem_7039(retptr, arg0, arg1, addHeapObject(arg2));
|
|
1323
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1324
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1325
|
-
if (r1) {
|
|
1326
|
-
throw takeObject(r0);
|
|
1327
|
-
}
|
|
1328
|
-
} finally {
|
|
1329
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1330
|
-
}
|
|
1331
|
-
}
|
|
1332
|
-
|
|
1333
|
-
function __wasm_bindgen_func_elem_7517(arg0, arg1, arg2, arg3) {
|
|
1334
|
-
wasm.__wasm_bindgen_func_elem_7517(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
1335
|
-
}
|
|
1336
|
-
|
|
1337
|
-
const DebugServiceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1338
|
-
? { register: () => {}, unregister: () => {} }
|
|
1339
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_debugservice_free(ptr >>> 0, 1));
|
|
1340
|
-
const LanguageServiceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1341
|
-
? { register: () => {}, unregister: () => {} }
|
|
1342
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_languageservice_free(ptr >>> 0, 1));
|
|
1343
|
-
const ProjectLoaderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1344
|
-
? { register: () => {}, unregister: () => {} }
|
|
1345
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_projectloader_free(ptr >>> 0, 1));
|
|
1346
|
-
|
|
1347
|
-
function addHeapObject(obj) {
|
|
1348
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
1349
|
-
const idx = heap_next;
|
|
1350
|
-
heap_next = heap[idx];
|
|
1351
|
-
|
|
1352
|
-
heap[idx] = obj;
|
|
1353
|
-
return idx;
|
|
1354
|
-
}
|
|
1355
|
-
|
|
1356
|
-
function addBorrowedObject(obj) {
|
|
1357
|
-
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
1358
|
-
heap[--stack_pointer] = obj;
|
|
1359
|
-
return stack_pointer;
|
|
1360
|
-
}
|
|
1361
|
-
|
|
1362
|
-
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
1363
|
-
? { register: () => {}, unregister: () => {} }
|
|
1364
|
-
: new FinalizationRegistry(state => state.dtor(state.a, state.b));
|
|
1365
|
-
|
|
1366
|
-
function debugString(val) {
|
|
1367
|
-
// primitive types
|
|
1368
|
-
const type = typeof val;
|
|
1369
|
-
if (type == 'number' || type == 'boolean' || val == null) {
|
|
1370
|
-
return `${val}`;
|
|
1371
|
-
}
|
|
1372
|
-
if (type == 'string') {
|
|
1373
|
-
return `"${val}"`;
|
|
1374
|
-
}
|
|
1375
|
-
if (type == 'symbol') {
|
|
1376
|
-
const description = val.description;
|
|
1377
|
-
if (description == null) {
|
|
1378
|
-
return 'Symbol';
|
|
1379
|
-
} else {
|
|
1380
|
-
return `Symbol(${description})`;
|
|
1381
|
-
}
|
|
1382
|
-
}
|
|
1383
|
-
if (type == 'function') {
|
|
1384
|
-
const name = val.name;
|
|
1385
|
-
if (typeof name == 'string' && name.length > 0) {
|
|
1386
|
-
return `Function(${name})`;
|
|
1387
|
-
} else {
|
|
1388
|
-
return 'Function';
|
|
1389
|
-
}
|
|
1390
|
-
}
|
|
1391
|
-
// objects
|
|
1392
|
-
if (Array.isArray(val)) {
|
|
1393
|
-
const length = val.length;
|
|
1394
|
-
let debug = '[';
|
|
1395
|
-
if (length > 0) {
|
|
1396
|
-
debug += debugString(val[0]);
|
|
1397
|
-
}
|
|
1398
|
-
for(let i = 1; i < length; i++) {
|
|
1399
|
-
debug += ', ' + debugString(val[i]);
|
|
1400
|
-
}
|
|
1401
|
-
debug += ']';
|
|
1402
|
-
return debug;
|
|
1403
|
-
}
|
|
1404
|
-
// Test for built-in
|
|
1405
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
1406
|
-
let className;
|
|
1407
|
-
if (builtInMatches && builtInMatches.length > 1) {
|
|
1408
|
-
className = builtInMatches[1];
|
|
1409
|
-
} else {
|
|
1410
|
-
// Failed to match the standard '[object ClassName]'
|
|
1411
|
-
return toString.call(val);
|
|
1412
|
-
}
|
|
1413
|
-
if (className == 'Object') {
|
|
1414
|
-
// we're a user defined class or Object
|
|
1415
|
-
// JSON.stringify avoids problems with cycles, and is generally much
|
|
1416
|
-
// easier than looping through ownProperties of `val`.
|
|
1417
|
-
try {
|
|
1418
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
|
1419
|
-
} catch (_) {
|
|
1420
|
-
return 'Object';
|
|
1421
|
-
}
|
|
1422
|
-
}
|
|
1423
|
-
// errors
|
|
1424
|
-
if (val instanceof Error) {
|
|
1425
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
1426
|
-
}
|
|
1427
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
1428
|
-
return className;
|
|
1429
|
-
}
|
|
1430
|
-
|
|
1431
|
-
function dropObject(idx) {
|
|
1432
|
-
if (idx < 1028) return;
|
|
1433
|
-
heap[idx] = heap_next;
|
|
1434
|
-
heap_next = idx;
|
|
1435
|
-
}
|
|
1436
|
-
|
|
1437
|
-
function getArrayJsValueFromWasm0(ptr, len) {
|
|
1438
|
-
ptr = ptr >>> 0;
|
|
1439
|
-
const mem = getDataViewMemory0();
|
|
1440
|
-
const result = [];
|
|
1441
|
-
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
1442
|
-
result.push(takeObject(mem.getUint32(i, true)));
|
|
1443
|
-
}
|
|
1444
|
-
return result;
|
|
1445
|
-
}
|
|
1446
|
-
|
|
1447
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
1448
|
-
ptr = ptr >>> 0;
|
|
1449
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
1450
|
-
}
|
|
1451
|
-
|
|
1452
|
-
let cachedDataViewMemory0 = null;
|
|
1453
|
-
function getDataViewMemory0() {
|
|
1454
|
-
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
1455
|
-
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
1456
|
-
}
|
|
1457
|
-
return cachedDataViewMemory0;
|
|
1458
|
-
}
|
|
1459
|
-
|
|
1460
|
-
function getStringFromWasm0(ptr, len) {
|
|
1461
|
-
ptr = ptr >>> 0;
|
|
1462
|
-
return decodeText(ptr, len);
|
|
1463
|
-
}
|
|
1464
|
-
|
|
1465
|
-
let cachedUint32ArrayMemory0 = null;
|
|
1466
|
-
function getUint32ArrayMemory0() {
|
|
1467
|
-
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
|
1468
|
-
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
1469
|
-
}
|
|
1470
|
-
return cachedUint32ArrayMemory0;
|
|
1471
|
-
}
|
|
1472
|
-
|
|
1473
|
-
let cachedUint8ArrayMemory0 = null;
|
|
1474
|
-
function getUint8ArrayMemory0() {
|
|
1475
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
1476
|
-
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
1477
|
-
}
|
|
1478
|
-
return cachedUint8ArrayMemory0;
|
|
1479
|
-
}
|
|
1480
|
-
|
|
1481
|
-
function getObject(idx) { return heap[idx]; }
|
|
1482
|
-
|
|
1483
|
-
function handleError(f, args) {
|
|
1484
|
-
try {
|
|
1485
|
-
return f.apply(this, args);
|
|
1486
|
-
} catch (e) {
|
|
1487
|
-
wasm.__wbindgen_export3(addHeapObject(e));
|
|
1488
|
-
}
|
|
1489
|
-
}
|
|
1490
|
-
|
|
1491
|
-
let heap = new Array(1024).fill(undefined);
|
|
1492
|
-
heap.push(undefined, null, true, false);
|
|
1493
|
-
|
|
1494
|
-
let heap_next = heap.length;
|
|
1495
|
-
|
|
1496
|
-
function isLikeNone(x) {
|
|
1497
|
-
return x === undefined || x === null;
|
|
1498
|
-
}
|
|
1499
|
-
|
|
1500
|
-
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
1501
|
-
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
1502
|
-
const real = (...args) => {
|
|
1503
|
-
|
|
1504
|
-
// First up with a closure we increment the internal reference
|
|
1505
|
-
// count. This ensures that the Rust closure environment won't
|
|
1506
|
-
// be deallocated while we're invoking it.
|
|
1507
|
-
state.cnt++;
|
|
1508
|
-
const a = state.a;
|
|
1509
|
-
state.a = 0;
|
|
1510
|
-
try {
|
|
1511
|
-
return f(a, state.b, ...args);
|
|
1512
|
-
} finally {
|
|
1513
|
-
state.a = a;
|
|
1514
|
-
real._wbg_cb_unref();
|
|
1515
|
-
}
|
|
1516
|
-
};
|
|
1517
|
-
real._wbg_cb_unref = () => {
|
|
1518
|
-
if (--state.cnt === 0) {
|
|
1519
|
-
state.dtor(state.a, state.b);
|
|
1520
|
-
state.a = 0;
|
|
1521
|
-
CLOSURE_DTORS.unregister(state);
|
|
1522
|
-
}
|
|
1523
|
-
};
|
|
1524
|
-
CLOSURE_DTORS.register(real, state, state);
|
|
1525
|
-
return real;
|
|
1526
|
-
}
|
|
1527
|
-
|
|
1528
|
-
function passArray32ToWasm0(arg, malloc) {
|
|
1529
|
-
const ptr = malloc(arg.length * 4, 4) >>> 0;
|
|
1530
|
-
getUint32ArrayMemory0().set(arg, ptr / 4);
|
|
1531
|
-
WASM_VECTOR_LEN = arg.length;
|
|
1532
|
-
return ptr;
|
|
1533
|
-
}
|
|
1534
|
-
|
|
1535
|
-
function passArrayJsValueToWasm0(array, malloc) {
|
|
1536
|
-
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
1537
|
-
const mem = getDataViewMemory0();
|
|
1538
|
-
for (let i = 0; i < array.length; i++) {
|
|
1539
|
-
mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
|
|
1540
|
-
}
|
|
1541
|
-
WASM_VECTOR_LEN = array.length;
|
|
1542
|
-
return ptr;
|
|
1543
|
-
}
|
|
1544
|
-
|
|
1545
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
1546
|
-
if (realloc === undefined) {
|
|
1547
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
1548
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
1549
|
-
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
1550
|
-
WASM_VECTOR_LEN = buf.length;
|
|
1551
|
-
return ptr;
|
|
1552
|
-
}
|
|
1553
|
-
|
|
1554
|
-
let len = arg.length;
|
|
1555
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
1556
|
-
|
|
1557
|
-
const mem = getUint8ArrayMemory0();
|
|
1558
|
-
|
|
1559
|
-
let offset = 0;
|
|
1560
|
-
|
|
1561
|
-
for (; offset < len; offset++) {
|
|
1562
|
-
const code = arg.charCodeAt(offset);
|
|
1563
|
-
if (code > 0x7F) break;
|
|
1564
|
-
mem[ptr + offset] = code;
|
|
1565
|
-
}
|
|
1566
|
-
if (offset !== len) {
|
|
1567
|
-
if (offset !== 0) {
|
|
1568
|
-
arg = arg.slice(offset);
|
|
1569
|
-
}
|
|
1570
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
1571
|
-
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
1572
|
-
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
1573
|
-
|
|
1574
|
-
offset += ret.written;
|
|
1575
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
1576
|
-
}
|
|
1577
|
-
|
|
1578
|
-
WASM_VECTOR_LEN = offset;
|
|
1579
|
-
return ptr;
|
|
1580
|
-
}
|
|
1581
|
-
|
|
1582
|
-
let stack_pointer = 1024;
|
|
1583
|
-
|
|
1584
|
-
function takeObject(idx) {
|
|
1585
|
-
const ret = getObject(idx);
|
|
1586
|
-
dropObject(idx);
|
|
1587
|
-
return ret;
|
|
1588
|
-
}
|
|
1589
|
-
|
|
1590
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
1591
|
-
cachedTextDecoder.decode();
|
|
1592
|
-
function decodeText(ptr, len) {
|
|
1593
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
1594
|
-
}
|
|
1595
|
-
|
|
1596
|
-
const cachedTextEncoder = new TextEncoder();
|
|
1597
|
-
|
|
1598
|
-
if (!('encodeInto' in cachedTextEncoder)) {
|
|
1599
|
-
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
1600
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
1601
|
-
view.set(buf);
|
|
1602
|
-
return {
|
|
1603
|
-
read: arg.length,
|
|
1604
|
-
written: buf.length
|
|
1605
|
-
};
|
|
1606
|
-
};
|
|
1607
|
-
}
|
|
1608
|
-
|
|
1609
|
-
let WASM_VECTOR_LEN = 0;
|
|
1610
|
-
|
|
1611
|
-
const wasmPath = `${__dirname}/qsc_wasm_bg.wasm`;
|
|
1612
|
-
const wasmBytes = require('fs').readFileSync(wasmPath);
|
|
1613
|
-
const wasmModule = new WebAssembly.Module(wasmBytes);
|
|
1614
|
-
let wasm = new WebAssembly.Instance(wasmModule, __wbg_get_imports()).exports;
|