qsharp-lang 1.6.1-dev → 1.6.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/dist/browser.d.ts +4 -8
- package/dist/browser.js +4 -4
- package/dist/compiler/compiler.d.ts +20 -37
- package/dist/compiler/compiler.js +30 -50
- package/dist/debug-service/debug-service.d.ts +3 -3
- package/dist/debug-service/debug-service.js +4 -3
- package/dist/katas-content.generated.js +28 -8
- package/dist/katas-content.generated.md.js +28 -8
- package/dist/language-service/language-service.d.ts +3 -4
- package/dist/language-service/language-service.js +8 -3
- package/dist/main.d.ts +3 -6
- package/dist/main.js +4 -4
- package/docs/Microsoft.Quantum.Arrays/All.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Any.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Chunks.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/CircularlyShifted.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/ColumnAt.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Count.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Diagonal.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/DrawMany.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Enumerated.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Excluding.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Filtered.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/FlatMapped.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Flattened.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Fold.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/ForEach.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Head.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/HeadAndRest.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/IndexOf.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/IndexRange.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Interleaved.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/IsEmpty.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/IsRectangularArray.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/IsSorted.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/IsSquareArray.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Mapped.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/MappedByIndex.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/MappedOverRange.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Most.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/MostAndTail.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Padded.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Partitioned.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Rest.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Reversed.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/SequenceI.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/SequenceL.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Sorted.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Subarray.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Swapped.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Tail.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Transposed.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Unzipped.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Where.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Windows.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Zipped.md +1 -1
- package/docs/Microsoft.Quantum.Canon/ApplyCNOTChain.md +1 -1
- package/docs/Microsoft.Quantum.Canon/ApplyControlledOnBitString.md +1 -1
- package/docs/Microsoft.Quantum.Canon/ApplyControlledOnInt.md +1 -1
- package/docs/Microsoft.Quantum.Canon/ApplyP.md +1 -1
- package/docs/Microsoft.Quantum.Canon/ApplyPauli.md +1 -1
- package/docs/Microsoft.Quantum.Canon/ApplyPauliFromBitString.md +1 -1
- package/docs/Microsoft.Quantum.Canon/ApplyPauliFromInt.md +1 -1
- package/docs/Microsoft.Quantum.Canon/ApplyQFT.md +1 -1
- package/docs/Microsoft.Quantum.Canon/ApplyToEach.md +1 -1
- package/docs/Microsoft.Quantum.Canon/ApplyToEachA.md +1 -1
- package/docs/Microsoft.Quantum.Canon/ApplyToEachC.md +1 -1
- package/docs/Microsoft.Quantum.Canon/ApplyToEachCA.md +1 -1
- package/docs/Microsoft.Quantum.Canon/ApplyXorInPlace.md +1 -1
- package/docs/Microsoft.Quantum.Canon/ApplyXorInPlaceL.md +1 -1
- package/docs/Microsoft.Quantum.Canon/CX.md +1 -1
- package/docs/Microsoft.Quantum.Canon/CY.md +1 -1
- package/docs/Microsoft.Quantum.Canon/CZ.md +1 -1
- package/docs/Microsoft.Quantum.Canon/Fst.md +1 -1
- package/docs/Microsoft.Quantum.Canon/Snd.md +1 -1
- package/docs/Microsoft.Quantum.Canon/SwapReverseRegister.md +1 -1
- package/docs/Microsoft.Quantum.Convert/BigIntAsBoolArray.md +1 -1
- package/docs/Microsoft.Quantum.Convert/BoolArrayAsBigInt.md +1 -1
- package/docs/Microsoft.Quantum.Convert/BoolArrayAsInt.md +1 -1
- package/docs/Microsoft.Quantum.Convert/BoolArrayAsResultArray.md +1 -1
- package/docs/Microsoft.Quantum.Convert/BoolAsResult.md +1 -1
- package/docs/Microsoft.Quantum.Convert/ComplexAsComplexPolar.md +1 -1
- package/docs/Microsoft.Quantum.Convert/ComplexPolarAsComplex.md +1 -1
- package/docs/Microsoft.Quantum.Convert/IntAsBigInt.md +1 -1
- package/docs/Microsoft.Quantum.Convert/IntAsBoolArray.md +1 -1
- package/docs/Microsoft.Quantum.Convert/IntAsDouble.md +1 -1
- package/docs/Microsoft.Quantum.Convert/ResultArrayAsBoolArray.md +1 -1
- package/docs/Microsoft.Quantum.Convert/ResultArrayAsInt.md +1 -1
- package/docs/Microsoft.Quantum.Convert/ResultAsBool.md +1 -1
- 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/RangeReverse.md +1 -1
- package/docs/Microsoft.Quantum.Core/RangeStart.md +1 -1
- package/docs/Microsoft.Quantum.Core/RangeStep.md +1 -1
- package/docs/Microsoft.Quantum.Core/Repeated.md +1 -1
- package/docs/Microsoft.Quantum.Diagnostics/DumpMachine.md +1 -1
- package/docs/Microsoft.Quantum.Diagnostics/DumpRegister.md +1 -1
- package/docs/Microsoft.Quantum.Diagnostics/Fact.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/AND.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/CCNOT.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/CNOT.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/Exp.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/H.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/I.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/M.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/Measure.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/Message.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/R.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/R1.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/R1Frac.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/RFrac.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/Reset.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/ResetAll.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/Rx.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/Rxx.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/Ry.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/Ryy.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/Rz.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/Rzz.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/S.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/SWAP.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/T.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/X.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/Y.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/Z.md +1 -1
- package/docs/Microsoft.Quantum.Logical/Xor.md +1 -1
- package/docs/Microsoft.Quantum.Math/AbsComplex.md +1 -1
- package/docs/Microsoft.Quantum.Math/AbsComplexPolar.md +1 -1
- package/docs/Microsoft.Quantum.Math/AbsD.md +1 -1
- package/docs/Microsoft.Quantum.Math/AbsI.md +1 -1
- package/docs/Microsoft.Quantum.Math/AbsL.md +1 -1
- package/docs/Microsoft.Quantum.Math/AbsSquaredComplex.md +1 -1
- package/docs/Microsoft.Quantum.Math/AbsSquaredComplexPolar.md +1 -1
- package/docs/Microsoft.Quantum.Math/ApproximateFactorial.md +1 -1
- package/docs/Microsoft.Quantum.Math/ArcCos.md +1 -1
- package/docs/Microsoft.Quantum.Math/ArcCosh.md +1 -1
- package/docs/Microsoft.Quantum.Math/ArcSin.md +1 -1
- package/docs/Microsoft.Quantum.Math/ArcSinh.md +1 -1
- package/docs/Microsoft.Quantum.Math/ArcTan.md +1 -1
- package/docs/Microsoft.Quantum.Math/ArcTan2.md +1 -1
- package/docs/Microsoft.Quantum.Math/ArcTanh.md +1 -1
- package/docs/Microsoft.Quantum.Math/ArgComplex.md +1 -1
- package/docs/Microsoft.Quantum.Math/ArgComplexPolar.md +1 -1
- package/docs/Microsoft.Quantum.Math/Binom.md +1 -1
- package/docs/Microsoft.Quantum.Math/BitSizeI.md +1 -1
- package/docs/Microsoft.Quantum.Math/BitSizeL.md +1 -1
- package/docs/Microsoft.Quantum.Math/Ceiling.md +1 -1
- package/docs/Microsoft.Quantum.Math/Complex.md +1 -1
- package/docs/Microsoft.Quantum.Math/ComplexPolar.md +1 -1
- package/docs/Microsoft.Quantum.Math/ContinuedFractionConvergentI.md +1 -1
- package/docs/Microsoft.Quantum.Math/ContinuedFractionConvergentL.md +1 -1
- package/docs/Microsoft.Quantum.Math/Cos.md +1 -1
- package/docs/Microsoft.Quantum.Math/Cosh.md +1 -1
- package/docs/Microsoft.Quantum.Math/DivRemI.md +1 -1
- package/docs/Microsoft.Quantum.Math/DivRemL.md +1 -1
- package/docs/Microsoft.Quantum.Math/DividedByC.md +1 -1
- package/docs/Microsoft.Quantum.Math/DividedByCP.md +1 -1
- package/docs/Microsoft.Quantum.Math/E.md +1 -1
- package/docs/Microsoft.Quantum.Math/ExpModI.md +1 -1
- package/docs/Microsoft.Quantum.Math/ExpModL.md +1 -1
- package/docs/Microsoft.Quantum.Math/ExtendedGreatestCommonDivisorI.md +1 -1
- package/docs/Microsoft.Quantum.Math/ExtendedGreatestCommonDivisorL.md +1 -1
- package/docs/Microsoft.Quantum.Math/FactorialI.md +1 -1
- package/docs/Microsoft.Quantum.Math/FactorialL.md +1 -1
- package/docs/Microsoft.Quantum.Math/Floor.md +1 -1
- package/docs/Microsoft.Quantum.Math/GreatestCommonDivisorI.md +1 -1
- package/docs/Microsoft.Quantum.Math/GreatestCommonDivisorL.md +1 -1
- package/docs/Microsoft.Quantum.Math/HammingWeightI.md +1 -1
- package/docs/Microsoft.Quantum.Math/InverseModI.md +1 -1
- package/docs/Microsoft.Quantum.Math/InverseModL.md +1 -1
- package/docs/Microsoft.Quantum.Math/IsCoprimeI.md +1 -1
- package/docs/Microsoft.Quantum.Math/IsCoprimeL.md +1 -1
- package/docs/Microsoft.Quantum.Math/IsInfinite.md +1 -1
- package/docs/Microsoft.Quantum.Math/IsNaN.md +1 -1
- package/docs/Microsoft.Quantum.Math/LargestFixedPoint.md +1 -1
- package/docs/Microsoft.Quantum.Math/Lg.md +1 -1
- package/docs/Microsoft.Quantum.Math/Log.md +1 -1
- package/docs/Microsoft.Quantum.Math/Log10.md +1 -1
- package/docs/Microsoft.Quantum.Math/LogFactorialD.md +1 -1
- package/docs/Microsoft.Quantum.Math/LogGammaD.md +1 -1
- package/docs/Microsoft.Quantum.Math/LogOf2.md +1 -1
- package/docs/Microsoft.Quantum.Math/Max.md +1 -1
- package/docs/Microsoft.Quantum.Math/MaxD.md +1 -1
- package/docs/Microsoft.Quantum.Math/MaxI.md +1 -1
- package/docs/Microsoft.Quantum.Math/MaxL.md +1 -1
- package/docs/Microsoft.Quantum.Math/Min.md +1 -1
- package/docs/Microsoft.Quantum.Math/MinD.md +1 -1
- package/docs/Microsoft.Quantum.Math/MinI.md +1 -1
- package/docs/Microsoft.Quantum.Math/MinL.md +1 -1
- package/docs/Microsoft.Quantum.Math/MinusC.md +1 -1
- package/docs/Microsoft.Quantum.Math/MinusCP.md +1 -1
- package/docs/Microsoft.Quantum.Math/ModulusI.md +1 -1
- package/docs/Microsoft.Quantum.Math/ModulusL.md +1 -1
- package/docs/Microsoft.Quantum.Math/NegationC.md +1 -1
- package/docs/Microsoft.Quantum.Math/NegationCP.md +1 -1
- package/docs/Microsoft.Quantum.Math/PI.md +1 -1
- package/docs/Microsoft.Quantum.Math/PNorm.md +1 -1
- package/docs/Microsoft.Quantum.Math/PNormalized.md +1 -1
- package/docs/Microsoft.Quantum.Math/PlusC.md +1 -1
- package/docs/Microsoft.Quantum.Math/PlusCP.md +1 -1
- package/docs/Microsoft.Quantum.Math/PowC.md +1 -1
- package/docs/Microsoft.Quantum.Math/PowCP.md +1 -1
- package/docs/Microsoft.Quantum.Math/RealMod.md +1 -1
- package/docs/Microsoft.Quantum.Math/Round.md +1 -1
- package/docs/Microsoft.Quantum.Math/SignD.md +1 -1
- package/docs/Microsoft.Quantum.Math/SignI.md +1 -1
- package/docs/Microsoft.Quantum.Math/SignL.md +1 -1
- package/docs/Microsoft.Quantum.Math/Sin.md +1 -1
- package/docs/Microsoft.Quantum.Math/Sinh.md +1 -1
- package/docs/Microsoft.Quantum.Math/SmallestFixedPoint.md +1 -1
- package/docs/Microsoft.Quantum.Math/Sqrt.md +1 -1
- package/docs/Microsoft.Quantum.Math/SquaredNorm.md +1 -1
- package/docs/Microsoft.Quantum.Math/Tan.md +1 -1
- package/docs/Microsoft.Quantum.Math/Tanh.md +1 -1
- package/docs/Microsoft.Quantum.Math/TimesC.md +1 -1
- package/docs/Microsoft.Quantum.Math/TimesCP.md +1 -1
- package/docs/Microsoft.Quantum.Math/TrailingZeroCountI.md +1 -1
- package/docs/Microsoft.Quantum.Math/TrailingZeroCountL.md +1 -1
- package/docs/Microsoft.Quantum.Math/Truncate.md +1 -1
- package/docs/Microsoft.Quantum.Measurement/MResetEachZ.md +1 -1
- package/docs/Microsoft.Quantum.Measurement/MResetX.md +1 -1
- package/docs/Microsoft.Quantum.Measurement/MResetY.md +1 -1
- package/docs/Microsoft.Quantum.Measurement/MResetZ.md +1 -1
- package/docs/Microsoft.Quantum.Measurement/MeasureAllZ.md +1 -1
- package/docs/Microsoft.Quantum.Measurement/MeasureEachZ.md +1 -1
- package/docs/Microsoft.Quantum.Measurement/MeasureInteger.md +1 -1
- package/docs/Microsoft.Quantum.ResourceEstimation/AccountForEstimates.md +1 -1
- package/docs/Microsoft.Quantum.ResourceEstimation/AuxQubitCount.md +1 -1
- package/docs/Microsoft.Quantum.ResourceEstimation/BeginEstimateCaching.md +1 -1
- package/docs/Microsoft.Quantum.ResourceEstimation/BeginRepeatEstimates.md +1 -1
- package/docs/Microsoft.Quantum.ResourceEstimation/CczCount.md +1 -1
- package/docs/Microsoft.Quantum.ResourceEstimation/EndEstimateCaching.md +1 -1
- package/docs/Microsoft.Quantum.ResourceEstimation/EndRepeatEstimates.md +1 -1
- package/docs/Microsoft.Quantum.ResourceEstimation/MeasurementCount.md +1 -1
- package/docs/Microsoft.Quantum.ResourceEstimation/PSSPCLayout.md +1 -1
- package/docs/Microsoft.Quantum.ResourceEstimation/RepeatEstimates.md +1 -1
- package/docs/Microsoft.Quantum.ResourceEstimation/RotationCount.md +1 -1
- package/docs/Microsoft.Quantum.ResourceEstimation/RotationDepth.md +1 -1
- package/docs/Microsoft.Quantum.ResourceEstimation/SingleVariant.md +1 -1
- package/docs/Microsoft.Quantum.ResourceEstimation/TCount.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/AddLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfEqualL.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfEqualLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterL.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterOrEqualL.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterOrEqualLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessL.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessOrEqualL.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessOrEqualLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/FourierTDIncByLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByI.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByIUsingIncByLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByL.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByLEUsingAddLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByLUsingIncByLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/LookAheadDKRSAddLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/MAJ.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ReflectAboutInteger.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/RippleCarryCGAddLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/RippleCarryCGIncByLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/RippleCarryTTKIncByLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.StatePreparation/ApproximatelyPreparePureStateCP.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.StatePreparation/PreparePureStateD.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.TableLookup/Select.md +1 -1
- package/lib/node/qsc_wasm.cjs +133 -152
- package/lib/node/qsc_wasm.d.cts +62 -36
- package/lib/node/qsc_wasm_bg.wasm +0 -0
- package/lib/web/qsc_wasm.d.ts +71 -45
- package/lib/web/qsc_wasm.js +126 -150
- package/lib/web/qsc_wasm_bg.wasm +0 -0
- package/package.json +1 -1
- package/ux/estimatesOverview.tsx +2 -0
- package/ux/estimatesPanel.tsx +2 -0
- package/ux/qsharp-ux.css +30 -5
- package/ux/saveImage.tsx +107 -0
- package/ux/saveImageUtil.tsx +72 -0
- package/ux/scatterChart.tsx +31 -0
package/lib/node/qsc_wasm.cjs
CHANGED
|
@@ -110,15 +110,6 @@ function takeObject(idx) {
|
|
|
110
110
|
return ret;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
function addHeapObject(obj) {
|
|
114
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
115
|
-
const idx = heap_next;
|
|
116
|
-
heap_next = heap[idx];
|
|
117
|
-
|
|
118
|
-
heap[idx] = obj;
|
|
119
|
-
return idx;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
113
|
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
123
114
|
|
|
124
115
|
cachedTextDecoder.decode();
|
|
@@ -128,6 +119,15 @@ function getStringFromWasm0(ptr, len) {
|
|
|
128
119
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
129
120
|
}
|
|
130
121
|
|
|
122
|
+
function addHeapObject(obj) {
|
|
123
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
124
|
+
const idx = heap_next;
|
|
125
|
+
heap_next = heap[idx];
|
|
126
|
+
|
|
127
|
+
heap[idx] = obj;
|
|
128
|
+
return idx;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
131
|
let cachedBigInt64Memory0 = null;
|
|
132
132
|
|
|
133
133
|
function getBigInt64Memory0() {
|
|
@@ -232,10 +232,18 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
232
232
|
CLOSURE_DTORS.register(real, state, state);
|
|
233
233
|
return real;
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function __wbg_adapter_52(arg0, arg1, arg2) {
|
|
236
236
|
wasm.__wbindgen_export_3(arg0, arg1, addHeapObject(arg2));
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
+
let stack_pointer = 128;
|
|
240
|
+
|
|
241
|
+
function addBorrowedObject(obj) {
|
|
242
|
+
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
243
|
+
heap[--stack_pointer] = obj;
|
|
244
|
+
return stack_pointer;
|
|
245
|
+
}
|
|
246
|
+
|
|
239
247
|
let cachedUint32Memory0 = null;
|
|
240
248
|
|
|
241
249
|
function getUint32Memory0() {
|
|
@@ -245,6 +253,13 @@ function getUint32Memory0() {
|
|
|
245
253
|
return cachedUint32Memory0;
|
|
246
254
|
}
|
|
247
255
|
|
|
256
|
+
function passArray32ToWasm0(arg, malloc) {
|
|
257
|
+
const ptr = malloc(arg.length * 4, 4) >>> 0;
|
|
258
|
+
getUint32Memory0().set(arg, ptr / 4);
|
|
259
|
+
WASM_VECTOR_LEN = arg.length;
|
|
260
|
+
return ptr;
|
|
261
|
+
}
|
|
262
|
+
|
|
248
263
|
function passArrayJsValueToWasm0(array, malloc) {
|
|
249
264
|
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
250
265
|
const mem = getUint32Memory0();
|
|
@@ -255,21 +270,6 @@ function passArrayJsValueToWasm0(array, malloc) {
|
|
|
255
270
|
return ptr;
|
|
256
271
|
}
|
|
257
272
|
|
|
258
|
-
let stack_pointer = 128;
|
|
259
|
-
|
|
260
|
-
function addBorrowedObject(obj) {
|
|
261
|
-
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
262
|
-
heap[--stack_pointer] = obj;
|
|
263
|
-
return stack_pointer;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
function passArray32ToWasm0(arg, malloc) {
|
|
267
|
-
const ptr = malloc(arg.length * 4, 4) >>> 0;
|
|
268
|
-
getUint32Memory0().set(arg, ptr / 4);
|
|
269
|
-
WASM_VECTOR_LEN = arg.length;
|
|
270
|
-
return ptr;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
273
|
function getArrayJsValueFromWasm0(ptr, len) {
|
|
274
274
|
ptr = ptr >>> 0;
|
|
275
275
|
const mem = getUint32Memory0();
|
|
@@ -326,100 +326,76 @@ module.exports.git_hash = function() {
|
|
|
326
326
|
};
|
|
327
327
|
|
|
328
328
|
/**
|
|
329
|
-
* @param {
|
|
330
|
-
* @param {(string)[]} language_features
|
|
331
|
-
* @param {string} profile
|
|
329
|
+
* @param {IProgramConfig} program
|
|
332
330
|
* @returns {string}
|
|
333
331
|
*/
|
|
334
|
-
module.exports.get_qir = function(
|
|
335
|
-
let
|
|
336
|
-
let
|
|
332
|
+
module.exports.get_qir = function(program) {
|
|
333
|
+
let deferred2_0;
|
|
334
|
+
let deferred2_1;
|
|
337
335
|
try {
|
|
338
336
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
339
|
-
|
|
340
|
-
const len0 = WASM_VECTOR_LEN;
|
|
341
|
-
const ptr1 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export_0);
|
|
342
|
-
const len1 = WASM_VECTOR_LEN;
|
|
343
|
-
const ptr2 = passStringToWasm0(profile, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
344
|
-
const len2 = WASM_VECTOR_LEN;
|
|
345
|
-
wasm.get_qir(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
337
|
+
wasm.get_qir(retptr, addHeapObject(program));
|
|
346
338
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
347
339
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
348
340
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
349
341
|
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
350
|
-
var
|
|
351
|
-
var
|
|
342
|
+
var ptr1 = r0;
|
|
343
|
+
var len1 = r1;
|
|
352
344
|
if (r3) {
|
|
353
|
-
|
|
345
|
+
ptr1 = 0; len1 = 0;
|
|
354
346
|
throw takeObject(r2);
|
|
355
347
|
}
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
return getStringFromWasm0(
|
|
348
|
+
deferred2_0 = ptr1;
|
|
349
|
+
deferred2_1 = len1;
|
|
350
|
+
return getStringFromWasm0(ptr1, len1);
|
|
359
351
|
} finally {
|
|
360
352
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
361
|
-
wasm.__wbindgen_export_4(
|
|
353
|
+
wasm.__wbindgen_export_4(deferred2_0, deferred2_1, 1);
|
|
362
354
|
}
|
|
363
355
|
};
|
|
364
356
|
|
|
365
357
|
/**
|
|
366
|
-
* @param {
|
|
358
|
+
* @param {IProgramConfig} program
|
|
367
359
|
* @param {string} params
|
|
368
|
-
* @param {(string)[]} language_features
|
|
369
|
-
* @param {string} targetProfile
|
|
370
360
|
* @returns {string}
|
|
371
361
|
*/
|
|
372
|
-
module.exports.get_estimates = function(
|
|
373
|
-
let
|
|
374
|
-
let
|
|
362
|
+
module.exports.get_estimates = function(program, params) {
|
|
363
|
+
let deferred3_0;
|
|
364
|
+
let deferred3_1;
|
|
375
365
|
try {
|
|
376
366
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
377
|
-
const ptr0 =
|
|
367
|
+
const ptr0 = passStringToWasm0(params, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
378
368
|
const len0 = WASM_VECTOR_LEN;
|
|
379
|
-
|
|
380
|
-
const len1 = WASM_VECTOR_LEN;
|
|
381
|
-
const ptr2 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export_0);
|
|
382
|
-
const len2 = WASM_VECTOR_LEN;
|
|
383
|
-
const ptr3 = passStringToWasm0(targetProfile, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
384
|
-
const len3 = WASM_VECTOR_LEN;
|
|
385
|
-
wasm.get_estimates(retptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
369
|
+
wasm.get_estimates(retptr, addHeapObject(program), ptr0, len0);
|
|
386
370
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
387
371
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
388
372
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
389
373
|
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
390
|
-
var
|
|
391
|
-
var
|
|
374
|
+
var ptr2 = r0;
|
|
375
|
+
var len2 = r1;
|
|
392
376
|
if (r3) {
|
|
393
|
-
|
|
377
|
+
ptr2 = 0; len2 = 0;
|
|
394
378
|
throw takeObject(r2);
|
|
395
379
|
}
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
return getStringFromWasm0(
|
|
380
|
+
deferred3_0 = ptr2;
|
|
381
|
+
deferred3_1 = len2;
|
|
382
|
+
return getStringFromWasm0(ptr2, len2);
|
|
399
383
|
} finally {
|
|
400
384
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
401
|
-
wasm.__wbindgen_export_4(
|
|
385
|
+
wasm.__wbindgen_export_4(deferred3_0, deferred3_1, 1);
|
|
402
386
|
}
|
|
403
387
|
};
|
|
404
388
|
|
|
405
389
|
/**
|
|
406
|
-
* @param {
|
|
407
|
-
* @param {string} targetProfile
|
|
408
|
-
* @param {(string)[]} language_features
|
|
390
|
+
* @param {IProgramConfig} program
|
|
409
391
|
* @param {boolean} simulate
|
|
410
392
|
* @param {IOperationInfo | undefined} [operation]
|
|
411
393
|
* @returns {any}
|
|
412
394
|
*/
|
|
413
|
-
module.exports.get_circuit = function(
|
|
395
|
+
module.exports.get_circuit = function(program, simulate, operation) {
|
|
414
396
|
try {
|
|
415
397
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
416
|
-
|
|
417
|
-
const len0 = WASM_VECTOR_LEN;
|
|
418
|
-
const ptr1 = passStringToWasm0(targetProfile, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
419
|
-
const len1 = WASM_VECTOR_LEN;
|
|
420
|
-
const ptr2 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export_0);
|
|
421
|
-
const len2 = WASM_VECTOR_LEN;
|
|
422
|
-
wasm.get_circuit(retptr, ptr0, len0, ptr1, len1, ptr2, len2, simulate, isLikeNone(operation) ? 0 : addHeapObject(operation));
|
|
398
|
+
wasm.get_circuit(retptr, addHeapObject(program), simulate, isLikeNone(operation) ? 0 : addHeapObject(operation));
|
|
423
399
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
424
400
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
425
401
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -530,26 +506,18 @@ module.exports.get_hir = function(code, language_features, profile) {
|
|
|
530
506
|
};
|
|
531
507
|
|
|
532
508
|
/**
|
|
533
|
-
* @param {
|
|
509
|
+
* @param {IProgramConfig} program
|
|
534
510
|
* @param {string} expr
|
|
535
511
|
* @param {Function} event_cb
|
|
536
512
|
* @param {number} shots
|
|
537
|
-
* @param {(string)[]} language_features
|
|
538
|
-
* @param {string} profile
|
|
539
513
|
* @returns {boolean}
|
|
540
514
|
*/
|
|
541
|
-
module.exports.run = function(
|
|
515
|
+
module.exports.run = function(program, expr, event_cb, shots) {
|
|
542
516
|
try {
|
|
543
517
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
544
|
-
const ptr0 =
|
|
518
|
+
const ptr0 = passStringToWasm0(expr, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
545
519
|
const len0 = WASM_VECTOR_LEN;
|
|
546
|
-
|
|
547
|
-
const len1 = WASM_VECTOR_LEN;
|
|
548
|
-
const ptr2 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export_0);
|
|
549
|
-
const len2 = WASM_VECTOR_LEN;
|
|
550
|
-
const ptr3 = passStringToWasm0(profile, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
551
|
-
const len3 = WASM_VECTOR_LEN;
|
|
552
|
-
wasm.run(retptr, ptr0, len0, ptr1, len1, addBorrowedObject(event_cb), shots, ptr2, len2, ptr3, len3);
|
|
520
|
+
wasm.run(retptr, addHeapObject(program), ptr0, len0, addBorrowedObject(event_cb), shots);
|
|
553
521
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
554
522
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
555
523
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -581,26 +549,18 @@ module.exports.check_exercise_solution = function(solution_code, exercise_source
|
|
|
581
549
|
};
|
|
582
550
|
|
|
583
551
|
/**
|
|
584
|
-
* @param {
|
|
585
|
-
* @param {string | undefined} [targetProfile]
|
|
586
|
-
* @param {(string)[] | undefined} [languageFeatures]
|
|
552
|
+
* @param {IProgramConfig | undefined} [additional_program]
|
|
587
553
|
* @returns {(IDocFile)[]}
|
|
588
554
|
*/
|
|
589
|
-
module.exports.generate_docs = function(
|
|
555
|
+
module.exports.generate_docs = function(additional_program) {
|
|
590
556
|
try {
|
|
591
557
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
592
|
-
|
|
593
|
-
var len0 = WASM_VECTOR_LEN;
|
|
594
|
-
var ptr1 = isLikeNone(targetProfile) ? 0 : passStringToWasm0(targetProfile, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
595
|
-
var len1 = WASM_VECTOR_LEN;
|
|
596
|
-
var ptr2 = isLikeNone(languageFeatures) ? 0 : passArrayJsValueToWasm0(languageFeatures, wasm.__wbindgen_export_0);
|
|
597
|
-
var len2 = WASM_VECTOR_LEN;
|
|
598
|
-
wasm.generate_docs(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
558
|
+
wasm.generate_docs(retptr, isLikeNone(additional_program) ? 0 : addHeapObject(additional_program));
|
|
599
559
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
600
560
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
601
|
-
var
|
|
561
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
602
562
|
wasm.__wbindgen_export_4(r0, r1 * 4, 4);
|
|
603
|
-
return
|
|
563
|
+
return v1;
|
|
604
564
|
} finally {
|
|
605
565
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
606
566
|
}
|
|
@@ -613,7 +573,7 @@ function handleError(f, args) {
|
|
|
613
573
|
wasm.__wbindgen_export_5(addHeapObject(e));
|
|
614
574
|
}
|
|
615
575
|
}
|
|
616
|
-
function
|
|
576
|
+
function __wbg_adapter_186(arg0, arg1, arg2, arg3) {
|
|
617
577
|
wasm.__wbindgen_export_6(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
618
578
|
}
|
|
619
579
|
|
|
@@ -647,34 +607,26 @@ class DebugService {
|
|
|
647
607
|
return this;
|
|
648
608
|
}
|
|
649
609
|
/**
|
|
650
|
-
* @param {
|
|
651
|
-
* @param {string}
|
|
652
|
-
* @param {string | undefined} entry
|
|
653
|
-
* @param {(string)[]} language_features
|
|
610
|
+
* @param {IProgramConfig} program
|
|
611
|
+
* @param {string | undefined} [entry]
|
|
654
612
|
* @returns {string}
|
|
655
613
|
*/
|
|
656
|
-
|
|
657
|
-
let
|
|
658
|
-
let
|
|
614
|
+
load_program(program, entry) {
|
|
615
|
+
let deferred2_0;
|
|
616
|
+
let deferred2_1;
|
|
659
617
|
try {
|
|
660
618
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
const len1 = WASM_VECTOR_LEN;
|
|
665
|
-
var ptr2 = isLikeNone(entry) ? 0 : passStringToWasm0(entry, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
666
|
-
var len2 = WASM_VECTOR_LEN;
|
|
667
|
-
const ptr3 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export_0);
|
|
668
|
-
const len3 = WASM_VECTOR_LEN;
|
|
669
|
-
wasm.debugservice_load_source(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
619
|
+
var ptr0 = isLikeNone(entry) ? 0 : passStringToWasm0(entry, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
620
|
+
var len0 = WASM_VECTOR_LEN;
|
|
621
|
+
wasm.debugservice_load_program(retptr, this.__wbg_ptr, addHeapObject(program), ptr0, len0);
|
|
670
622
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
671
623
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
672
|
-
|
|
673
|
-
|
|
624
|
+
deferred2_0 = r0;
|
|
625
|
+
deferred2_1 = r1;
|
|
674
626
|
return getStringFromWasm0(r0, r1);
|
|
675
627
|
} finally {
|
|
676
628
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
677
|
-
wasm.__wbindgen_export_4(
|
|
629
|
+
wasm.__wbindgen_export_4(deferred2_0, deferred2_1, 1);
|
|
678
630
|
}
|
|
679
631
|
}
|
|
680
632
|
/**
|
|
@@ -848,13 +800,11 @@ class LanguageService {
|
|
|
848
800
|
}
|
|
849
801
|
/**
|
|
850
802
|
* @param {(uri: string, version: number | undefined, diagnostics: VSDiagnostic[]) => void} diagnostics_callback
|
|
851
|
-
* @param {
|
|
852
|
-
* @param {(uri: string) => Promise<[string, number][]>} list_directory
|
|
853
|
-
* @param {(uri: string) => Promise<{ manifestDirectory: string }| null>} get_manifest
|
|
803
|
+
* @param {IProjectHost} host
|
|
854
804
|
* @returns {Promise<any>}
|
|
855
805
|
*/
|
|
856
|
-
start_background_work(diagnostics_callback,
|
|
857
|
-
const ret = wasm.languageservice_start_background_work(this.__wbg_ptr, addHeapObject(diagnostics_callback), addHeapObject(
|
|
806
|
+
start_background_work(diagnostics_callback, host) {
|
|
807
|
+
const ret = wasm.languageservice_start_background_work(this.__wbg_ptr, addHeapObject(diagnostics_callback), addHeapObject(host));
|
|
858
808
|
return takeObject(ret);
|
|
859
809
|
}
|
|
860
810
|
/**
|
|
@@ -1080,21 +1030,21 @@ class ProjectLoader {
|
|
|
1080
1030
|
wasm.__wbg_projectloader_free(ptr);
|
|
1081
1031
|
}
|
|
1082
1032
|
/**
|
|
1083
|
-
* @param {
|
|
1084
|
-
* @param {(uri: string) => Promise<[string, number][]>} list_directory
|
|
1085
|
-
* @param {(uri: string) => Promise<{ manifestDirectory: string }| null>} get_manifest
|
|
1033
|
+
* @param {IProjectHost} project_host
|
|
1086
1034
|
*/
|
|
1087
|
-
constructor(
|
|
1088
|
-
const ret = wasm.projectloader_new(addHeapObject(
|
|
1035
|
+
constructor(project_host) {
|
|
1036
|
+
const ret = wasm.projectloader_new(addHeapObject(project_host));
|
|
1089
1037
|
this.__wbg_ptr = ret >>> 0;
|
|
1090
1038
|
return this;
|
|
1091
1039
|
}
|
|
1092
1040
|
/**
|
|
1093
|
-
* @param {
|
|
1094
|
-
* @returns {Promise<
|
|
1041
|
+
* @param {string} directory
|
|
1042
|
+
* @returns {Promise<IProjectConfig>}
|
|
1095
1043
|
*/
|
|
1096
|
-
load_project(
|
|
1097
|
-
const
|
|
1044
|
+
load_project(directory) {
|
|
1045
|
+
const ptr0 = passStringToWasm0(directory, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
1046
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1047
|
+
const ret = wasm.projectloader_load_project(this.__wbg_ptr, ptr0, len0);
|
|
1098
1048
|
return takeObject(ret);
|
|
1099
1049
|
}
|
|
1100
1050
|
}
|
|
@@ -1120,6 +1070,11 @@ module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
|
1120
1070
|
takeObject(arg0);
|
|
1121
1071
|
};
|
|
1122
1072
|
|
|
1073
|
+
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
1074
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1075
|
+
return addHeapObject(ret);
|
|
1076
|
+
};
|
|
1077
|
+
|
|
1123
1078
|
module.exports.__wbindgen_cb_drop = function(arg0) {
|
|
1124
1079
|
const obj = takeObject(arg0).original;
|
|
1125
1080
|
if (obj.cnt-- == 1) {
|
|
@@ -1167,11 +1122,6 @@ module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
|
1167
1122
|
return addHeapObject(ret);
|
|
1168
1123
|
};
|
|
1169
1124
|
|
|
1170
|
-
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
1171
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1172
|
-
return addHeapObject(ret);
|
|
1173
|
-
};
|
|
1174
|
-
|
|
1175
1125
|
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
1176
1126
|
const ret = getObject(arg0) === undefined;
|
|
1177
1127
|
return ret;
|
|
@@ -1215,9 +1165,25 @@ module.exports.__wbg_stack_3090cd8fd3702c6e = function(arg0, arg1) {
|
|
|
1215
1165
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1216
1166
|
};
|
|
1217
1167
|
|
|
1218
|
-
module.exports.
|
|
1219
|
-
const ret = getObject(
|
|
1220
|
-
|
|
1168
|
+
module.exports.__wbg_profile_431ee5e29ff55ee3 = function(arg0, arg1) {
|
|
1169
|
+
const ret = getObject(arg1).profile;
|
|
1170
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
1171
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1172
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
1173
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1174
|
+
};
|
|
1175
|
+
|
|
1176
|
+
module.exports.__wbg_sources_604e3e26bf93d80c = function(arg0) {
|
|
1177
|
+
const ret = getObject(arg0).sources;
|
|
1178
|
+
return addHeapObject(ret);
|
|
1179
|
+
};
|
|
1180
|
+
|
|
1181
|
+
module.exports.__wbg_languageFeatures_ebc106d4e512fb1c = function(arg0, arg1) {
|
|
1182
|
+
const ret = getObject(arg1).languageFeatures;
|
|
1183
|
+
const ptr1 = passArrayJsValueToWasm0(ret, wasm.__wbindgen_export_0);
|
|
1184
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1185
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
1186
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1221
1187
|
};
|
|
1222
1188
|
|
|
1223
1189
|
module.exports.__wbindgen_is_function = function(arg0) {
|
|
@@ -1235,6 +1201,26 @@ module.exports.__wbindgen_object_clone_ref = function(arg0) {
|
|
|
1235
1201
|
return addHeapObject(ret);
|
|
1236
1202
|
};
|
|
1237
1203
|
|
|
1204
|
+
module.exports.__wbg_readFile_3776aacd85682587 = function(arg0, arg1, arg2) {
|
|
1205
|
+
const ret = getObject(arg0).readFile(getStringFromWasm0(arg1, arg2));
|
|
1206
|
+
return addHeapObject(ret);
|
|
1207
|
+
};
|
|
1208
|
+
|
|
1209
|
+
module.exports.__wbg_listDirectory_271976dbfbb2dc9f = function(arg0, arg1, arg2) {
|
|
1210
|
+
const ret = getObject(arg0).listDirectory(getStringFromWasm0(arg1, arg2));
|
|
1211
|
+
return addHeapObject(ret);
|
|
1212
|
+
};
|
|
1213
|
+
|
|
1214
|
+
module.exports.__wbg_resolvePath_674360b3ad1067f3 = function(arg0, arg1, arg2, arg3, arg4) {
|
|
1215
|
+
const ret = getObject(arg0).resolvePath(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1216
|
+
return addHeapObject(ret);
|
|
1217
|
+
};
|
|
1218
|
+
|
|
1219
|
+
module.exports.__wbg_findManifestDirectory_1e22fa316acdbeff = function(arg0, arg1, arg2) {
|
|
1220
|
+
const ret = getObject(arg0).findManifestDirectory(getStringFromWasm0(arg1, arg2));
|
|
1221
|
+
return addHeapObject(ret);
|
|
1222
|
+
};
|
|
1223
|
+
|
|
1238
1224
|
module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
1239
1225
|
const ret = getObject(arg0) == getObject(arg1);
|
|
1240
1226
|
return ret;
|
|
@@ -1378,11 +1364,6 @@ module.exports.__wbg_isArray_2ab64d95e09ea0ae = function(arg0) {
|
|
|
1378
1364
|
return ret;
|
|
1379
1365
|
};
|
|
1380
1366
|
|
|
1381
|
-
module.exports.__wbg_push_a5b05aedc7234f9f = function(arg0, arg1) {
|
|
1382
|
-
const ret = getObject(arg0).push(getObject(arg1));
|
|
1383
|
-
return ret;
|
|
1384
|
-
};
|
|
1385
|
-
|
|
1386
1367
|
module.exports.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2 = function(arg0) {
|
|
1387
1368
|
let result;
|
|
1388
1369
|
try {
|
|
@@ -1437,7 +1418,7 @@ module.exports.__wbg_new_81740750da40724f = function(arg0, arg1) {
|
|
|
1437
1418
|
const a = state0.a;
|
|
1438
1419
|
state0.a = 0;
|
|
1439
1420
|
try {
|
|
1440
|
-
return
|
|
1421
|
+
return __wbg_adapter_186(a, state0.b, arg0, arg1);
|
|
1441
1422
|
} finally {
|
|
1442
1423
|
state0.a = a;
|
|
1443
1424
|
}
|
|
@@ -1548,8 +1529,8 @@ module.exports.__wbindgen_memory = function() {
|
|
|
1548
1529
|
return addHeapObject(ret);
|
|
1549
1530
|
};
|
|
1550
1531
|
|
|
1551
|
-
module.exports.
|
|
1552
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1532
|
+
module.exports.__wbindgen_closure_wrapper803 = function(arg0, arg1, arg2) {
|
|
1533
|
+
const ret = makeMutClosure(arg0, arg1, 342, __wbg_adapter_52);
|
|
1553
1534
|
return addHeapObject(ret);
|
|
1554
1535
|
};
|
|
1555
1536
|
|
package/lib/node/qsc_wasm.d.cts
CHANGED
|
@@ -14,29 +14,23 @@ export function setLogLevel(level: number): void;
|
|
|
14
14
|
*/
|
|
15
15
|
export function git_hash(): string;
|
|
16
16
|
/**
|
|
17
|
-
* @param {
|
|
18
|
-
* @param {(string)[]} language_features
|
|
19
|
-
* @param {string} profile
|
|
17
|
+
* @param {IProgramConfig} program
|
|
20
18
|
* @returns {string}
|
|
21
19
|
*/
|
|
22
|
-
export function get_qir(
|
|
20
|
+
export function get_qir(program: IProgramConfig): string;
|
|
23
21
|
/**
|
|
24
|
-
* @param {
|
|
22
|
+
* @param {IProgramConfig} program
|
|
25
23
|
* @param {string} params
|
|
26
|
-
* @param {(string)[]} language_features
|
|
27
|
-
* @param {string} targetProfile
|
|
28
24
|
* @returns {string}
|
|
29
25
|
*/
|
|
30
|
-
export function get_estimates(
|
|
26
|
+
export function get_estimates(program: IProgramConfig, params: string): string;
|
|
31
27
|
/**
|
|
32
|
-
* @param {
|
|
33
|
-
* @param {string} targetProfile
|
|
34
|
-
* @param {(string)[]} language_features
|
|
28
|
+
* @param {IProgramConfig} program
|
|
35
29
|
* @param {boolean} simulate
|
|
36
30
|
* @param {IOperationInfo | undefined} [operation]
|
|
37
31
|
* @returns {any}
|
|
38
32
|
*/
|
|
39
|
-
export function get_circuit(
|
|
33
|
+
export function get_circuit(program: IProgramConfig, simulate: boolean, operation?: IOperationInfo): any;
|
|
40
34
|
/**
|
|
41
35
|
* @param {string} name
|
|
42
36
|
* @returns {string | undefined}
|
|
@@ -57,15 +51,13 @@ export function get_ast(code: string, language_features: (string)[], profile: st
|
|
|
57
51
|
*/
|
|
58
52
|
export function get_hir(code: string, language_features: (string)[], profile: string): string;
|
|
59
53
|
/**
|
|
60
|
-
* @param {
|
|
54
|
+
* @param {IProgramConfig} program
|
|
61
55
|
* @param {string} expr
|
|
62
56
|
* @param {Function} event_cb
|
|
63
57
|
* @param {number} shots
|
|
64
|
-
* @param {(string)[]} language_features
|
|
65
|
-
* @param {string} profile
|
|
66
58
|
* @returns {boolean}
|
|
67
59
|
*/
|
|
68
|
-
export function run(
|
|
60
|
+
export function run(program: IProgramConfig, expr: string, event_cb: Function, shots: number): boolean;
|
|
69
61
|
/**
|
|
70
62
|
* @param {string} solution_code
|
|
71
63
|
* @param {any} exercise_sources_js
|
|
@@ -74,12 +66,10 @@ export function run(sources: (Array<any>)[], expr: string, event_cb: Function, s
|
|
|
74
66
|
*/
|
|
75
67
|
export function check_exercise_solution(solution_code: string, exercise_sources_js: any, event_cb: Function): boolean;
|
|
76
68
|
/**
|
|
77
|
-
* @param {
|
|
78
|
-
* @param {string | undefined} [targetProfile]
|
|
79
|
-
* @param {(string)[] | undefined} [languageFeatures]
|
|
69
|
+
* @param {IProgramConfig | undefined} [additional_program]
|
|
80
70
|
* @returns {(IDocFile)[]}
|
|
81
71
|
*/
|
|
82
|
-
export function generate_docs(
|
|
72
|
+
export function generate_docs(additional_program?: IProgramConfig): (IDocFile)[];
|
|
83
73
|
/**
|
|
84
74
|
*/
|
|
85
75
|
export enum StepResultId {
|
|
@@ -264,6 +254,48 @@ export interface ILocation {
|
|
|
264
254
|
span: IRange;
|
|
265
255
|
}
|
|
266
256
|
|
|
257
|
+
|
|
258
|
+
export interface IProjectHost {
|
|
259
|
+
readFile(uri: string): Promise<string | null>;
|
|
260
|
+
listDirectory(uri: string): Promise<[string, number][]>;
|
|
261
|
+
resolvePath(base: string, path: string): Promise<string | null>;
|
|
262
|
+
findManifestDirectory(docUri: string): Promise<string | null>;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Copy of the ProgramConfig type defined in compiler.ts,
|
|
267
|
+
* but with all the properties required and filled in with defaults where necessary.
|
|
268
|
+
*/
|
|
269
|
+
export interface IProgramConfig {
|
|
270
|
+
sources: [string, string][];
|
|
271
|
+
languageFeatures: string[];
|
|
272
|
+
profile: TargetProfile;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
export interface IProjectConfig {
|
|
277
|
+
/**
|
|
278
|
+
* Friendly name for the project, based on the name of the Q# document or project directory
|
|
279
|
+
*/
|
|
280
|
+
projectName: string;
|
|
281
|
+
/**
|
|
282
|
+
* Uri for the qsharp.json or the root source file (single file projects)
|
|
283
|
+
*/
|
|
284
|
+
projectUri: string;
|
|
285
|
+
/**
|
|
286
|
+
* [sourceName, sourceContents] tuples
|
|
287
|
+
*
|
|
288
|
+
* In the future, for projects with dependencies, this will contain the
|
|
289
|
+
* full dependency graph and sources for all the packages referenced by the project.
|
|
290
|
+
*/
|
|
291
|
+
sources: [string, string][];
|
|
292
|
+
languageFeatures: string[];
|
|
293
|
+
lints: {
|
|
294
|
+
lint: string;
|
|
295
|
+
level: string;
|
|
296
|
+
}[];
|
|
297
|
+
}
|
|
298
|
+
|
|
267
299
|
export interface IDocFile {
|
|
268
300
|
filename: string;
|
|
269
301
|
metadata: string;
|
|
@@ -286,13 +318,11 @@ export class DebugService {
|
|
|
286
318
|
*/
|
|
287
319
|
constructor();
|
|
288
320
|
/**
|
|
289
|
-
* @param {
|
|
290
|
-
* @param {string}
|
|
291
|
-
* @param {string | undefined} entry
|
|
292
|
-
* @param {(string)[]} language_features
|
|
321
|
+
* @param {IProgramConfig} program
|
|
322
|
+
* @param {string | undefined} [entry]
|
|
293
323
|
* @returns {string}
|
|
294
324
|
*/
|
|
295
|
-
|
|
325
|
+
load_program(program: IProgramConfig, entry?: string): string;
|
|
296
326
|
/**
|
|
297
327
|
* @returns {IQuantumStateList}
|
|
298
328
|
*/
|
|
@@ -348,12 +378,10 @@ export class LanguageService {
|
|
|
348
378
|
constructor();
|
|
349
379
|
/**
|
|
350
380
|
* @param {(uri: string, version: number | undefined, diagnostics: VSDiagnostic[]) => void} diagnostics_callback
|
|
351
|
-
* @param {
|
|
352
|
-
* @param {(uri: string) => Promise<[string, number][]>} list_directory
|
|
353
|
-
* @param {(uri: string) => Promise<{ manifestDirectory: string }| null>} get_manifest
|
|
381
|
+
* @param {IProjectHost} host
|
|
354
382
|
* @returns {Promise<any>}
|
|
355
383
|
*/
|
|
356
|
-
start_background_work(diagnostics_callback: (uri: string, version: number | undefined, diagnostics: VSDiagnostic[]) => void,
|
|
384
|
+
start_background_work(diagnostics_callback: (uri: string, version: number | undefined, diagnostics: VSDiagnostic[]) => void, host: IProjectHost): Promise<any>;
|
|
357
385
|
/**
|
|
358
386
|
*/
|
|
359
387
|
stop_background_work(): void;
|
|
@@ -449,14 +477,12 @@ export class LanguageService {
|
|
|
449
477
|
export class ProjectLoader {
|
|
450
478
|
free(): void;
|
|
451
479
|
/**
|
|
452
|
-
* @param {
|
|
453
|
-
* @param {(uri: string) => Promise<[string, number][]>} list_directory
|
|
454
|
-
* @param {(uri: string) => Promise<{ manifestDirectory: string }| null>} get_manifest
|
|
480
|
+
* @param {IProjectHost} project_host
|
|
455
481
|
*/
|
|
456
|
-
constructor(
|
|
482
|
+
constructor(project_host: IProjectHost);
|
|
457
483
|
/**
|
|
458
|
-
* @param {
|
|
459
|
-
* @returns {Promise<
|
|
484
|
+
* @param {string} directory
|
|
485
|
+
* @returns {Promise<IProjectConfig>}
|
|
460
486
|
*/
|
|
461
|
-
load_project(
|
|
487
|
+
load_project(directory: string): Promise<IProjectConfig>;
|
|
462
488
|
}
|
|
Binary file
|