basedpl 0.1.71 → 0.1.73

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/basedpl_wasm.js CHANGED
@@ -69,17 +69,20 @@ export function configure(base, panic) {
69
69
  }
70
70
 
71
71
  /**
72
- * Every case in `speed`, text in `speed.txt`'s format, with its cost, as `basedpl::timing::costs` times it and `basedpl::timing::rows` encodes it with its wasm budget in its log line: an array of `{section, code, line, copy, budgets, cost, seconds}`. With `cases`, an array of codes, only those cases run. Throws when the setup or a case fails.
72
+ * Every case in `speed`, text in `speed.txt`'s format, with its cost, as `basedpl::timing::costs` times it and `basedpl::timing::rows` encodes it with its wasm budget in its log line: an array of `{section, code, line, copy, budgets, cost, seconds}`. With `cases`, an array of codes, only those cases run. `prefs` runs before each section's header. Throws when the setup or a case fails.
73
73
  * @param {string} speed
74
74
  * @param {string[] | null} [cases]
75
+ * @param {string | null} [prefs]
75
76
  * @returns {any}
76
77
  */
77
- export function costs(speed, cases) {
78
+ export function costs(speed, cases, prefs) {
78
79
  const ptr0 = passStringToWasm0(speed, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
79
80
  const len0 = WASM_VECTOR_LEN;
80
81
  var ptr1 = isLikeNone(cases) ? 0 : passArrayJsValueToWasm0(cases, wasm.__wbindgen_malloc);
81
82
  var len1 = WASM_VECTOR_LEN;
82
- const ret = wasm.costs(ptr0, len0, ptr1, len1);
83
+ var ptr2 = isLikeNone(prefs) ? 0 : passStringToWasm0(prefs, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
84
+ var len2 = WASM_VECTOR_LEN;
85
+ const ret = wasm.costs(ptr0, len0, ptr1, len1, ptr2, len2);
83
86
  if (ret[2]) {
84
87
  throw takeFromExternrefTable0(ret[1]);
85
88
  }
@@ -241,7 +244,7 @@ function __wbg_get_imports() {
241
244
  __wbg_getRandomValues_436a51d0629d84e1: function() { return handleError(function (arg0, arg1) {
242
245
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
243
246
  }, arguments); },
244
- __wbg_getRandomValues_973dabfb0ad1769f: function() { return handleError(function (arg0, arg1) {
247
+ __wbg_getRandomValues_869eb80731672410: function() { return handleError(function (arg0, arg1) {
245
248
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
246
249
  }, arguments); },
247
250
  __wbg_getTime_f5a55efff2585d5d: function(arg0) {
@@ -561,7 +564,7 @@ function __wbg_get_imports() {
561
564
  const ret = arg0.normalize(getStringFromWasm0(arg1, arg2));
562
565
  return ret;
563
566
  },
564
- __wbg_now_e1044392fce0f3e7: function() { return handleError(function () {
567
+ __wbg_now_a699dcfc451fcecf: function() { return handleError(function () {
565
568
  const ret = Date.now();
566
569
  return ret;
567
570
  }, arguments); },
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "basedpl",
3
- "version": "0.1.71",
3
+ "version": "0.1.73",
4
4
  "description": "BasedPL, the Based-array Programming Language, is an APL-derived array language, borrowing ideas from J and BQN, with an emphasis on simple, consistent notation.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {