@eagleoutice/flowr - v2.17.4
    Preparing search index...

    This provides the full analyzer caching layer, please avoid using this directly and prefer the FlowrAnalyzer.

    Type Parameters

    Hierarchy (View Summary)

    Index
    • Get the control flow graph (CFG) for the request, computing if necessary.

      Parameters

      • force: boolean | undefined

        Do not use the cache, instead force new analyses.

      • Optionalsimplifications: readonly (
            | "unique-cf-sets"
            | "analyze-dead-code"
            | "remove-dead-code"
            | "to-basic-blocks"
        )[]

        Simplification passes to be applied to the CFG.

      Returns Promise<ControlFlowInformation<CfgVertex>>

    • A value computed from the current analysis once per key, dropped with the analysis. A failed computation is not kept, so the next caller tries again. Callers asking while it runs share the one promise, so a value of one analysis is never computed twice concurrently. See ReadonlyFlowrAnalysisProvider#derive for what to keep in mind when choosing the key.

      Type Parameters

      • T

      Parameters

      • key: object
      • compute: () => Promise<T>

      Returns Promise<T>

      const first = cache.derive(key, compute);
      const second = cache.derive(key, compute); // the same promise
    • Get the control flow graph (CFG) for the request if already available, otherwise return undefined.

      Parameters

      • simplifications:
            | readonly (
                | "unique-cf-sets"
                | "analyze-dead-code"
                | "remove-dead-code"
                | "to-basic-blocks"
            )[]
            | undefined

        Simplification passes to be applied to the CFG.

      Returns ControlFlowInformation<CfgVertex> | undefined

      FlowrAnalyzerCache#controlflow - to get the control flow graph, computing if necessary.