numbl 0.4.21 → 0.4.22
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/binding.gyp +12 -6
- package/dist-browser/browser/index.d.ts +1 -1
- package/dist-browser/browser/mip.d.ts +7 -0
- package/dist-browser/browser/protocol.d.ts +1 -1
- package/dist-browser/browser.js +1 -1
- package/dist-browser/db/operations.d.ts +0 -1
- package/dist-browser/gpuHelper.d.ts +29 -0
- package/dist-browser/hooks/projectFilesState.d.ts +37 -0
- package/dist-browser/numbl-core/execSession.d.ts +39 -0
- package/dist-browser/numbl-core/executeCode.d.ts +10 -1
- package/dist-browser/numbl-core/executors/classification.d.ts +2 -10
- package/dist-browser/numbl-core/executors/jit/backend.d.ts +65 -0
- package/dist-browser/numbl-core/executors/jit/cBackend.d.ts +22 -0
- package/dist-browser/numbl-core/executors/jit/callExecutor.d.ts +13 -44
- package/dist-browser/numbl-core/executors/jit/hostHelpers.d.ts +24 -0
- package/dist-browser/numbl-core/executors/jit/jsBackend.d.ts +15 -0
- package/dist-browser/numbl-core/executors/jit/loopExecutor.d.ts +13 -40
- package/dist-browser/numbl-core/executors/jit/session.d.ts +1 -1
- package/dist-browser/numbl-core/executors/jit/topLevelExecutor.d.ts +13 -33
- package/dist-browser/numbl-core/executors/jit/valueAdapterC.d.ts +32 -48
- package/dist-browser/numbl-core/executors/lowering.d.ts +38 -96
- package/dist-browser/numbl-core/executors/plugins.d.ts +14 -28
- package/dist-browser/numbl-core/executors/registry.d.ts +32 -133
- package/dist-browser/numbl-core/executors/types.d.ts +30 -92
- package/dist-browser/numbl-core/functionResolve.d.ts +3 -13
- package/dist-browser/numbl-core/helpers/check-helpers.d.ts +0 -5
- package/dist-browser/numbl-core/helpers/glob.d.ts +14 -0
- package/dist-browser/numbl-core/helpers/linsolve.d.ts +3 -13
- package/dist-browser/numbl-core/helpers/reduction-helpers.d.ts +2 -4
- package/dist-browser/numbl-core/helpers/shape-utils.d.ts +10 -0
- package/dist-browser/numbl-core/interpreter/builtins/index.d.ts +3 -1
- package/dist-browser/numbl-core/interpreter/builtins/time-system.d.ts +0 -1
- package/dist-browser/numbl-core/interpreter/builtins/types.d.ts +7 -7
- package/dist-browser/numbl-core/interpreter/interpreter.d.ts +6 -6
- package/dist-browser/numbl-core/interpreter/interpreterFunctions.d.ts +9 -1
- package/dist-browser/numbl-core/interpreter/interpreterSpecialBuiltins.d.ts +6 -3
- package/dist-browser/numbl-core/jit/builtins/defs/_shared.d.ts +1 -5
- package/dist-browser/numbl-core/jit/builtins/defs/arithmetic/_elemwise.d.ts +1 -2
- package/dist-browser/numbl-core/jit/builtins/defs/logical/_unary_pred.d.ts +3 -3
- package/dist-browser/numbl-core/jit/builtins/defs/logical/fieldnames.d.ts +1 -1
- package/dist-browser/numbl-core/jit/builtins/defs/logical/strcmp.d.ts +1 -1
- package/dist-browser/numbl-core/jit/builtins/defs/math/_unary_real.d.ts +5 -2
- package/dist-browser/numbl-core/jit/builtins/defs/math/realsqrt.d.ts +6 -0
- package/dist-browser/numbl-core/jit/builtins/defs/reduction/_shape.d.ts +0 -5
- package/dist-browser/numbl-core/jit/builtins/defs/shape/_construct.d.ts +0 -4
- package/dist-browser/numbl-core/jit/builtins/defs/shape/_triangular.d.ts +2 -8
- package/dist-browser/numbl-core/jit/builtins/defs/system/deal.d.ts +4 -5
- package/dist-browser/numbl-core/jit/builtins/defs/system/feval.d.ts +7 -29
- package/dist-browser/numbl-core/jit/builtins/registry.d.ts +15 -30
- package/dist-browser/numbl-core/jit/builtins/runtime/system/cdiv.d.ts +4 -0
- package/dist-browser/numbl-core/jit/builtins/runtime/system/cscalar.d.ts +4 -0
- package/dist-browser/numbl-core/jit/builtins/runtime/tensor_ops/tensor_elemwise_real_fn.d.ts +45 -15
- package/dist-browser/numbl-core/jit/builtins/runtime/tensor_ops/tensor_reduce_real.d.ts +5 -5
- package/dist-browser/numbl-core/jit/builtins/runtime/tensor_ops/tensor_unary_real_math.d.ts +6 -0
- package/dist-browser/numbl-core/jit/codegen/emit.d.ts +9 -30
- package/dist-browser/numbl-core/jit/codegen/emitJs.d.ts +9 -27
- package/dist-browser/numbl-core/jit/codegen/emitStmt.d.ts +8 -31
- package/dist-browser/numbl-core/jit/codegen/emitTensorFused.d.ts +10 -9
- package/dist-browser/numbl-core/jit/codegen/inlinePass.d.ts +39 -48
- package/dist-browser/numbl-core/jit/codegen/prettyIR.d.ts +1 -6
- package/dist-browser/numbl-core/jit/codegen/runtime.d.ts +7 -28
- package/dist-browser/numbl-core/jit/compileSpec.d.ts +3 -6
- package/dist-browser/numbl-core/jit/compileSpecC.d.ts +5 -0
- package/dist-browser/numbl-core/jit/lowering/assignedFlags.d.ts +24 -0
- package/dist-browser/numbl-core/jit/lowering/definiteAssign.d.ts +3 -1
- package/dist-browser/numbl-core/jit/lowering/errors.d.ts +3 -15
- package/dist-browser/numbl-core/jit/lowering/ir.d.ts +0 -2
- package/dist-browser/numbl-core/jit/lowering/lower.d.ts +4 -12
- package/dist-browser/numbl-core/jit/lowering/types.d.ts +2 -7
- package/dist-browser/numbl-core/jit/numbl/index.d.ts +5 -14
- package/dist-browser/numbl-core/jit/parser/index.d.ts +4 -9
- package/dist-browser/numbl-core/jit/workspace/workspace.d.ts +32 -136
- package/dist-browser/numbl-core/jitDeclineDiagnostics.d.ts +1 -1
- package/dist-browser/numbl-core/jsUserFunctions.d.ts +10 -12
- package/dist-browser/numbl-core/lowering/classInfo.d.ts +4 -1
- package/dist-browser/numbl-core/lowering/loweringContext.d.ts +15 -23
- package/dist-browser/numbl-core/native/lapack-bridge.d.ts +111 -130
- package/dist-browser/numbl-core/native/ts-lapack-bridge.d.ts +4 -5
- package/dist-browser/numbl-core/native/ts-lapack-complex.d.ts +23 -0
- package/dist-browser/numbl-core/native/ts-lapack-qr-lu.d.ts +37 -0
- package/dist-browser/numbl-core/native/wasm-lapack-bridge.d.ts +4 -5
- package/dist-browser/numbl-core/ops/dispatch.d.ts +4 -5
- package/dist-browser/numbl-core/parser/types.d.ts +1 -21
- package/{dist-lib/numbl-core/runtime → dist-browser/numbl-core/plotting}/axisCommand.d.ts +2 -2
- package/dist-browser/{graphics → numbl-core/plotting}/axisLimits.d.ts +14 -2
- package/dist-browser/numbl-core/plotting/builtins.d.ts +8 -0
- package/dist-browser/numbl-core/plotting/colormaps.d.ts +10 -0
- package/dist-browser/numbl-core/{runtime/plotBuiltinDispatch.d.ts → plotting/dispatch.d.ts} +14 -25
- package/dist-browser/numbl-core/plotting/imagescExtent.d.ts +19 -0
- package/dist-browser/numbl-core/{runtime/runtimePlot.d.ts → plotting/instructions.d.ts} +5 -17
- package/dist-browser/numbl-core/plotting/parseArgsChart.d.ts +94 -0
- package/dist-browser/numbl-core/plotting/parseArgsCommon.d.ts +64 -0
- package/dist-browser/numbl-core/plotting/parseArgsLine.d.ts +103 -0
- package/dist-browser/numbl-core/plotting/parseArgsPatch.d.ts +38 -0
- package/dist-browser/numbl-core/plotting/parseArgsQuiver.d.ts +32 -0
- package/dist-browser/numbl-core/plotting/parseArgsSurface.d.ts +75 -0
- package/dist-browser/numbl-core/plotting/streamline.d.ts +16 -0
- package/{dist-graphics/graphics → dist-browser/numbl-core/plotting}/types.d.ts +9 -7
- package/dist-browser/numbl-core/runtime/cow.d.ts +0 -8
- package/dist-browser/numbl-core/runtime/refcount.d.ts +0 -3
- package/dist-browser/numbl-core/runtime/registerSpecial.d.ts +15 -0
- package/dist-browser/numbl-core/runtime/runtime.d.ts +11 -35
- package/dist-browser/numbl-core/runtime/runtimeDispatch.d.ts +6 -0
- package/dist-browser/numbl-core/runtime/specialBuiltins.d.ts +3 -9
- package/dist-browser/numbl-core/runtime/uihtmlSession.d.ts +5 -13
- package/dist-browser/numbl-core/runtime/utils.d.ts +4 -1
- package/dist-browser/numbl-core/version.d.ts +1 -1
- package/dist-browser/numbl-core/workspace/workspace.d.ts +64 -0
- package/dist-browser/vfs/syncVfsChanges.d.ts +2 -2
- package/dist-cli/cli.js +74244 -80566
- package/dist-graphics/graphics/FigureView.d.ts +1 -1
- package/dist-graphics/graphics/SurfView.d.ts +3 -2
- package/dist-graphics/graphics/drawPlot.d.ts +1 -1
- package/dist-graphics/graphics/exportFigureHdf5.d.ts +1 -1
- package/dist-graphics/graphics/figureHashTransport.d.ts +1 -1
- package/dist-graphics/graphics/figureUpload.d.ts +1 -1
- package/dist-graphics/graphics/importFigureHdf5.d.ts +1 -1
- package/dist-graphics/graphics/openInFigureViewer.d.ts +1 -1
- package/dist-graphics/graphics/plotHelpers.d.ts +1 -1
- package/dist-graphics/graphics/plotLegend.d.ts +1 -1
- package/dist-graphics/graphics/plotMarkers.d.ts +1 -1
- package/dist-graphics/graphics/restoreNaNs.d.ts +1 -1
- package/dist-graphics/graphics/uihtmlRelay.d.ts +16 -0
- package/dist-graphics/graphics-lib.d.ts +3 -3
- package/dist-graphics/index.js +294 -328
- package/{dist-lib/graphics → dist-graphics/numbl-core/plotting}/axisLimits.d.ts +14 -2
- package/dist-graphics/numbl-core/plotting/colormaps.d.ts +10 -0
- package/dist-graphics/numbl-core/plotting/imagescExtent.d.ts +19 -0
- package/{dist-browser/graphics → dist-graphics/numbl-core/plotting}/types.d.ts +9 -7
- package/dist-lib/browser/mip.d.ts +17 -0
- package/dist-lib/cli-scan.d.ts +8 -1
- package/dist-lib/lib.d.ts +1 -1
- package/dist-lib/lib.js +29201 -35301
- package/dist-lib/node.js +22 -14
- package/dist-lib/numbl-core/execSession.d.ts +39 -0
- package/dist-lib/numbl-core/executeCode.d.ts +10 -1
- package/dist-lib/numbl-core/executors/classification.d.ts +2 -10
- package/dist-lib/numbl-core/executors/jit/backend.d.ts +65 -0
- package/dist-lib/numbl-core/executors/jit/cBackend.d.ts +22 -0
- package/dist-lib/numbl-core/executors/jit/callExecutor.d.ts +13 -44
- package/dist-lib/numbl-core/executors/jit/hostHelpers.d.ts +24 -0
- package/dist-lib/numbl-core/executors/jit/jsBackend.d.ts +15 -0
- package/dist-lib/numbl-core/executors/jit/loopExecutor.d.ts +13 -40
- package/dist-lib/numbl-core/executors/jit/session.d.ts +1 -1
- package/dist-lib/numbl-core/executors/jit/topLevelExecutor.d.ts +13 -33
- package/dist-lib/numbl-core/executors/jit/valueAdapterC.d.ts +32 -48
- package/dist-lib/numbl-core/executors/lowering.d.ts +38 -96
- package/dist-lib/numbl-core/executors/plugins.d.ts +14 -28
- package/dist-lib/numbl-core/executors/registry.d.ts +32 -133
- package/dist-lib/numbl-core/executors/types.d.ts +30 -92
- package/dist-lib/numbl-core/functionResolve.d.ts +3 -13
- package/dist-lib/numbl-core/helpers/check-helpers.d.ts +0 -5
- package/dist-lib/numbl-core/helpers/glob.d.ts +14 -0
- package/dist-lib/numbl-core/helpers/linsolve.d.ts +3 -13
- package/dist-lib/numbl-core/helpers/reduction-helpers.d.ts +2 -4
- package/dist-lib/numbl-core/helpers/shape-utils.d.ts +10 -0
- package/dist-lib/numbl-core/interpreter/builtins/index.d.ts +3 -1
- package/dist-lib/numbl-core/interpreter/builtins/time-system.d.ts +0 -1
- package/dist-lib/numbl-core/interpreter/builtins/types.d.ts +7 -7
- package/dist-lib/numbl-core/interpreter/interpreter.d.ts +6 -6
- package/dist-lib/numbl-core/interpreter/interpreterFunctions.d.ts +9 -1
- package/dist-lib/numbl-core/interpreter/interpreterSpecialBuiltins.d.ts +6 -3
- package/dist-lib/numbl-core/jit/builtins/defs/_shared.d.ts +1 -5
- package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/_elemwise.d.ts +1 -2
- package/dist-lib/numbl-core/jit/builtins/defs/logical/_unary_pred.d.ts +3 -3
- package/dist-lib/numbl-core/jit/builtins/defs/logical/fieldnames.d.ts +1 -1
- package/dist-lib/numbl-core/jit/builtins/defs/logical/strcmp.d.ts +1 -1
- package/dist-lib/numbl-core/jit/builtins/defs/math/_unary_real.d.ts +5 -2
- package/dist-lib/numbl-core/jit/builtins/defs/math/realsqrt.d.ts +6 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/_shape.d.ts +0 -5
- package/dist-lib/numbl-core/jit/builtins/defs/shape/_construct.d.ts +0 -4
- package/dist-lib/numbl-core/jit/builtins/defs/shape/_triangular.d.ts +2 -8
- package/dist-lib/numbl-core/jit/builtins/defs/system/deal.d.ts +4 -5
- package/dist-lib/numbl-core/jit/builtins/defs/system/feval.d.ts +7 -29
- package/dist-lib/numbl-core/jit/builtins/registry.d.ts +15 -30
- package/dist-lib/numbl-core/jit/builtins/runtime/system/cdiv.d.ts +4 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/system/cscalar.d.ts +4 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_elemwise_real_fn.d.ts +45 -15
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_reduce_real.d.ts +5 -5
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_unary_real_math.d.ts +6 -0
- package/dist-lib/numbl-core/jit/codegen/emit.d.ts +9 -30
- package/dist-lib/numbl-core/jit/codegen/emitJs.d.ts +9 -27
- package/dist-lib/numbl-core/jit/codegen/emitStmt.d.ts +8 -31
- package/dist-lib/numbl-core/jit/codegen/emitTensorFused.d.ts +10 -9
- package/dist-lib/numbl-core/jit/codegen/inlinePass.d.ts +39 -48
- package/dist-lib/numbl-core/jit/codegen/prettyIR.d.ts +1 -6
- package/dist-lib/numbl-core/jit/codegen/runtime.d.ts +7 -28
- package/dist-lib/numbl-core/jit/compileSpec.d.ts +3 -6
- package/dist-lib/numbl-core/jit/compileSpecC.d.ts +5 -0
- package/dist-lib/numbl-core/jit/lowering/assignedFlags.d.ts +24 -0
- package/dist-lib/numbl-core/jit/lowering/definiteAssign.d.ts +3 -1
- package/dist-lib/numbl-core/jit/lowering/errors.d.ts +3 -15
- package/dist-lib/numbl-core/jit/lowering/ir.d.ts +0 -2
- package/dist-lib/numbl-core/jit/lowering/lower.d.ts +4 -12
- package/dist-lib/numbl-core/jit/lowering/types.d.ts +2 -7
- package/dist-lib/numbl-core/jit/numbl/index.d.ts +5 -14
- package/dist-lib/numbl-core/jit/parser/index.d.ts +4 -9
- package/dist-lib/numbl-core/jit/workspace/workspace.d.ts +32 -136
- package/dist-lib/numbl-core/jitDeclineDiagnostics.d.ts +1 -1
- package/dist-lib/numbl-core/jsUserFunctions.d.ts +10 -12
- package/dist-lib/numbl-core/lowering/classInfo.d.ts +4 -1
- package/dist-lib/numbl-core/lowering/loweringContext.d.ts +15 -23
- package/dist-lib/numbl-core/native/lapack-bridge.d.ts +111 -130
- package/dist-lib/numbl-core/native/ts-lapack-bridge.d.ts +4 -5
- package/dist-lib/numbl-core/native/ts-lapack-complex.d.ts +23 -0
- package/dist-lib/numbl-core/native/ts-lapack-qr-lu.d.ts +37 -0
- package/dist-lib/numbl-core/native/wasm-lapack-bridge.d.ts +4 -5
- package/dist-lib/numbl-core/ops/dispatch.d.ts +4 -5
- package/dist-lib/numbl-core/parser/types.d.ts +1 -21
- package/{dist-browser/numbl-core/runtime → dist-lib/numbl-core/plotting}/axisCommand.d.ts +2 -2
- package/{dist-graphics/graphics → dist-lib/numbl-core/plotting}/axisLimits.d.ts +14 -2
- package/dist-lib/numbl-core/plotting/builtins.d.ts +8 -0
- package/dist-lib/numbl-core/plotting/colormaps.d.ts +10 -0
- package/dist-lib/numbl-core/{runtime/plotBuiltinDispatch.d.ts → plotting/dispatch.d.ts} +14 -25
- package/dist-lib/numbl-core/plotting/imagescExtent.d.ts +19 -0
- package/dist-lib/numbl-core/{runtime/runtimePlot.d.ts → plotting/instructions.d.ts} +5 -17
- package/dist-lib/numbl-core/plotting/parseArgsChart.d.ts +94 -0
- package/dist-lib/numbl-core/plotting/parseArgsCommon.d.ts +64 -0
- package/dist-lib/numbl-core/plotting/parseArgsLine.d.ts +103 -0
- package/dist-lib/numbl-core/plotting/parseArgsPatch.d.ts +38 -0
- package/dist-lib/numbl-core/plotting/parseArgsQuiver.d.ts +32 -0
- package/dist-lib/numbl-core/plotting/parseArgsSurface.d.ts +75 -0
- package/dist-lib/numbl-core/plotting/streamline.d.ts +16 -0
- package/dist-lib/{graphics → numbl-core/plotting}/types.d.ts +9 -7
- package/dist-lib/numbl-core/runtime/cow.d.ts +0 -8
- package/dist-lib/numbl-core/runtime/refcount.d.ts +0 -3
- package/dist-lib/numbl-core/runtime/registerSpecial.d.ts +15 -0
- package/dist-lib/numbl-core/runtime/runtime.d.ts +11 -35
- package/dist-lib/numbl-core/runtime/runtimeDispatch.d.ts +6 -0
- package/dist-lib/numbl-core/runtime/specialBuiltins.d.ts +3 -9
- package/dist-lib/numbl-core/runtime/uihtmlSession.d.ts +5 -13
- package/dist-lib/numbl-core/runtime/utils.d.ts +4 -1
- package/dist-lib/numbl-core/version.d.ts +1 -1
- package/dist-lib/numbl-core/workspace/workspace.d.ts +64 -0
- package/dist-lib/vfs/unzipToFiles.d.ts +7 -0
- package/dist-plot-viewer/assets/index-C0fIevlp.js +4504 -0
- package/dist-plot-viewer/index.html +1 -1
- package/dist-site-viewer/assets/index-BDaviCH6.js +4832 -0
- package/dist-site-viewer/assets/numbl-worker-D6m4K2PP.js +5691 -0
- package/dist-site-viewer/index.html +2 -2
- package/native/numbl_addon.cpp +2 -12
- package/native/numbl_addon_common.h +0 -5
- package/package.json +6 -5
- package/dist-browser/hooks/useProjectFiles.d.ts +0 -45
- package/dist-browser/numbl-core/executors/context.d.ts +0 -76
- package/dist-browser/numbl-core/executors/index.d.ts +0 -14
- package/dist-browser/numbl-core/executors/jit/cJitCallExecutor.d.ts +0 -35
- package/dist-browser/numbl-core/executors/jit/cJitLoopExecutor.d.ts +0 -31
- package/dist-browser/numbl-core/executors/jit/cJitTopLevelExecutor.d.ts +0 -29
- package/dist-browser/numbl-core/helpers/dummy.d.ts +0 -5
- package/dist-browser/numbl-core/jit/runtime/context.d.ts +0 -23
- package/dist-browser/numbl-core/jit/runtime/inferType.d.ts +0 -10
- package/dist-browser/numbl-core/jit/runtime/value.d.ts +0 -101
- package/dist-browser/numbl-core/jit/workspace/driverPrologue.d.ts +0 -59
- package/dist-browser/numbl-core/jit/workspace/mtoc2UserFunctionLoader.d.ts +0 -62
- package/dist-browser/numbl-core/native/bridge-resolve.d.ts +0 -14
- package/dist-browser/numbl-core/runtime/plotUtils.d.ts +0 -336
- package/dist-browser/numbl-core/runtime/specialBuiltinNames.d.ts +0 -2
- package/dist-graphics/graphics/surfColormap.d.ts +0 -2
- package/dist-lib/numbl-core/executors/context.d.ts +0 -76
- package/dist-lib/numbl-core/executors/index.d.ts +0 -14
- package/dist-lib/numbl-core/executors/jit/cJitCallExecutor.d.ts +0 -35
- package/dist-lib/numbl-core/executors/jit/cJitLoopExecutor.d.ts +0 -31
- package/dist-lib/numbl-core/executors/jit/cJitTopLevelExecutor.d.ts +0 -29
- package/dist-lib/numbl-core/helpers/dummy.d.ts +0 -5
- package/dist-lib/numbl-core/jit/runtime/context.d.ts +0 -23
- package/dist-lib/numbl-core/jit/runtime/inferType.d.ts +0 -10
- package/dist-lib/numbl-core/jit/runtime/value.d.ts +0 -101
- package/dist-lib/numbl-core/jit/workspace/driverPrologue.d.ts +0 -59
- package/dist-lib/numbl-core/jit/workspace/mtoc2UserFunctionLoader.d.ts +0 -62
- package/dist-lib/numbl-core/native/bridge-resolve.d.ts +0 -14
- package/dist-lib/numbl-core/runtime/plotUtils.d.ts +0 -336
- package/dist-lib/numbl-core/runtime/specialBuiltinNames.d.ts +0 -2
- package/dist-plot-viewer/assets/index-YeXWXIxH.js +0 -4504
- package/dist-site-viewer/assets/index-DrtkDG_M.js +0 -4832
- package/dist-site-viewer/assets/numbl-worker-Dz_Z8B9u.js +0 -5327
- package/native/elemwise.cpp +0 -360
- package/native/unary_elemwise.cpp +0 -67
- /package/dist-browser/{graphics → numbl-core/plotting}/figuresReducer.d.ts +0 -0
- /package/dist-graphics/{graphics → numbl-core/plotting}/figuresReducer.d.ts +0 -0
- /package/dist-lib/{graphics → numbl-core/plotting}/figuresReducer.d.ts +0 -0
|
@@ -14,11 +14,13 @@ import { type RuntimeValue, type RuntimeLogical, type RuntimeTensor, type Runtim
|
|
|
14
14
|
import { RefScope } from "./refcount.js";
|
|
15
15
|
import { RuntimeChar, RuntimeCell, RuntimeClassInstanceArray, type RuntimeComplexNumber, type RuntimeClassInstance } from "../runtime/types.js";
|
|
16
16
|
import { type ItemType } from "../lowering/itemTypes.js";
|
|
17
|
-
import type { PlotInstruction } from "
|
|
17
|
+
import type { PlotInstruction } from "../plotting/types.js";
|
|
18
18
|
import type { ExecOptions } from "../executeCode.js";
|
|
19
19
|
import type { FileIOAdapter } from "../fileIOAdapter.js";
|
|
20
20
|
import type { SystemAdapter } from "../systemAdapter.js";
|
|
21
21
|
import { type CallSite } from "./runtimeHelpers.js";
|
|
22
|
+
import "./specialBuiltins.js";
|
|
23
|
+
import "../plotting/builtins.js";
|
|
22
24
|
export declare class Runtime {
|
|
23
25
|
private options;
|
|
24
26
|
private initialVariableValues?;
|
|
@@ -111,7 +113,7 @@ export declare class Runtime {
|
|
|
111
113
|
strictRefcount: boolean;
|
|
112
114
|
activeAccessors: Set<string>;
|
|
113
115
|
resolveClassMethod: ((className: string, methodName: string) => ((...args: any[]) => any) | null) | null;
|
|
114
|
-
|
|
116
|
+
getClassAncestors: ((className: string) => string[]) | null;
|
|
115
117
|
classMethodCache: Map<string, ((...args: any[]) => any) | null>;
|
|
116
118
|
/** Callback for addpath/rmpath — mutates search paths and rebuilds function index. */
|
|
117
119
|
onPathChange: ((action: "add" | "remove", dir: string, position: "begin" | "end") => void) | null;
|
|
@@ -119,27 +121,15 @@ export declare class Runtime {
|
|
|
119
121
|
onCwdChange: ((newCwd: string) => void) | null;
|
|
120
122
|
/** Reference to the active search paths (set by executeCode). */
|
|
121
123
|
searchPaths: string[];
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
callerAccessorStack: (Record<string, [
|
|
128
|
-
() => unknown,
|
|
129
|
-
(v: unknown) => void
|
|
130
|
-
]> | null)[];
|
|
131
|
-
private dynamicCallerVarStack;
|
|
124
|
+
/** Warning identifiers turned off with warning('off', id); 'all' covers
|
|
125
|
+
* identifiers without their own entry. */
|
|
126
|
+
warningsOff: Set<string>;
|
|
127
|
+
/** Counter for uihtml component ids. */
|
|
128
|
+
uihtmlSeq: number;
|
|
132
129
|
fileIO?: FileIOAdapter;
|
|
133
130
|
system?: SystemAdapter;
|
|
134
|
-
builtins: Record<string, (nargout: number, args: unknown[]) => unknown>;
|
|
135
131
|
customBuiltins: Record<string, (nargout: number, args: unknown[]) => unknown>;
|
|
136
132
|
compileSpecialized: ((name: string, argTypes: ItemType[], callSite: CallSite) => ((...args: any[]) => any) | null) | null;
|
|
137
|
-
evalLocalCallback: ((code: string, initialVars: Record<string, RuntimeValue>, onOutput: (text: string) => void, fileName?: string) => {
|
|
138
|
-
returnValue: unknown;
|
|
139
|
-
variableValues: Record<string, RuntimeValue>;
|
|
140
|
-
searchPaths?: string[];
|
|
141
|
-
workspaceFiles?: import("../../numbl-core/workspace/index.js").WorkspaceFile[];
|
|
142
|
-
}) | null;
|
|
143
133
|
jitFunctionCode: Map<string, string>;
|
|
144
134
|
private dispatchUnknownCache;
|
|
145
135
|
dispatchUnknownCounts: Map<string, number>;
|
|
@@ -166,7 +156,6 @@ export declare class Runtime {
|
|
|
166
156
|
* op runs without an explicit `figure`, so a later no-arg `figure` allocates
|
|
167
157
|
* a new handle instead of reusing 1 (MATLAB semantics). */
|
|
168
158
|
ensureCurrentFigure(): void;
|
|
169
|
-
private initBuiltins;
|
|
170
159
|
profileEnter(key: string): void;
|
|
171
160
|
profileLeave(): void;
|
|
172
161
|
getBuiltinProfile(): Record<string, {
|
|
@@ -220,8 +209,6 @@ export declare class Runtime {
|
|
|
220
209
|
setVariableValue(name: string, value: RuntimeValue | undefined): void;
|
|
221
210
|
/** Collect defined variable names from getters and apply argument filters. */
|
|
222
211
|
private filterVarNames;
|
|
223
|
-
/** Get shape of a runtime value as a number array. */
|
|
224
|
-
private static varShape;
|
|
225
212
|
/** Estimate bytes for a runtime value. */
|
|
226
213
|
private static varBytes;
|
|
227
214
|
/** Check if a runtime value is complex. */
|
|
@@ -233,14 +220,6 @@ export declare class Runtime {
|
|
|
233
220
|
private static varInfo;
|
|
234
221
|
private static whosStruct;
|
|
235
222
|
whos(nargout: number, getters: Record<string, () => unknown>, args: unknown[]): unknown;
|
|
236
|
-
setWorkspaceAccessor(name: string, getter: () => unknown, setter: (v: unknown) => void): void;
|
|
237
|
-
getWorkspaceVariable(name: string): unknown | undefined;
|
|
238
|
-
setWorkspaceVariable(name: string, value: unknown): void;
|
|
239
|
-
pushCallerAccessors(accessors: Record<string, [() => unknown, (v: unknown) => void]> | null): void;
|
|
240
|
-
popCallerAccessors(): void;
|
|
241
|
-
getCallerVariable(name: string): unknown | undefined;
|
|
242
|
-
setCallerVariable(name: string, value: unknown): void;
|
|
243
|
-
evalLocal(code: unknown, accessors: Record<string, [() => unknown, (v: unknown) => void]>): unknown;
|
|
244
223
|
getPersistent(funcId: string, varName: string): RuntimeValue;
|
|
245
224
|
setPersistent(funcId: string, varName: string, value: RuntimeValue): void;
|
|
246
225
|
uplus(v: unknown): RuntimeValue;
|
|
@@ -276,11 +255,8 @@ export declare class Runtime {
|
|
|
276
255
|
* Returns the compiled method function or null if it doesn't exist.
|
|
277
256
|
*/
|
|
278
257
|
cachedResolveClassMethod(className: string, methodName: string): ((...args: any[]) => any) | null;
|
|
279
|
-
/**
|
|
280
|
-
|
|
281
|
-
* Returns null if no parent or no callback registered.
|
|
282
|
-
*/
|
|
283
|
-
getClassParentName(className: string): string | null;
|
|
258
|
+
/** Ancestor class names of a class, or [] if unknown. */
|
|
259
|
+
classAncestors(className: string): string[];
|
|
284
260
|
/** Get the class name from a runtime value (for dynamic static method dispatch). */
|
|
285
261
|
getClassName(value: unknown): string;
|
|
286
262
|
dispatch(name: string, nargout: number, args: unknown[]): unknown;
|
|
@@ -6,6 +6,12 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { type RuntimeValue, type RuntimeLogical, RuntimeFunction } from "../runtime/index.js";
|
|
8
8
|
import type { Runtime } from "./runtime.js";
|
|
9
|
+
/** Returned by `invokeBuiltin` when `name` is not a builtin. */
|
|
10
|
+
export declare const NOT_A_BUILTIN: unique symbol;
|
|
11
|
+
/** Call the builtin `name`: an execution-specific custom builtin if one is
|
|
12
|
+
* set, else the registered IBuiltin. Returns NOT_A_BUILTIN if neither
|
|
13
|
+
* exists. A builtin with no outputs errors when outputs are requested. */
|
|
14
|
+
export declare function invokeBuiltin(rt: Runtime, name: string, nargout: number, args: unknown[]): unknown;
|
|
9
15
|
export declare function getFuncHandle(name: string): RuntimeFunction;
|
|
10
16
|
export declare function makeUserFuncHandle(jsFn: (...args: unknown[]) => unknown, nargin?: number): RuntimeFunction;
|
|
11
17
|
export declare function isa(rt: Runtime, value: unknown, classNameArg: unknown): RuntimeLogical;
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Special builtin functions that require direct runtime access.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* IBuiltin dispatch path.
|
|
4
|
+
* They are registered once, at module load, as ordinary IBuiltins; each call
|
|
5
|
+
* gets the active Runtime from the current-runtime stack.
|
|
7
6
|
*/
|
|
8
|
-
|
|
9
|
-
export { SPECIAL_BUILTIN_NAMES } from "./specialBuiltinNames.js";
|
|
10
|
-
/**
|
|
11
|
-
* Register all special builtins as IBuiltins closing over the runtime instance.
|
|
12
|
-
*/
|
|
13
|
-
export declare function registerSpecialBuiltins(rt: Runtime): void;
|
|
7
|
+
export {};
|
|
@@ -8,15 +8,11 @@
|
|
|
8
8
|
* when an event arrives from the iframe — mirroring MATLAB, where the script
|
|
9
9
|
* returns but its callbacks keep firing.
|
|
10
10
|
*
|
|
11
|
-
* Dispatch
|
|
12
|
-
*
|
|
13
|
-
* and pushes the runtime so `disp`, plotting, and `sendEventToHTMLSource`
|
|
14
|
-
* inside the callback reach this runtime. This mirrors executeCode's own
|
|
15
|
-
* save/restore of SPECIAL_BUILTIN_NAMES.
|
|
11
|
+
* Dispatch pushes the runtime so `disp`, plotting, and
|
|
12
|
+
* `sendEventToHTMLSource` inside the callback reach this runtime.
|
|
16
13
|
*/
|
|
17
14
|
import type { Runtime } from "./runtime.js";
|
|
18
|
-
import type { PlotInstruction } from "
|
|
19
|
-
import { type IBuiltin } from "../interpreter/builtins/types.js";
|
|
15
|
+
import type { PlotInstruction } from "../plotting/types.js";
|
|
20
16
|
export interface UihtmlSession {
|
|
21
17
|
/** True while at least one component still has a registered callback. */
|
|
22
18
|
hasCallbacks(): boolean;
|
|
@@ -32,9 +28,5 @@ export interface UihtmlSession {
|
|
|
32
28
|
/** Release the retained callback handles (and their refs). */
|
|
33
29
|
dispose(): void;
|
|
34
30
|
}
|
|
35
|
-
/**
|
|
36
|
-
|
|
37
|
-
* `activeSpecials` is a snapshot of this runtime's special-builtin closures,
|
|
38
|
-
* captured at end-of-run while they are still installed globally.
|
|
39
|
-
*/
|
|
40
|
-
export declare function createUihtmlSession(rt: Runtime, activeSpecials: Map<string, IBuiltin>, onDrawnow?: (plotInstructions: PlotInstruction[]) => void): UihtmlSession;
|
|
31
|
+
/** Build a session over a runtime that registered uihtml callbacks. */
|
|
32
|
+
export declare function createUihtmlSession(rt: Runtime, onDrawnow?: (plotInstructions: PlotInstruction[]) => void): UihtmlSession;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Tensor shape/indexing utilities.
|
|
3
3
|
*/
|
|
4
|
-
import { type RuntimeTensor } from "./types.js";
|
|
4
|
+
import { type RuntimeTensor, type RuntimeValue } from "./types.js";
|
|
5
|
+
/** The MATLAB size of any runtime value, with at least two dimensions.
|
|
6
|
+
* Scalars, strings, structs and objects are 1×1. */
|
|
7
|
+
export declare function valueShape(v: RuntimeValue): number[];
|
|
5
8
|
/** Get 2D size (rows, cols) from shape, padding with 1s as needed.
|
|
6
9
|
* For N-D tensors (N>2), trailing dimensions are collapsed into cols,
|
|
7
10
|
* matching MATLAB's behavior when fewer subscripts than dimensions. */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Numbl version, used for JIT disk cache invalidation. */
|
|
2
|
-
export declare const NUMBL_VERSION = "0.4.
|
|
2
|
+
export declare const NUMBL_VERSION = "0.4.22";
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The files visible to a run: the caller's workspace files, the implicit cwd,
|
|
3
|
+
* the search path and the bundled stdlib. Keeps them in sync with addpath,
|
|
4
|
+
* rmpath and cd, and registers them with the LoweringContext for function
|
|
5
|
+
* resolution.
|
|
6
|
+
*/
|
|
7
|
+
import type { LoweringContext, FunctionIndex } from "../lowering/loweringContext.js";
|
|
8
|
+
import type { FileIOAdapter } from "../fileIOAdapter.js";
|
|
9
|
+
import type { SystemAdapter } from "../systemAdapter.js";
|
|
10
|
+
import type { WorkspaceFile, NativeBridge } from "./types.js";
|
|
11
|
+
import { type LoadedJsUserFunction } from "../jsUserFunctions.js";
|
|
12
|
+
/** Search-path entry for bundled shim files; always last. */
|
|
13
|
+
export declare const SHIM_SEARCH_PATH = "__numbl_shims__";
|
|
14
|
+
export declare class Workspace {
|
|
15
|
+
private readonly ctx;
|
|
16
|
+
private readonly fileIO;
|
|
17
|
+
private readonly nativeBridge;
|
|
18
|
+
readonly mFiles: WorkspaceFile[];
|
|
19
|
+
readonly jsFiles: WorkspaceFile[];
|
|
20
|
+
readonly wasmFiles: WorkspaceFile[];
|
|
21
|
+
/** Loaded .numbl.js functions, sorted by search-path priority on rebuild. */
|
|
22
|
+
jsFunctions: LoadedJsUserFunction[];
|
|
23
|
+
/** Names of the bundled stdlib and shim files. */
|
|
24
|
+
readonly bundledFileNames: Set<string>;
|
|
25
|
+
/** The current directory, searched first unless it is an explicit path. */
|
|
26
|
+
implicitCwd: string | null;
|
|
27
|
+
/** True once addpath, rmpath or cd changed the workspace. */
|
|
28
|
+
modified: boolean;
|
|
29
|
+
/** Notified when a .m file enters or leaves the workspace after startup. */
|
|
30
|
+
onFileAdded?: (f: WorkspaceFile) => void;
|
|
31
|
+
onFileRemoved?: (name: string) => void;
|
|
32
|
+
constructor(ctx: LoweringContext, fileIO: FileIOAdapter | undefined, nativeBridge: NativeBridge | undefined);
|
|
33
|
+
get searchPaths(): string[];
|
|
34
|
+
private resolve;
|
|
35
|
+
/** Parse a .m file into the shared AST cache. A file that fails to parse
|
|
36
|
+
* is skipped with a warning rather than aborting the run. */
|
|
37
|
+
private parse;
|
|
38
|
+
/** Initial file set: the caller's files, the implicit cwd, the explicit
|
|
39
|
+
* search paths (files already provided are not re-added) and the bundled
|
|
40
|
+
* stdlib and shims. All .numbl.js files load as one batch so library
|
|
41
|
+
* files (`_name.numbl.js`) are visible across directories. */
|
|
42
|
+
load(files: WorkspaceFile[], searchPaths: string[], implicitCwd: string | null | undefined, system: SystemAdapter | undefined, bundled: WorkspaceFile[]): void;
|
|
43
|
+
/** Register the current files and .numbl.js functions with the context. */
|
|
44
|
+
register(): void;
|
|
45
|
+
/** Re-sort the files by search-path priority, re-register them and return
|
|
46
|
+
* a fresh function index. */
|
|
47
|
+
rebuild(): FunctionIndex;
|
|
48
|
+
/** Scan a directory: parse its .m files not already known, and (re)load
|
|
49
|
+
* its .numbl.js functions. Files are always reloaded because files sent
|
|
50
|
+
* earlier (e.g. by the IDE) may have lacked their wasm/native binaries. */
|
|
51
|
+
private scanDir;
|
|
52
|
+
/** Drop the files under `dir`, except those for which `keep` is true. */
|
|
53
|
+
private removeFilesUnder;
|
|
54
|
+
/** addpath. Returns false if `dir` is already on the path. */
|
|
55
|
+
addPath(dir: string, position: "begin" | "end"): boolean;
|
|
56
|
+
/** rmpath. */
|
|
57
|
+
removePath(dir: string): void;
|
|
58
|
+
/** cd: make `newCwd` the implicit cwd. Returns false if it already is. */
|
|
59
|
+
changeCwd(newCwd: string): boolean;
|
|
60
|
+
/** Search paths to report back to callers (no implicit cwd or shims). */
|
|
61
|
+
explicitSearchPaths(): string[];
|
|
62
|
+
/** Files to report back to callers (no bundled stdlib or shims). */
|
|
63
|
+
userFiles(): WorkspaceFile[];
|
|
64
|
+
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Syncs VFS changes from a worker execution back to IndexedDB.
|
|
3
3
|
*/
|
|
4
4
|
import type { VfsChanges } from "./VirtualFileSystem.js";
|
|
5
|
-
import type {
|
|
5
|
+
import type { FileEntry } from "../hooks/projectFilesState.js";
|
|
6
6
|
export interface VfsSyncResult {
|
|
7
|
-
addedFiles:
|
|
7
|
+
addedFiles: FileEntry[];
|
|
8
8
|
modifiedFiles: {
|
|
9
9
|
path: string;
|
|
10
10
|
data: Uint8Array;
|