numbl 0.3.3 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (349) hide show
  1. package/binding.gyp +6 -5
  2. package/dist-cli/cli.js +63077 -42047
  3. package/dist-lib/graphics/types.d.ts +40 -1
  4. package/dist-lib/lib.d.ts +0 -1
  5. package/dist-lib/lib.js +78446 -57671
  6. package/dist-lib/numbl-core/executeCode.d.ts +10 -12
  7. package/dist-lib/numbl-core/executors/classification.d.ts +134 -0
  8. package/dist-lib/numbl-core/executors/handleInline.d.ts +42 -0
  9. package/dist-lib/numbl-core/executors/index.d.ts +0 -3
  10. package/dist-lib/numbl-core/executors/jit/cJitCallExecutor.d.ts +35 -0
  11. package/dist-lib/numbl-core/executors/jit/cJitLoopExecutor.d.ts +31 -0
  12. package/dist-lib/numbl-core/executors/jit/cJitTopLevelExecutor.d.ts +29 -0
  13. package/dist-lib/numbl-core/executors/jit/callExecutor.d.ts +45 -0
  14. package/dist-lib/numbl-core/executors/jit/compileC.d.ts +51 -0
  15. package/dist-lib/numbl-core/executors/jit/compileC.node.d.ts +25 -0
  16. package/dist-lib/numbl-core/executors/jit/hostHelpers.d.ts +27 -0
  17. package/dist-lib/numbl-core/executors/jit/loopExecutor.d.ts +41 -0
  18. package/dist-lib/numbl-core/executors/jit/session.d.ts +17 -0
  19. package/dist-lib/numbl-core/executors/jit/topLevelExecutor.d.ts +36 -0
  20. package/dist-lib/numbl-core/executors/jit/typeAdapter.d.ts +28 -0
  21. package/dist-lib/numbl-core/executors/jit/typeAdapterC.d.ts +73 -0
  22. package/dist-lib/numbl-core/executors/jit/valueAdapter.d.ts +48 -0
  23. package/dist-lib/numbl-core/executors/jit/valueAdapterC.d.ts +108 -0
  24. package/dist-lib/numbl-core/executors/lowering.d.ts +31 -77
  25. package/dist-lib/numbl-core/executors/plugins.d.ts +14 -21
  26. package/dist-lib/numbl-core/helpers/reduction-helpers.d.ts +4 -1
  27. package/dist-lib/numbl-core/interpreter/builtins/index.d.ts +1 -1
  28. package/dist-lib/numbl-core/interpreter/builtins/types.d.ts +0 -18
  29. package/dist-lib/numbl-core/interpreter/interpreter.d.ts +37 -21
  30. package/dist-lib/numbl-core/interpreter/interpreterExec.d.ts +6 -0
  31. package/dist-lib/numbl-core/interpreter/interpreterFunctions.d.ts +13 -1
  32. package/dist-lib/numbl-core/interpreter/interpreterSpecialBuiltins.d.ts +1 -1
  33. package/dist-lib/numbl-core/jit/builtins/defs/_shared.d.ts +43 -0
  34. package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/_elemwise.d.ts +123 -0
  35. package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/minus.d.ts +2 -0
  36. package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/mpower.d.ts +12 -0
  37. package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/mrdivide.d.ts +5 -0
  38. package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/mtimes.d.ts +2 -0
  39. package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/plus.d.ts +2 -0
  40. package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/power.d.ts +30 -0
  41. package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/rdivide.d.ts +2 -0
  42. package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/times.d.ts +2 -0
  43. package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/uminus.d.ts +2 -0
  44. package/dist-lib/numbl-core/jit/builtins/defs/compare/_compare.d.ts +12 -0
  45. package/dist-lib/numbl-core/jit/builtins/defs/compare/eq.d.ts +2 -0
  46. package/dist-lib/numbl-core/jit/builtins/defs/compare/ge.d.ts +2 -0
  47. package/dist-lib/numbl-core/jit/builtins/defs/compare/gt.d.ts +2 -0
  48. package/dist-lib/numbl-core/jit/builtins/defs/compare/le.d.ts +2 -0
  49. package/dist-lib/numbl-core/jit/builtins/defs/compare/lt.d.ts +2 -0
  50. package/dist-lib/numbl-core/jit/builtins/defs/compare/ne.d.ts +2 -0
  51. package/dist-lib/numbl-core/jit/builtins/defs/diag/assert.d.ts +6 -0
  52. package/dist-lib/numbl-core/jit/builtins/defs/io/_format_args.d.ts +17 -0
  53. package/dist-lib/numbl-core/jit/builtins/defs/io/disp.d.ts +2 -0
  54. package/dist-lib/numbl-core/jit/builtins/defs/io/error.d.ts +2 -0
  55. package/dist-lib/numbl-core/jit/builtins/defs/io/fprintf.d.ts +2 -0
  56. package/dist-lib/numbl-core/jit/builtins/defs/io/sprintf.d.ts +2 -0
  57. package/dist-lib/numbl-core/jit/builtins/defs/io/warning.d.ts +15 -0
  58. package/dist-lib/numbl-core/jit/builtins/defs/logical/_shortcircuit.d.ts +30 -0
  59. package/dist-lib/numbl-core/jit/builtins/defs/logical/_unary_pred.d.ts +30 -0
  60. package/dist-lib/numbl-core/jit/builtins/defs/logical/and.d.ts +5 -0
  61. package/dist-lib/numbl-core/jit/builtins/defs/logical/andand.d.ts +1 -0
  62. package/dist-lib/numbl-core/jit/builtins/defs/logical/boolconst.d.ts +3 -0
  63. package/dist-lib/numbl-core/jit/builtins/defs/logical/classBuiltin.d.ts +21 -0
  64. package/dist-lib/numbl-core/jit/builtins/defs/logical/fieldnames.d.ts +15 -0
  65. package/dist-lib/numbl-core/jit/builtins/defs/logical/isa.d.ts +13 -0
  66. package/dist-lib/numbl-core/jit/builtins/defs/logical/iscell.d.ts +8 -0
  67. package/dist-lib/numbl-core/jit/builtins/defs/logical/isempty.d.ts +2 -0
  68. package/dist-lib/numbl-core/jit/builtins/defs/logical/isequal.d.ts +2 -0
  69. package/dist-lib/numbl-core/jit/builtins/defs/logical/isfield.d.ts +20 -0
  70. package/dist-lib/numbl-core/jit/builtins/defs/logical/isinf.d.ts +2 -0
  71. package/dist-lib/numbl-core/jit/builtins/defs/logical/isnan.d.ts +1 -0
  72. package/dist-lib/numbl-core/jit/builtins/defs/logical/isnumeric.d.ts +7 -0
  73. package/dist-lib/numbl-core/jit/builtins/defs/logical/isreal.d.ts +2 -0
  74. package/dist-lib/numbl-core/jit/builtins/defs/logical/isscalar.d.ts +20 -0
  75. package/dist-lib/numbl-core/jit/builtins/defs/logical/isstruct.d.ts +7 -0
  76. package/dist-lib/numbl-core/jit/builtins/defs/logical/logical.d.ts +1 -0
  77. package/dist-lib/numbl-core/jit/builtins/defs/logical/not.d.ts +15 -0
  78. package/dist-lib/numbl-core/jit/builtins/defs/logical/or.d.ts +11 -0
  79. package/dist-lib/numbl-core/jit/builtins/defs/logical/oror.d.ts +1 -0
  80. package/dist-lib/numbl-core/jit/builtins/defs/logical/strcmp.d.ts +21 -0
  81. package/dist-lib/numbl-core/jit/builtins/defs/logical/typequery.d.ts +10 -0
  82. package/dist-lib/numbl-core/jit/builtins/defs/logical/xor.d.ts +12 -0
  83. package/dist-lib/numbl-core/jit/builtins/defs/math/_complex_fold.d.ts +34 -0
  84. package/dist-lib/numbl-core/jit/builtins/defs/math/_unary_real.d.ts +51 -0
  85. package/dist-lib/numbl-core/jit/builtins/defs/math/abs.d.ts +7 -0
  86. package/dist-lib/numbl-core/jit/builtins/defs/math/angle.d.ts +7 -0
  87. package/dist-lib/numbl-core/jit/builtins/defs/math/asinh.d.ts +1 -0
  88. package/dist-lib/numbl-core/jit/builtins/defs/math/atan.d.ts +1 -0
  89. package/dist-lib/numbl-core/jit/builtins/defs/math/atan2.d.ts +3 -0
  90. package/dist-lib/numbl-core/jit/builtins/defs/math/besselh.d.ts +2 -0
  91. package/dist-lib/numbl-core/jit/builtins/defs/math/ceil.d.ts +4 -0
  92. package/dist-lib/numbl-core/jit/builtins/defs/math/conj.d.ts +7 -0
  93. package/dist-lib/numbl-core/jit/builtins/defs/math/constants.d.ts +7 -0
  94. package/dist-lib/numbl-core/jit/builtins/defs/math/cos.d.ts +1 -0
  95. package/dist-lib/numbl-core/jit/builtins/defs/math/cosh.d.ts +1 -0
  96. package/dist-lib/numbl-core/jit/builtins/defs/math/dot.d.ts +20 -0
  97. package/dist-lib/numbl-core/jit/builtins/defs/math/double.d.ts +28 -0
  98. package/dist-lib/numbl-core/jit/builtins/defs/math/exp.d.ts +1 -0
  99. package/dist-lib/numbl-core/jit/builtins/defs/math/fix.d.ts +4 -0
  100. package/dist-lib/numbl-core/jit/builtins/defs/math/floor.d.ts +4 -0
  101. package/dist-lib/numbl-core/jit/builtins/defs/math/hypot.d.ts +3 -0
  102. package/dist-lib/numbl-core/jit/builtins/defs/math/imag.d.ts +7 -0
  103. package/dist-lib/numbl-core/jit/builtins/defs/math/linspace.d.ts +6 -0
  104. package/dist-lib/numbl-core/jit/builtins/defs/math/log.d.ts +4 -0
  105. package/dist-lib/numbl-core/jit/builtins/defs/math/log10.d.ts +3 -0
  106. package/dist-lib/numbl-core/jit/builtins/defs/math/log2.d.ts +5 -0
  107. package/dist-lib/numbl-core/jit/builtins/defs/math/logspace.d.ts +8 -0
  108. package/dist-lib/numbl-core/jit/builtins/defs/math/mod.d.ts +1 -0
  109. package/dist-lib/numbl-core/jit/builtins/defs/math/norm.d.ts +2 -0
  110. package/dist-lib/numbl-core/jit/builtins/defs/math/real.d.ts +7 -0
  111. package/dist-lib/numbl-core/jit/builtins/defs/math/rem.d.ts +3 -0
  112. package/dist-lib/numbl-core/jit/builtins/defs/math/round.d.ts +1 -0
  113. package/dist-lib/numbl-core/jit/builtins/defs/math/sign.d.ts +5 -0
  114. package/dist-lib/numbl-core/jit/builtins/defs/math/sin.d.ts +1 -0
  115. package/dist-lib/numbl-core/jit/builtins/defs/math/sinh.d.ts +1 -0
  116. package/dist-lib/numbl-core/jit/builtins/defs/math/sqrt.d.ts +11 -0
  117. package/dist-lib/numbl-core/jit/builtins/defs/math/tan.d.ts +1 -0
  118. package/dist-lib/numbl-core/jit/builtins/defs/math/tanh.d.ts +1 -0
  119. package/dist-lib/numbl-core/jit/builtins/defs/math/uniquetol.d.ts +22 -0
  120. package/dist-lib/numbl-core/jit/builtins/defs/plot/dispatch.d.ts +6 -0
  121. package/dist-lib/numbl-core/jit/builtins/defs/reduction/_cumulative.d.ts +49 -0
  122. package/dist-lib/numbl-core/jit/builtins/defs/reduction/_shape.d.ts +126 -0
  123. package/dist-lib/numbl-core/jit/builtins/defs/reduction/_variance.d.ts +17 -0
  124. package/dist-lib/numbl-core/jit/builtins/defs/reduction/all.d.ts +1 -0
  125. package/dist-lib/numbl-core/jit/builtins/defs/reduction/any.d.ts +1 -0
  126. package/dist-lib/numbl-core/jit/builtins/defs/reduction/cummax.d.ts +1 -0
  127. package/dist-lib/numbl-core/jit/builtins/defs/reduction/cummin.d.ts +1 -0
  128. package/dist-lib/numbl-core/jit/builtins/defs/reduction/cumprod.d.ts +1 -0
  129. package/dist-lib/numbl-core/jit/builtins/defs/reduction/cumsum.d.ts +1 -0
  130. package/dist-lib/numbl-core/jit/builtins/defs/reduction/diff.d.ts +16 -0
  131. package/dist-lib/numbl-core/jit/builtins/defs/reduction/length.d.ts +2 -0
  132. package/dist-lib/numbl-core/jit/builtins/defs/reduction/max.d.ts +1 -0
  133. package/dist-lib/numbl-core/jit/builtins/defs/reduction/mean.d.ts +1 -0
  134. package/dist-lib/numbl-core/jit/builtins/defs/reduction/min.d.ts +1 -0
  135. package/dist-lib/numbl-core/jit/builtins/defs/reduction/numel.d.ts +2 -0
  136. package/dist-lib/numbl-core/jit/builtins/defs/reduction/prod.d.ts +1 -0
  137. package/dist-lib/numbl-core/jit/builtins/defs/reduction/std.d.ts +1 -0
  138. package/dist-lib/numbl-core/jit/builtins/defs/reduction/sum.d.ts +1 -0
  139. package/dist-lib/numbl-core/jit/builtins/defs/reduction/var.d.ts +1 -0
  140. package/dist-lib/numbl-core/jit/builtins/defs/shape/_construct.d.ts +67 -0
  141. package/dist-lib/numbl-core/jit/builtins/defs/shape/_triangular.d.ts +34 -0
  142. package/dist-lib/numbl-core/jit/builtins/defs/shape/cat.d.ts +33 -0
  143. package/dist-lib/numbl-core/jit/builtins/defs/shape/diag.d.ts +29 -0
  144. package/dist-lib/numbl-core/jit/builtins/defs/shape/eye.d.ts +5 -0
  145. package/dist-lib/numbl-core/jit/builtins/defs/shape/flip.d.ts +7 -0
  146. package/dist-lib/numbl-core/jit/builtins/defs/shape/meshgrid.d.ts +12 -0
  147. package/dist-lib/numbl-core/jit/builtins/defs/shape/ones.d.ts +1 -0
  148. package/dist-lib/numbl-core/jit/builtins/defs/shape/repmat.d.ts +37 -0
  149. package/dist-lib/numbl-core/jit/builtins/defs/shape/reshape.d.ts +39 -0
  150. package/dist-lib/numbl-core/jit/builtins/defs/shape/size.d.ts +20 -0
  151. package/dist-lib/numbl-core/jit/builtins/defs/shape/sort.d.ts +19 -0
  152. package/dist-lib/numbl-core/jit/builtins/defs/shape/transpose.d.ts +6 -0
  153. package/dist-lib/numbl-core/jit/builtins/defs/shape/tril.d.ts +16 -0
  154. package/dist-lib/numbl-core/jit/builtins/defs/shape/triu.d.ts +16 -0
  155. package/dist-lib/numbl-core/jit/builtins/defs/shape/zeros.d.ts +1 -0
  156. package/dist-lib/numbl-core/jit/builtins/defs/system/deal.d.ts +20 -0
  157. package/dist-lib/numbl-core/jit/builtins/defs/system/feval.d.ts +36 -0
  158. package/dist-lib/numbl-core/jit/builtins/defs/system/pathBuiltins.d.ts +4 -0
  159. package/dist-lib/numbl-core/jit/builtins/defs/system/tic.d.ts +8 -0
  160. package/dist-lib/numbl-core/jit/builtins/defs/system/toc.d.ts +5 -0
  161. package/dist-lib/numbl-core/jit/builtins/index.d.ts +16 -0
  162. package/dist-lib/numbl-core/jit/builtins/registry.d.ts +138 -0
  163. package/dist-lib/numbl-core/jit/builtins/runtime/cell/cell.d.ts +24 -0
  164. package/dist-lib/numbl-core/jit/builtins/runtime/indexing/loop_count.d.ts +1 -0
  165. package/dist-lib/numbl-core/jit/builtins/runtime/indexing/range_value.d.ts +1 -0
  166. package/dist-lib/numbl-core/jit/builtins/runtime/indexing/scalar_index.d.ts +11 -0
  167. package/dist-lib/numbl-core/jit/builtins/runtime/indexing/tensor_make_range.d.ts +5 -0
  168. package/dist-lib/numbl-core/jit/builtins/runtime/io/assert_fmt.d.ts +1 -0
  169. package/dist-lib/numbl-core/jit/builtins/runtime/io/disp_complex.d.ts +1 -0
  170. package/dist-lib/numbl-core/jit/builtins/runtime/io/disp_double.d.ts +1 -0
  171. package/dist-lib/numbl-core/jit/builtins/runtime/io/disp_struct.d.ts +1 -0
  172. package/dist-lib/numbl-core/jit/builtins/runtime/io/disp_tensor.d.ts +1 -0
  173. package/dist-lib/numbl-core/jit/builtins/runtime/io/disp_tensor_complex.d.ts +1 -0
  174. package/dist-lib/numbl-core/jit/builtins/runtime/io/error_fmt.d.ts +2 -0
  175. package/dist-lib/numbl-core/jit/builtins/runtime/io/format_complex.d.ts +1 -0
  176. package/dist-lib/numbl-core/jit/builtins/runtime/io/format_double.d.ts +1 -0
  177. package/dist-lib/numbl-core/jit/builtins/runtime/io/format_engine.d.ts +1 -0
  178. package/dist-lib/numbl-core/jit/builtins/runtime/io/fprintf.d.ts +1 -0
  179. package/dist-lib/numbl-core/jit/builtins/runtime/io/sprintf.d.ts +5 -0
  180. package/dist-lib/numbl-core/jit/builtins/runtime/io/warning_fmt.d.ts +2 -0
  181. package/dist-lib/numbl-core/jit/builtins/runtime/plot/plot_dispatch.d.ts +1 -0
  182. package/dist-lib/numbl-core/jit/builtins/runtime/snippets.gen.d.ts +86 -0
  183. package/dist-lib/numbl-core/jit/builtins/runtime/system/cdiv.d.ts +4 -0
  184. package/dist-lib/numbl-core/jit/builtins/runtime/system/cscalar.d.ts +103 -0
  185. package/dist-lib/numbl-core/jit/builtins/runtime/system/deep_clone.d.ts +1 -0
  186. package/dist-lib/numbl-core/jit/builtins/runtime/system/isequal.d.ts +2 -0
  187. package/dist-lib/numbl-core/jit/builtins/runtime/system/tictoc.d.ts +5 -0
  188. package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor.d.ts +6 -0
  189. package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor_alloc.d.ts +5 -0
  190. package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor_alloc_complex.d.ts +6 -0
  191. package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor_alloc_nd.d.ts +5 -0
  192. package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor_alloc_nd_complex.d.ts +6 -0
  193. package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor_copy_complex.d.ts +6 -0
  194. package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor_from_matrix.d.ts +5 -0
  195. package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor_from_matrix_complex.d.ts +6 -0
  196. package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor_from_row.d.ts +5 -0
  197. package/dist-lib/numbl-core/jit/builtins/runtime/tensor/tensor_from_row_complex.d.ts +6 -0
  198. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_cat.d.ts +11 -0
  199. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_cumulative.d.ts +32 -0
  200. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_diag.d.ts +33 -0
  201. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_diff.d.ts +5 -0
  202. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_dot.d.ts +16 -0
  203. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_elemwise_complex.d.ts +90 -0
  204. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_elemwise_real.d.ts +75 -0
  205. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_elemwise_real_fn.d.ts +95 -0
  206. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_eye.d.ts +10 -0
  207. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_fill_nd.d.ts +11 -0
  208. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_fill_square.d.ts +5 -0
  209. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_flip.d.ts +11 -0
  210. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_linspace.d.ts +5 -0
  211. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_logical_real.d.ts +10 -0
  212. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_logspace.d.ts +5 -0
  213. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_meshgrid.d.ts +29 -0
  214. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_mtimes_complex.d.ts +10 -0
  215. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_mtimes_real.d.ts +6 -0
  216. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_norm.d.ts +4 -0
  217. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_ones_nd.d.ts +5 -0
  218. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_ones_square.d.ts +5 -0
  219. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_predicate.d.ts +42 -0
  220. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_reduce_complex.d.ts +53 -0
  221. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_reduce_real.d.ts +42 -0
  222. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_repmat.d.ts +11 -0
  223. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_reshape_nd.d.ts +5 -0
  224. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_reshape_nd_complex.d.ts +6 -0
  225. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_size.d.ts +5 -0
  226. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_sort_real.d.ts +36 -0
  227. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_transpose.d.ts +5 -0
  228. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_transpose_complex.d.ts +6 -0
  229. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_triangular.d.ts +22 -0
  230. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_unary_complex_math.d.ts +128 -0
  231. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_unary_real_math.d.ts +95 -0
  232. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_uniquetol.d.ts +5 -0
  233. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_var.d.ts +12 -0
  234. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_zeros_nd.d.ts +5 -0
  235. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_zeros_square.d.ts +5 -0
  236. package/dist-lib/numbl-core/jit/builtins/runtime/text/strcmp.d.ts +2 -0
  237. package/dist-lib/numbl-core/jit/codegen/cFormat.d.ts +36 -0
  238. package/dist-lib/numbl-core/jit/codegen/cHelpers.d.ts +48 -0
  239. package/dist-lib/numbl-core/jit/codegen/emit.d.ts +55 -0
  240. package/dist-lib/numbl-core/jit/codegen/emitCellTypedef.d.ts +23 -0
  241. package/dist-lib/numbl-core/jit/codegen/emitExpr.d.ts +33 -0
  242. package/dist-lib/numbl-core/jit/codegen/emitIndex.d.ts +56 -0
  243. package/dist-lib/numbl-core/jit/codegen/emitJs.d.ts +64 -0
  244. package/dist-lib/numbl-core/jit/codegen/emitNamedTypedef.d.ts +58 -0
  245. package/dist-lib/numbl-core/jit/codegen/emitStmt.d.ts +76 -0
  246. package/dist-lib/numbl-core/jit/codegen/emitTensorConcat.d.ts +23 -0
  247. package/dist-lib/numbl-core/jit/codegen/emitTensorConcatJs.d.ts +16 -0
  248. package/dist-lib/numbl-core/jit/codegen/emitTensorFused.d.ts +77 -0
  249. package/dist-lib/numbl-core/jit/codegen/inlinePass.d.ts +66 -0
  250. package/dist-lib/numbl-core/jit/codegen/liveness.d.ts +58 -0
  251. package/dist-lib/numbl-core/jit/codegen/prettyIR.d.ts +24 -0
  252. package/dist-lib/numbl-core/jit/codegen/runtime.d.ts +150 -0
  253. package/dist-lib/numbl-core/jit/compileSpec.d.ts +84 -0
  254. package/dist-lib/numbl-core/jit/compileSpecC.d.ts +93 -0
  255. package/dist-lib/numbl-core/jit/index.d.ts +15 -0
  256. package/dist-lib/numbl-core/jit/lowering/classDefs.d.ts +109 -0
  257. package/dist-lib/numbl-core/jit/lowering/errors.d.ts +35 -0
  258. package/dist-lib/numbl-core/jit/lowering/indexFold.d.ts +31 -0
  259. package/dist-lib/numbl-core/jit/lowering/indexResolve.d.ts +100 -0
  260. package/dist-lib/numbl-core/jit/lowering/ir.d.ts +584 -0
  261. package/dist-lib/numbl-core/jit/lowering/lower.d.ts +271 -0
  262. package/dist-lib/numbl-core/jit/lowering/lowerCellIndex.d.ts +41 -0
  263. package/dist-lib/numbl-core/jit/lowering/lowerCellLit.d.ts +19 -0
  264. package/dist-lib/numbl-core/jit/lowering/lowerClassConstructor.d.ts +55 -0
  265. package/dist-lib/numbl-core/jit/lowering/lowerFuncCall.d.ts +34 -0
  266. package/dist-lib/numbl-core/jit/lowering/lowerHandle.d.ts +57 -0
  267. package/dist-lib/numbl-core/jit/lowering/lowerIndexLoad.d.ts +16 -0
  268. package/dist-lib/numbl-core/jit/lowering/lowerIndexSlice.d.ts +29 -0
  269. package/dist-lib/numbl-core/jit/lowering/lowerIndexSliceStore.d.ts +19 -0
  270. package/dist-lib/numbl-core/jit/lowering/lowerIndexStore.d.ts +14 -0
  271. package/dist-lib/numbl-core/jit/lowering/lowerMethodCall.d.ts +45 -0
  272. package/dist-lib/numbl-core/jit/lowering/lowerMultiAssign.d.ts +36 -0
  273. package/dist-lib/numbl-core/jit/lowering/lowerTensorLit.d.ts +25 -0
  274. package/dist-lib/numbl-core/jit/lowering/rangeCount.d.ts +19 -0
  275. package/dist-lib/numbl-core/jit/lowering/specialize.d.ts +93 -0
  276. package/dist-lib/numbl-core/jit/lowering/types.d.ts +503 -0
  277. package/dist-lib/numbl-core/jit/lowering/walk.d.ts +17 -0
  278. package/dist-lib/numbl-core/jit/numbl/index.d.ts +30 -0
  279. package/dist-lib/numbl-core/jit/parser/astUtils.d.ts +43 -0
  280. package/dist-lib/numbl-core/jit/parser/index.d.ts +12 -0
  281. package/dist-lib/numbl-core/jit/parser/sourceLoc.d.ts +12 -0
  282. package/dist-lib/numbl-core/jit/runtime/context.d.ts +23 -0
  283. package/dist-lib/numbl-core/jit/runtime/inferType.d.ts +10 -0
  284. package/dist-lib/numbl-core/jit/runtime/value.d.ts +101 -0
  285. package/dist-lib/numbl-core/jit/workspace/driverPrologue.d.ts +59 -0
  286. package/dist-lib/numbl-core/jit/workspace/mtoc2UserFunctionLoader.d.ts +62 -0
  287. package/dist-lib/numbl-core/jit/workspace/workspace.d.ts +243 -0
  288. package/dist-lib/numbl-core/jitTypes.d.ts +7 -321
  289. package/dist-lib/numbl-core/jsUserFunctions.d.ts +2 -2
  290. package/dist-lib/numbl-core/parser/ClassParser.d.ts +3 -0
  291. package/dist-lib/numbl-core/runtime/index.d.ts +1 -1
  292. package/dist-lib/numbl-core/runtime/indexing.d.ts +11 -1
  293. package/dist-lib/numbl-core/runtime/plotUtils.d.ts +28 -2
  294. package/dist-lib/numbl-core/runtime/runtime.d.ts +16 -1
  295. package/dist-lib/numbl-core/runtime/runtimePlot.d.ts +5 -0
  296. package/dist-lib/numbl-core/runtime/types.d.ts +19 -3
  297. package/dist-lib/numbl-core/version.d.ts +1 -1
  298. package/dist-lib/numbl-core/workspace/types.d.ts +8 -0
  299. package/dist-plot-viewer/assets/index-DfxsWeyf.js +4426 -0
  300. package/dist-plot-viewer/index.html +1 -1
  301. package/dist-site-viewer/404.html +33 -0
  302. package/dist-site-viewer/assets/index-C5c2lKAx.js +4748 -0
  303. package/dist-site-viewer/assets/index-D5YY8PKx.css +1 -0
  304. package/dist-site-viewer/assets/numbl-worker-CkoM4MUa.js +11836 -0
  305. package/dist-site-viewer/coi-serviceworker.js +70 -0
  306. package/dist-site-viewer/favicon.svg +23 -0
  307. package/dist-site-viewer/index.html +16 -0
  308. package/dist-site-viewer/logo.svg +26 -0
  309. package/dist-site-viewer/numbl-embed.js +111 -0
  310. package/dist-site-viewer/vite.svg +1 -0
  311. package/native/ops/real_unary_elemwise.c +3 -1
  312. package/package.json +15 -9
  313. package/dist-lib/numbl-core/executors/cJit/builtins.d.ts +0 -30
  314. package/dist-lib/numbl-core/executors/cJit/chainCodegen.d.ts +0 -59
  315. package/dist-lib/numbl-core/executors/cJit/chainExecutor.d.ts +0 -27
  316. package/dist-lib/numbl-core/executors/cJit/chainPass.d.ts +0 -42
  317. package/dist-lib/numbl-core/executors/cJit/codegen.d.ts +0 -44
  318. package/dist-lib/numbl-core/executors/cJit/compile.d.ts +0 -45
  319. package/dist-lib/numbl-core/executors/cJit/elemwiseCodegen.d.ts +0 -23
  320. package/dist-lib/numbl-core/executors/cJit/elemwiseStructural.d.ts +0 -33
  321. package/dist-lib/numbl-core/executors/cJit/fuseAnalyze.d.ts +0 -39
  322. package/dist-lib/numbl-core/executors/cJit/fuseCodegen.d.ts +0 -16
  323. package/dist-lib/numbl-core/executors/cJit/fuseExecutor.d.ts +0 -28
  324. package/dist-lib/numbl-core/executors/cJit/loopExecutor.d.ts +0 -32
  325. package/dist-lib/numbl-core/executors/cJit/register.d.ts +0 -10
  326. package/dist-lib/numbl-core/executors/cJit/whitelist.d.ts +0 -15
  327. package/dist-lib/numbl-core/executors/jsJit/callExecutor.d.ts +0 -25
  328. package/dist-lib/numbl-core/executors/jsJit/codegen/jitCodegen.d.ts +0 -7
  329. package/dist-lib/numbl-core/executors/jsJit/codegen/jitCodegenHoist.d.ts +0 -70
  330. package/dist-lib/numbl-core/executors/jsJit/codegen/jsMultiReduction.d.ts +0 -67
  331. package/dist-lib/numbl-core/executors/jsJit/helpers/jitHelpers.d.ts +0 -34
  332. package/dist-lib/numbl-core/executors/jsJit/helpers/jitHelpersComplex.d.ts +0 -21
  333. package/dist-lib/numbl-core/executors/jsJit/helpers/jitHelpersIndex.d.ts +0 -33
  334. package/dist-lib/numbl-core/executors/jsJit/helpers/jitHelpersTensor.d.ts +0 -34
  335. package/dist-lib/numbl-core/executors/jsJit/jitCall.d.ts +0 -59
  336. package/dist-lib/numbl-core/executors/jsJit/jitLoop.d.ts +0 -53
  337. package/dist-lib/numbl-core/executors/jsJit/jitTopLevel.d.ts +0 -44
  338. package/dist-lib/numbl-core/executors/jsJit/loopExecutor.d.ts +0 -15
  339. package/dist-lib/numbl-core/executors/jsJit/lower/blockAnalysis.d.ts +0 -37
  340. package/dist-lib/numbl-core/executors/jsJit/lower/jitBailSafety.d.ts +0 -41
  341. package/dist-lib/numbl-core/executors/jsJit/lower/jitLower.d.ts +0 -136
  342. package/dist-lib/numbl-core/executors/jsJit/lower/jitLowerExpr.d.ts +0 -36
  343. package/dist-lib/numbl-core/executors/jsJit/lower/jitLowerStmt.d.ts +0 -9
  344. package/dist-lib/numbl-core/executors/jsJit/lower/jitLowerTypes.d.ts +0 -29
  345. package/dist-lib/numbl-core/executors/jsJit/lower/scalarEmit.d.ts +0 -58
  346. package/dist-lib/numbl-core/executors/jsJit/shared.d.ts +0 -120
  347. package/dist-lib/numbl-core/executors/jsJit/topLevelExecutor.d.ts +0 -17
  348. package/dist-plot-viewer/assets/index-COAM8o1E.js +0 -4426
  349. /package/dist-lib/numbl-core/{executors/jsJit/helpers → runtime}/alloc.d.ts +0 -0
@@ -0,0 +1,271 @@
1
+ /**
2
+ * mtoc2 lowerer. Walks the numbl AST, threads a type env (with exact-
3
+ * value tracking), and produces typed IR. The same pass:
4
+ * - resolves every function-call site through the shared
5
+ * `Workspace` (which delegates to numbl's `resolveFunction`),
6
+ * so MATLAB precedence rules (local > workspace > builtin, plus
7
+ * class-method dispatch on `obj.method(args)` and
8
+ * `ClassName.method(args)`) are inherited from numbl wholesale;
9
+ * - allocates per-call function specializations (mangled by the
10
+ * FNV-1a hash of the canonicalized arg-type tuple, salted by
11
+ * the defining file so two files defining a subfunction with
12
+ * the same name get distinct C names);
13
+ * - merges types across control-flow joins;
14
+ * - widens variables assigned inside loop bodies (strips exact)
15
+ * before lowering the body, so the one-pass lowering doesn't
16
+ * bake the entry-state value into the emitted code.
17
+ *
18
+ * Exact-value tracking threads through the type system (builtin
19
+ * transfer fns still compute exact results), but the only place the
20
+ * lowerer substitutes a literal for a computation is the `if` /
21
+ * `elseif` condition — when the cond's type has a `number` exact, the
22
+ * branch is statically taken or dropped. Arithmetic, comparisons,
23
+ * builtin calls, and Ident reads all emit runtime IR even when their
24
+ * exact value is known.
25
+ *
26
+ * MVP scope: scalar real double + arithmetic + comparisons + disp +
27
+ * if/while/for + user functions (0 or 1 outputs; 0-output calls return
28
+ * `Void` and are only valid as the expression of an `ExprStmt`) +
29
+ * classes (instance methods, static methods, constructors), with
30
+ * resolution against sibling `.m` files in the workspace via numbl's
31
+ * vendored resolver. Anything outside that throws
32
+ * `UnsupportedConstruct` with a span.
33
+ */
34
+ import type { AbstractSyntaxTree, Expr, Stmt, Span } from "../parser/index.js";
35
+ import { type Type, type NumericType } from "./types.js";
36
+ import type { ClassRegistration } from "./classDefs.js";
37
+ import type { Workspace } from "../workspace/workspace.js";
38
+ import type { CallSite } from "../numbl/index.js";
39
+ /** Hook for the `%!numbl:printtype` directive's compile-time output.
40
+ * Defaults to `console.error` (so emitted lines go to stderr and
41
+ * don't mix with the cross-runner's stdout comparison). Tests
42
+ * replace this with a capturing function. */
43
+ export declare let printTypeSink: (line: string) => void;
44
+ export declare function setPrintTypeSink(sink: (line: string) => void): void;
45
+ export declare function resetPrintTypeSink(): void;
46
+ import { type Assign, type IRExpr, type IRStmt, type IRFunc, type IRProgram } from "./ir.js";
47
+ export interface EnvEntry {
48
+ cName: string;
49
+ ty: Type;
50
+ /** True when the variable is assigned on only SOME arms of an
51
+ * enclosing `if` (not all), so a read may hit a never-assigned value.
52
+ * MATLAB raises "Undefined ..." at runtime on the unassigned path; the
53
+ * JIT predeclares the local with a default and would silently read it,
54
+ * so a read of a flagged var (or returning it as an output) declines
55
+ * to the interpreter, which performs the runtime definite-assignment
56
+ * check. */
57
+ maybeUnassigned?: boolean;
58
+ }
59
+ export declare class Lowerer {
60
+ workspace: Workspace;
61
+ env: Map<string, EnvEntry>;
62
+ specializations: Map<string, IRFunc>;
63
+ /** Stack of contexts for resolving the `end` keyword inside an
64
+ * index slot. Pushed by the index-lowering helpers (lowerIndexLoad
65
+ * / lowerIndexStore / lowerIndexSlice / lowerIndexSliceStore)
66
+ * around each slot they lower; consumed by the `EndKeyword` arm of
67
+ * `lowerExpr`. `axis === "linear"` flags the single-slot form
68
+ * whose `end` resolves to `numel(base)`. Outside an index slot the
69
+ * stack is empty and `end` raises `UnsupportedConstruct`. */
70
+ endStack: Array<{
71
+ baseCName: string;
72
+ baseTy: NumericType;
73
+ axis: number | "linear";
74
+ }>;
75
+ /** Monotonic counter for synthesizing `_mtoc2_t1`, `_mtoc2_t2`, ...
76
+ * hoist-temp names. Reset per function specialization. */
77
+ tempCounter: number;
78
+ /** Monotonic counter for the synthetic suffix used when an
79
+ * incompatible reassignment is split into a fresh binding
80
+ * (`_mtoc2_<cName>__v<N>`). See `recordAssignment`. Per-Lowerer, so
81
+ * each function specialization / script scope numbers independently. */
82
+ splitCounter: number;
83
+ /** Nesting depth inside `if` / `while` / `for` bodies. Bumped by
84
+ * `withControlDepth` around each body lowering. An incompatible
85
+ * reassignment can only be *split* at depth 0 (straight-line scope);
86
+ * inside a branch or loop the env merge can't reconcile two storage
87
+ * categories under one name, so it throws instead. */
88
+ controlDepth: number;
89
+ /** Expression-level hoist statements queued by sub-lowerings that
90
+ * can't pass a `hoists` array up the IR-expression return chain.
91
+ * Used today by member-rooted indexing (`obj.field(args)`) to push a
92
+ * fresh `Assign(temp = MemberLoad)` so the downstream `IndexLoad` /
93
+ * `IndexSlice` has a real `Var` to anchor `end`-keyword resolution
94
+ * on. `lowerStmt` drains this list around every statement boundary
95
+ * and prepends the hoists to whatever the inner lowering emitted. */
96
+ pendingExprHoists: IRStmt[];
97
+ /** Monotonic counter for synthesizing anonymous-function names
98
+ * (`anon_0`, `anon_1`, ...). Shared across the whole program so two
99
+ * textually distinct `@(...)` expressions get distinct identities. */
100
+ anonCounter: number;
101
+ /** Source file the lowerer is currently inside. Defaults to the
102
+ * workspace's main file at construction; pushed/popped by
103
+ * `specializeUserFunction` so a call from inside `helper.m`'s
104
+ * subfunction reports the right file in its `CallSite`. */
105
+ currentFile: string;
106
+ /** Per-specialization `nargin` / `nargout` values. Pushed by
107
+ * `specializeUserFunction` before lowering a function body; popped
108
+ * after. Read by the matching identifier arms of `lowerIdent`. Empty
109
+ * at top level — MATLAB rejects `nargin` / `nargout` outside a
110
+ * function body, which we mirror by leaving the reference
111
+ * unresolved (which falls through to the "undefined" error). */
112
+ callFrameStack: {
113
+ nargin: number;
114
+ nargout: number;
115
+ }[];
116
+ /** Spec keys whose still-empty placeholder was consumed via a cache
117
+ * hit while lowering some other (or the same) spec. Tracked so
118
+ * `specializeUserFunction` knows when a recursive self-call used a
119
+ * stale `outputTypes` seed and a second pass is needed to refine
120
+ * the recursive-call IR's `ty`. The set is populated by
121
+ * `specializeUserFunction`'s cache-hit branch and consumed by the
122
+ * same function after body lowering. */
123
+ recursiveSpecsConsumed: Set<string>;
124
+ /** Number of distinct specializations created so far per
125
+ * `<sourceName>|<definingFile>`. Read by
126
+ * `specializeUserFunction`'s cache-miss branch; when the count for
127
+ * any one source-level function crosses `MAX_SPECS_PER_FUNCTION`,
128
+ * translation aborts with a clear error rather than letting the
129
+ * spec map (and the emitted C / JS) grow without bound. Exact-
130
+ * value tracking shards the cache by arg value, so a tight call
131
+ * with hundreds of distinct literal args (or value-keyed loop
132
+ * bodies) is the typical trigger. */
133
+ specCountPerSource: Map<string, number>;
134
+ constructor(workspace: Workspace);
135
+ /** Built `CallSite` for the vendored numbl resolver. New
136
+ * resolver-relevant fields added later (`className`, `methodName`,
137
+ * ...) only need to be threaded here. */
138
+ callSite(): CallSite;
139
+ /** Public env lookup used by the index-lowering helpers. Returns
140
+ * the env entry (cName + ty) if a binding exists in the current
141
+ * scope, or undefined otherwise. */
142
+ envLookup(name: string): EnvEntry | undefined;
143
+ /** Run `fn` with `controlDepth` incremented; restored on exit. Used by
144
+ * `lowerIf` / `lowerWhile` / `lowerFor` to mark "we're inside a
145
+ * branch or loop body" so an incompatible reassignment throws rather
146
+ * than splitting (see `recordAssignment`). */
147
+ withControlDepth<T>(fn: () => T): T;
148
+ /** Look up a registered class (workspace or local) by name.
149
+ * Re-throws the saved `UnsupportedConstruct` if numbl knew the
150
+ * class but mtoc2's `registerClassDef` rejected it in the JIT
151
+ * bridge's `fromExistingContext` mode — surfacing the error at
152
+ * the first actual use rather than at workspace finalize. */
153
+ classReg(name: string): ClassRegistration | undefined;
154
+ lowerProgram(ast: AbstractSyntaxTree): IRProgram;
155
+ lowerStmts(stmts: Stmt[]): IRStmt[];
156
+ private lowerStmt;
157
+ private lowerStmtInner;
158
+ /** Numbl directives (`%!numbl:<name> <args>`). Numbl interprets a
159
+ * small set (e.g. `assert_jit`) and ignores the rest. Mtoc2 reuses
160
+ * the same parsed-directive AST node to host translator-side hints
161
+ * that numbl silently passes over:
162
+ *
163
+ * - `%!numbl:opaque <var> [<var>...]` — strip `exact` from each
164
+ * named variable in the current env. Used in test scripts to
165
+ * force the runtime codegen path on values mtoc2 would otherwise
166
+ * fold at compile time.
167
+ * - `%!numbl:showtype <var> [<var>...]` — snapshot each variable's
168
+ * type and emit a `/_ type ... _/` comment in the generated C
169
+ * at this position. Debug aid; no runtime effect.
170
+ * - `%!numbl:printtype <var> [<var>...]` — same snapshot, but
171
+ * written to stderr (via `printTypeSink`) at compile time. Fires
172
+ * once per function specialization. No IR node, no codegen
173
+ * interaction.
174
+ *
175
+ * Numbl ignores all three directives, so cross-runner output is
176
+ * unaffected. */
177
+ private lowerDirective;
178
+ /** Look up each name in `args` in the current env, snapshotting its
179
+ * `cName` and current `Type`. Throws `UnsupportedConstruct` with
180
+ * the directive's span on the first unknown name. Used by the
181
+ * `showtype` and `printtype` directive branches. */
182
+ private snapshotTypeEntries;
183
+ private lowerExprStmt;
184
+ /** Reject Void in a value-consuming context with a clear span. The
185
+ * Void type tags a call to a zero-output user function; it has no
186
+ * representation as a value and is only valid as the direct
187
+ * expression of an `ExprStmt`. */
188
+ requireValueType(e: IRExpr, what: string): void;
189
+ /** Recursively rewrite sub-expressions of `e`, hoisting any owned-
190
+ * producing non-Var sub-expression to a fresh temp Assign. The
191
+ * top-level `e` itself is NOT hoisted by this function — the caller
192
+ * decides what context `e` sits in (Assign RHS at an owned consume
193
+ * site can keep an owned producer; everywhere else requires
194
+ * `anfRequireScalarOrVar`). */
195
+ private anfChildren;
196
+ /** Walk `e` and ensure the returned expression is either non-owned or
197
+ * a Var. Recursively ANFs children; if `e` itself is owned-producing
198
+ * (multi-element tensor / struct / class / handle / char / string,
199
+ * in non-Var form), hoist it to a fresh temp. The ANF invariant is
200
+ * that owned-producing expressions appear only as direct Assign RHSs
201
+ * at owned consume sites; every other position holds a Var read. */
202
+ anfRequireScalarOrVar(e: IRExpr, hoists: IRStmt[]): IRExpr;
203
+ private hoistToTemp;
204
+ freshTempName(): string;
205
+ private lowerAssign;
206
+ /** `s.f = rhs` or chained `s.inner.f = rhs`. Lowers to a single
207
+ * `MemberStore` IR node with the root `Var` as `base` and the
208
+ * field chain in `fieldPath`. v1 requires the root variable to be
209
+ * already in env (no implicit struct introduction — use
210
+ * `s = struct('f', v, ...)` or a class constructor). Every step
211
+ * of the chain must already exist on the corresponding nested
212
+ * struct/class type.
213
+ *
214
+ * Type discipline: the rhs and the field must occupy the same
215
+ * C-level slot — checked by `storageEquivalent`, which calls
216
+ * `cFieldTypeStr` on both. Scalar↔tensor, different elem, or
217
+ * different struct/class typedef name → rejected. Otherwise the
218
+ * write is accepted and env is updated so subsequent reads of
219
+ * the field report the rhs's full internal type (the C typedef
220
+ * is unaffected — the typedef hash sees only the C-level type
221
+ * via `cFieldTypeStr`, not the internal lattice precision). */
222
+ lowerAssignLValue(s: Extract<Stmt, {
223
+ type: "AssignLValue";
224
+ }>): IRStmt | IRStmt[];
225
+ recordAssignment(name: string, expr: IRExpr, span: Span): Assign;
226
+ private lowerIf;
227
+ private lowerElseChain;
228
+ private lowerWhile;
229
+ private lowerFor;
230
+ lowerExpr(e: Expr): IRExpr;
231
+ /** `end` keyword inside an index slot — resolves through the top of
232
+ * `endStack`. Outside an index slot it raises with a span. When the
233
+ * axis size is statically known, emit a `NumLit`; otherwise emit
234
+ * an `EndRef` IR node and let codegen render the runtime axis-size
235
+ * read. */
236
+ private lowerEndKeyword;
237
+ /** `a : b` or `a : s : b` used as a value (outside an index slot
238
+ * and outside a for-loop iterable). Emits a `MakeRange` IR node
239
+ * whose result is a freshly-allocated row vector. */
240
+ private lowerRangeAsValue;
241
+ /** `s.f` or chained `s.inner.f`. Lowers each nesting level into a
242
+ * fresh `MemberLoad` whose `base` is the inner load. The leaf
243
+ * type is the field's static type on the immediate container.
244
+ *
245
+ * Dependent-property routing: when `base` is a class instance and
246
+ * the class declares a `get.<name>` accessor, the read is replaced
247
+ * by a single-output method call. The result is an owned `Call`
248
+ * IRExpr; ANF in the surrounding context hoists it like any other
249
+ * owned producer. */
250
+ private lowerMember;
251
+ private lowerIdent;
252
+ private lowerBinary;
253
+ private lowerUnary;
254
+ private requireScalarReal;
255
+ /** Like `requireScalarReal` but also accepts scalar complex —
256
+ * used by `if` / `while` / `elseif` conds, where MATLAB's `toBool`
257
+ * rule (`creal(z) != 0 || cimag(z) != 0`) gives the boolean. */
258
+ private requireScalarCondType;
259
+ private mergeBranchEnvs;
260
+ }
261
+ /** Map a user-source variable name to a safe C / JS identifier.
262
+ * Reserved words get a `v_` prefix; other names pass through unchanged
263
+ * so emitted code remains readable for the common case. The numbl
264
+ * parser already rejects identifiers starting with `_`, so a user
265
+ * `for` only collides with the keyword (not with `v_for` from any
266
+ * other source). */
267
+ export declare function cIdentForUserName(name: string): string;
268
+ export { tryExtractDottedName } from "../parser/astUtils.js";
269
+ /** Strip the surrounding `'` or `"` quotes the numbl parser stores as
270
+ * part of a `Char`/`String` literal's lexeme. */
271
+ export declare function stripQuotes(s: string): string;
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Brace-indexed cell read lowering: `c{i}`, `c{i, j}`.
3
+ *
4
+ * Routed from `lowerExpr` when the AST node is `IndexCell` AND the
5
+ * base resolves to an in-scope cell variable. The base must be a
6
+ * bare `Ident` for now — member-rooted `obj.field{i}` is rejected
7
+ * pending the broader member-rooted-index work.
8
+ *
9
+ * Result type depends on the cell's mode:
10
+ * - Tuple mode + every index a `NumLit` matching an in-range
11
+ * slot → the specific slot's `Type`.
12
+ * - Tuple mode + any non-exact index → the unified slot type
13
+ * (rejected with `UnsupportedConstruct` if slot types diverge).
14
+ * - Uniform mode → the cell's `elem` type.
15
+ *
16
+ * Per-axis (`c{i, j}`) reads are accepted only for tuple cells
17
+ * whose shape is exact 2-D; uniform cells route through the same
18
+ * column-major linear offset at runtime.
19
+ */
20
+ import type { Expr, LValue, Span } from "../parser/index.js";
21
+ import type { IRExpr, IRStmt } from "./ir.js";
22
+ import type { Lowerer } from "./lower.js";
23
+ export declare function lowerCellIndexLoad(this: Lowerer, e: Extract<Expr, {
24
+ type: "IndexCell";
25
+ }>): IRExpr;
26
+ /** Brace-write lowering: `c{i} = rhs`, `c{i, j} = rhs`. The base
27
+ * must be a bare cell-typed variable. After the store, the env's
28
+ * recorded type for `c` is refreshed to reflect the new slot type:
29
+ *
30
+ * - Tuple mode + static index → update the slot's `Type` to the
31
+ * rhs's type.
32
+ * - Tuple mode + non-static index → require every slot type to
33
+ * unify with the rhs type; demote the env entry to a uniform
34
+ * cell with the unified elem.
35
+ * - Uniform mode → rhs must unify with the cell's `elem`.
36
+ *
37
+ * If neither path applies, raise `UnsupportedConstruct` (no LUB /
38
+ * heterogeneous fallback per the design — see docs/cells_plan.md). */
39
+ export declare function lowerCellIndexStore(this: Lowerer, lv: Extract<LValue, {
40
+ type: "IndexCell";
41
+ }>, exprAst: Expr, span: Span): IRStmt | IRStmt[];
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Cell-literal lowering: `{a, b, c}`, `{1; 2; 3}`, `{1, 'hi'; [1 2], "x"}`.
3
+ *
4
+ * Reached from `lowerExpr` whenever the AST node is a `Cell`. The
5
+ * literal always produces a tuple-mode `CellType` with per-slot types
6
+ * (matching the lowered slot expressions). Empty `{}` produces a
7
+ * 0×0 tuple cell with `elements: []`.
8
+ *
9
+ * Slot expressions accept any value-typed expression — scalars,
10
+ * tensors, structs, classes, handles, strings, chars. The lowerer
11
+ * relies on the ANF pass to hoist owned-producing slot values to
12
+ * fresh temps before the `CellLit` becomes an Assign RHS.
13
+ */
14
+ import type { Expr } from "../parser/index.js";
15
+ import type { IRExpr } from "./ir.js";
16
+ import type { Lowerer } from "./lower.js";
17
+ export declare function lowerCellLit(this: Lowerer, e: Extract<Expr, {
18
+ type: "Cell";
19
+ }>): IRExpr;
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Class-constructor lowering.
3
+ *
4
+ * Three responsibilities:
5
+ *
6
+ * - `lowerClassConstructorCall` — produces the `Call` IR node that
7
+ * invokes the user-declared constructor, after settling the
8
+ * class's `ClassType` and synthesizing the default-valued
9
+ * receiver that the constructor body sees on entry.
10
+ *
11
+ * - `resolveClassType` — for classes whose property types weren't
12
+ * fully inferred at registration (because at least one property
13
+ * declares no default), pre-scan the constructor body for the
14
+ * first top-level `<receiver>.<prop> = <rhs>` write per pending
15
+ * property and lower its RHS in a temp env to derive the
16
+ * property's type. The first call wins; subsequent calls reuse
17
+ * `reg.ty` and validate via the normal `MemberStore` storage-
18
+ * equivalence check.
19
+ *
20
+ * - `makeInitialClassReceiver` — synthesize a `StructLit` whose
21
+ * ty is the just-resolved `ClassType` and whose field values are
22
+ * either the registered defaults or a zero/empty placeholder for
23
+ * pending properties. The constructor body's first write
24
+ * overwrites the placeholder.
25
+ */
26
+ import type { Expr, Span } from "../parser/index.js";
27
+ import type { IRExpr } from "./ir.js";
28
+ import { type ClassType, type Type } from "./types.js";
29
+ import type { ClassRegistration } from "./classDefs.js";
30
+ import type { Lowerer } from "./lower.js";
31
+ /** Lower `ClassName(args)` to the `Call` IR node that invokes the
32
+ * user-declared constructor. The constructor's first statement gets
33
+ * a synthetic `obj = <default-receiver>` prepended (via
34
+ * `specializeUserFunction`'s `preSeedOutput`) so the body's reads
35
+ * and writes against the receiver work against an initialized
36
+ * slot. */
37
+ export declare function lowerClassConstructorCall(this: Lowerer, reg: ClassRegistration, args: Expr[], span: Span): IRExpr;
38
+ /** Settle the class's `ClassType`. For a class with every property
39
+ * declaring a default, `reg.ty` is already filled in at
40
+ * registration and we just return it. For a class with pending
41
+ * properties, we pre-scan the constructor body for direct
42
+ * `obj.<prop> = <rhs>` writes (where `obj` is the constructor's
43
+ * output receiver) and lower each first-write RHS in a temp env
44
+ * bound to the call's `argTypes`. The first call wins — subsequent
45
+ * specs validate against the cached type via the normal
46
+ * `MemberStore` storage-equivalence check. */
47
+ export declare function resolveClassType(this: Lowerer, reg: ClassRegistration, argTypes: Type[], span: Span): ClassType;
48
+ /** Synthesize a `StructLit` whose ty is `classTy` and whose field
49
+ * values are the property defaults from `reg.defaults` — for any
50
+ * property without a default, synthesize a zero-value matching the
51
+ * inferred C-level type (the constructor body's first write
52
+ * overwrites it anyway; the zero is just a typed placeholder so
53
+ * the C designated initializer is well-formed and any
54
+ * read-before-write reads as 0 / empty). */
55
+ export declare function makeInitialClassReceiver(this: Lowerer, reg: ClassRegistration, classTy: ClassType, span: Span): IRExpr;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Bare-name function-call lowering: `name(args)`.
3
+ *
4
+ * Resolution priority — checked in this order:
5
+ * 0. The literal name `struct` (no shadowing local) → `StructLit`.
6
+ * 1. The literal name `bsxfun` (no shadowing local) → rewrite to
7
+ * `fn(A, B)` when the first arg is `@<knownElementwiseBinary>`.
8
+ * 2. An in-scope `HandleType` variable → `dispatchHandleCall`.
9
+ * 3. An in-scope class name with no shadowing local → class
10
+ * constructor.
11
+ * 4. An in-scope variable: multi-element numeric routes through
12
+ * the index helpers; other types raise UnsupportedConstruct.
13
+ * 5. Zero-arity builtin paren-form (`pi()`, `Inf()`).
14
+ * 6. Numbl resolver verdict — builtin / user-function / class
15
+ * method.
16
+ * 7. Fallback to mtoc2's own builtin registry for plot-drawing
17
+ * builtins numbl wires through runtime dispatch.
18
+ */
19
+ import type { Expr } from "../parser/index.js";
20
+ import type { IRExpr } from "./ir.js";
21
+ import type { Lowerer } from "./lower.js";
22
+ export declare function lowerFuncCall(this: Lowerer, e: Extract<Expr, {
23
+ type: "FuncCall";
24
+ }>): IRExpr;
25
+ /** Shared AST rewrite used by both `lowerFevalCall` (single-output
26
+ * expression context) and the multi-assign path (`lowerMultiAssign`
27
+ * calls this to rewrite the RHS before its own dispatch). Returns a
28
+ * fresh `FuncCall` node naming the resolved target with `args[0]`
29
+ * consumed. */
30
+ export declare function rewriteFevalToDirectCall(e: Extract<Expr, {
31
+ type: "FuncCall";
32
+ }>): Extract<Expr, {
33
+ type: "FuncCall";
34
+ }>;
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Function-handle lowering:
3
+ * - `@name` → `lowerFuncHandle` (HandleLit with no captures)
4
+ * - `@(p1,...) body` → `lowerAnonFunc` (HandleLit with captures
5
+ * of the surrounding scope)
6
+ * - `h(args)` → `dispatchHandleCall` (specialize + Call IR)
7
+ *
8
+ * Captures are deep-copied into the handle struct at the `@(...)`
9
+ * site (MATLAB by-value snapshot). Owned-typed captures (tensor,
10
+ * struct, class instance, another handle) ship per-shape
11
+ * `_empty/_copy/_assign/_free` helpers so they participate in the
12
+ * standard scope-exit-free / early-free lifecycle.
13
+ */
14
+ import type { Expr, LValue, Span } from "../parser/index.js";
15
+ import type { IRExpr, IRStmt } from "./ir.js";
16
+ import type { EnvEntry, Lowerer } from "./lower.js";
17
+ /** `@name` — a named handle to a top-level user function. Builds the
18
+ * handle type, captures empty, and returns a HandleLit. Builtin
19
+ * targets (`@disp`, `@sin`) are rejected — mtoc2 v1 doesn't support
20
+ * them. Class methods (`@SomeClass.method`) aren't reachable via
21
+ * this AST (the parser emits a different shape for those). The
22
+ * workspace resolver finds local + cross-file function targets. */
23
+ export declare function lowerFuncHandle(this: Lowerer, e: Extract<Expr, {
24
+ type: "FuncHandle";
25
+ }>): IRExpr;
26
+ /** `@(p1, ..., pN) <body>` — an anonymous function. Detects every
27
+ * free Ident in the body that's bound in the enclosing scope (and
28
+ * not in the param list) as a capture, then synthesizes a top-level
29
+ * `function out = anon_<N>(p1, ..., pN, c1, ..., cM)` whose body
30
+ * assigns the source body expression to the synthesized output. The
31
+ * synthesized AST is parked on `handleTy.ast` so every call site
32
+ * routes through the same specialization cache used for
33
+ * user-declared functions.
34
+ *
35
+ * Captures may be scalar real numeric, tensor, struct, class
36
+ * instance, or another handle — the handle's C struct ships with
37
+ * per-shape `_empty/_copy/_assign/_free` helpers (just like
38
+ * structs/classes), so owned-typed fields participate in the
39
+ * standard scope-exit-free / early-free lifecycle. String / Void /
40
+ * Unknown captures are rejected with `UnsupportedConstruct`. */
41
+ export declare function lowerAnonFunc(this: Lowerer, e: Extract<Expr, {
42
+ type: "AnonFunc";
43
+ }>): IRExpr;
44
+ /** Dispatch `h(args)` where `h` is an in-scope handle variable.
45
+ * Reads the handle's `ast` off its type, lowers the user-supplied
46
+ * args, appends per-capture `HandleCaptureLoad` reads, specializes
47
+ * the underlying function on the combined arg-type tuple, and emits
48
+ * a direct call to the mangled name. */
49
+ export declare function dispatchHandleCall(this: Lowerer, handleName: string, handleEntry: EnvEntry, argExprs: Expr[], span: Span): IRExpr;
50
+ /** `[a, b, ...] = h(args)` where `h` is an in-scope handle variable.
51
+ * Mirrors `dispatchHandleCall`'s user-arg + capture-load wiring, then
52
+ * specializes the target at the caller's nargout. Emits a Call (when
53
+ * the spec truncates to 1 output) or a MultiAssignCall (N>=2 outputs);
54
+ * drop-all bare-statement use (`h(args);`) passes 0 lvalues and emits
55
+ * an ExprStmt. Returns the IR statement(s) to splice into the parent
56
+ * block. */
57
+ export declare function dispatchHandleMultiAssign(this: Lowerer, handleName: string, handleEntry: EnvEntry, argExprs: Expr[], lvalues: ReadonlyArray<LValue>, span: Span): IRStmt | IRStmt[];
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Scalar index-read lowering: `v(i)` / `M(i, j)` / `T(i, j, k)` /
3
+ * `v(end)` / `M(end, end)` / etc.
4
+ *
5
+ * Reached from `lowerFuncCall` whenever a `FuncCall` name resolves to
6
+ * an in-scope multi-element numeric variable AND none of the args are
7
+ * a range / bare colon (that case routes to `lowerIndexSlice`). Each
8
+ * index slot must lower to a scalar real expression; an `end` token
9
+ * inside a slot resolves through the Lowerer's `endStack` to the
10
+ * appropriate axis size.
11
+ */
12
+ import type { Expr, Span } from "../parser/index.js";
13
+ import type { IRExpr } from "./ir.js";
14
+ import type { Lowerer } from "./lower.js";
15
+ /** Lower an index-read of an in-scope variable. */
16
+ export declare function lowerIndexLoad(this: Lowerer, name: string, argExprs: ReadonlyArray<Expr>, span: Span): IRExpr;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Range / colon / scalar-mix indexed-read lowering: `v(:)`, `v(a:b)`,
3
+ * `M(:, j)`, `T(:, :, i)`, … .
4
+ *
5
+ * Reached from `lowerFuncCall` whenever a `FuncCall` name resolves to
6
+ * an in-scope multi-element numeric variable AND at least one arg is a
7
+ * `Range` or bare `Colon`. Two acceptable arities: 1 slot (linear) or
8
+ * `base.ty.dims.length` slots (one per axis). Result-shape rules
9
+ * mirror numbl and mtoc:
10
+ *
11
+ * single-slot Colon → column vector, length numel(base)
12
+ * single-slot Range, row-vec base → row vector, count(range)
13
+ * single-slot Range, col-vec base → col vector, count(range)
14
+ * single-slot Range, matrix / N-D base → row vector, count(range)
15
+ * multi-slot Colon at axis k → base.dims[k]
16
+ * multi-slot Range at axis k → exact count when statically
17
+ * derivable, else unknown
18
+ * multi-slot Scalar at axis k → exact 1
19
+ */
20
+ import type { Expr, Span } from "../parser/index.js";
21
+ import type { IRExpr, IndexSliceArg } from "./ir.js";
22
+ import { type NumericType } from "./types.js";
23
+ import type { Lowerer } from "./lower.js";
24
+ export declare function lowerIndexSlice(this: Lowerer, name: string, argExprs: ReadonlyArray<Expr>, span: Span): IRExpr;
25
+ /** Lower a single AST index slot into an `IndexSliceArg`. The
26
+ * `endStack` is pushed around each sub-expression so an embedded
27
+ * `end` token resolves against the right axis. Exported so the
28
+ * store-side helper reuses the same logic. */
29
+ export declare function lowerSliceArg(this: Lowerer, baseCName: string, baseTy: NumericType, axis: number | "linear", arg: Expr): IndexSliceArg;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Range / colon / scalar-mix indexed-write lowering: `v(:) = w`,
3
+ * `v(a:b) = w`, `M(:, j) = w`, `T(:, :, i) = w`, … .
4
+ *
5
+ * Companion to `lowerIndexSlice` for slice writes. RHS shape:
6
+ * - scalar real numeric → broadcast into every slot.
7
+ * - named multi-element tensor (`Var`) → per-slot copy.
8
+ *
9
+ * Other RHS forms (a fresh `TensorBuild`, an `IndexSlice`, a tensor
10
+ * Binary, etc.) are rejected with a clear message — the user must
11
+ * assign the expression to a name first so the temporary lifetime is
12
+ * explicit.
13
+ */
14
+ import type { Expr, LValue, Span } from "../parser/index.js";
15
+ import type { IRStmt } from "./ir.js";
16
+ import type { Lowerer } from "./lower.js";
17
+ export declare function lowerIndexSliceStore(this: Lowerer, lvalue: Extract<LValue, {
18
+ type: "Index";
19
+ }>, exprAst: Expr, span: Span): IRStmt | IRStmt[];
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Scalar indexed-write lowering: `v(i) = x`, `M(i, j) = x`,
3
+ * `T(i, j, k) = x`, `v(end) = x`.
4
+ *
5
+ * Reached from `lowerAssignLValue` whenever the lvalue is an `Index`
6
+ * with a simple `Ident` base AND none of the index slots are a range
7
+ * / colon (that case routes to `lowerIndexSliceStore`).
8
+ */
9
+ import type { Expr, LValue, Span } from "../parser/index.js";
10
+ import type { IRStmt } from "./ir.js";
11
+ import type { Lowerer } from "./lower.js";
12
+ export declare function lowerIndexStore(this: Lowerer, lvalue: Extract<LValue, {
13
+ type: "Index";
14
+ }>, exprAst: Expr, span: Span): IRStmt | IRStmt[];
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Method-call lowering — every `<base>.<name>(args)` AST node:
3
+ *
4
+ * - **Package call**: `pkg.foo(args)` and `pkg.sub.foo(args)` —
5
+ * leftmost segment is not an in-scope variable. Routes to the
6
+ * userFunction / classConstructor verdict from the resolver.
7
+ * - **Static method call**: `ClassName.staticMethod(args)` — base
8
+ * resolves to a class name. Receiver is not present in the arg
9
+ * tuple.
10
+ * - **Instance method call**: `obj.method(args)` — base evaluates
11
+ * to a class instance. The receiver becomes the first arg when
12
+ * numbl's resolver decides this is an instance dispatch
13
+ * (`stripInstance === false`).
14
+ * - **Member-rooted indexing**: `obj.field(args)` where `field` is
15
+ * a property (not a method). The field load lands in a fresh
16
+ * temp and the args run through the standard `lowerIndexLoad` /
17
+ * `lowerIndexSlice` path.
18
+ */
19
+ import type { Expr, Span } from "../parser/index.js";
20
+ import type { IRExpr } from "./ir.js";
21
+ import type { Lowerer } from "./lower.js";
22
+ export declare function lowerMethodCall(this: Lowerer, e: Extract<Expr, {
23
+ type: "MethodCall";
24
+ }>): IRExpr;
25
+ /** Lowers `obj.depProp(args)` where `depProp` is a `Dependent`
26
+ * property: call the getter to produce the value, hoist the result
27
+ * to a fresh temp, then run the args through the standard
28
+ * `lowerIndexLoad` / `lowerIndexSlice` path on the temp. v1
29
+ * rejects the corresponding write form (`obj.depProp(args) = rhs`)
30
+ * at `lowerAssignLValue` — splicing through the getter then setter
31
+ * is deferred. */
32
+ export declare function lowerDependentPropertyIndex(this: Lowerer, base: IRExpr, reg: import("./classDefs.js").ClassRegistration, propName: string, argExprs: ReadonlyArray<Expr>, span: Span): IRExpr;
33
+ /** Lowers `obj.field(args)` where `field` is a class property (not a
34
+ * method): load the field into a fresh temp, then run the args
35
+ * through the standard `lowerIndexLoad` / `lowerIndexSlice` path
36
+ * using the temp's name. The synthetic `Assign(temp = MemberLoad)`
37
+ * is queued on `pendingExprHoists` so `lowerStmt` prepends it to
38
+ * the emitted statement. */
39
+ export declare function lowerMemberRootedIndex(this: Lowerer, base: IRExpr, field: string, argExprs: ReadonlyArray<Expr>, span: Span): IRExpr;
40
+ /** `ClassName.staticMethod(args)` — static method called via class
41
+ * name. The receiver is not present; arg types feed the resolver
42
+ * directly. */
43
+ export declare function lowerStaticMethodCall(this: Lowerer, className: string, e: Extract<Expr, {
44
+ type: "MethodCall";
45
+ }>, span: Span): IRExpr;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Multi-assign statement lowering: `[a, b] = foo(x);` (with mix of
3
+ * named lvalues, `~` discards, and trailing-omitted slots) and the
4
+ * drop-all bare-statement variant `foo(x);` where `foo` has N≥2
5
+ * outputs. Handles both user-function and multi-output builtin (e.g.
6
+ * `[v, i] = sort(...)`) targets.
7
+ *
8
+ * 1-output declarations reached through this path (because the call
9
+ * site has lvalues.length === 1) take the classic single-output ABI
10
+ * — return-by-value via a `Call` IR node and an `Assign` / `ExprStmt`
11
+ * wrapper. Only N≥2 outputs produce a `MultiAssignCall` IR node
12
+ * (which carries the sret out-pointer ABI).
13
+ */
14
+ import type { Span, Stmt, LValue } from "../parser/index.js";
15
+ import type { IRStmt } from "./ir.js";
16
+ import { type Type } from "./types.js";
17
+ import type { Lowerer } from "./lower.js";
18
+ export declare function lowerMultiAssign(this: Lowerer, s: Extract<Stmt, {
19
+ type: "MultiAssign";
20
+ }>): IRStmt | IRStmt[];
21
+ /** Validate each multi-output slot type, register the lvalue
22
+ * bindings in env (or mark them as discarded), and return the
23
+ * `MultiAssignCall.outputs` list. Single chokepoint for the
24
+ * user-function and builtin multi-output paths.
25
+ *
26
+ * `slotLabel(i)` returns a per-slot description for the error
27
+ * message when a slot's type isn't supported — e.g. `output 'a'`
28
+ * for declared user-function outputs or `output slot 1` for builtin
29
+ * slots that have no source-level name. */
30
+ export declare function buildMultiOutputSlots(this: Lowerer, callName: string, slotTypes: ReadonlyArray<Type>, lvalues: ReadonlyArray<LValue>, slotLabel: (i: number) => string, span: Span): {
31
+ ty: Type;
32
+ binding: {
33
+ name: string;
34
+ cName: string;
35
+ } | null;
36
+ }[];