numbl 0.3.0 → 0.4.0
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 +17 -33
- package/dist-cli/cli.js +61511 -46223
- package/dist-lib/graphics/types.d.ts +22 -0
- package/dist-lib/lib.js +37582 -22275
- package/dist-lib/numbl-core/executeCode.d.ts +11 -16
- package/dist-lib/numbl-core/executors/cache.d.ts +26 -0
- package/dist-lib/numbl-core/executors/classification.d.ts +134 -0
- package/dist-lib/numbl-core/executors/context.d.ts +76 -0
- package/dist-lib/numbl-core/executors/handleInline.d.ts +42 -0
- package/dist-lib/numbl-core/executors/index.d.ts +14 -0
- package/dist-lib/numbl-core/executors/jit/cJitCallExecutor.d.ts +35 -0
- package/dist-lib/numbl-core/executors/jit/cJitLoopExecutor.d.ts +31 -0
- package/dist-lib/numbl-core/executors/jit/cJitTopLevelExecutor.d.ts +29 -0
- package/dist-lib/numbl-core/executors/jit/callExecutor.d.ts +45 -0
- package/dist-lib/numbl-core/executors/jit/compileC.d.ts +51 -0
- package/dist-lib/numbl-core/executors/jit/compileC.node.d.ts +25 -0
- package/dist-lib/numbl-core/executors/jit/hostHelpers.d.ts +27 -0
- package/dist-lib/numbl-core/executors/jit/loopExecutor.d.ts +41 -0
- package/dist-lib/numbl-core/executors/jit/session.d.ts +17 -0
- package/dist-lib/numbl-core/executors/jit/topLevelExecutor.d.ts +36 -0
- package/dist-lib/numbl-core/executors/jit/typeAdapter.d.ts +28 -0
- package/dist-lib/numbl-core/executors/jit/typeAdapterC.d.ts +73 -0
- package/dist-lib/numbl-core/executors/jit/valueAdapter.d.ts +48 -0
- package/dist-lib/numbl-core/executors/jit/valueAdapterC.d.ts +108 -0
- package/dist-lib/numbl-core/executors/lowering.d.ts +120 -0
- package/dist-lib/numbl-core/executors/plugins.d.ts +32 -0
- package/dist-lib/numbl-core/executors/registry.d.ts +148 -0
- package/dist-lib/numbl-core/executors/types.d.ts +103 -0
- package/dist-lib/numbl-core/functionResolve.d.ts +7 -0
- package/dist-lib/numbl-core/helpers/check-helpers.d.ts +4 -5
- package/dist-lib/numbl-core/helpers/linsolve.d.ts +2 -3
- package/dist-lib/numbl-core/helpers/prng.d.ts +1 -2
- package/dist-lib/numbl-core/helpers/reduction-helpers.d.ts +4 -1
- package/dist-lib/numbl-core/interpreter/builtins/datetime.d.ts +2 -1
- package/dist-lib/numbl-core/interpreter/builtins/index.d.ts +1 -1
- package/dist-lib/numbl-core/interpreter/builtins/misc.d.ts +4 -1
- package/dist-lib/numbl-core/interpreter/builtins/types.d.ts +4 -109
- package/dist-lib/numbl-core/interpreter/interpreter.d.ts +51 -49
- package/dist-lib/numbl-core/interpreter/interpreterExec.d.ts +6 -0
- package/dist-lib/numbl-core/interpreter/interpreterSpecialBuiltins.d.ts +6 -3
- package/dist-lib/numbl-core/interpreter/types.d.ts +27 -12
- package/dist-lib/numbl-core/jit/builtins/defs/_shared.d.ts +43 -0
- package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/_elemwise.d.ts +123 -0
- package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/minus.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/mpower.d.ts +12 -0
- package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/mrdivide.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/mtimes.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/plus.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/power.d.ts +30 -0
- package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/rdivide.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/times.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/uminus.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/compare/_compare.d.ts +12 -0
- package/dist-lib/numbl-core/jit/builtins/defs/compare/eq.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/compare/ge.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/compare/gt.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/compare/le.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/compare/lt.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/compare/ne.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/diag/assert.d.ts +6 -0
- package/dist-lib/numbl-core/jit/builtins/defs/io/_format_args.d.ts +17 -0
- package/dist-lib/numbl-core/jit/builtins/defs/io/disp.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/io/error.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/io/fprintf.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/io/sprintf.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/io/warning.d.ts +15 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/_shortcircuit.d.ts +30 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/_unary_pred.d.ts +30 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/and.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/andand.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/boolconst.d.ts +3 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/classBuiltin.d.ts +21 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/fieldnames.d.ts +15 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/isa.d.ts +13 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/iscell.d.ts +8 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/isempty.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/isequal.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/isfield.d.ts +20 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/isinf.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/isnan.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/isnumeric.d.ts +7 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/isreal.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/isscalar.d.ts +20 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/isstruct.d.ts +7 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/logical.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/not.d.ts +15 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/or.d.ts +11 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/oror.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/strcmp.d.ts +21 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/typequery.d.ts +10 -0
- package/dist-lib/numbl-core/jit/builtins/defs/logical/xor.d.ts +12 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/_complex_fold.d.ts +34 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/_unary_real.d.ts +51 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/abs.d.ts +7 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/angle.d.ts +7 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/asinh.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/atan.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/atan2.d.ts +3 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/besselh.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/ceil.d.ts +4 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/conj.d.ts +7 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/constants.d.ts +7 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/cos.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/cosh.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/dot.d.ts +20 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/double.d.ts +28 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/exp.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/fix.d.ts +4 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/floor.d.ts +4 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/hypot.d.ts +3 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/imag.d.ts +7 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/linspace.d.ts +6 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/log.d.ts +4 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/log10.d.ts +3 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/log2.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/logspace.d.ts +8 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/mod.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/norm.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/real.d.ts +7 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/rem.d.ts +3 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/round.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/sign.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/sin.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/sinh.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/sqrt.d.ts +11 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/tan.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/tanh.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/math/uniquetol.d.ts +22 -0
- package/dist-lib/numbl-core/jit/builtins/defs/plot/dispatch.d.ts +6 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/_cumulative.d.ts +49 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/_shape.d.ts +126 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/_variance.d.ts +17 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/all.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/any.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/cummax.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/cummin.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/cumprod.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/cumsum.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/diff.d.ts +16 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/length.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/max.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/mean.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/min.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/numel.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/prod.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/std.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/sum.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/reduction/var.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/_construct.d.ts +67 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/_triangular.d.ts +34 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/cat.d.ts +33 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/diag.d.ts +29 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/eye.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/flip.d.ts +7 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/meshgrid.d.ts +12 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/ones.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/repmat.d.ts +37 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/reshape.d.ts +39 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/size.d.ts +20 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/sort.d.ts +19 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/transpose.d.ts +6 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/tril.d.ts +16 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/triu.d.ts +16 -0
- package/dist-lib/numbl-core/jit/builtins/defs/shape/zeros.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/defs/system/deal.d.ts +20 -0
- package/dist-lib/numbl-core/jit/builtins/defs/system/feval.d.ts +36 -0
- package/dist-lib/numbl-core/jit/builtins/defs/system/pathBuiltins.d.ts +4 -0
- package/dist-lib/numbl-core/jit/builtins/defs/system/tic.d.ts +8 -0
- package/dist-lib/numbl-core/jit/builtins/defs/system/toc.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/index.d.ts +16 -0
- package/dist-lib/numbl-core/jit/builtins/registry.d.ts +138 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/cell/cell.d.ts +24 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/indexing/loop_count.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/indexing/range_value.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/indexing/scalar_index.d.ts +11 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/indexing/tensor_make_range.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/io/assert_fmt.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/io/disp_complex.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/io/disp_double.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/io/disp_struct.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/io/disp_tensor.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/io/disp_tensor_complex.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/io/error_fmt.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/io/format_complex.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/io/format_double.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/io/format_engine.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/io/fprintf.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/io/sprintf.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/io/warning_fmt.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/plot/plot_dispatch.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/snippets.gen.d.ts +86 -0
- 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 +103 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/system/deep_clone.d.ts +1 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/system/isequal.d.ts +2 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/system/tictoc.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor.d.ts +6 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor_alloc.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor_alloc_complex.d.ts +6 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor_alloc_nd.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor_alloc_nd_complex.d.ts +6 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor_copy_complex.d.ts +6 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor_from_matrix.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor_from_matrix_complex.d.ts +6 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor_from_row.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor_from_row_complex.d.ts +6 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_cat.d.ts +11 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_cumulative.d.ts +32 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_diag.d.ts +33 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_diff.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_dot.d.ts +16 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_elemwise_complex.d.ts +90 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_elemwise_real.d.ts +75 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_elemwise_real_fn.d.ts +95 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_eye.d.ts +10 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_fill_nd.d.ts +11 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_fill_square.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_flip.d.ts +11 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_linspace.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_logical_real.d.ts +10 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_logspace.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_meshgrid.d.ts +29 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_mtimes_complex.d.ts +10 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_mtimes_real.d.ts +6 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_norm.d.ts +4 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_ones_nd.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_ones_square.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_predicate.d.ts +42 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_reduce_complex.d.ts +53 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_reduce_real.d.ts +42 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_repmat.d.ts +11 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_reshape_nd.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_reshape_nd_complex.d.ts +6 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_size.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_sort_real.d.ts +36 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_transpose.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_transpose_complex.d.ts +6 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_triangular.d.ts +22 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_unary_complex_math.d.ts +128 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_unary_real_math.d.ts +95 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_uniquetol.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_var.d.ts +12 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_zeros_nd.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_zeros_square.d.ts +5 -0
- package/dist-lib/numbl-core/jit/builtins/runtime/text/strcmp.d.ts +2 -0
- package/dist-lib/numbl-core/jit/codegen/cFormat.d.ts +36 -0
- package/dist-lib/numbl-core/jit/codegen/cHelpers.d.ts +48 -0
- package/dist-lib/numbl-core/jit/codegen/emit.d.ts +55 -0
- package/dist-lib/numbl-core/jit/codegen/emitCellTypedef.d.ts +23 -0
- package/dist-lib/numbl-core/jit/codegen/emitExpr.d.ts +33 -0
- package/dist-lib/numbl-core/jit/codegen/emitIndex.d.ts +56 -0
- package/dist-lib/numbl-core/jit/codegen/emitJs.d.ts +64 -0
- package/dist-lib/numbl-core/jit/codegen/emitNamedTypedef.d.ts +58 -0
- package/dist-lib/numbl-core/jit/codegen/emitStmt.d.ts +76 -0
- package/dist-lib/numbl-core/jit/codegen/emitTensorConcat.d.ts +23 -0
- package/dist-lib/numbl-core/jit/codegen/emitTensorConcatJs.d.ts +16 -0
- package/dist-lib/numbl-core/jit/codegen/emitTensorFused.d.ts +77 -0
- package/dist-lib/numbl-core/jit/codegen/inlinePass.d.ts +66 -0
- package/dist-lib/numbl-core/jit/codegen/liveness.d.ts +58 -0
- package/dist-lib/numbl-core/jit/codegen/prettyIR.d.ts +24 -0
- package/dist-lib/numbl-core/jit/codegen/runtime.d.ts +150 -0
- package/dist-lib/numbl-core/jit/compileSpec.d.ts +84 -0
- package/dist-lib/numbl-core/jit/compileSpecC.d.ts +93 -0
- package/dist-lib/numbl-core/jit/index.d.ts +13 -5
- package/dist-lib/numbl-core/jit/lowering/classDefs.d.ts +109 -0
- package/dist-lib/numbl-core/jit/lowering/errors.d.ts +35 -0
- package/dist-lib/numbl-core/jit/lowering/indexFold.d.ts +31 -0
- package/dist-lib/numbl-core/jit/lowering/indexResolve.d.ts +100 -0
- package/dist-lib/numbl-core/jit/lowering/ir.d.ts +584 -0
- package/dist-lib/numbl-core/jit/lowering/lower.d.ts +271 -0
- package/dist-lib/numbl-core/jit/lowering/lowerCellIndex.d.ts +41 -0
- package/dist-lib/numbl-core/jit/lowering/lowerCellLit.d.ts +19 -0
- package/dist-lib/numbl-core/jit/lowering/lowerClassConstructor.d.ts +55 -0
- package/dist-lib/numbl-core/jit/lowering/lowerFuncCall.d.ts +34 -0
- package/dist-lib/numbl-core/jit/lowering/lowerHandle.d.ts +57 -0
- package/dist-lib/numbl-core/jit/lowering/lowerIndexLoad.d.ts +16 -0
- package/dist-lib/numbl-core/jit/lowering/lowerIndexSlice.d.ts +29 -0
- package/dist-lib/numbl-core/jit/lowering/lowerIndexSliceStore.d.ts +19 -0
- package/dist-lib/numbl-core/jit/lowering/lowerIndexStore.d.ts +14 -0
- package/dist-lib/numbl-core/jit/lowering/lowerMethodCall.d.ts +45 -0
- package/dist-lib/numbl-core/jit/lowering/lowerMultiAssign.d.ts +36 -0
- package/dist-lib/numbl-core/jit/lowering/lowerTensorLit.d.ts +25 -0
- package/dist-lib/numbl-core/jit/lowering/rangeCount.d.ts +19 -0
- package/dist-lib/numbl-core/jit/lowering/specialize.d.ts +93 -0
- package/dist-lib/numbl-core/jit/lowering/types.d.ts +503 -0
- package/dist-lib/numbl-core/jit/lowering/walk.d.ts +17 -0
- package/dist-lib/numbl-core/jit/numbl/index.d.ts +30 -0
- package/dist-lib/numbl-core/jit/parser/astUtils.d.ts +43 -0
- package/dist-lib/numbl-core/jit/parser/index.d.ts +12 -0
- package/dist-lib/numbl-core/jit/parser/sourceLoc.d.ts +12 -0
- package/dist-lib/numbl-core/jit/runtime/context.d.ts +23 -0
- package/dist-lib/numbl-core/jit/runtime/inferType.d.ts +10 -0
- package/dist-lib/numbl-core/jit/runtime/value.d.ts +101 -0
- package/dist-lib/numbl-core/jit/workspace/driverPrologue.d.ts +59 -0
- package/dist-lib/numbl-core/jit/workspace/mtoc2UserFunctionLoader.d.ts +62 -0
- package/dist-lib/numbl-core/jit/workspace/workspace.d.ts +243 -0
- package/dist-lib/numbl-core/jitTypes.d.ts +94 -0
- package/dist-lib/numbl-core/jsUserFunctions.d.ts +10 -2
- package/dist-lib/numbl-core/lowering/loweringContext.d.ts +24 -0
- package/dist-lib/numbl-core/native/lapack-bridge.d.ts +3 -3
- package/dist-lib/numbl-core/parser/ClassParser.d.ts +3 -0
- package/dist-lib/numbl-core/parser/types.d.ts +20 -0
- package/dist-lib/numbl-core/runtime/alloc.d.ts +12 -23
- package/dist-lib/numbl-core/runtime/constructors.d.ts +6 -6
- package/dist-lib/numbl-core/runtime/cow.d.ts +33 -0
- package/dist-lib/numbl-core/runtime/index.d.ts +4 -3
- package/dist-lib/numbl-core/runtime/indexing.d.ts +17 -2
- package/dist-lib/numbl-core/runtime/plotBuiltinDispatch.d.ts +86 -0
- package/dist-lib/numbl-core/runtime/plotUtils.d.ts +17 -2
- package/dist-lib/numbl-core/runtime/refcount.d.ts +85 -0
- package/dist-lib/numbl-core/runtime/runtime.d.ts +43 -67
- package/dist-lib/numbl-core/runtime/runtimeDispatch.d.ts +2 -2
- package/dist-lib/numbl-core/runtime/runtimeIndexing.d.ts +2 -2
- package/dist-lib/numbl-core/runtime/runtimeMemberAccess.d.ts +1 -1
- package/dist-lib/numbl-core/runtime/runtimePlot.d.ts +1 -0
- package/dist-lib/numbl-core/runtime/struct-access.d.ts +2 -1
- package/dist-lib/numbl-core/runtime/types.d.ts +117 -62
- package/dist-lib/numbl-core/runtime/utils.d.ts +2 -8
- package/dist-lib/numbl-core/version.d.ts +1 -1
- package/dist-lib/numbl-core/workspace/types.d.ts +8 -0
- package/dist-plot-viewer/assets/index-COAM8o1E.js +4426 -0
- package/dist-plot-viewer/index.html +1 -1
- package/dist-site-viewer/404.html +33 -0
- package/dist-site-viewer/assets/index-CgBUy7v7.js +4748 -0
- package/dist-site-viewer/assets/index-D5YY8PKx.css +1 -0
- package/dist-site-viewer/assets/numbl-worker-VkVtodCX.js +11836 -0
- package/dist-site-viewer/coi-serviceworker.js +70 -0
- package/dist-site-viewer/favicon.svg +23 -0
- package/dist-site-viewer/index.html +16 -0
- package/dist-site-viewer/logo.svg +26 -0
- package/dist-site-viewer/numbl-embed.js +111 -0
- package/dist-site-viewer/vite.svg +1 -0
- package/native/lapack_linsolve.cpp +1 -1
- package/native/numbl_addon_common.h +2 -2
- package/native/ops/comparison.c +1 -1
- package/native/ops/real_unary_elemwise.c +3 -1
- package/package.json +16 -13
- package/dist-lib/numbl-core/jit/c/abi.d.ts +0 -90
- package/dist-lib/numbl-core/jit/c/assemble.d.ts +0 -56
- package/dist-lib/numbl-core/jit/c/classify.d.ts +0 -70
- package/dist-lib/numbl-core/jit/c/compile.d.ts +0 -37
- package/dist-lib/numbl-core/jit/c/context.d.ts +0 -152
- package/dist-lib/numbl-core/jit/c/emit/assign.d.ts +0 -20
- package/dist-lib/numbl-core/jit/c/emit/complexScalar.d.ts +0 -18
- package/dist-lib/numbl-core/jit/c/emit/fused.d.ts +0 -42
- package/dist-lib/numbl-core/jit/c/emit/helpers.d.ts +0 -40
- package/dist-lib/numbl-core/jit/c/emit/index.d.ts +0 -14
- package/dist-lib/numbl-core/jit/c/emit/scalar.d.ts +0 -23
- package/dist-lib/numbl-core/jit/c/emit/stmt.d.ts +0 -25
- package/dist-lib/numbl-core/jit/c/emit/tensor.d.ts +0 -127
- package/dist-lib/numbl-core/jit/c/emit/userCall.d.ts +0 -58
- package/dist-lib/numbl-core/jit/c/epilogue.d.ts +0 -26
- package/dist-lib/numbl-core/jit/c/feasibility.d.ts +0 -44
- package/dist-lib/numbl-core/jit/c/prelude.d.ts +0 -37
- package/dist-lib/numbl-core/jit/c/visit.d.ts +0 -63
- package/dist-lib/numbl-core/jit/e1/complexKernelEmit.d.ts +0 -46
- package/dist-lib/numbl-core/jit/e1/hash.d.ts +0 -10
- package/dist-lib/numbl-core/jit/e1/install.d.ts +0 -13
- package/dist-lib/numbl-core/jit/e1/kernelEmit.d.ts +0 -54
- package/dist-lib/numbl-core/jit/e1/multiReductionKernel.d.ts +0 -66
- package/dist-lib/numbl-core/jit/e1/openmpFlag.d.ts +0 -13
- package/dist-lib/numbl-core/jit/e1/scalarFnKernel.d.ts +0 -44
- package/dist-lib/numbl-core/jit/e2/assignKernel.d.ts +0 -34
- package/dist-lib/numbl-core/jit/e2/astToJitExpr.d.ts +0 -25
- package/dist-lib/numbl-core/jit/e2/cache.d.ts +0 -80
- package/dist-lib/numbl-core/jit/e2/chainKernelEmit.d.ts +0 -55
- package/dist-lib/numbl-core/jit/e2/classify.d.ts +0 -119
- package/dist-lib/numbl-core/jit/e2/compileFn.d.ts +0 -16
- package/dist-lib/numbl-core/jit/e2/complexChainKernelEmit.d.ts +0 -79
- package/dist-lib/numbl-core/jit/e2/emitShared.d.ts +0 -71
- package/dist-lib/numbl-core/jit/e2/install.d.ts +0 -11
- package/dist-lib/numbl-core/jit/e2/liveness.d.ts +0 -29
- package/dist-lib/numbl-core/jit/e2/loopKernel.d.ts +0 -49
- package/dist-lib/numbl-core/jit/e2/loopKernelEmit.d.ts +0 -75
- package/dist-lib/numbl-core/jit/e2/multiReductionDriver.d.ts +0 -24
- package/dist-lib/numbl-core/jit/e2/reductionKernelEmit.d.ts +0 -72
- package/dist-lib/numbl-core/jit/e2/scalarFnDriver.d.ts +0 -29
- package/dist-lib/numbl-core/jit/fusedChainHelpers.d.ts +0 -65
- package/dist-lib/numbl-core/jit/fusedScalarEmit.d.ts +0 -69
- package/dist-lib/numbl-core/jit/fusion.d.ts +0 -71
- package/dist-lib/numbl-core/jit/fusionOps.d.ts +0 -25
- package/dist-lib/numbl-core/jit/heavyOps.d.ts +0 -15
- package/dist-lib/numbl-core/jit/jitBailSafety.d.ts +0 -41
- package/dist-lib/numbl-core/jit/jitLoop.d.ts +0 -25
- package/dist-lib/numbl-core/jit/jitLoopAnalysis.d.ts +0 -37
- package/dist-lib/numbl-core/jit/jitLower.d.ts +0 -122
- package/dist-lib/numbl-core/jit/jitLowerExpr.d.ts +0 -27
- package/dist-lib/numbl-core/jit/jitLowerStmt.d.ts +0 -9
- package/dist-lib/numbl-core/jit/jitLowerTypes.d.ts +0 -29
- package/dist-lib/numbl-core/jit/jitTopLevel.d.ts +0 -22
- package/dist-lib/numbl-core/jit/jitTypes.d.ts +0 -394
- package/dist-lib/numbl-core/jit/js/jitCodegen.d.ts +0 -7
- package/dist-lib/numbl-core/jit/js/jitCodegenHoist.d.ts +0 -70
- package/dist-lib/numbl-core/jit/js/jitHelpers.d.ts +0 -34
- package/dist-lib/numbl-core/jit/js/jitHelpersComplex.d.ts +0 -21
- package/dist-lib/numbl-core/jit/js/jitHelpersIndex.d.ts +0 -33
- package/dist-lib/numbl-core/jit/js/jitHelpersTensor.d.ts +0 -34
- package/dist-lib/numbl-core/jit/js/jsFusedCodegen.d.ts +0 -17
- package/dist-lib/numbl-core/jit/js/jsMultiReduction.d.ts +0 -70
- package/dist-lib/numbl-core/jit/scalarEmit.d.ts +0 -58
- package/dist-plot-viewer/assets/index-GiUNnMQg.js +0 -4426
- package/native/jit_runtime/jit_runtime.c +0 -261
- package/native/jit_runtime/jit_runtime.h +0 -204
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* runtimeDispatch.ts, and helper types/utilities in runtimeHelpers.ts.
|
|
12
12
|
*/
|
|
13
13
|
import { type RuntimeValue, type RuntimeLogical, type RuntimeTensor, type RuntimeStruct, type RuntimeString, type RuntimeFunction, RuntimeError, type CallFrame } from "../runtime/index.js";
|
|
14
|
+
import { RefScope } from "./refcount.js";
|
|
14
15
|
import { RuntimeChar, RuntimeCell, type RuntimeComplexNumber, type RuntimeClassInstance } from "../runtime/types.js";
|
|
15
16
|
import { type ItemType } from "../lowering/itemTypes.js";
|
|
16
17
|
import type { PlotInstruction } from "../../graphics/types.js";
|
|
@@ -22,9 +23,21 @@ export declare class Runtime {
|
|
|
22
23
|
private options;
|
|
23
24
|
private initialVariableValues?;
|
|
24
25
|
outputLines: string[];
|
|
26
|
+
/** Stack of in-progress output-capture buffers. While non-empty,
|
|
27
|
+
* `output()` appends to the top buffer instead of emitting, so a
|
|
28
|
+
* speculative JIT attempt's side effects can be committed on success
|
|
29
|
+
* or discarded on bail (preventing duplicated output when the
|
|
30
|
+
* interpreter re-runs the same code). */
|
|
31
|
+
private outputCaptureStack;
|
|
25
32
|
plotInstructions: PlotInstruction[];
|
|
26
33
|
variableValues: Record<string, RuntimeValue>;
|
|
27
34
|
holdState: boolean;
|
|
35
|
+
tiledLayoutState: {
|
|
36
|
+
rows: number;
|
|
37
|
+
cols: number;
|
|
38
|
+
mode: "fixed" | "flow" | "vertical" | "horizontal";
|
|
39
|
+
count: number;
|
|
40
|
+
} | null;
|
|
28
41
|
private cancelFlag;
|
|
29
42
|
$line: number;
|
|
30
43
|
$file: string | null;
|
|
@@ -37,12 +50,12 @@ export declare class Runtime {
|
|
|
37
50
|
END: symbol;
|
|
38
51
|
RTV: {
|
|
39
52
|
num(value: number): import("../runtime/types.js").RuntimeNumber;
|
|
40
|
-
tensor(data:
|
|
41
|
-
tensorRaw(data:
|
|
53
|
+
tensor(data: Float64Array | number[], shape: number[], imag?: Float64Array | number[]): RuntimeTensor;
|
|
54
|
+
tensorRaw(data: Float64Array, shape: number[]): RuntimeTensor;
|
|
42
55
|
scalar(value: number): import("../runtime/types.js").RuntimeNumber;
|
|
43
56
|
row(data: number[], imag?: number[]): RuntimeTensor;
|
|
44
57
|
col(data: number[], imag?: number[]): RuntimeTensor;
|
|
45
|
-
matrix(rows: number, cols: number, data: number[] |
|
|
58
|
+
matrix(rows: number, cols: number, data: number[] | Float64Array, imag?: number[] | Float64Array): RuntimeTensor;
|
|
46
59
|
string(value: string): RuntimeString;
|
|
47
60
|
char(value: string): RuntimeChar;
|
|
48
61
|
logical(value: boolean): RuntimeLogical;
|
|
@@ -60,8 +73,19 @@ export declare class Runtime {
|
|
|
60
73
|
value: RuntimeValue;
|
|
61
74
|
}>, keyType?: string, valueType?: string): import("../runtime/types.js").RuntimeDictionary;
|
|
62
75
|
};
|
|
63
|
-
|
|
76
|
+
persistentStore: Map<string, Map<string, RuntimeValue>>;
|
|
64
77
|
$g: Record<string, RuntimeValue>;
|
|
78
|
+
/** Active per-statement transient scope. New refcounted values are
|
|
79
|
+
* auto-adopted into this scope (rc 0→1) on construction so they
|
|
80
|
+
* survive long enough to be bound somewhere; on scope drain at end
|
|
81
|
+
* of statement, anything still held only by the scope is decref'd
|
|
82
|
+
* to 0 and destroyed. Null when no statement is in flight. */
|
|
83
|
+
currentScope: RefScope | null;
|
|
84
|
+
/** When true, `decref` on a zero count throws (loud at the
|
|
85
|
+
* underflow site rather than silently leaking). On by default — the
|
|
86
|
+
* refcount-driven COW system relies on accurate refcounts to make
|
|
87
|
+
* correct mutate-vs-copy decisions. */
|
|
88
|
+
strictRefcount: boolean;
|
|
65
89
|
activeAccessors: Set<string>;
|
|
66
90
|
resolveClassMethod: ((className: string, methodName: string) => ((...args: any[]) => any) | null) | null;
|
|
67
91
|
getClassParent: ((className: string) => string | null) | null;
|
|
@@ -86,7 +110,6 @@ export declare class Runtime {
|
|
|
86
110
|
system?: SystemAdapter;
|
|
87
111
|
builtins: Record<string, (nargout: number, args: unknown[]) => unknown>;
|
|
88
112
|
customBuiltins: Record<string, (nargout: number, args: unknown[]) => unknown>;
|
|
89
|
-
jitHelpers: Record<string, any> | null;
|
|
90
113
|
compileSpecialized: ((name: string, argTypes: ItemType[], callSite: CallSite) => ((...args: any[]) => any) | null) | null;
|
|
91
114
|
evalLocalCallback: ((code: string, initialVars: Record<string, RuntimeValue>, onOutput: (text: string) => void, fileName?: string) => {
|
|
92
115
|
returnValue: unknown;
|
|
@@ -112,6 +135,10 @@ export declare class Runtime {
|
|
|
112
135
|
constructor(options: ExecOptions, initialVariableValues?: Record<string, RuntimeValue> | undefined);
|
|
113
136
|
/** Throw CancellationError if the cancel flag has been set. */
|
|
114
137
|
checkCancel(): void;
|
|
138
|
+
/** Run `fn` with a fresh `RefScope` as `this.currentScope`. On return,
|
|
139
|
+
* every value adopted into the scope is decref'd. Used by `execStmt`
|
|
140
|
+
* to bound the lifetime of expression transients to one statement. */
|
|
141
|
+
withScope<T>(fn: () => T): T;
|
|
115
142
|
private initBuiltins;
|
|
116
143
|
profileEnter(key: string): void;
|
|
117
144
|
profileLeave(): void;
|
|
@@ -136,6 +163,16 @@ export declare class Runtime {
|
|
|
136
163
|
getJitCompileTimeMs(): number;
|
|
137
164
|
getDispatchUnknownCounts(): Record<string, number>;
|
|
138
165
|
output(text: string): void;
|
|
166
|
+
/** Begin buffering output for a speculative execution attempt.
|
|
167
|
+
* Pair with exactly one `commitOutputCapture()` or
|
|
168
|
+
* `discardOutputCapture()`. */
|
|
169
|
+
beginOutputCapture(): void;
|
|
170
|
+
/** Emit the buffered output (to the parent capture frame if nested,
|
|
171
|
+
* else to the real sink) — call when the attempt succeeded. */
|
|
172
|
+
commitOutputCapture(): void;
|
|
173
|
+
/** Drop the buffered output — call when the attempt bailed, so a
|
|
174
|
+
* subsequent re-run is the only thing that emits. */
|
|
175
|
+
discardOutputCapture(): void;
|
|
139
176
|
error(message: string): RuntimeError;
|
|
140
177
|
annotateError(e: unknown): void;
|
|
141
178
|
wrapError(e: unknown): RuntimeStruct;
|
|
@@ -146,7 +183,6 @@ export declare class Runtime {
|
|
|
146
183
|
lg(v: boolean): RuntimeLogical;
|
|
147
184
|
/** Scalar power that returns complex for negative base with fractional exponent */
|
|
148
185
|
pow(a: number, b: number): number | RuntimeComplexNumber;
|
|
149
|
-
share(v: unknown): RuntimeValue;
|
|
150
186
|
get displayResults(): boolean;
|
|
151
187
|
displayResult(v: unknown): void;
|
|
152
188
|
displayAssign(name: string, v: unknown): void;
|
|
@@ -270,68 +306,8 @@ export declare class Runtime {
|
|
|
270
306
|
memberChainAssign(base: unknown, names: string[], rhs: unknown): unknown;
|
|
271
307
|
narginchk(actualNargin: unknown, minArgs: unknown, maxArgs: unknown): void;
|
|
272
308
|
nargoutchk(actualNargout: unknown, minArgs: unknown, maxArgs: unknown): void;
|
|
273
|
-
|
|
274
|
-
type: "set_figure_handle";
|
|
275
|
-
handle: unknown;
|
|
276
|
-
} | {
|
|
277
|
-
type: "plot";
|
|
278
|
-
x: unknown;
|
|
279
|
-
y: unknown;
|
|
280
|
-
} | {
|
|
281
|
-
type: "set_hold";
|
|
282
|
-
value: unknown;
|
|
283
|
-
} | {
|
|
284
|
-
type: "close";
|
|
285
|
-
} | {
|
|
286
|
-
type: "close_all";
|
|
287
|
-
} | {
|
|
288
|
-
type: "clf";
|
|
289
|
-
} | {
|
|
290
|
-
type: "set_subplot";
|
|
291
|
-
rows: unknown;
|
|
292
|
-
cols: unknown;
|
|
293
|
-
index: unknown;
|
|
294
|
-
} | {
|
|
295
|
-
type: "set_sgtitle";
|
|
296
|
-
text: unknown;
|
|
297
|
-
} | {
|
|
298
|
-
type: "set_grid";
|
|
299
|
-
value: unknown;
|
|
300
|
-
}): void;
|
|
309
|
+
/** Read the hold state, for `ishold()` queries. */
|
|
301
310
|
ishold(): RuntimeValue;
|
|
302
|
-
plot_call(args: RuntimeValue[]): void;
|
|
303
|
-
plot3_call(args: RuntimeValue[]): void;
|
|
304
|
-
surf_call(args: RuntimeValue[]): void;
|
|
305
|
-
scatter_call(args: RuntimeValue[]): void;
|
|
306
|
-
imagesc_call(args: RuntimeValue[]): void;
|
|
307
|
-
pcolor_call(args: RuntimeValue[]): void;
|
|
308
|
-
contour_call(args: RuntimeValue[], filled: boolean): void;
|
|
309
|
-
mesh_call(args: RuntimeValue[]): void;
|
|
310
|
-
bar_call(args: RuntimeValue[]): void;
|
|
311
|
-
barh_call(args: RuntimeValue[]): void;
|
|
312
|
-
bar3_call(args: RuntimeValue[]): void;
|
|
313
|
-
bar3h_call(args: RuntimeValue[]): void;
|
|
314
|
-
stairs_call(args: RuntimeValue[]): void;
|
|
315
|
-
errorbar_call(args: RuntimeValue[]): void;
|
|
316
|
-
semilogx_call(args: RuntimeValue[]): void;
|
|
317
|
-
semilogy_call(args: RuntimeValue[]): void;
|
|
318
|
-
loglog_call(args: RuntimeValue[]): void;
|
|
319
|
-
area_call(args: RuntimeValue[]): void;
|
|
320
|
-
fplot_call(args: RuntimeValue[]): void;
|
|
321
|
-
fplot3_call(args: RuntimeValue[]): void;
|
|
322
|
-
scatter3_call(args: RuntimeValue[]): void;
|
|
323
|
-
histogram_call(args: RuntimeValue[]): void;
|
|
324
|
-
histogram2_call(args: RuntimeValue[]): void;
|
|
325
|
-
boxchart_call(args: RuntimeValue[]): void;
|
|
326
|
-
swarmchart_call(args: RuntimeValue[]): void;
|
|
327
|
-
swarmchart3_call(args: RuntimeValue[]): void;
|
|
328
|
-
piechart_call(args: RuntimeValue[]): void;
|
|
329
|
-
donutchart_call(args: RuntimeValue[]): void;
|
|
330
|
-
heatmap_call(args: RuntimeValue[]): void;
|
|
331
|
-
streamline_call(args: RuntimeValue[]): RuntimeValue;
|
|
332
|
-
stream2_call(args: RuntimeValue[]): RuntimeValue;
|
|
333
|
-
view_call(args: RuntimeValue[]): void;
|
|
334
|
-
legend_call(args: RuntimeValue[]): void;
|
|
335
311
|
drawnow(): void;
|
|
336
312
|
pause(seconds: unknown): void;
|
|
337
313
|
readInput(prompt: string): string;
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
* Standalone functions that take the Runtime instance as the first parameter.
|
|
5
5
|
* Handles function/class dispatch, arrayfun/cellfun/bsxfun, and subsref/subsasgn.
|
|
6
6
|
*/
|
|
7
|
-
import { type RuntimeValue, type RuntimeLogical,
|
|
7
|
+
import { type RuntimeValue, type RuntimeLogical, RuntimeFunction } from "../runtime/index.js";
|
|
8
8
|
import type { Runtime } from "./runtime.js";
|
|
9
9
|
export declare function getFuncHandle(name: string): RuntimeFunction;
|
|
10
10
|
export declare function makeUserFuncHandle(jsFn: (...args: unknown[]) => unknown, nargin?: number): RuntimeFunction;
|
|
11
11
|
export declare function isa(rt: Runtime, value: unknown, classNameArg: unknown): RuntimeLogical;
|
|
12
|
-
export declare function callSuperConstructor(target: unknown, superInstance: unknown): RuntimeValue;
|
|
12
|
+
export declare function callSuperConstructor(target: unknown, superInstance: unknown, rt?: Runtime): RuntimeValue;
|
|
13
13
|
export declare function createClassInstance(_rt: Runtime, className: string, propertyNames: string[], defaults?: Record<string, unknown>, isHandleClass?: boolean): RuntimeValue;
|
|
14
14
|
export declare function dispatch(rt: Runtime, name: string, nargout: number, args: unknown[], targetClassName?: string): unknown;
|
|
15
15
|
/** Direct builtin call — skips local/workspace/registry lookup. */
|
|
@@ -20,9 +20,9 @@ export declare function indexStore(rt: Runtime, base: unknown, indices: unknown[
|
|
|
20
20
|
/**
|
|
21
21
|
* Cell-indexed assignment (curly braces).
|
|
22
22
|
*/
|
|
23
|
-
export declare function indexCellStore(base: unknown, indices: unknown[], rhs: unknown): unknown;
|
|
23
|
+
export declare function indexCellStore(base: unknown, indices: unknown[], rhs: unknown, rt?: import("./refcount.js").RefcountRuntime): unknown;
|
|
24
24
|
/**
|
|
25
25
|
* Multi-output assignment to cell elements: [c{idx}] = func()
|
|
26
26
|
* Distributes individual results to individual cell positions.
|
|
27
27
|
*/
|
|
28
|
-
export declare function multiOutputCellAssign(base: unknown, indices: unknown, results: unknown[]): unknown;
|
|
28
|
+
export declare function multiOutputCellAssign(base: unknown, indices: unknown, results: unknown[], rt?: import("./refcount.js").RefcountRuntime): unknown;
|
|
@@ -7,7 +7,7 @@ export declare function getMember(rt: Runtime, base: unknown, name: string): unk
|
|
|
7
7
|
export declare function getMemberDynamic(base: unknown, nameExpr: unknown): RuntimeValue;
|
|
8
8
|
export declare function getMemberOrEmpty(base: unknown, name: string): RuntimeValue;
|
|
9
9
|
export declare function setMemberReturn(rt: Runtime, base: unknown, name: string, rhs: unknown): unknown;
|
|
10
|
-
export declare function setMemberDynamicReturn(base: unknown, nameExpr: unknown, rhs: unknown): RuntimeValue;
|
|
10
|
+
export declare function setMemberDynamicReturn(rt: Runtime, base: unknown, nameExpr: unknown, rhs: unknown): RuntimeValue;
|
|
11
11
|
/**
|
|
12
12
|
* Call a user-defined subsref method on a class instance.
|
|
13
13
|
* Constructs S = struct('type', '.', 'subs', name) for each name in the chain.
|
|
@@ -100,6 +100,7 @@ export declare function swarmchart3Call(plotInstructions: PlotInstruction[], arg
|
|
|
100
100
|
export declare function piechartCall(plotInstructions: PlotInstruction[], args: RuntimeValue[]): void;
|
|
101
101
|
export declare function donutchartCall(plotInstructions: PlotInstruction[], args: RuntimeValue[]): void;
|
|
102
102
|
export declare function heatmapCall(plotInstructions: PlotInstruction[], args: RuntimeValue[]): void;
|
|
103
|
+
export declare function quiverCall(plotInstructions: PlotInstruction[], args: RuntimeValue[]): void;
|
|
103
104
|
export declare function legendCall(plotInstructions: PlotInstruction[], args: RuntimeValue[]): void;
|
|
104
105
|
export declare function drawnow(plotInstructions: PlotInstruction[], options: ExecOptions): void;
|
|
105
106
|
export declare function pause(seconds: unknown): void;
|
|
@@ -2,5 +2,6 @@
|
|
|
2
2
|
* Struct and class instance field access.
|
|
3
3
|
*/
|
|
4
4
|
import { type RuntimeValue } from "./types.js";
|
|
5
|
+
import { type RefcountRuntime } from "./refcount.js";
|
|
5
6
|
export declare function getRTValueField(base: RuntimeValue, field: string): RuntimeValue;
|
|
6
|
-
export declare function setRTValueField(base: RuntimeValue, field: string, value: RuntimeValue): RuntimeValue;
|
|
7
|
+
export declare function setRTValueField(base: RuntimeValue, field: string, value: RuntimeValue, rt?: RefcountRuntime): RuntimeValue;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
+
import { Refcounted, type RefcountRuntime } from "./refcount.js";
|
|
1
2
|
export declare const USE_FLOAT32: boolean;
|
|
2
|
-
export declare const FloatXArray: Float32ArrayConstructor | Float64ArrayConstructor;
|
|
3
|
-
export type FloatXArrayType = Float32Array | Float64Array;
|
|
4
3
|
export type RuntimeValue = number | boolean | string | RuntimeTensor | RuntimeChar | RuntimeCell | RuntimeStruct | RuntimeFunction | RuntimeClassInstance | RuntimeComplexNumber | RuntimeDummyHandle | RuntimeGraphicsHandle | RuntimeStructArray | RuntimeClassInstanceArray | RuntimeSparseMatrix | RuntimeDictionary;
|
|
5
4
|
export type RuntimeNumber = number;
|
|
6
5
|
export type RuntimeLogical = boolean;
|
|
@@ -22,104 +21,160 @@ export declare const isRuntimeClassInstanceArray: (value: RuntimeValue) => value
|
|
|
22
21
|
export declare const isRuntimeSparseMatrix: (value: RuntimeValue) => value is RuntimeSparseMatrix;
|
|
23
22
|
export declare const isRuntimeDictionary: (value: RuntimeValue) => value is RuntimeDictionary;
|
|
24
23
|
export declare const kstr: (value: RuntimeValue) => string;
|
|
25
|
-
export
|
|
26
|
-
kind: "tensor";
|
|
27
|
-
data:
|
|
28
|
-
imag
|
|
24
|
+
export declare class RuntimeTensor extends Refcounted {
|
|
25
|
+
readonly kind: "tensor";
|
|
26
|
+
data: Float64Array;
|
|
27
|
+
imag: Float64Array | undefined;
|
|
29
28
|
shape: number[];
|
|
30
|
-
/** When true, this tensor represents a logical (boolean) array from
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
export
|
|
36
|
-
kind: "char";
|
|
29
|
+
/** When true, this tensor represents a logical (boolean) array from
|
|
30
|
+
* comparisons/logical ops. */
|
|
31
|
+
_isLogical: boolean | undefined;
|
|
32
|
+
constructor(data: Float64Array, shape: number[], imag?: Float64Array, _isLogical?: boolean);
|
|
33
|
+
}
|
|
34
|
+
export declare class RuntimeChar extends Refcounted {
|
|
35
|
+
readonly kind: "char";
|
|
37
36
|
value: string;
|
|
38
|
-
/** Optional shape for multi-row char arrays. If absent, shape is
|
|
39
|
-
* For multi-row arrays, value contains all rows
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
/** Optional shape for multi-row char arrays. If absent, shape is
|
|
38
|
+
* [1, value.length]. For multi-row arrays, value contains all rows
|
|
39
|
+
* concatenated (each row is shape[1] chars). */
|
|
40
|
+
shape: number[] | undefined;
|
|
41
|
+
constructor(value: string, shape?: number[]);
|
|
42
|
+
}
|
|
43
|
+
export declare class RuntimeCell extends Refcounted {
|
|
44
|
+
readonly kind: "cell";
|
|
44
45
|
data: RuntimeValue[];
|
|
45
46
|
shape: number[];
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
constructor(data: RuntimeValue[], shape: number[]);
|
|
48
|
+
/** Replace element at idx, decref-old / incref-new. Caller resizes the
|
|
49
|
+
* shape if necessary; this method does not touch shape. */
|
|
50
|
+
bindElement(rt: RefcountRuntime, idx: number, value: RuntimeValue): void;
|
|
51
|
+
protected _destroy(rt: RefcountRuntime): void;
|
|
52
|
+
}
|
|
53
|
+
export declare class RuntimeStruct extends Refcounted {
|
|
54
|
+
readonly kind: "struct";
|
|
51
55
|
fields: Map<string, RuntimeValue>;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
56
|
+
constructor(fields: Map<string, RuntimeValue>);
|
|
57
|
+
/** Set/replace a field value, decref-old / incref-new. */
|
|
58
|
+
bindField(rt: RefcountRuntime, name: string, value: RuntimeValue): void;
|
|
59
|
+
protected _destroy(rt: RefcountRuntime): void;
|
|
60
|
+
}
|
|
61
|
+
export declare class RuntimeFunction extends Refcounted {
|
|
62
|
+
readonly kind: "function";
|
|
55
63
|
name: string;
|
|
56
64
|
/** For closures: captured variables */
|
|
57
65
|
captures: RuntimeValue[];
|
|
58
66
|
/** The underlying callable — either a builtin or user-defined function name */
|
|
59
67
|
impl: "builtin" | "user";
|
|
60
68
|
/** For anonymous functions and user function handles: the underlying JS closure */
|
|
61
|
-
jsFn
|
|
69
|
+
jsFn: ((...args: unknown[]) => unknown) | undefined;
|
|
62
70
|
/** When true, jsFn expects nargout as its first argument */
|
|
63
|
-
jsFnExpectsNargout
|
|
71
|
+
jsFnExpectsNargout: boolean | undefined;
|
|
64
72
|
/** Number of input parameters (for nargin(handle)) */
|
|
65
|
-
nargin
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
73
|
+
nargin: number | undefined;
|
|
74
|
+
/** Cleanup hook fired by `_destroy`. Anonymous functions use this to
|
|
75
|
+
* decref values held in their captured environment snapshot, since
|
|
76
|
+
* those refs live in the JS closure (not in `captures`). */
|
|
77
|
+
releaseExtra: ((rt: RefcountRuntime) => void) | undefined;
|
|
78
|
+
/** For anonymous-function snapshots: the captured environment, made
|
|
79
|
+
* visible to the alias sweep so a tensor stored both here and in
|
|
80
|
+
* the parent env triggers copy-on-write on parent-side mutations.
|
|
81
|
+
* (Only the structural shape `{ vars, parent }` is needed; typed
|
|
82
|
+
* loosely to avoid a runtime↔interpreter circular import.) */
|
|
83
|
+
capturedEnv: {
|
|
84
|
+
vars: Map<string, RuntimeValue>;
|
|
85
|
+
parent?: unknown;
|
|
86
|
+
} | undefined;
|
|
87
|
+
/** The defining AST of this handle — an `AnonFunc` (`@(p) body`) or
|
|
88
|
+
* `FuncHandle` (`@name`) parser Expr. Lets the JIT recover the
|
|
89
|
+
* handle's source so a capture-free handle that crosses a
|
|
90
|
+
* compile boundary (a loop input / call arg) can be inlined as an
|
|
91
|
+
* in-scope handle constant. Typed loosely (parser Expr) to avoid a
|
|
92
|
+
* runtime→parser layering dependency; consumers cast. Undefined for
|
|
93
|
+
* handles created by paths that don't set it (e.g. builtins). */
|
|
94
|
+
handleAst: unknown;
|
|
95
|
+
/** Source file the handle was defined in. The inliner only reuses a
|
|
96
|
+
* handle's AST when this matches the file being compiled, so a
|
|
97
|
+
* named-handle target (`@foo`) resolves to the same `foo` it did at
|
|
98
|
+
* definition (file-local functions can shadow across files). */
|
|
99
|
+
handleDefFile: string | undefined;
|
|
100
|
+
constructor(name: string, impl: "builtin" | "user", captures: RuntimeValue[], jsFn?: (...args: unknown[]) => unknown, jsFnExpectsNargout?: boolean, nargin?: number);
|
|
101
|
+
protected _destroy(rt: RefcountRuntime): void;
|
|
102
|
+
}
|
|
103
|
+
export declare class RuntimeClassInstance extends Refcounted {
|
|
104
|
+
readonly kind: "class_instance";
|
|
69
105
|
className: string;
|
|
70
106
|
fields: Map<string, RuntimeValue>;
|
|
71
107
|
/** True if this class inherits from handle (reference semantics). */
|
|
72
108
|
isHandleClass: boolean;
|
|
73
109
|
/** For classes that inherit from built-in types (e.g. classdef Foo < double),
|
|
74
110
|
* stores the underlying built-in data. */
|
|
75
|
-
_builtinData
|
|
76
|
-
|
|
111
|
+
_builtinData: RuntimeValue | undefined;
|
|
112
|
+
constructor(className: string, fields: Map<string, RuntimeValue>, isHandleClass: boolean, _builtinData?: RuntimeValue);
|
|
113
|
+
/** Set/replace a field value (handle-class in-place mutation), with
|
|
114
|
+
* proper decref-old / incref-new bookkeeping. Used for handle-class
|
|
115
|
+
* field assigns; value-class field assigns construct a new instance. */
|
|
116
|
+
bindField(rt: RefcountRuntime, name: string, value: RuntimeValue): void;
|
|
117
|
+
protected _destroy(rt: RefcountRuntime): void;
|
|
118
|
+
}
|
|
77
119
|
/** A 1-D array of class instances that all share the same class.
|
|
78
120
|
* Created by default horzcat/vertcat when the class doesn't overload them. */
|
|
79
|
-
export
|
|
80
|
-
kind: "class_instance_array";
|
|
121
|
+
export declare class RuntimeClassInstanceArray extends Refcounted {
|
|
122
|
+
readonly kind: "class_instance_array";
|
|
81
123
|
className: string;
|
|
82
124
|
elements: RuntimeClassInstance[];
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
125
|
+
constructor(className: string, elements: RuntimeClassInstance[]);
|
|
126
|
+
protected _destroy(rt: RefcountRuntime): void;
|
|
127
|
+
}
|
|
128
|
+
export declare class RuntimeComplexNumber extends Refcounted {
|
|
129
|
+
readonly kind: "complex_number";
|
|
86
130
|
re: number;
|
|
87
131
|
im: number;
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
132
|
+
constructor(re: number, im: number);
|
|
133
|
+
}
|
|
134
|
+
export declare class RuntimeDummyHandle extends Refcounted {
|
|
135
|
+
readonly kind: "dummy_handle";
|
|
136
|
+
constructor();
|
|
137
|
+
}
|
|
92
138
|
/** Handle to a graphics object (e.g. surface returned by pcolor) with a mutable trace reference. */
|
|
93
|
-
export
|
|
94
|
-
kind: "graphics_handle";
|
|
139
|
+
export declare class RuntimeGraphicsHandle extends Refcounted {
|
|
140
|
+
readonly kind: "graphics_handle";
|
|
95
141
|
_trace: Record<string, unknown>;
|
|
96
142
|
_traceType: string;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
143
|
+
constructor(_trace: Record<string, unknown>, _traceType: string);
|
|
144
|
+
}
|
|
145
|
+
/** A 1-D array of structs that all share the same field names. */
|
|
146
|
+
export declare class RuntimeStructArray extends Refcounted {
|
|
147
|
+
readonly kind: "struct_array";
|
|
101
148
|
fieldNames: string[];
|
|
102
149
|
elements: RuntimeStruct[];
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
150
|
+
constructor(fieldNames: string[], elements: RuntimeStruct[]);
|
|
151
|
+
protected _destroy(rt: RefcountRuntime): void;
|
|
152
|
+
}
|
|
153
|
+
/** Sparse matrix in CSC (Compressed Sparse Column) format, matching MATLAB's
|
|
154
|
+
* internal representation. */
|
|
155
|
+
export declare class RuntimeSparseMatrix extends Refcounted {
|
|
156
|
+
readonly kind: "sparse_matrix";
|
|
107
157
|
m: number;
|
|
108
158
|
n: number;
|
|
109
159
|
ir: Int32Array;
|
|
110
160
|
jc: Int32Array;
|
|
111
161
|
pr: Float64Array;
|
|
112
|
-
pi
|
|
113
|
-
|
|
114
|
-
}
|
|
162
|
+
pi: Float64Array | undefined;
|
|
163
|
+
constructor(m: number, n: number, ir: Int32Array, jc: Int32Array, pr: Float64Array, pi?: Float64Array);
|
|
164
|
+
}
|
|
115
165
|
/** Dictionary mapping unique keys to values (MATLAB R2022b+). */
|
|
116
|
-
export
|
|
117
|
-
kind: "dictionary";
|
|
166
|
+
export declare class RuntimeDictionary extends Refcounted {
|
|
167
|
+
readonly kind: "dictionary";
|
|
118
168
|
/** Entries keyed by a hash string of the RuntimeValue key, preserving insertion order. */
|
|
119
169
|
entries: Map<string, {
|
|
120
170
|
key: RuntimeValue;
|
|
121
171
|
value: RuntimeValue;
|
|
122
172
|
}>;
|
|
123
|
-
keyType
|
|
124
|
-
valueType
|
|
125
|
-
|
|
173
|
+
keyType: string | undefined;
|
|
174
|
+
valueType: string | undefined;
|
|
175
|
+
constructor(entries?: Map<string, {
|
|
176
|
+
key: RuntimeValue;
|
|
177
|
+
value: RuntimeValue;
|
|
178
|
+
}>, keyType?: string, valueType?: string);
|
|
179
|
+
protected _destroy(rt: RefcountRuntime): void;
|
|
180
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Tensor shape/indexing utilities
|
|
2
|
+
* Tensor shape/indexing utilities.
|
|
3
3
|
*/
|
|
4
|
-
import { type
|
|
4
|
+
import { type RuntimeTensor } from "./types.js";
|
|
5
5
|
/** Get 2D size (rows, cols) from shape, padding with 1s as needed.
|
|
6
6
|
* For N-D tensors (N>2), trailing dimensions are collapsed into cols,
|
|
7
7
|
* matching MATLAB's behavior when fewer subscripts than dimensions. */
|
|
@@ -14,9 +14,3 @@ export declare function colMajorIndex(row: number, col: number, rows: number): n
|
|
|
14
14
|
export declare function ind2sub(shape: number[], idx: number): number[];
|
|
15
15
|
/** Convert subscripts to linear index (column-major) */
|
|
16
16
|
export declare function sub2ind(shape: number[], subs: number[]): number;
|
|
17
|
-
/**
|
|
18
|
-
* Share an RuntimeValue for assignment (COW): increments refcount on tensors/cells
|
|
19
|
-
* so that mIndexStore knows to copy before mutating.
|
|
20
|
-
* Returns a new wrapper object that shares the same underlying data.
|
|
21
|
-
*/
|
|
22
|
-
export declare function shareRuntimeValue(v: RuntimeValue): RuntimeValue;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Numbl version, used for JIT disk cache invalidation. */
|
|
2
|
-
export declare const NUMBL_VERSION = "0.
|
|
2
|
+
export declare const NUMBL_VERSION = "0.4.0";
|
|
@@ -10,7 +10,15 @@ export interface WorkspaceFile {
|
|
|
10
10
|
* Bridge for loading native shared libraries (.so/.dll/.dylib).
|
|
11
11
|
* Implemented outside numbl-core (e.g. via koffi in the CLI) since
|
|
12
12
|
* native FFI is not available in browser environments.
|
|
13
|
+
*
|
|
14
|
+
* `koffi`, when present, exposes the root koffi module so the
|
|
15
|
+
* C-JIT executors can call its struct / alloc / encode / decode
|
|
16
|
+
* helpers. Browser deployments leave `koffi` undefined; the
|
|
17
|
+
* C-JIT executors decline (numbl falls back to JS-JIT).
|
|
13
18
|
*/
|
|
14
19
|
export interface NativeBridge {
|
|
15
20
|
load(libraryPath: string): unknown;
|
|
21
|
+
/** koffi root module — `require("koffi")`'s exports. Only the
|
|
22
|
+
* C-JIT path consumes it. Optional so non-Node hosts can omit. */
|
|
23
|
+
koffi?: unknown;
|
|
16
24
|
}
|