@eagleoutice/flowr 2.16.1 → 2.16.3
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/README.md +10 -10
- package/abstract-interpretation/data-frame/arguments.js +4 -3
- package/abstract-interpretation/data-frame/dataframe-semantics.js +1 -2
- package/abstract-interpretation/data-frame/semantics.d.ts +2 -2
- package/abstract-interpretation/data-frame/semantics.js +2 -6
- package/benchmark/slicer.js +1 -3
- package/benchmark/summarizer/first-phase/input.js +1 -12
- package/benchmark/summarizer/second-phase/process.d.ts +7 -0
- package/benchmark/summarizer/second-phase/process.js +15 -12
- package/cli/repl/commands/repl-cfg.js +18 -49
- package/cli/repl/commands/repl-clipboard.d.ts +2 -0
- package/cli/repl/commands/repl-clipboard.js +5 -0
- package/cli/repl/commands/repl-commands.js +2 -2
- package/cli/repl/commands/repl-dataflow.js +21 -55
- package/cli/repl/commands/repl-normalize.js +15 -28
- package/cli/repl/commands/repl-parse.js +2 -2
- package/cli/repl/commands/repl-query.js +10 -10
- package/cli/repl/commands/repl-signature.js +4 -4
- package/cli/repl/server/connection.d.ts +1 -0
- package/cli/repl/server/connection.js +8 -30
- package/cli/repl/server/messages/message-analysis.js +1 -1
- package/config.d.ts +6 -0
- package/config.js +7 -4
- package/control-flow/cfg-dead-code.js +5 -14
- package/control-flow/cfg-to-basic-blocks.js +1 -6
- package/control-flow/control-flow-graph.d.ts +2 -16
- package/control-flow/control-flow-graph.js +8 -66
- package/control-flow/diff-cfg.js +10 -23
- package/control-flow/semantic-cfg-guided-visitor.js +5 -11
- package/control-flow/simple-visitor.js +2 -2
- package/core/steps/pipeline/default-pipelines.d.ts +138 -138
- package/data/r-base-packages.generated.js +0 -1
- package/data/r-base-primitives.generated.js +0 -1
- package/data/r-s3-generics.generated.d.ts +5 -0
- package/data/r-s3-generics.generated.js +103 -0
- package/dataflow/cluster.js +2 -1
- package/dataflow/environments/append.d.ts +1 -0
- package/dataflow/environments/built-in-props.d.ts +15 -2
- package/dataflow/environments/built-in-props.js +31 -4
- package/dataflow/environments/built-in.js +15 -9
- package/dataflow/environments/clone.d.ts +1 -0
- package/dataflow/environments/clone.js +1 -0
- package/dataflow/environments/default-builtin-config.d.ts +385 -25
- package/dataflow/environments/default-builtin-config.js +186 -106
- package/dataflow/environments/define.d.ts +1 -0
- package/dataflow/environments/define.js +1 -0
- package/dataflow/environments/environment.d.ts +27 -0
- package/dataflow/environments/environment.js +37 -16
- package/dataflow/environments/frame-memory.d.ts +9 -1
- package/dataflow/environments/frame-memory.js +12 -1
- package/dataflow/environments/identifier.d.ts +1 -2
- package/dataflow/environments/identifier.js +5 -7
- package/dataflow/environments/overwrite.js +1 -0
- package/dataflow/environments/query-fn-props.d.ts +3 -0
- package/dataflow/environments/query-fn-props.js +7 -0
- package/dataflow/environments/resolve-by-name.js +11 -4
- package/dataflow/environments/scoping.d.ts +3 -0
- package/dataflow/environments/scoping.js +3 -0
- package/dataflow/eval/resolve/alias-tracking.js +3 -3
- package/dataflow/eval/resolve/resolve-argument.d.ts +7 -3
- package/dataflow/eval/resolve/resolve-argument.js +21 -12
- package/dataflow/eval/resolve/resolve-numbers.js +5 -2
- package/dataflow/eval/resolve/resolve-strings.d.ts +1 -1
- package/dataflow/eval/resolve/resolve-working-directory.js +2 -2
- package/dataflow/eval/resolve/resolve.js +1 -2
- package/dataflow/eval/values/intervals/interval-constants.js +1 -6
- package/dataflow/eval/values/r-value.js +1 -6
- package/dataflow/extractor.js +17 -17
- package/dataflow/fn/argument-roles.js +15 -15
- package/dataflow/fn/class-declaration.js +7 -7
- package/dataflow/fn/frame-reflection.d.ts +1 -23
- package/dataflow/fn/frame-reflection.js +8 -95
- package/dataflow/fn/function-props.d.ts +0 -3
- package/dataflow/fn/function-props.js +9 -11
- package/dataflow/fn/function-semantics.d.ts +1 -0
- package/dataflow/fn/strict-function.js +15 -14
- package/dataflow/graph/call-graph.d.ts +8 -0
- package/dataflow/graph/call-graph.js +40 -25
- package/dataflow/graph/dataflowgraph-builder.d.ts +0 -60
- package/dataflow/graph/dataflowgraph-builder.js +15 -135
- package/dataflow/graph/df-helper.d.ts +56 -4
- package/dataflow/graph/df-helper.js +116 -1
- package/dataflow/graph/diff-dataflow-graph.js +13 -15
- package/dataflow/graph/graph-helper.d.ts +20 -0
- package/dataflow/graph/graph-helper.js +18 -0
- package/dataflow/graph/graph.js +15 -8
- package/dataflow/graph/match-args.d.ts +1 -1
- package/dataflow/graph/match-args.js +3 -3
- package/dataflow/internal/linker.d.ts +4 -10
- package/dataflow/internal/linker.js +21 -29
- package/dataflow/internal/process/functions/call/built-in/built-in-access.js +2 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.d.ts +5 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.js +39 -22
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +19 -21
- package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +3 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-env-contents.js +6 -11
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +6 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +14 -13
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +27 -13
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +6 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +33 -35
- package/dataflow/internal/process/functions/call/built-in/built-in-get.js +3 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +6 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +12 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-list.js +3 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-load.js +7 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-local.js +5 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-new-env.js +3 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +2 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.js +14 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +6 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +1 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +5 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +4 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-s-four.js +7 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +1 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +2 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +5 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.js +4 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +8 -9
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +4 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-with.js +3 -3
- package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +36 -38
- package/dataflow/internal/process/functions/call/common.d.ts +3 -1
- package/dataflow/internal/process/functions/call/common.js +6 -7
- package/dataflow/internal/process/functions/call/deferred.js +8 -8
- package/dataflow/internal/process/functions/call/known-call-handling.d.ts +11 -4
- package/dataflow/internal/process/functions/call/known-call-handling.js +11 -7
- package/dataflow/internal/process/functions/call/named-call-handling.js +64 -11
- package/dataflow/internal/process/functions/call/nse.js +4 -4
- package/dataflow/internal/process/functions/call/quoted.js +16 -14
- package/dataflow/internal/process/functions/call/unnamed-call-handling.js +2 -2
- package/dataflow/internal/process/functions/process-parameter.js +2 -2
- package/dataflow/internal/process/process-named-call.js +1 -1
- package/dataflow/origin/dfg-get-origin.js +2 -2
- package/dataflow/origin/dfg-get-symbol-refs.d.ts +1 -0
- package/dataflow/origin/dfg-get-symbol-refs.js +3 -8
- package/documentation/data/faq/wiki-faq-store.js +2 -2
- package/documentation/doc-capabilities.js +2 -1
- package/documentation/doc-util/doc-functions.js +2 -2
- package/documentation/doc-util/doc-repl.js +4 -4
- package/documentation/doc-util/doc-types.js +2 -2
- package/documentation/wiki-absint.js +2 -1
- package/documentation/wiki-cfg.js +2 -1
- package/documentation/wiki-create-linting-rules.js +1 -1
- package/documentation/wiki-dataflow-graph.js +6 -6
- package/documentation/wiki-interface.js +3 -2
- package/documentation/wiki-linter.js +54 -4
- package/documentation/wiki-mk/doc-maker.js +1 -2
- package/documentation/wiki-query.js +25 -0
- package/documentation/wiki-search.js +2 -1
- package/documentation/wiki-signature-database.js +0 -2
- package/linter/linter-executor.js +4 -0
- package/linter/linter-rules.d.ts +526 -4
- package/linter/linter-rules.js +39 -1
- package/linter/linter-tags.d.ts +6 -0
- package/linter/linter-tags.js +6 -0
- package/linter/rules/absolute-path.js +4 -3
- package/linter/rules/cmd-check/bogus-return.d.ts +29 -0
- package/linter/rules/cmd-check/bogus-return.js +63 -0
- package/linter/rules/cmd-check/call-arguments.d.ts +63 -0
- package/linter/rules/cmd-check/call-arguments.js +211 -0
- package/linter/rules/cmd-check/class-string-comparison.d.ts +48 -0
- package/linter/rules/cmd-check/class-string-comparison.js +135 -0
- package/linter/rules/cmd-check/cmd-check-util.d.ts +67 -0
- package/linter/rules/cmd-check/cmd-check-util.js +169 -0
- package/linter/rules/cmd-check/compiled-code.d.ts +86 -0
- package/linter/rules/cmd-check/compiled-code.js +350 -0
- package/linter/rules/cmd-check/conformance.d.ts +47 -0
- package/linter/rules/cmd-check/conformance.js +166 -0
- package/linter/rules/cmd-check/dependency-declaration.d.ts +95 -0
- package/linter/rules/cmd-check/dependency-declaration.js +299 -0
- package/linter/rules/cmd-check/description-metadata.d.ts +63 -0
- package/linter/rules/cmd-check/description-metadata.js +393 -0
- package/linter/rules/cmd-check/documentation-mismatch.d.ts +54 -0
- package/linter/rules/cmd-check/documentation-mismatch.js +407 -0
- package/linter/rules/cmd-check/file-checks.d.ts +29 -0
- package/linter/rules/cmd-check/file-checks.js +34 -0
- package/linter/rules/cmd-check/foreign-function-calls.d.ts +54 -0
- package/linter/rules/cmd-check/foreign-function-calls.js +115 -0
- package/linter/rules/cmd-check/global-environment-modification.d.ts +61 -0
- package/linter/rules/cmd-check/global-environment-modification.js +237 -0
- package/linter/rules/cmd-check/namespace-tampering.d.ts +52 -0
- package/linter/rules/cmd-check/namespace-tampering.js +162 -0
- package/linter/rules/cmd-check/non-ascii-code.d.ts +51 -0
- package/linter/rules/cmd-check/non-ascii-code.js +112 -0
- package/linter/rules/cmd-check/package-code.d.ts +30 -0
- package/linter/rules/cmd-check/package-code.js +141 -0
- package/linter/rules/cmd-check/package-data.d.ts +49 -0
- package/linter/rules/cmd-check/package-data.js +181 -0
- package/linter/rules/cmd-check/package-files.d.ts +41 -0
- package/linter/rules/cmd-check/package-files.js +157 -0
- package/linter/rules/cmd-check/package-hooks.d.ts +57 -0
- package/linter/rules/cmd-check/package-hooks.js +165 -0
- package/linter/rules/cmd-check/package-metafiles.d.ts +49 -0
- package/linter/rules/cmd-check/package-metafiles.js +292 -0
- package/linter/rules/cmd-check/package-runtime.d.ts +67 -0
- package/linter/rules/cmd-check/package-runtime.js +284 -0
- package/linter/rules/cmd-check/package-structure.d.ts +85 -0
- package/linter/rules/cmd-check/package-structure.js +320 -0
- package/linter/rules/cmd-check/rd-files.d.ts +67 -0
- package/linter/rules/cmd-check/rd-files.js +621 -0
- package/linter/rules/cmd-check/s-three-method-consistency.d.ts +72 -0
- package/linter/rules/cmd-check/s-three-method-consistency.js +206 -0
- package/linter/rules/cmd-check/true-false-abbreviation.d.ts +45 -0
- package/linter/rules/cmd-check/true-false-abbreviation.js +121 -0
- package/linter/rules/deprecated-functions.js +4 -4
- package/linter/rules/function-finder-util.d.ts +1 -1
- package/linter/rules/function-finder-util.js +1 -3
- package/linter/rules/naming-convention.d.ts +1 -1
- package/linter/rules/naming-convention.js +13 -14
- package/linter/rules/network-functions.d.ts +4 -3
- package/linter/rules/network-functions.js +14 -12
- package/linter/rules/no-leaked-credentials.d.ts +8 -3
- package/linter/rules/no-leaked-credentials.js +134 -36
- package/linter/rules/problematic-inputs.d.ts +1 -1
- package/linter/rules/problematic-inputs.js +21 -14
- package/linter/rules/seeded-randomness.js +5 -5
- package/linter/rules/software-has-license.d.ts +1 -1
- package/linter/rules/software-has-license.js +1 -1
- package/linter/rules/unclosed-connection.js +3 -3
- package/linter/rules/undefined-symbol-util.js +16 -32
- package/linter/rules/undefined-symbol.d.ts +2 -0
- package/linter/rules/undefined-symbol.js +33 -3
- package/linter/rules/unescaped-arguments.d.ts +13 -2
- package/linter/rules/unescaped-arguments.js +104 -15
- package/linter/rules/unused-definition.js +13 -19
- package/package.json +1 -1
- package/project/cache/flowr-analyzer-cache.js +1 -1
- package/project/context/flowr-analyzer-context.js +1 -1
- package/project/context/flowr-analyzer-environment-context.d.ts +1 -1
- package/project/context/flowr-analyzer-files-context.d.ts +6 -0
- package/project/context/flowr-analyzer-files-context.js +3 -0
- package/project/context/flowr-analyzer-incremental-analysis-context.d.ts +0 -2
- package/project/context/flowr-analyzer-incremental-analysis-context.js +0 -4
- package/project/context/flowr-file.d.ts +4 -0
- package/project/context/flowr-file.js +4 -0
- package/project/flowr-analyzer-builder.js +1 -1
- package/project/plugins/file-plugins/files/flowr-description-file.js +2 -2
- package/project/plugins/file-plugins/files/flowr-jupyter-file.d.ts +2 -0
- package/project/plugins/file-plugins/files/flowr-jupyter-file.js +4 -0
- package/project/plugins/file-plugins/files/flowr-manifest-files.d.ts +2 -0
- package/project/plugins/file-plugins/files/flowr-manifest-files.js +11 -14
- package/project/plugins/file-plugins/files/flowr-namespace-file.d.ts +3 -0
- package/project/plugins/file-plugins/files/flowr-namespace-file.js +25 -15
- package/project/plugins/file-plugins/files/flowr-rd-file.d.ts +44 -0
- package/project/plugins/file-plugins/files/flowr-rd-file.js +130 -61
- package/project/plugins/file-plugins/files/flowr-rda-file.d.ts +0 -1
- package/project/plugins/file-plugins/files/flowr-rda-file.js +4 -16
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.d.ts +2 -0
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +4 -0
- package/project/plugins/file-plugins/files/flowr-sweave-file.d.ts +2 -0
- package/project/plugins/file-plugins/files/flowr-sweave-file.js +4 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.d.ts +0 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.js +1 -5
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.d.ts +2 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.js +2 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-session-info-plugin.js +3 -7
- package/project/sigdb/build.js +16 -30
- package/project/sigdb/dict.d.ts +4 -6
- package/project/sigdb/dict.js +125 -31
- package/project/sigdb/reader.js +2 -18
- package/project/sigdb/sigdb-download.js +14 -23
- package/queries/base-query-format.d.ts +2 -0
- package/queries/base-query-format.js +10 -2
- package/queries/catalog/absint-query/absint-query-format.d.ts +1 -1
- package/queries/catalog/absint-query/absint-query-format.js +5 -7
- package/queries/catalog/call-context-query/call-context-query-executor.js +26 -33
- package/queries/catalog/call-context-query/call-context-query-format.d.ts +1 -1
- package/queries/catalog/call-context-query/call-context-query-format.js +1 -3
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +2 -4
- package/queries/catalog/call-context-query/identify-link-to-nested-call-relation.js +1 -4
- package/queries/catalog/call-graph-query/call-graph-query-format.js +2 -3
- package/queries/catalog/config-query/config-query-format.js +3 -3
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.js +2 -3
- package/queries/catalog/dataflow-query/dataflow-query-format.js +2 -3
- package/queries/catalog/dependencies-query/data-flow.d.ts +43 -0
- package/queries/catalog/dependencies-query/data-flow.js +173 -0
- package/queries/catalog/dependencies-query/dependencies-query-executor.d.ts +18 -0
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +108 -12
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +17 -1
- package/queries/catalog/dependencies-query/dependencies-query-format.js +14 -11
- package/queries/catalog/dependencies-query/function-info/derived-functions.js +2 -1
- package/queries/catalog/dependencies-query/function-info/function-info.d.ts +2 -0
- package/queries/catalog/dependencies-query/function-info/library-functions.js +13 -13
- package/queries/catalog/dependencies-query/function-info/read-functions.js +1 -1
- package/queries/catalog/dependencies-query/function-info/remote-functions.js +3 -3
- package/queries/catalog/dependencies-query/function-info/source-functions.js +2 -2
- package/queries/catalog/dependencies-query/function-info/test-functions.js +8 -8
- package/queries/catalog/dependencies-query/function-info/transform-functions.d.ts +8 -0
- package/queries/catalog/dependencies-query/function-info/transform-functions.js +17 -0
- package/queries/catalog/dependencies-query/function-info/write-functions.js +4 -0
- package/queries/catalog/dependencies-query/implicit-echo.d.ts +5 -3
- package/queries/catalog/dependencies-query/implicit-echo.js +33 -34
- package/queries/catalog/dependencies-query/link-devices.d.ts +3 -2
- package/queries/catalog/dependencies-query/link-devices.js +9 -6
- package/queries/catalog/dependencies-query/plot-description.d.ts +10 -0
- package/queries/catalog/dependencies-query/plot-description.js +119 -0
- package/queries/catalog/dependencies-query/plot-objects.d.ts +13 -0
- package/queries/catalog/dependencies-query/plot-objects.js +61 -0
- package/queries/catalog/dice-query/dice-query-format.d.ts +2 -2
- package/queries/catalog/dice-query/dice-query-format.js +3 -40
- package/queries/catalog/does-call-query/does-call-query-format.d.ts +1 -1
- package/queries/catalog/does-call-query/does-call-query-format.js +2 -2
- package/queries/catalog/function-info-query/function-info-query-format.js +2 -2
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.js +2 -1
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +2 -2
- package/queries/catalog/happens-before-query/happens-before-query-format.js +2 -2
- package/queries/catalog/id-map-query/id-map-query-format.js +1 -3
- package/queries/catalog/input-sources-query/input-source-functions.d.ts +6 -4
- package/queries/catalog/input-sources-query/input-source-functions.js +11 -6
- package/queries/catalog/input-sources-query/input-sources-query-executor.js +3 -3
- package/queries/catalog/input-sources-query/input-sources-query-format.d.ts +1 -1
- package/queries/catalog/input-sources-query/input-sources-query-format.js +11 -5
- package/queries/catalog/input-sources-query/simple-input-classifier.d.ts +12 -4
- package/queries/catalog/input-sources-query/simple-input-classifier.js +237 -40
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.js +4 -7
- package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-executor.js +1 -1
- package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-format.js +3 -2
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-executor.js +2 -2
- package/queries/catalog/linter-query/linter-query-executor.js +10 -3
- package/queries/catalog/linter-query/linter-query-format.d.ts +4 -1
- package/queries/catalog/linter-query/linter-query-format.js +32 -21
- package/queries/catalog/location-map-query/location-map-query-format.d.ts +1 -1
- package/queries/catalog/location-map-query/location-map-query-format.js +1 -3
- package/queries/catalog/normalized-ast-query/normalized-ast-query-format.js +2 -3
- package/queries/catalog/origin-query/origin-query-executor.d.ts +1 -1
- package/queries/catalog/origin-query/origin-query-executor.js +3 -3
- package/queries/catalog/origin-query/origin-query-format.d.ts +1 -1
- package/queries/catalog/origin-query/origin-query-format.js +4 -5
- package/queries/catalog/project-query/project-query-format.js +2 -2
- package/queries/catalog/provenance-query/provenance-query-format.js +2 -3
- package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +1 -1
- package/queries/catalog/resolve-value-query/resolve-value-query-format.js +4 -4
- package/queries/catalog/search-query/search-query-format.js +1 -3
- package/queries/catalog/signature-query/signature-query-executor.js +3 -3
- package/queries/catalog/signature-query/signature-query-format.js +2 -2
- package/queries/catalog/slice-query-options.d.ts +16 -0
- package/queries/catalog/slice-query-options.js +28 -0
- package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +2 -2
- package/queries/catalog/static-slice-query/static-slice-query-format.js +3 -42
- package/queries/query-print.d.ts +4 -0
- package/queries/query-print.js +17 -1
- package/queries/query.d.ts +3 -3
- package/queries/query.js +3 -4
- package/r-bridge/lang-4.x/ast/model/model.d.ts +27 -3
- package/r-bridge/lang-4.x/ast/model/model.js +28 -1
- package/r-bridge/lang-4.x/ast/model/nodes/info/r-delimiter.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/info/r-delimiter.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +20 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.js +25 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-break.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-comment.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +18 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.js +15 -6
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-next.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +17 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.js +20 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.js +1 -0
- package/r-bridge/lang-4.x/ast/model/operators.js +0 -2
- package/r-bridge/lang-4.x/ast/model/processing/decorate.js +1 -6
- package/r-bridge/lang-4.x/ast/model/processing/fold.js +1 -6
- package/r-bridge/lang-4.x/ast/model/processing/node-id.js +4 -3
- package/r-bridge/lang-4.x/ast/parser/json/format.js +2 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/control/normalize-if-then.js +1 -5
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-argument.js +2 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-call.js +4 -20
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-definition.js +1 -5
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-next.js +1 -5
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-repeat.js +1 -5
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-while.js +2 -9
- package/r-bridge/lang-4.x/ast/parser/main/internal/normalize-access.js +1 -5
- package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-binary.js +2 -10
- package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-unary.js +2 -11
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-expressions.js +3 -11
- package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-number.js +1 -5
- package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-string.js +1 -5
- package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-symbol.js +1 -5
- package/r-bridge/lang-4.x/ast/parser/main/normalize-meta.d.ts +6 -1
- package/r-bridge/lang-4.x/ast/parser/main/normalize-meta.js +7 -0
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.d.ts +0 -10
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +30 -82
- package/r-bridge/retriever.d.ts +0 -4
- package/r-bridge/retriever.js +0 -13
- package/r-bridge/roxygen2/documentation-provider.js +3 -7
- package/r-bridge/shell.js +3 -8
- package/reconstruct/auto-select/magic-comments.js +8 -7
- package/reconstruct/inline/source-inline-map.d.ts +3 -0
- package/reconstruct/inline/source-inline-map.js +8 -7
- package/reconstruct/reconstruct.d.ts +1 -1
- package/reconstruct/reconstruct.js +33 -109
- package/search/flowr-search-printer.js +4 -15
- package/search/search-executor/search-enrichers.js +5 -3
- package/search/search-executor/search-generators.js +1 -1
- package/slicing/criterion/filters/all-variables.js +1 -2
- package/slicing/static/fingerprint.js +11 -2
- package/slicing/static/slice-call.d.ts +2 -8
- package/slicing/static/slice-call.js +8 -18
- package/slicing/static/static-slicer.js +81 -6
- package/util/collections/arrays.js +1 -1
- package/util/collections/set.js +1 -1
- package/util/diff-graph.d.ts +4 -0
- package/util/diff-graph.js +12 -0
- package/util/files.js +2 -6
- package/util/json.js +1 -15
- package/util/mermaid/cfg.js +10 -17
- package/util/mermaid/dfg.js +6 -8
- package/util/objects.d.ts +1 -1
- package/util/quads.js +4 -13
- package/util/r-author.js +5 -5
- package/util/range.d.ts +9 -0
- package/util/range.js +11 -0
- package/util/schema.js +3 -3
- package/util/simple-df/dfg-view.js +2 -1
- package/util/text/ansi.js +1 -2
- package/util/text/playground-link.js +2 -1
- package/util/text/r-highlight.js +2 -1
- package/util/text/strings.d.ts +2 -0
- package/util/text/strings.js +5 -0
- package/util/text/time.js +1 -2
- package/util/version.js +4 -3
- package/dataflow/fn/recursive-function.d.ts +0 -6
- package/dataflow/fn/recursive-function.js +0 -32
- package/dataflow/internal/process/functions/call/argument/unpack-argument.d.ts +0 -16
- package/dataflow/internal/process/functions/call/argument/unpack-argument.js +0 -27
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.FlowrAnalyzerPackageVersionsSessionInfoPlugin = exports.sessionInfoLog = void 0;
|
|
4
4
|
const flowr_analyzer_package_versions_plugin_1 = require("./flowr-analyzer-package-versions-plugin");
|
|
5
5
|
const semver_1 = require("semver");
|
|
6
|
-
const
|
|
6
|
+
const flowr_analyzer_package_versions_lockfile_plugin_1 = require("./flowr-analyzer-package-versions-lockfile-plugin");
|
|
7
7
|
const flowr_file_1 = require("../../context/flowr-file");
|
|
8
8
|
const log_1 = require("../../../util/log");
|
|
9
9
|
exports.sessionInfoLog = log_1.log.getSubLogger({ name: 'flowr-analyzer-package-versions-session-info-plugin' });
|
|
@@ -15,10 +15,6 @@ const packageHeaderRe = /\b(?:other attached packages|loaded via a namespace \(a
|
|
|
15
15
|
const packageListingLineRe = /\[\d+\]\s*(.+)$/gm;
|
|
16
16
|
/** a single `name_version` token within a listing line, e.g. `dplyr_1.1.2` or `data.table_1.14.8` */
|
|
17
17
|
const packageTokenRe = /([A-Za-z][A-Za-z0-9.]*)_(\d+(?:[.-]\d+)+)/g;
|
|
18
|
-
function pin(ctx, name, version) {
|
|
19
|
-
const range = package_1.Package.parsePkgVersionRange(undefined, version);
|
|
20
|
-
ctx.deps.addDeclaredDependency(new package_1.Package({ name, versionConstraints: range ? [range] : undefined }));
|
|
21
|
-
}
|
|
22
18
|
/**
|
|
23
19
|
* Reads package (and R) versions from a pasted `sessionInfo()` output block within a source file (typically inside
|
|
24
20
|
* a comment). This is how R users record a reproducible environment, so when present it pins exact versions, just
|
|
@@ -51,10 +47,10 @@ class FlowrAnalyzerPackageVersionsSessionInfoPlugin extends flowr_analyzer_packa
|
|
|
51
47
|
return;
|
|
52
48
|
}
|
|
53
49
|
if (rVersionMatch) {
|
|
54
|
-
pin(ctx, 'R', rVersionMatch[1]);
|
|
50
|
+
(0, flowr_analyzer_package_versions_lockfile_plugin_1.pin)(ctx, 'R', rVersionMatch[1]);
|
|
55
51
|
}
|
|
56
52
|
for (const [name, version] of packages) {
|
|
57
|
-
pin(ctx, name, version);
|
|
53
|
+
(0, flowr_analyzer_package_versions_lockfile_plugin_1.pin)(ctx, name, version);
|
|
58
54
|
}
|
|
59
55
|
}
|
|
60
56
|
}
|
package/project/sigdb/build.js
CHANGED
|
@@ -497,23 +497,14 @@ function optimizeStringOrder(strings, blobs) {
|
|
|
497
497
|
}
|
|
498
498
|
/** flush a batch line once its serialized size reaches roughly this many bytes (keeps lines under the string cap) */
|
|
499
499
|
const NdjsonBatchBytes = 8_000_000;
|
|
500
|
-
|
|
501
|
-
* Batch the string dictionary into `["d", startIdx, "s1\ns2\n…"]` lines: one newline-delimited blob per line
|
|
502
|
-
* rather than a JSON array of quoted strings, which loads as a single `split('\n')` instead of parsing ~1.4M elements.
|
|
503
|
-
*/
|
|
504
|
-
function* dictLines(strings) {
|
|
505
|
-
/* a line holding no names would read back as one empty name */
|
|
506
|
-
if (strings.length === 0) {
|
|
507
|
-
return;
|
|
508
|
-
}
|
|
500
|
+
function* batched(count, part, line) {
|
|
509
501
|
let start = 0;
|
|
510
502
|
let parts = [];
|
|
511
503
|
let bytes = 0;
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
const s = strings[i];
|
|
504
|
+
for (let i = 0; i < count; i++) {
|
|
505
|
+
const s = part(i);
|
|
515
506
|
if (parts.length > 0 && bytes + s.length + 1 > NdjsonBatchBytes) {
|
|
516
|
-
yield line(start);
|
|
507
|
+
yield line(start, parts);
|
|
517
508
|
start = i;
|
|
518
509
|
parts = [];
|
|
519
510
|
bytes = 0;
|
|
@@ -521,26 +512,21 @@ function* dictLines(strings) {
|
|
|
521
512
|
parts.push(s);
|
|
522
513
|
bytes += s.length + 1;
|
|
523
514
|
}
|
|
524
|
-
yield line(start);
|
|
515
|
+
yield line(start, parts);
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Batch the string dictionary into `["d", startIdx, "s1\ns2\n…"]` lines: one newline-delimited blob per line
|
|
519
|
+
* rather than a JSON array of quoted strings, which loads as a single `split('\n')` instead of parsing ~1.4M elements.
|
|
520
|
+
*/
|
|
521
|
+
function* dictLines(strings) {
|
|
522
|
+
/* a line holding no names would read back as one empty name */
|
|
523
|
+
if (strings.length > 0) {
|
|
524
|
+
yield* batched(strings.length, i => strings[i], (from, parts) => `["d",${from},${JSON.stringify(parts.join('\n'))}]`);
|
|
525
|
+
}
|
|
525
526
|
}
|
|
526
527
|
/** batch an array into `[tag, startIdx, [...]]` lines that never approach V8's string cap */
|
|
527
528
|
function* batchLines(tag, arr) {
|
|
528
|
-
|
|
529
|
-
let parts = [];
|
|
530
|
-
let bytes = 0;
|
|
531
|
-
const line = (from) => `["${tag}",${from},[${parts.join(',')}]]`;
|
|
532
|
-
for (let i = 0; i < arr.length; i++) {
|
|
533
|
-
const s = JSON.stringify(arr[i]);
|
|
534
|
-
if (parts.length > 0 && bytes + s.length + 1 > NdjsonBatchBytes) {
|
|
535
|
-
yield line(start);
|
|
536
|
-
start = i;
|
|
537
|
-
parts = [];
|
|
538
|
-
bytes = 0;
|
|
539
|
-
}
|
|
540
|
-
parts.push(s);
|
|
541
|
-
bytes += s.length + 1;
|
|
542
|
-
}
|
|
543
|
-
yield line(start);
|
|
529
|
+
yield* batched(arr.length, i => JSON.stringify(arr[i]), (from, parts) => `["${tag}",${from},[${parts.join(',')}]]`);
|
|
544
530
|
}
|
|
545
531
|
// large window shaves ~15% off the `.br`; every read path decodes with `BROTLI_DECODER_PARAM_LARGE_WINDOW`
|
|
546
532
|
const DefaultBrotliLgwin = 30;
|
package/project/sigdb/dict.d.ts
CHANGED
|
@@ -15,13 +15,11 @@ export declare class SigDict implements Iterable<string> {
|
|
|
15
15
|
/** The dictionary `names` spells out. */
|
|
16
16
|
static of(names: readonly string[]): SigDict;
|
|
17
17
|
/**
|
|
18
|
-
* The dictionary
|
|
19
|
-
*
|
|
18
|
+
* The dictionary a bundle's `d` lines spell out, each `["d", start, "name\nname..."]` (or the legacy `["d", start, [names]]`).
|
|
19
|
+
* The names are unescaped from the line's bytes straight into the dictionary, as parsing every line into a string only to
|
|
20
|
+
* encode it back took most of the time opening a database costs. The runs must cover the ids from `0` without a gap.
|
|
20
21
|
*/
|
|
21
|
-
static
|
|
22
|
-
start: number;
|
|
23
|
-
names: string;
|
|
24
|
-
}[]): SigDict;
|
|
22
|
+
static ofLines(lines: Buffer): SigDict;
|
|
25
23
|
/** how many names it holds */
|
|
26
24
|
get length(): number;
|
|
27
25
|
/** The name with the given id, `''` for an id the dictionary does not hold. */
|
package/project/sigdb/dict.js
CHANGED
|
@@ -8,14 +8,6 @@
|
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.SigDict = void 0;
|
|
11
|
-
/** the number of newline-separated pieces in `text`; `''` is one empty piece */
|
|
12
|
-
function pieces(text) {
|
|
13
|
-
let count = 1;
|
|
14
|
-
for (let at = text.indexOf('\n'); at >= 0; at = text.indexOf('\n', at + 1)) {
|
|
15
|
-
count++;
|
|
16
|
-
}
|
|
17
|
-
return count;
|
|
18
|
-
}
|
|
19
11
|
/** A dictionary's names by id. Ids are positions, so {@link SigDict.at} is what `strings[id]` used to be. */
|
|
20
12
|
class SigDict {
|
|
21
13
|
/** every name in utf8, separated by newlines, so a name never carries one */
|
|
@@ -28,38 +20,41 @@ class SigDict {
|
|
|
28
20
|
}
|
|
29
21
|
/** The dictionary `names` spells out. */
|
|
30
22
|
static of(names) {
|
|
31
|
-
|
|
23
|
+
if (names.length === 0) {
|
|
24
|
+
return new SigDict(Buffer.alloc(0), new Int32Array(0));
|
|
25
|
+
}
|
|
26
|
+
const bytes = Buffer.from(names.join('\n'), 'utf8');
|
|
27
|
+
const ends = new Int32Array(names.length);
|
|
28
|
+
for (let i = 0, from = 0; i < ends.length; i++) {
|
|
29
|
+
const newline = bytes.indexOf(Newline, from);
|
|
30
|
+
ends[i] = newline < 0 ? bytes.length : newline;
|
|
31
|
+
from = ends[i] + 1;
|
|
32
|
+
}
|
|
33
|
+
return new SigDict(bytes, ends);
|
|
32
34
|
}
|
|
33
35
|
/**
|
|
34
|
-
* The dictionary
|
|
35
|
-
*
|
|
36
|
+
* The dictionary a bundle's `d` lines spell out, each `["d", start, "name\nname..."]` (or the legacy `["d", start, [names]]`).
|
|
37
|
+
* The names are unescaped from the line's bytes straight into the dictionary, as parsing every line into a string only to
|
|
38
|
+
* encode it back took most of the time opening a database costs. The runs must cover the ids from `0` without a gap.
|
|
36
39
|
*/
|
|
37
|
-
static
|
|
40
|
+
static ofLines(lines) {
|
|
41
|
+
const runs = dictRuns(lines).sort((a, b) => a.start - b.start);
|
|
38
42
|
if (runs.length === 0) {
|
|
39
43
|
return new SigDict(Buffer.alloc(0), new Int32Array(0));
|
|
40
44
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
for (const run of ordered) {
|
|
45
|
-
size += Buffer.byteLength(run.names, 'utf8');
|
|
46
|
-
count += pieces(run.names);
|
|
47
|
-
}
|
|
48
|
-
const bytes = Buffer.allocUnsafe(size);
|
|
45
|
+
/* unescaping only shrinks a payload, and a newline joins two runs */
|
|
46
|
+
const out = Buffer.allocUnsafe(runs.reduce((size, run) => size + run.bytes.length, runs.length - 1));
|
|
47
|
+
const ends = new NameEnds();
|
|
49
48
|
let at = 0;
|
|
50
|
-
for (let
|
|
51
|
-
if (
|
|
52
|
-
|
|
49
|
+
for (let r = 0; r < runs.length; r++) {
|
|
50
|
+
if (r > 0) {
|
|
51
|
+
ends.push(at);
|
|
52
|
+
out[at++] = Newline;
|
|
53
53
|
}
|
|
54
|
-
at
|
|
54
|
+
at = runs[r].escaped ? unescapeInto(runs[r].bytes, out, at, ends) : copyInto(runs[r].bytes, out, at, ends);
|
|
55
55
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
const newline = bytes.indexOf(Newline, from);
|
|
59
|
-
ends[i] = newline < 0 ? bytes.length : newline;
|
|
60
|
-
from = ends[i] + 1;
|
|
61
|
-
}
|
|
62
|
-
return new SigDict(bytes, ends);
|
|
56
|
+
ends.push(at);
|
|
57
|
+
return new SigDict(Buffer.from(out.subarray(0, at)), ends.done());
|
|
63
58
|
}
|
|
64
59
|
/** how many names it holds */
|
|
65
60
|
get length() {
|
|
@@ -94,4 +89,103 @@ const Newline = 0x0a;
|
|
|
94
89
|
function group(size, first) {
|
|
95
90
|
return size === 0 ? 0 : (first << 8) | Math.min(size, 255);
|
|
96
91
|
}
|
|
92
|
+
const Quote = 0x22, Backslash = 0x5c, Comma = 0x2c, Zero = 0x30, Nine = 0x39;
|
|
93
|
+
/** what a JSON escape other than `\u` stands for, by the byte after the backslash */
|
|
94
|
+
const SimpleEscapes = new Uint8Array(128);
|
|
95
|
+
for (const [escape, plain] of [['n', Newline], ['t', 0x09], ['r', 0x0d], ['b', 0x08], ['f', 0x0c], ['"', Quote], ['\\', Backslash], ['/', 0x2f]]) {
|
|
96
|
+
SimpleEscapes[escape.charCodeAt(0)] = plain;
|
|
97
|
+
}
|
|
98
|
+
/** `["d",` */
|
|
99
|
+
const RunPrefix = new TextEncoder().encode('["d",');
|
|
100
|
+
/** The `d` lines of `lines`, the blob form read off the bytes as it is and anything else through `JSON.parse`. */
|
|
101
|
+
function dictRuns(lines) {
|
|
102
|
+
const runs = [];
|
|
103
|
+
for (let from = 0; from < lines.length;) {
|
|
104
|
+
let to = lines.indexOf(Newline, from);
|
|
105
|
+
if (to < 0) {
|
|
106
|
+
to = lines.length;
|
|
107
|
+
}
|
|
108
|
+
if (to > from) {
|
|
109
|
+
runs.push(blobRun(lines, from, to) ?? parsedRun(lines.toString('utf8', from, to)));
|
|
110
|
+
}
|
|
111
|
+
from = to + 1;
|
|
112
|
+
}
|
|
113
|
+
return runs;
|
|
114
|
+
}
|
|
115
|
+
/** `["d",<start>,"<names>"]` between `from` and `to`, `undefined` if the line has another shape */
|
|
116
|
+
function blobRun(lines, from, to) {
|
|
117
|
+
if (lines.compare(RunPrefix, 0, RunPrefix.length, from, from + RunPrefix.length) !== 0) {
|
|
118
|
+
return undefined;
|
|
119
|
+
}
|
|
120
|
+
let at = from + RunPrefix.length, start = 0;
|
|
121
|
+
for (; at < to && lines[at] >= Zero && lines[at] <= Nine; at++) {
|
|
122
|
+
start = start * 10 + lines[at] - Zero;
|
|
123
|
+
}
|
|
124
|
+
const blob = at + 1;
|
|
125
|
+
if (at === from + RunPrefix.length || lines[at] !== Comma || lines[blob] !== Quote || lines[to - 2] !== Quote || lines[to - 1] !== 0x5d) {
|
|
126
|
+
return undefined;
|
|
127
|
+
}
|
|
128
|
+
return { start, bytes: lines.subarray(blob + 1, to - 2), escaped: true };
|
|
129
|
+
}
|
|
130
|
+
function parsedRun(line) {
|
|
131
|
+
const [, start, payload] = JSON.parse(line);
|
|
132
|
+
return { start, bytes: Buffer.from(typeof payload === 'string' ? payload : payload.join('\n'), 'utf8'), escaped: false };
|
|
133
|
+
}
|
|
134
|
+
/** names already decoded, so only their ends are left to note */
|
|
135
|
+
function copyInto(bytes, out, at, ends) {
|
|
136
|
+
for (let newline = bytes.indexOf(Newline); newline >= 0; newline = bytes.indexOf(Newline, newline + 1)) {
|
|
137
|
+
ends.push(at + newline);
|
|
138
|
+
}
|
|
139
|
+
return at + bytes.copy(out, at);
|
|
140
|
+
}
|
|
141
|
+
/** Writes the JSON string body `bytes` unescaped into `out` from `at`, noting each name's end, and returns where it stopped. */
|
|
142
|
+
function unescapeInto(bytes, out, at, ends) {
|
|
143
|
+
for (let i = 0; i < bytes.length; i++) {
|
|
144
|
+
const b = bytes[i];
|
|
145
|
+
if (b !== Backslash) {
|
|
146
|
+
out[at++] = b;
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
const escape = bytes[++i];
|
|
150
|
+
if (escape !== 0x75 /* u */) {
|
|
151
|
+
const plain = SimpleEscapes[escape];
|
|
152
|
+
if (plain === Newline) {
|
|
153
|
+
ends.push(at);
|
|
154
|
+
}
|
|
155
|
+
out[at++] = plain;
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
let code = hexAt(bytes, i + 1);
|
|
159
|
+
i += 4;
|
|
160
|
+
/* a pair of surrogates is one code point, a lone one encodes as U+FFFD like any string write would */
|
|
161
|
+
if (code >= 0xd800 && code <= 0xdbff && bytes[i + 1] === Backslash && bytes[i + 2] === 0x75) {
|
|
162
|
+
const low = hexAt(bytes, i + 3);
|
|
163
|
+
if (low >= 0xdc00 && low <= 0xdfff) {
|
|
164
|
+
code = 0x10000 + ((code - 0xd800) << 10) + (low - 0xdc00);
|
|
165
|
+
i += 6;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
at += out.write(code >= 0xd800 && code <= 0xdfff ? '\ufffd' : String.fromCodePoint(code), at, 'utf8');
|
|
169
|
+
}
|
|
170
|
+
return at;
|
|
171
|
+
}
|
|
172
|
+
function hexAt(bytes, at) {
|
|
173
|
+
return Number.parseInt(bytes.toString('latin1', at, at + 4), 16);
|
|
174
|
+
}
|
|
175
|
+
/** where each name ends, grown as the names are written since a line does not say how many it holds */
|
|
176
|
+
class NameEnds {
|
|
177
|
+
ends = new Int32Array(1 << 16);
|
|
178
|
+
size = 0;
|
|
179
|
+
push(end) {
|
|
180
|
+
if (this.size === this.ends.length) {
|
|
181
|
+
const grown = new Int32Array(this.ends.length * 2);
|
|
182
|
+
grown.set(this.ends);
|
|
183
|
+
this.ends = grown;
|
|
184
|
+
}
|
|
185
|
+
this.ends[this.size++] = end;
|
|
186
|
+
}
|
|
187
|
+
done() {
|
|
188
|
+
return this.ends.slice(0, this.size);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
97
191
|
//# sourceMappingURL=dict.js.map
|
package/project/sigdb/reader.js
CHANGED
|
@@ -79,22 +79,6 @@ function dictionaryIdOf(strings, name) {
|
|
|
79
79
|
}
|
|
80
80
|
return -1;
|
|
81
81
|
}
|
|
82
|
-
/** the dictionary a bundle's `d` lines spell out */
|
|
83
|
-
function readDictSection(buf) {
|
|
84
|
-
const runs = [];
|
|
85
|
-
let off = 0;
|
|
86
|
-
while (off < buf.length) {
|
|
87
|
-
let nl = buf.indexOf(0x0a, off);
|
|
88
|
-
if (nl < 0) {
|
|
89
|
-
nl = buf.length;
|
|
90
|
-
}
|
|
91
|
-
if (nl > off) {
|
|
92
|
-
runs.push(dictLineRun(buf.toString('utf8', off, nl)));
|
|
93
|
-
}
|
|
94
|
-
off = nl + 1;
|
|
95
|
-
}
|
|
96
|
-
return dict_1.SigDict.ofRuns(runs);
|
|
97
|
-
}
|
|
98
82
|
/** stream-read a whole bundle into a {@link SigDb} (any size; never one string). Prefer {@link SigDatabase} for partial access. */
|
|
99
83
|
async function readSignatureDb(file) {
|
|
100
84
|
const rl = readline_1.default.createInterface({ input: (0, decompress_1.sigDbStream)(file), crlfDelay: Infinity });
|
|
@@ -415,7 +399,7 @@ class SigDatabase {
|
|
|
415
399
|
if (dictBytes > 0) {
|
|
416
400
|
const buf = Buffer.allocUnsafe(dictBytes);
|
|
417
401
|
fs_1.default.readSync(fd, buf, 0, dictBytes, dictStart);
|
|
418
|
-
strings =
|
|
402
|
+
strings = dict_1.SigDict.ofLines(buf);
|
|
419
403
|
}
|
|
420
404
|
else {
|
|
421
405
|
strings = dict_1.SigDict.of([]);
|
|
@@ -820,7 +804,7 @@ class SigDatabaseSet {
|
|
|
820
804
|
const [start, bytes] = ref.range;
|
|
821
805
|
const buf = Buffer.allocUnsafe(bytes);
|
|
822
806
|
fs_1.default.readSync(fd, buf, 0, bytes, start);
|
|
823
|
-
strings =
|
|
807
|
+
strings = dict_1.SigDict.ofLines(buf);
|
|
824
808
|
}
|
|
825
809
|
finally {
|
|
826
810
|
fs_1.default.closeSync(fd);
|
|
@@ -369,41 +369,32 @@ function sigDbRemoteRelease() {
|
|
|
369
369
|
return undefined;
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
|
-
|
|
373
|
-
function sigDbCacheComplete() {
|
|
372
|
+
function withSelectedShards(f) {
|
|
374
373
|
const pointerPath = findRemotePointer();
|
|
375
374
|
if (!pointerPath) {
|
|
376
375
|
return false;
|
|
377
376
|
}
|
|
378
377
|
try {
|
|
379
378
|
const remote = readPointer(pointerPath);
|
|
380
|
-
|
|
381
|
-
return selectDownloadVariants(Object.keys(remote.shards)).every(name => {
|
|
382
|
-
try {
|
|
383
|
-
return fs_1.default.statSync(path_1.default.join(dir, name)).size === remote.shards[name].bytes;
|
|
384
|
-
}
|
|
385
|
-
catch {
|
|
386
|
-
return false;
|
|
387
|
-
}
|
|
388
|
-
});
|
|
379
|
+
return f(remote, path_1.default.join((0, decompress_1.sigDbCacheDir)(undefined, false), 'bundles', remote.tag), selectDownloadVariants(Object.keys(remote.shards)));
|
|
389
380
|
}
|
|
390
381
|
catch {
|
|
391
382
|
return false;
|
|
392
383
|
}
|
|
393
384
|
}
|
|
385
|
+
/** Fast presence check (existence + byte size only, no hashing) for the shards the committed pointer selects for this runtime; `false` when no pointer is committed or any selected shard is missing/wrong-size. */
|
|
386
|
+
function sigDbCacheComplete() {
|
|
387
|
+
return withSelectedShards((remote, dir, names) => names.every(name => {
|
|
388
|
+
try {
|
|
389
|
+
return fs_1.default.statSync(path_1.default.join(dir, name)).size === remote.shards[name].bytes;
|
|
390
|
+
}
|
|
391
|
+
catch {
|
|
392
|
+
return false;
|
|
393
|
+
}
|
|
394
|
+
}));
|
|
395
|
+
}
|
|
394
396
|
/** Startup check: `true` when a committed link file lists shards whose cached copies are missing or mismatched */
|
|
395
397
|
function sigDbNeedsSync() {
|
|
396
|
-
|
|
397
|
-
if (!pointerPath) {
|
|
398
|
-
return false;
|
|
399
|
-
}
|
|
400
|
-
try {
|
|
401
|
-
const remote = readPointer(pointerPath);
|
|
402
|
-
const dir = path_1.default.join((0, decompress_1.sigDbCacheDir)(undefined, false), 'bundles', remote.tag);
|
|
403
|
-
return selectDownloadVariants(Object.keys(remote.shards)).some(name => !isCached(path_1.default.join(dir, name), { name, url: '', expected: remote.shards[name] }));
|
|
404
|
-
}
|
|
405
|
-
catch {
|
|
406
|
-
return false;
|
|
407
|
-
}
|
|
398
|
+
return withSelectedShards((remote, dir, names) => names.some(name => !isCached(path_1.default.join(dir, name), { name, url: '', expected: remote.shards[name] })));
|
|
408
399
|
}
|
|
409
400
|
//# sourceMappingURL=sigdb-download.js.map
|
|
@@ -18,5 +18,7 @@ export interface BasicQueryData {
|
|
|
18
18
|
}
|
|
19
19
|
/** {@link SupportedQuery#fromLine} for a query whose only argument is an optional multi-criterion `filter` */
|
|
20
20
|
export declare function filterLineParser<T extends string>(type: T): (_output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<T>;
|
|
21
|
+
/** Reports a malformed query line (with optional unformatted `details`), yielding no query. */
|
|
22
|
+
export declare function invalidQueryLine<T extends string>(output: ReplOutput, message: string, details?: string): ParsedQueryLine<T>;
|
|
21
23
|
/** {@link SupportedQuery#fromLine} for a query keyed by a single slicing criterion, erroring (naming the query as `label`) when it is missing */
|
|
22
24
|
export declare function singleCriterionLineParser<T extends string>(type: T, label: string, extra?: (line: readonly string[]) => Record<string, unknown>): (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<T>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.filterLineParser = filterLineParser;
|
|
4
|
+
exports.invalidQueryLine = invalidQueryLine;
|
|
4
5
|
exports.singleCriterionLineParser = singleCriterionLineParser;
|
|
5
6
|
const slice_query_parser_1 = require("../cli/repl/parser/slice-query-parser");
|
|
6
7
|
const ansi_1 = require("../util/text/ansi");
|
|
@@ -14,13 +15,20 @@ function filterLineParser(type) {
|
|
|
14
15
|
};
|
|
15
16
|
};
|
|
16
17
|
}
|
|
18
|
+
/** Reports a malformed query line (with optional unformatted `details`), yielding no query. */
|
|
19
|
+
function invalidQueryLine(output, message, details) {
|
|
20
|
+
output.stderr(output.formatter.format(message, { color: 1 /* Colors.Red */, effect: ansi_1.ColorEffect.Foreground, style: 1 /* FontStyles.Bold */ }));
|
|
21
|
+
if (details !== undefined) {
|
|
22
|
+
output.stderr(details);
|
|
23
|
+
}
|
|
24
|
+
return { query: [] };
|
|
25
|
+
}
|
|
17
26
|
/** {@link SupportedQuery#fromLine} for a query keyed by a single slicing criterion, erroring (naming the query as `label`) when it is missing */
|
|
18
27
|
function singleCriterionLineParser(type, label, extra) {
|
|
19
28
|
return function (output, line, _config) {
|
|
20
29
|
const criterion = (0, slice_query_parser_1.sliceCriteriaParser)(line[0]);
|
|
21
30
|
if (!criterion || criterion.length !== 1) {
|
|
22
|
-
|
|
23
|
-
return { query: [] };
|
|
31
|
+
return invalidQueryLine(output, `Invalid ${label} query format, a single slicing criterion must be given in the form "(criterion1)"`);
|
|
24
32
|
}
|
|
25
33
|
return {
|
|
26
34
|
query: [{ type, criterion: criterion[0], ...extra?.(line) }],
|
|
@@ -8,7 +8,7 @@ import type { CommandCompletions } from '../../../cli/repl/core';
|
|
|
8
8
|
import type { FlowrConfig } from '../../../config';
|
|
9
9
|
import type { NodeId } from '../../../r-bridge/lang-4.x/ast/model/processing/node-id';
|
|
10
10
|
import { SlicingCriterion, type SlicingCriteria } from '../../../slicing/criterion/parse';
|
|
11
|
-
import type
|
|
11
|
+
import { type BaseQueryFormat, type BaseQueryResult } from '../../base-query-format';
|
|
12
12
|
import type { ParsedQueryLine } from '../../query';
|
|
13
13
|
import { executeAbsintQuery } from './absint-query-executor';
|
|
14
14
|
export interface AbsintQuery<AbsintType extends AbsintQueryType = AbsintQueryType> extends BaseQueryFormat {
|
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.AbsintQueryDefinition = exports.AbsintQueryInferences = void 0;
|
|
7
7
|
const joi_1 = __importDefault(require("joi"));
|
|
8
|
+
const query_print_1 = require("../../query-print");
|
|
8
9
|
const shape_inference_1 = require("../../../abstract-interpretation/data-frame/shape-inference");
|
|
9
10
|
const abstract_domain_1 = require("../../../abstract-interpretation/domains/abstract-domain");
|
|
10
11
|
const lattice_1 = require("../../../abstract-interpretation/domains/lattice");
|
|
@@ -13,8 +14,7 @@ const retriever_1 = require("../../../r-bridge/retriever");
|
|
|
13
14
|
const parse_1 = require("../../../slicing/criterion/parse");
|
|
14
15
|
const assert_1 = require("../../../util/assert");
|
|
15
16
|
const record_1 = require("../../../util/record");
|
|
16
|
-
const
|
|
17
|
-
const time_1 = require("../../../util/text/time");
|
|
17
|
+
const base_query_format_1 = require("../../base-query-format");
|
|
18
18
|
const absint_query_executor_1 = require("./absint-query-executor");
|
|
19
19
|
exports.AbsintQueryInferences = {
|
|
20
20
|
'df-shape': { create: () => new shape_inference_1.DataFrameShapeAnalysis({ trackOperations: false }), domain: 'dataFrame' }
|
|
@@ -47,13 +47,11 @@ function absintQueryCompleter(line, startingNewArg, _config) {
|
|
|
47
47
|
function absintQueryLineParser(output, line, _config) {
|
|
48
48
|
const type = (line[0] ?? '').toLowerCase();
|
|
49
49
|
if (!record_1.Record.has(exports.AbsintQueryInferences, type)) {
|
|
50
|
-
|
|
51
|
-
return { query: [] };
|
|
50
|
+
return (0, base_query_format_1.invalidQueryLine)(output, `Invalid inference type "${type}", must be one of ${record_1.Record.keys(exports.AbsintQueryInferences).map(type => `"${type}"`).join(', ')}`);
|
|
52
51
|
}
|
|
53
52
|
const criteria = (0, slice_query_parser_1.sliceCriteriaParser)(line[1]);
|
|
54
53
|
if (criteria !== undefined && !criteria.every(parse_1.SlicingCriterion.isValid)) {
|
|
55
|
-
|
|
56
|
-
return { query: [] };
|
|
54
|
+
return (0, base_query_format_1.invalidQueryLine)(output, `Invalid slicing criteria "${line[1]}"`);
|
|
57
55
|
}
|
|
58
56
|
const code = (0, slice_query_parser_1.queryLineCode)(line, criteria ? 2 : 1);
|
|
59
57
|
return {
|
|
@@ -70,7 +68,7 @@ exports.AbsintQueryDefinition = {
|
|
|
70
68
|
executor: absint_query_executor_1.executeAbsintQuery,
|
|
71
69
|
asciiSummarizer: (formatter, _analyzer, queryResults, result) => {
|
|
72
70
|
const out = queryResults;
|
|
73
|
-
result.push(
|
|
71
|
+
result.push((0, query_print_1.queryHeader)('absint', formatter, out['.meta'].timing));
|
|
74
72
|
if (out.result instanceof abstract_domain_1.AbstractDomain) {
|
|
75
73
|
if (out.result.isBottom()) {
|
|
76
74
|
result.push(` ╰ state: ${lattice_1.BottomSymbol}`);
|
|
@@ -12,6 +12,7 @@ const identify_link_to_last_call_relation_1 = require("./identify-link-to-last-c
|
|
|
12
12
|
const identify_link_to_relation_1 = require("./identify-link-to-relation");
|
|
13
13
|
const identifier_1 = require("../../../dataflow/environments/identifier");
|
|
14
14
|
const df_helper_1 = require("../../../dataflow/graph/df-helper");
|
|
15
|
+
const query_fn_props_1 = require("../../../dataflow/environments/query-fn-props");
|
|
15
16
|
const queue_1 = require("../../../util/collections/queue");
|
|
16
17
|
const r_base_packages_1 = require("../../../util/r-base-packages");
|
|
17
18
|
function makeReport(collector) {
|
|
@@ -68,39 +69,31 @@ function exactNamesOf(callName, exact) {
|
|
|
68
69
|
function promoteQueryCallNames(queries) {
|
|
69
70
|
let requiresCfg = false;
|
|
70
71
|
const promotedQueries = queries.map((q, idx) => {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
...l,
|
|
84
|
-
callName: promoteCallName(l.callName)
|
|
85
|
-
})) : {
|
|
86
|
-
...q.linkTo,
|
|
87
|
-
/* we have to add another promotion layer whenever we add something without this call name */
|
|
88
|
-
callName: promoteCallName(q.linkTo.callName)
|
|
89
|
-
} : undefined
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
return {
|
|
94
|
-
...q,
|
|
95
|
-
callName: promoteCallName(q.callName, q.callNameExact),
|
|
96
|
-
exactNames: exactNamesOf(q.callName, q.callNameExact),
|
|
97
|
-
idx,
|
|
98
|
-
fileFilter: q.fileFilter && {
|
|
99
|
-
...q.fileFilter,
|
|
100
|
-
filter: promoteCallName(q.fileFilter.filter)
|
|
101
|
-
}
|
|
102
|
-
};
|
|
72
|
+
const promoted = {
|
|
73
|
+
...q,
|
|
74
|
+
callName: promoteCallName(q.callName, q.callNameExact),
|
|
75
|
+
exactNames: exactNamesOf(q.callName, q.callNameExact),
|
|
76
|
+
idx,
|
|
77
|
+
fileFilter: q.fileFilter && {
|
|
78
|
+
...q.fileFilter,
|
|
79
|
+
filter: promoteCallName(q.fileFilter.filter)
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
if (!isSubCallQuery(q)) {
|
|
83
|
+
return promoted;
|
|
103
84
|
}
|
|
85
|
+
requiresCfg = true;
|
|
86
|
+
return {
|
|
87
|
+
...promoted,
|
|
88
|
+
linkTo: q.linkTo ? (0, arrays_1.isArray)(q.linkTo) ? q.linkTo.map(l => ({
|
|
89
|
+
...l,
|
|
90
|
+
callName: promoteCallName(l.callName)
|
|
91
|
+
})) : {
|
|
92
|
+
...q.linkTo,
|
|
93
|
+
/* we have to add another promotion layer whenever we add something without this call name */
|
|
94
|
+
callName: promoteCallName(q.linkTo.callName)
|
|
95
|
+
} : undefined
|
|
96
|
+
};
|
|
104
97
|
});
|
|
105
98
|
return { promotedQueries, requiresCfg };
|
|
106
99
|
}
|
|
@@ -310,7 +303,7 @@ async function executeCallContextQueries({ analyzer }, queries) {
|
|
|
310
303
|
continue;
|
|
311
304
|
}
|
|
312
305
|
}
|
|
313
|
-
if (df_helper_1.Dataflow.isQuoted(nodeId, dataflow.graph)) {
|
|
306
|
+
if (df_helper_1.Dataflow.isQuoted(nodeId, dataflow.graph) && !(0, query_fn_props_1.quotedForWorker)(nodeId, dataflow.graph, analyzer.inspectContext().env.builtInIndex)) {
|
|
314
307
|
/* if the call is quoted, we do not want to link to it */
|
|
315
308
|
continue;
|
|
316
309
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BaseQueryFormat, BaseQueryResult } from '../../base-query-format';
|
|
2
2
|
import type { NodeId } from '../../../r-bridge/lang-4.x/ast/model/processing/node-id';
|
|
3
3
|
import { executeCallContextQueries } from './call-context-query-executor';
|
|
4
|
-
import {
|
|
4
|
+
import type { OutputFormatter } from '../../../util/text/ansi';
|
|
5
5
|
import Joi from 'joi';
|
|
6
6
|
import { CallTargets } from './identify-link-to-last-call-relation';
|
|
7
7
|
import type { DataflowGraph } from '../../../dataflow/graph/graph';
|
|
@@ -5,8 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.CallContextQueryDefinition = void 0;
|
|
7
7
|
const call_context_query_executor_1 = require("./call-context-query-executor");
|
|
8
|
-
const ansi_1 = require("../../../util/text/ansi");
|
|
9
|
-
const time_1 = require("../../../util/text/time");
|
|
10
8
|
const joi_1 = __importDefault(require("joi"));
|
|
11
9
|
const query_print_1 = require("../../query-print");
|
|
12
10
|
const identify_link_to_last_call_relation_1 = require("./identify-link-to-last-call-relation");
|
|
@@ -30,7 +28,7 @@ exports.CallContextQueryDefinition = {
|
|
|
30
28
|
executor: call_context_query_executor_1.executeCallContextQueries,
|
|
31
29
|
asciiSummarizer: async (formatter, analyzer, queryResults, result) => {
|
|
32
30
|
const out = queryResults;
|
|
33
|
-
result.push(
|
|
31
|
+
result.push((0, query_print_1.queryHeader)('call-context', formatter, out['.meta'].timing), (0, query_print_1.asciiCallContext)(formatter, out, (await analyzer.normalize()).idMap));
|
|
34
32
|
return true;
|
|
35
33
|
},
|
|
36
34
|
schema: joi_1.default.object({
|
|
@@ -17,6 +17,7 @@ const cascade_action_1 = require("./cascade-action");
|
|
|
17
17
|
const control_flow_graph_1 = require("../../../control-flow/control-flow-graph");
|
|
18
18
|
const resolve_helper_1 = require("../../../dataflow/environments/resolve-helper");
|
|
19
19
|
const r_argument_1 = require("../../../r-bridge/lang-4.x/ast/model/nodes/r-argument");
|
|
20
|
+
const df_helper_1 = require("../../../dataflow/graph/df-helper");
|
|
20
21
|
var CallTargets;
|
|
21
22
|
(function (CallTargets) {
|
|
22
23
|
/** call targets a function that is not defined locally in the script (e.g., the call targets a library function) */
|
|
@@ -38,10 +39,7 @@ function satisfiesCallTargets(info, graph, callTarget) {
|
|
|
38
39
|
if (outgoing === undefined) {
|
|
39
40
|
return 'no';
|
|
40
41
|
}
|
|
41
|
-
const callTargets =
|
|
42
|
-
.filter(([, e]) => edge_1.DfEdge.includesType(e, edge_1.EdgeType.Calls))
|
|
43
|
-
.map(([t]) => t)
|
|
44
|
-
.toArray();
|
|
42
|
+
const callTargets = df_helper_1.Dataflow.targetsOf(graph, info.id, edge_1.EdgeType.Calls);
|
|
45
43
|
let builtIn = false;
|
|
46
44
|
/*
|
|
47
45
|
* a resolved call target that is itself a built-in - a base builtin or a loaded-package export
|
|
@@ -20,10 +20,7 @@ async function identifyLinkToNestedRelation(from, analyzer, { callName, ignoreIf
|
|
|
20
20
|
const found = [];
|
|
21
21
|
const cg = await analyzer.callGraph();
|
|
22
22
|
const subCg = call_graph_1.CallGraph.computeSubCallGraph(cg, new Set([from]));
|
|
23
|
-
for (const [, t] of subCg.
|
|
24
|
-
if (!vertex_1.DfgVertex.isFunctionCall(t)) {
|
|
25
|
-
continue;
|
|
26
|
-
}
|
|
23
|
+
for (const [, t] of subCg.verticesOfType(vertex_1.VertexType.FunctionCall)) {
|
|
27
24
|
if (test(identifier_1.Identifier.toString(t.name))) {
|
|
28
25
|
found.push(t.id);
|
|
29
26
|
}
|