MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / expr

Method expr

src/compute-engine/index.ts:1571–1582  ·  view source on GitHub ↗

Return a boxed expression from a number, string or expression input. * Calls `ce.function()`, `ce.number()` or `ce.symbol()` as appropriate.

(
    expr: NumericValue | ExpressionInput,
    options?: {
      form?: FormOption;
      canonical?: CanonicalOptions;
      structural?: boolean;
      scope?: Scope | undefined;
    }
  )

Source from the content-addressed store, hash-verified

1569 /** Instrumentation counters for the auto-compilation of lazy-`Map` element
1570 * lambdas on numeric drains — compile attempts, elements served by a
1571 * compiled function, dependency re-validations, recompiles, per-element
1572 * interpreter fallbacks and NaN double-checks. This is the only surface that
1573 * says whether a given `Map` drain compiled, re-validated or fell back, and
1574 * it is exposed here because that question is asked from a consumer install,
1575 * where a module-level export of `library/map-auto-compile.ts` is not
1576 * reachable (no subpath export, and the symbol does not survive
1577 * minification).
1578 *
1579 * The counters are process-global and cumulative, not per-engine — the
1580 * compile cache they instrument is a module-level `WeakMap` shared by every
1581 * engine in the process — so every engine returns the same object, and a
1582 * caller measures a single drain by reading the counters before and after it
1583 * and taking the difference.
1584 * @internal
1585 */

Callers 8

ceBaselineFunction · 0.95
ceBaselineNFunction · 0.95
firesFunction · 0.95
boxMethod · 0.95
holdMethod · 0.95
mainFunction · 0.95
selfTestSolveTemplateFunction · 0.95
buildSolveRulesFunction · 0.95

Calls 2

optionsToInternalFunction · 0.90
boxFunction · 0.90

Tested by 3

ceBaselineFunction · 0.76
ceBaselineNFunction · 0.76
firesFunction · 0.76