@eagleoutice/flowr 2.14.4 → 2.15.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.
- package/README.md +77 -64
- package/abstract-interpretation/absint-inference.d.ts +347 -0
- package/abstract-interpretation/{absint-visitor.js → absint-inference.js} +327 -97
- package/abstract-interpretation/abstract-semantics.d.ts +246 -0
- package/abstract-interpretation/abstract-semantics.js +3 -0
- package/abstract-interpretation/data-frame/{mappers/arguments.d.ts → arguments.d.ts} +18 -16
- package/abstract-interpretation/data-frame/{mappers/arguments.js → arguments.js} +20 -21
- package/abstract-interpretation/data-frame/dataframe-semantics.d.ts +52 -0
- package/abstract-interpretation/data-frame/dataframe-semantics.js +1665 -0
- package/abstract-interpretation/data-frame/resolve-args.js +4 -4
- package/abstract-interpretation/data-frame/semantics.d.ts +15 -21
- package/abstract-interpretation/data-frame/semantics.js +27 -29
- package/abstract-interpretation/data-frame/shape-inference.d.ts +28 -24
- package/abstract-interpretation/data-frame/shape-inference.js +14 -79
- package/abstract-interpretation/domains/interval-domain.d.ts +5 -1
- package/abstract-interpretation/domains/interval-domain.js +25 -33
- package/abstract-interpretation/domains/multi-value-state-domain.d.ts +6 -3
- package/abstract-interpretation/domains/multi-value-state-domain.js +24 -4
- package/abstract-interpretation/domains/partial-product-domain.d.ts +12 -6
- package/abstract-interpretation/domains/partial-product-domain.js +26 -43
- package/abstract-interpretation/domains/positive-interval-domain.d.ts +1 -6
- package/abstract-interpretation/domains/positive-interval-domain.js +3 -29
- package/abstract-interpretation/domains/product-domain.d.ts +1 -1
- package/abstract-interpretation/domains/set-range-domain.d.ts +6 -0
- package/abstract-interpretation/domains/set-range-domain.js +29 -62
- package/abstract-interpretation/domains/state-abstract-domain.d.ts +9 -2
- package/abstract-interpretation/domains/state-abstract-domain.js +26 -37
- package/abstract-interpretation/domains/{state-domain-like.d.ts → state-domain.d.ts} +10 -6
- package/abstract-interpretation/domains/{state-domain-like.js → state-domain.js} +1 -1
- package/abstract-interpretation/value-semantics.d.ts +113 -0
- package/abstract-interpretation/value-semantics.js +115 -0
- package/benchmark/slicer.js +12 -6
- package/benchmark/stats/feature-counts.d.ts +2 -1
- package/benchmark/stats/feature-counts.js +25 -1
- package/benchmark/stats/stats.d.ts +4 -0
- package/benchmark/summarizer/second-phase/graph.js +7 -0
- package/cli/repl/commands/repl-parse.js +11 -22
- package/cli/repl/parser/slice-query-parser.d.ts +2 -0
- package/cli/repl/parser/slice-query-parser.js +1 -0
- package/config.d.ts +30 -205
- package/config.js +37 -3
- package/control-flow/cfg-properties.d.ts +5 -0
- package/control-flow/cfg-properties.js +25 -7
- package/control-flow/control-flow-graph.d.ts +11 -37
- package/control-flow/control-flow-graph.js +33 -77
- package/control-flow/semantic-cfg-guided-visitor.d.ts +63 -320
- package/control-flow/semantic-cfg-guided-visitor.js +65 -320
- package/dataflow/environments/built-in-config.d.ts +2 -0
- package/dataflow/environments/built-in-proc-name.d.ts +4 -0
- package/dataflow/environments/built-in-proc-name.js +4 -0
- package/dataflow/environments/built-in-props.d.ts +192 -82
- package/dataflow/environments/built-in-props.js +336 -106
- package/dataflow/environments/built-in.d.ts +21 -9
- package/dataflow/environments/built-in.js +43 -12
- package/dataflow/environments/default-builtin-config.d.ts +3219 -313
- package/dataflow/environments/default-builtin-config.js +803 -1012
- package/dataflow/environments/environment.d.ts +26 -49
- package/dataflow/environments/environment.js +34 -47
- package/dataflow/environments/group-generics.d.ts +11 -2
- package/dataflow/environments/group-generics.js +22 -3
- package/dataflow/environments/identifier.d.ts +106 -6
- package/dataflow/environments/identifier.js +19 -1
- package/dataflow/environments/query-fn-props.d.ts +16 -8
- package/dataflow/environments/query-fn-props.js +45 -21
- package/dataflow/environments/resolve-by-name.js +9 -2
- package/dataflow/environments/scoping.d.ts +5 -0
- package/dataflow/environments/scoping.js +11 -0
- package/dataflow/eval/resolve/alias-tracking.d.ts +1 -1
- package/dataflow/eval/resolve/alias-tracking.js +24 -6
- package/dataflow/eval/resolve/resolve-numbers.d.ts +182 -7
- package/dataflow/eval/resolve/resolve-numbers.js +44 -9
- package/dataflow/eval/resolve/resolve-strings.d.ts +79 -2
- package/dataflow/eval/resolve/resolve-strings.js +16 -7
- package/dataflow/eval/resolve/resolve.d.ts +5 -22
- package/dataflow/eval/resolve/resolve.js +34 -34
- package/dataflow/eval/values/general.d.ts +9 -1
- package/dataflow/eval/values/general.js +22 -3
- package/dataflow/eval/values/sets/set-constants.d.ts +5 -0
- package/dataflow/eval/values/sets/set-constants.js +9 -1
- package/dataflow/eval/values/string/string-constants.d.ts +16 -15
- package/dataflow/eval/values/string/string-constants.js +59 -27
- package/dataflow/extractor.d.ts +2 -1
- package/dataflow/extractor.js +16 -4
- package/dataflow/fn/argument-roles.d.ts +35 -0
- package/dataflow/fn/argument-roles.js +252 -0
- package/dataflow/fn/class-declaration.d.ts +148 -0
- package/dataflow/fn/class-declaration.js +317 -0
- package/dataflow/fn/condition-handlers.d.ts +5 -0
- package/dataflow/fn/condition-handlers.js +13 -0
- package/dataflow/fn/exceptions-of-function.d.ts +21 -7
- package/dataflow/fn/exceptions-of-function.js +74 -43
- package/dataflow/fn/frame-reflection.d.ts +46 -0
- package/dataflow/fn/frame-reflection.js +169 -0
- package/dataflow/fn/function-props.d.ts +32 -0
- package/dataflow/fn/function-props.js +160 -0
- package/dataflow/fn/higher-order-function.d.ts +23 -5
- package/dataflow/fn/higher-order-function.js +64 -18
- package/dataflow/fn/strict-function.d.ts +24 -2
- package/dataflow/fn/strict-function.js +49 -19
- package/dataflow/graph/call-graph.js +10 -2
- package/dataflow/graph/df-helper.d.ts +1 -12
- package/dataflow/graph/df-helper.js +2 -19
- package/dataflow/graph/diff-dataflow-graph.d.ts +1 -1
- package/dataflow/graph/diff-dataflow-graph.js +2 -2
- package/dataflow/graph/graph.d.ts +39 -188
- package/dataflow/graph/graph.js +46 -163
- package/dataflow/graph/match-args.d.ts +34 -2
- package/dataflow/graph/match-args.js +45 -12
- package/dataflow/graph/vertex.d.ts +8 -0
- package/dataflow/info.d.ts +7 -5
- package/dataflow/info.js +1 -5
- package/dataflow/internal/control-flow.js +20 -17
- package/dataflow/internal/linker.d.ts +8 -37
- package/dataflow/internal/linker.js +22 -55
- package/dataflow/internal/process/functions/call/built-in/built-in-access.d.ts +1 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-access.js +7 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +3 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +8 -14
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +43 -50
- package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.d.ts +4 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.js +5 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-class-relation.d.ts +23 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-class-relation.js +24 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.d.ts +0 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +73 -27
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +2 -11
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +131 -92
- package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +17 -12
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +187 -99
- package/dataflow/internal/process/functions/call/built-in/built-in-load.d.ts +4 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-load.js +2 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.d.ts +2 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +4 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.d.ts +1 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +0 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-s-four.d.ts +31 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-s-four.js +101 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-dispatch.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.d.ts +7 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +23 -21
- package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.d.ts +1 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-string-template.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +22 -1
- package/dataflow/internal/process/functions/call/common.d.ts +4 -6
- package/dataflow/internal/process/functions/call/common.js +2 -2
- package/dataflow/internal/process/functions/call/deferred.d.ts +1 -1
- package/dataflow/internal/process/functions/call/deferred.js +2 -2
- package/dataflow/internal/process/functions/call/known-call-handling.d.ts +5 -3
- package/dataflow/internal/process/functions/call/known-call-handling.js +6 -4
- package/dataflow/internal/process/functions/call/named-call-handling.js +19 -13
- package/dataflow/internal/process/functions/call/quoted.d.ts +2 -2
- package/dataflow/internal/process/functions/call/quoted.js +144 -28
- package/dataflow/origin/dfg-get-origin.js +23 -10
- package/dataflow/processor.d.ts +2 -1
- package/dataflow/processor.js +6 -0
- package/documentation/data/interface/doc-writing-code.js +2 -0
- package/documentation/doc-util/doc-search.js +1 -1
- package/documentation/wiki-absint.d.ts +11 -14
- package/documentation/wiki-absint.js +73 -59
- package/documentation/wiki-core.js +64 -24
- package/documentation/wiki-linter.js +1 -0
- package/documentation/wiki-query.js +82 -264
- package/documentation/wiki-signature-database.js +17 -5
- package/gas.d.ts +91 -47
- package/gas.js +97 -13
- package/index.d.ts +31 -0
- package/index.js +52 -0
- package/linter/linter-rules.d.ts +87 -23
- package/linter/linter-rules.js +3 -1
- package/linter/rules/absolute-path.d.ts +1 -1
- package/linter/rules/dataframe-access-validation.d.ts +1 -1
- package/linter/rules/dataframe-access-validation.js +10 -8
- package/linter/rules/dead-code.d.ts +1 -1
- package/linter/rules/deprecated-functions.js +14 -5
- package/linter/rules/file-path-validity.d.ts +1 -1
- package/linter/rules/naming-convention.d.ts +1 -1
- package/linter/rules/naming-convention.js +13 -2
- package/linter/rules/network-functions.d.ts +10 -5
- package/linter/rules/network-functions.js +48 -36
- package/linter/rules/no-leaked-credentials.d.ts +1 -1
- package/linter/rules/problematic-inputs.d.ts +1 -1
- package/linter/rules/problematic-inputs.js +1 -1
- package/linter/rules/seeded-randomness.d.ts +3 -2
- package/linter/rules/seeded-randomness.js +7 -3
- package/linter/rules/software-has-license.d.ts +1 -1
- package/linter/rules/software-has-tests.d.ts +1 -1
- package/linter/rules/stop-with-call-arg.d.ts +1 -1
- package/linter/rules/syntactically-valid.d.ts +1 -1
- package/linter/rules/unclosed-connection.d.ts +3 -3
- package/linter/rules/unclosed-connection.js +3 -4
- package/linter/rules/undefined-symbol.d.ts +1 -1
- package/linter/rules/unescaped-arguments.d.ts +161 -0
- package/linter/rules/unescaped-arguments.js +293 -0
- package/linter/rules/unused-definition.d.ts +1 -1
- package/linter/rules/unused-definition.js +49 -4
- package/linter/rules/unused-import.d.ts +1 -1
- package/linter/rules/useless-loop.d.ts +1 -1
- package/package.json +3 -198
- package/project/context/flowr-analyzer-environment-context.d.ts +12 -1
- package/project/context/flowr-analyzer-environment-context.js +33 -1
- package/project/context/flowr-analyzer-files-context.d.ts +24 -1
- package/project/context/flowr-analyzer-files-context.js +42 -21
- package/project/context/flowr-analyzer-functions-context.d.ts +8 -0
- package/project/context/flowr-analyzer-functions-context.js +2 -0
- package/project/context/flowr-analyzer-gas-context.d.ts +9 -1
- package/project/context/flowr-analyzer-gas-context.js +21 -0
- package/project/context/flowr-file.d.ts +16 -1
- package/project/context/flowr-file.js +26 -2
- package/project/plugins/file-plugins/files/flowr-description-file.d.ts +19 -20
- package/project/plugins/file-plugins/files/flowr-description-file.js +55 -41
- package/project/plugins/file-plugins/files/flowr-jupyter-file.d.ts +9 -4
- package/project/plugins/file-plugins/files/flowr-jupyter-file.js +11 -3
- package/project/plugins/file-plugins/files/flowr-manifest-files.d.ts +6 -9
- package/project/plugins/file-plugins/files/flowr-manifest-files.js +5 -21
- package/project/plugins/file-plugins/files/flowr-namespace-file.d.ts +11 -12
- package/project/plugins/file-plugins/files/flowr-namespace-file.js +48 -61
- package/project/plugins/file-plugins/files/flowr-news-file.d.ts +3 -12
- package/project/plugins/file-plugins/files/flowr-news-file.js +2 -19
- package/project/plugins/file-plugins/files/flowr-rd-file.d.ts +145 -0
- package/project/plugins/file-plugins/files/flowr-rd-file.js +676 -0
- package/project/plugins/file-plugins/files/flowr-rda-file.d.ts +122 -422
- package/project/plugins/file-plugins/files/flowr-rda-file.js +517 -1005
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.d.ts +8 -2
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +10 -1
- package/project/plugins/file-plugins/files/flowr-sweave-file.d.ts +7 -2
- package/project/plugins/file-plugins/files/flowr-sweave-file.js +9 -1
- package/project/plugins/file-plugins/files/flowr-sysdata-file.d.ts +17 -0
- package/project/plugins/file-plugins/files/flowr-sysdata-file.js +40 -0
- package/project/plugins/file-plugins/flowr-analyzer-file-plugin.d.ts +2 -0
- package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +3 -1
- package/project/plugins/file-plugins/flowr-analyzer-rd-file-plugin.d.ts +58 -0
- package/project/plugins/file-plugins/flowr-analyzer-rd-file-plugin.js +95 -0
- package/project/plugins/file-plugins/flowr-analyzer-sysdata-file-plugin.d.ts +23 -0
- package/project/plugins/file-plugins/flowr-analyzer-sysdata-file-plugin.js +33 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.js +33 -72
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-namespace-file-plugin.js +17 -15
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +20 -37
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +29 -53
- package/project/plugins/package-version-plugins/package.js +2 -1
- package/project/plugins/plugin-registry.d.ts +3 -1
- package/project/plugins/plugin-registry.js +11 -0
- package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +20 -4
- package/project/sigdb/build.d.ts +9 -15
- package/project/sigdb/build.js +101 -42
- package/project/sigdb/decode.d.ts +10 -4
- package/project/sigdb/decode.js +60 -21
- package/project/sigdb/memory-source.d.ts +4 -0
- package/project/sigdb/memory-source.js +8 -0
- package/project/sigdb/reader.d.ts +57 -100
- package/project/sigdb/reader.js +157 -108
- package/project/sigdb/schema.d.ts +90 -26
- package/project/sigdb/schema.js +12 -6
- package/queries/base-query-format.d.ts +7 -0
- package/queries/base-query-format.js +29 -0
- package/queries/catalog/absint-query/absint-query-executor.js +8 -6
- package/queries/catalog/absint-query/absint-query-format.d.ts +20 -9
- package/queries/catalog/absint-query/absint-query-format.js +32 -19
- package/queries/catalog/call-context-query/call-context-query-executor.js +3 -3
- package/queries/catalog/call-graph-query/call-graph-query-format.d.ts +1 -1
- package/queries/catalog/cluster-query/cluster-query-format.d.ts +1 -1
- package/queries/catalog/control-flow-query/control-flow-query-format.d.ts +1 -1
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.js +1 -1
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +1 -1
- package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +1 -1
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +33 -7
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +1 -1
- package/queries/catalog/dependencies-query/function-info/derived-functions.d.ts +2 -2
- package/queries/catalog/dependencies-query/function-info/derived-functions.js +14 -4
- package/queries/catalog/dependencies-query/function-info/read-functions.js +7 -121
- package/queries/catalog/dependencies-query/function-info/statistics-functions.d.ts +1 -1
- package/queries/catalog/dependencies-query/function-info/statistics-functions.js +2 -2
- package/queries/catalog/dependencies-query/function-info/visualize-functions.js +4 -46
- package/queries/catalog/dependencies-query/function-info/write-functions.js +3 -76
- package/queries/catalog/dependencies-query/implicit-echo.js +2 -2
- package/queries/catalog/dependencies-query/link-devices.d.ts +2 -2
- package/queries/catalog/dependencies-query/link-devices.js +6 -7
- package/queries/catalog/dice-query/dice-query-executor.js +1 -1
- package/queries/catalog/dice-query/dice-query-format.d.ts +1 -1
- package/queries/catalog/does-call-query/does-call-query-executor.js +4 -0
- package/queries/catalog/does-call-query/does-call-query-format.d.ts +7 -1
- package/queries/catalog/files-query/files-query-format.d.ts +1 -1
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +1 -1
- package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +1 -1
- package/queries/catalog/id-map-query/id-map-query-format.d.ts +1 -1
- package/queries/catalog/input-sources-query/input-source-functions.d.ts +1 -1
- package/queries/catalog/input-sources-query/input-source-functions.js +2 -2
- package/queries/catalog/input-sources-query/input-sources-query-format.d.ts +7 -17
- package/queries/catalog/input-sources-query/input-sources-query-format.js +11 -27
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.js +1 -1
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +3 -8
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.js +2 -11
- package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-executor.d.ts +4 -0
- package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-executor.js +60 -0
- package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-format.d.ts +35 -0
- package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-format.js +63 -0
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +3 -6
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +3 -8
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.js +2 -11
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.d.ts +3 -8
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.js +2 -12
- package/queries/catalog/linter-query/linter-query-format.d.ts +1 -1
- package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +1 -1
- package/queries/catalog/origin-query/origin-query-format.d.ts +1 -1
- package/queries/catalog/project-query/project-query-format.d.ts +1 -1
- package/queries/catalog/provenance-query/provenance-query-format.d.ts +3 -8
- package/queries/catalog/provenance-query/provenance-query-format.js +2 -14
- package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +1 -1
- package/queries/catalog/search-query/search-query-format.d.ts +1 -1
- package/queries/catalog/signature-query/signature-query-executor.d.ts +5 -10
- package/queries/catalog/signature-query/signature-query-executor.js +87 -93
- package/queries/catalog/signature-query/signature-query-format.d.ts +20 -5
- package/queries/catalog/signature-query/signature-query-format.js +16 -4
- package/queries/catalog/signature-query/signature-query-render.js +18 -4
- package/queries/catalog/slice-query-options.d.ts +14 -0
- package/queries/catalog/slice-query-options.js +15 -0
- package/queries/catalog/static-slice-query/static-slice-query-executor.d.ts +2 -1
- package/queries/catalog/static-slice-query/static-slice-query-executor.js +3 -2
- package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +4 -3
- package/queries/catalog/static-slice-query/static-slice-query-format.js +7 -5
- package/queries/query-function-filter.d.ts +8 -3
- package/queries/query-function-filter.js +16 -6
- package/queries/query.d.ts +38 -38
- package/queries/query.js +30 -4
- package/r-bridge/lang-4.x/ast/model/model.d.ts +5 -0
- package/r-bridge/lang-4.x/ast/model/model.js +14 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/processing/node-id.d.ts +17 -9
- package/r-bridge/lang-4.x/ast/model/processing/node-id.js +35 -27
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +33 -22
- package/reconstruct/reconstruct.d.ts +9 -20
- package/reconstruct/reconstruct.js +66 -28
- package/search/flowr-search-filters.d.ts +7 -6
- package/search/flowr-search-filters.js +6 -4
- package/search/search-executor/search-enrichers.d.ts +10 -10
- package/search/search-executor/search-enrichers.js +32 -3
- package/search/search-executor/search-transformer.js +15 -23
- package/slicing/criterion/parse.js +2 -12
- package/slicing/static/slice-call.js +1 -8
- package/slicing/static/static-slicer.js +1 -1
- package/util/collections/bimap.js +14 -6
- package/util/objects.js +16 -17
- package/util/r-value.d.ts +5 -4
- package/util/record.d.ts +38 -3
- package/util/record.js +48 -1
- package/util/simple-df/dfg-ascii.js +1 -1
- package/util/text/strings.d.ts +5 -0
- package/util/text/strings.js +10 -0
- package/util/version.js +2 -2
- package/abstract-interpretation/absint-visitor.d.ts +0 -223
- package/abstract-interpretation/data-frame/mappers/access-mapper.d.ts +0 -19
- package/abstract-interpretation/data-frame/mappers/access-mapper.js +0 -151
- package/abstract-interpretation/data-frame/mappers/function-mapper.d.ts +0 -287
- package/abstract-interpretation/data-frame/mappers/function-mapper.js +0 -1096
- package/abstract-interpretation/data-frame/mappers/replacement-mapper.d.ts +0 -15
- package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +0 -207
- package/queries/catalog/inspect-strictness-query/inspect-strictness-query-executor.d.ts +0 -6
- package/queries/catalog/inspect-strictness-query/inspect-strictness-query-executor.js +0 -25
- package/queries/catalog/inspect-strictness-query/inspect-strictness-query-format.d.ts +0 -31
- package/queries/catalog/inspect-strictness-query/inspect-strictness-query-format.js +0 -56
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.argFor = void 0;
|
|
4
|
+
exports.s4ClassName = s4ClassName;
|
|
5
|
+
exports.linkS4Uses = linkS4Uses;
|
|
6
|
+
exports.linkS4Declaration = linkS4Declaration;
|
|
7
|
+
exports.linkS4Generic = linkS4Generic;
|
|
8
|
+
exports.processS4Use = processS4Use;
|
|
9
|
+
const r_function_call_1 = require("../../../../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
|
|
10
|
+
const r_argument_1 = require("../../../../../../r-bridge/lang-4.x/ast/model/nodes/r-argument");
|
|
11
|
+
const class_declaration_1 = require("../../../../../fn/class-declaration");
|
|
12
|
+
Object.defineProperty(exports, "argFor", { enumerable: true, get: function () { return class_declaration_1.argFor; } });
|
|
13
|
+
const identifier_1 = require("../../../../../environments/identifier");
|
|
14
|
+
const define_1 = require("../../../../../environments/define");
|
|
15
|
+
const node_value_1 = require("../../../../../eval/resolve/node-value");
|
|
16
|
+
const vertex_1 = require("../../../../../graph/vertex");
|
|
17
|
+
const built_in_proc_name_1 = require("../../../../../environments/built-in-proc-name");
|
|
18
|
+
const known_call_handling_1 = require("../known-call-handling");
|
|
19
|
+
/** marks a name in R's S4 class registry (the string-keyed table `setClass` writes and `new("P")` reads), separate from the variable scope so a class `P` stays apart from a variable `P` */
|
|
20
|
+
const S4ClassMark = '﹕s4class﹕';
|
|
21
|
+
/** The registry name of the S4 class `cls`, see {@link S4ClassMark}. */
|
|
22
|
+
function s4ClassName(cls) {
|
|
23
|
+
return S4ClassMark + cls;
|
|
24
|
+
}
|
|
25
|
+
/** The names an argument states, looking through the `c(...)`/`signature(...)` wrappers a signature may use. */
|
|
26
|
+
function namesOf(node, data) {
|
|
27
|
+
if (node === undefined) {
|
|
28
|
+
return [];
|
|
29
|
+
}
|
|
30
|
+
const known = node_value_1.NodeValue.knownStringsOf(node.info.id, data);
|
|
31
|
+
if (known.length > 0 || !r_function_call_1.RFunctionCall.isNamed(node)) {
|
|
32
|
+
return known;
|
|
33
|
+
}
|
|
34
|
+
const collected = [];
|
|
35
|
+
for (const arg of node.arguments) {
|
|
36
|
+
if (!r_argument_1.RArgument.isEmpty(arg) && arg.value !== undefined) {
|
|
37
|
+
collected.push(...namesOf(arg.value, data));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return collected;
|
|
41
|
+
}
|
|
42
|
+
/** Adds a read of every given name to the call, so the call depends on whatever registered them. */
|
|
43
|
+
function readNames(info, rootId, names, type, data) {
|
|
44
|
+
const added = [];
|
|
45
|
+
for (const name of names) {
|
|
46
|
+
added.push({ nodeId: rootId, name, type, cds: data.cds });
|
|
47
|
+
}
|
|
48
|
+
if (added.length > 0) {
|
|
49
|
+
info.in = [...info.in, ...added];
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/** Defines `name` in the environment and records it as an out-reference of the call at `rootId`. */
|
|
53
|
+
function defineOut(info, rootId, name, type, data) {
|
|
54
|
+
info.environment = (0, define_1.define)({ name, nodeId: rootId, type, definedAt: rootId, cds: data.cds }, false, info.environment);
|
|
55
|
+
info.out = [...info.out, { nodeId: rootId, name, type, cds: data.cds }];
|
|
56
|
+
}
|
|
57
|
+
/** wires the S4 registrations a call *uses* (the classes and generic its arguments name by string), read against the registry so the call depends on whatever `setClass`/`setGeneric` wrote them */
|
|
58
|
+
function linkS4Uses(info, args, rootId, data, config) {
|
|
59
|
+
for (const ref of config.classArgs ?? []) {
|
|
60
|
+
readNames(info, rootId, namesOf((0, class_declaration_1.argFor)(args, ref), data).map(s4ClassName), identifier_1.ReferenceType.Variable, data);
|
|
61
|
+
}
|
|
62
|
+
if (config.genericArg !== undefined) {
|
|
63
|
+
readNames(info, rootId, namesOf((0, class_declaration_1.argFor)(args, config.genericArg), data), identifier_1.ReferenceType.Function, data);
|
|
64
|
+
}
|
|
65
|
+
if (config.registersArg !== undefined) {
|
|
66
|
+
const registered = namesOf((0, class_declaration_1.argFor)(args, config.registersArg), data);
|
|
67
|
+
readNames(info, rootId, registered.map(s4ClassName), identifier_1.ReferenceType.Variable, data);
|
|
68
|
+
for (const cls of registered) {
|
|
69
|
+
defineOut(info, rootId, s4ClassName(cls), identifier_1.ReferenceType.Variable, data);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
/** wires what the attached {@link DataflowGraphVertexFunctionCall.classDecl|class declaration} states, S4 only: a declaration reads the classes it builds on and registers its own name; a mere relation (`setIs`, `setValidity`) reads and re-registers the class it names */
|
|
74
|
+
function linkS4Declaration(info, rootId, data) {
|
|
75
|
+
const vertex = info.graph.getVertex(rootId);
|
|
76
|
+
const decl = vertex_1.FunctionCallVertex.is(vertex) ? vertex.classDecl : undefined;
|
|
77
|
+
if (decl === undefined || decl.system !== "s4" /* ClassSystem.S4 */) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
const used = [...decl.contains, ...(decl.union ?? []), ...decl.members.map(m => m.type).filter(t => t !== undefined)];
|
|
81
|
+
if (decl.relation !== undefined && decl.name !== undefined) {
|
|
82
|
+
used.push(decl.name);
|
|
83
|
+
}
|
|
84
|
+
readNames(info, rootId, used.map(s4ClassName), identifier_1.ReferenceType.Variable, data);
|
|
85
|
+
if (decl.name !== undefined) {
|
|
86
|
+
defineOut(info, rootId, s4ClassName(decl.name), identifier_1.ReferenceType.Variable, data);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/** Records that the call registers the S4 generics it names, which `setMethod` and a call of the name depend on. */
|
|
90
|
+
function linkS4Generic(info, rootId, names, data) {
|
|
91
|
+
for (const name of names) {
|
|
92
|
+
defineOut(info, rootId, name, identifier_1.ReferenceType.Function, data);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
/** Processes a call that consumes S4 registrations without declaring any, like `new("P")` or `getMethod("f", "P")`. */
|
|
96
|
+
function processS4Use(name, args, rootId, data, config) {
|
|
97
|
+
const info = (0, known_call_handling_1.processKnownFunctionCall)({ name, args, rootId, data, origin: built_in_proc_name_1.BuiltInProcName.S4Use }).information;
|
|
98
|
+
linkS4Uses(info, args, rootId, data, config);
|
|
99
|
+
return info;
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=built-in-s-four.js.map
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.S7DispatchSeparator = void 0;
|
|
4
4
|
exports.processS7Dispatch = processS7Dispatch;
|
|
5
|
+
const built_in_props_1 = require("../../../../../environments/built-in-props");
|
|
5
6
|
const known_call_handling_1 = require("../known-call-handling");
|
|
6
7
|
const identifier_1 = require("../../../../../environments/identifier");
|
|
7
8
|
const built_in_proc_name_1 = require("../../../../../environments/built-in-proc-name");
|
|
@@ -14,7 +15,7 @@ function processS7Dispatch(name, args, rootId, data) {
|
|
|
14
15
|
if (!('currentS7name' in data) || !Array.isArray(data.currentS7name)) {
|
|
15
16
|
return (0, known_call_handling_1.processKnownFunctionCall)({ name, args, rootId, data, origin: built_in_proc_name_1.BuiltInProcName.S7Dispatch }).information;
|
|
16
17
|
}
|
|
17
|
-
const info = (0, known_call_handling_1.processKnownFunctionCall)({ name,
|
|
18
|
+
const info = (0, known_call_handling_1.processKnownFunctionCall)({ name, sig: built_in_props_1.FnSig.every, args, rootId, data, origin: built_in_proc_name_1.BuiltInProcName.S7Dispatch }).information;
|
|
18
19
|
for (const id of data.currentS7name) {
|
|
19
20
|
if (typeof id === 'string') {
|
|
20
21
|
const newIn = info.in.slice();
|
|
@@ -4,6 +4,7 @@ import type { ParentInformation } from '../../../../../../r-bridge/lang-4.x/ast/
|
|
|
4
4
|
import type { PotentiallyEmptyRArgument } from '../../../../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call';
|
|
5
5
|
import type { RSymbol } from '../../../../../../r-bridge/lang-4.x/ast/model/nodes/r-symbol';
|
|
6
6
|
import type { NodeId } from '../../../../../../r-bridge/lang-4.x/ast/model/processing/node-id';
|
|
7
|
+
import { type ClassDeclarationConfig } from '../../../../../fn/class-declaration';
|
|
7
8
|
/** e.g. new_generic(name, dispatch_args, fun=NULL) */
|
|
8
9
|
interface S7GenericDispatchConfig {
|
|
9
10
|
args: {
|
|
@@ -11,6 +12,8 @@ interface S7GenericDispatchConfig {
|
|
|
11
12
|
dispatchArg: string | undefined;
|
|
12
13
|
fun: string;
|
|
13
14
|
};
|
|
15
|
+
/** the call binds the generic under the name it is given, as `setGeneric` does (S7 hands its generic back instead) */
|
|
16
|
+
binds?: boolean;
|
|
14
17
|
}
|
|
15
18
|
/**
|
|
16
19
|
* Process an S7 new generic dispatch call like `new_generic` or `setGeneric`.
|
|
@@ -26,7 +29,11 @@ export declare function processMakeConstructor<OtherInfo>(name: RSymbol<OtherInf
|
|
|
26
29
|
readonly mode?: readonly ('s7' | 's3' | 's4')[];
|
|
27
30
|
readonly wrapIndex?: number;
|
|
28
31
|
readonly wrapName?: string;
|
|
32
|
+
/** what the call declares about a class, see {@link classDeclarationOf} */
|
|
33
|
+
readonly classDecl?: ClassDeclarationConfig;
|
|
29
34
|
}): DataflowInformation;
|
|
35
|
+
/** Records on the call vertex what a class-declaring call states, see {@link DataflowGraphVertexFunctionCall.classDecl}. */
|
|
36
|
+
export declare function attachClassDeclaration<OtherInfo>(info: DataflowInformation, rootId: NodeId, args: readonly PotentiallyEmptyRArgument<OtherInfo & ParentInformation>[], config: ClassDeclarationConfig | undefined): void;
|
|
30
37
|
/**
|
|
31
38
|
* Node-id suffix of the `fun = function(...) S7_dispatch()` argument flowR synthesizes for S7 calls that do not
|
|
32
39
|
* carry one (`new_class`, `new_generic`, ...). It stands for no argument in the source, so consumers that reason
|
|
@@ -3,7 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.S7SyntheticFunArgSuffix = void 0;
|
|
4
4
|
exports.processS7NewGeneric = processS7NewGeneric;
|
|
5
5
|
exports.processMakeConstructor = processMakeConstructor;
|
|
6
|
+
exports.attachClassDeclaration = attachClassDeclaration;
|
|
6
7
|
const match_args_1 = require("../../../../../graph/match-args");
|
|
8
|
+
const built_in_props_1 = require("../../../../../environments/built-in-props");
|
|
7
9
|
const known_call_handling_1 = require("../known-call-handling");
|
|
8
10
|
const built_in_apply_1 = require("./built-in-apply");
|
|
9
11
|
const logger_1 = require("../../../../../logger");
|
|
@@ -18,7 +20,8 @@ const node_value_1 = require("../../../../../eval/resolve/node-value");
|
|
|
18
20
|
const vertex_1 = require("../../../../../graph/vertex");
|
|
19
21
|
const range_1 = require("../../../../../../util/range");
|
|
20
22
|
const built_in_proc_name_1 = require("../../../../../environments/built-in-proc-name");
|
|
21
|
-
const
|
|
23
|
+
const class_declaration_1 = require("../../../../../fn/class-declaration");
|
|
24
|
+
const built_in_s_four_1 = require("./built-in-s-four");
|
|
22
25
|
/**
|
|
23
26
|
* Process an S7 new generic dispatch call like `new_generic` or `setGeneric`.
|
|
24
27
|
*/
|
|
@@ -55,13 +58,16 @@ function processS7NewGeneric(name, args, rootId, data, config) {
|
|
|
55
58
|
effectiveArgs.push(newFun[0]);
|
|
56
59
|
funArg = newFun[1];
|
|
57
60
|
}
|
|
58
|
-
const info = (0, known_call_handling_1.processKnownFunctionCall)({ name,
|
|
61
|
+
const info = (0, known_call_handling_1.processKnownFunctionCall)({ name, sig: built_in_props_1.FnSig.every, args: effectiveArgs, rootId, data, origin: built_in_proc_name_1.BuiltInProcName.S7NewGeneric }).information;
|
|
59
62
|
info.graph.addEdge(rootId, funArg, edge_1.EdgeType.Returns);
|
|
60
63
|
info.entryPoint = funArg;
|
|
61
64
|
const fArg = info.graph.getVertex(funArg);
|
|
62
65
|
if (vertex_1.FunctionDefinitionVertex.is(fArg)) {
|
|
63
66
|
fArg.mode ??= ['s4', 's7'];
|
|
64
67
|
}
|
|
68
|
+
if (config.binds) {
|
|
69
|
+
(0, built_in_s_four_1.linkS4Generic)(info, rootId, accessedIdentifiers, data);
|
|
70
|
+
}
|
|
65
71
|
return info;
|
|
66
72
|
}
|
|
67
73
|
/**
|
|
@@ -73,7 +79,7 @@ function processS7NewGeneric(name, args, rootId, data, config) {
|
|
|
73
79
|
function processMakeConstructor(name, args, rootId, data, config) {
|
|
74
80
|
// synthesise `function(...) S7_dispatch()` and make the call return it
|
|
75
81
|
const [funArg, funId] = makeS7DispatchFDef(name, [], rootId, args.length, data.completeAst.idMap);
|
|
76
|
-
const info = (0, known_call_handling_1.processKnownFunctionCall)({ name,
|
|
82
|
+
const info = (0, known_call_handling_1.processKnownFunctionCall)({ name, sig: built_in_props_1.FnSig.every, args: [...args, funArg], rootId, data, origin: built_in_proc_name_1.BuiltInProcName.S7MakeConstructor }).information;
|
|
77
83
|
info.graph.addEdge(rootId, funId, edge_1.EdgeType.Returns);
|
|
78
84
|
info.entryPoint = funId;
|
|
79
85
|
const fArg = info.graph.getVertex(funId);
|
|
@@ -83,31 +89,27 @@ function processMakeConstructor(name, args, rootId, data, config) {
|
|
|
83
89
|
if (config?.wrapIndex !== undefined) {
|
|
84
90
|
linkWrappedFunction(info, args, config.wrapIndex, config.wrapName, data);
|
|
85
91
|
}
|
|
92
|
+
attachClassDeclaration(info, rootId, args, config?.classDecl);
|
|
93
|
+
(0, built_in_s_four_1.linkS4Declaration)(info, rootId, data);
|
|
86
94
|
return info;
|
|
87
95
|
}
|
|
96
|
+
/** Records on the call vertex what a class-declaring call states, see {@link DataflowGraphVertexFunctionCall.classDecl}. */
|
|
97
|
+
function attachClassDeclaration(info, rootId, args, config) {
|
|
98
|
+
if (config === undefined) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const vertex = info.graph.getVertex(rootId);
|
|
102
|
+
if (vertex_1.FunctionCallVertex.is(vertex)) {
|
|
103
|
+
vertex.classDecl = class_declaration_1.ClassDeclarations.of(config, args);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
88
106
|
/** Mark the wrapped function of an eager higher-order wrapper (`Negate`/`Vectorize`/`partial`) as called. */
|
|
89
107
|
function linkWrappedFunction(info, args, wrapIndex, wrapName, data) {
|
|
90
|
-
|
|
91
|
-
if (wrapName !== undefined) {
|
|
92
|
-
wrapped = args.find(a => a !== r_function_call_1.EmptyArgument && a.name?.content === wrapName);
|
|
93
|
-
}
|
|
108
|
+
const wrapped = (0, built_in_s_four_1.argFor)(args, { name: wrapName, idx: wrapIndex });
|
|
94
109
|
if (wrapped === undefined) {
|
|
95
|
-
let pos = 0;
|
|
96
|
-
for (const a of args) {
|
|
97
|
-
if (r_argument_1.RArgument.isEmpty(a) || a.name) {
|
|
98
|
-
continue;
|
|
99
|
-
}
|
|
100
|
-
if (pos === wrapIndex) {
|
|
101
|
-
wrapped = a;
|
|
102
|
-
break;
|
|
103
|
-
}
|
|
104
|
-
pos++;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
if (wrapped === undefined || r_argument_1.RArgument.isEmpty(wrapped) || !wrapped.value) {
|
|
108
110
|
return;
|
|
109
111
|
}
|
|
110
|
-
const resolved = (0, built_in_apply_1.resolveFunctionArgument)(wrapped
|
|
112
|
+
const resolved = (0, built_in_apply_1.resolveFunctionArgument)(wrapped, data, {});
|
|
111
113
|
if (resolved === undefined || resolved.anonymous) {
|
|
112
114
|
return;
|
|
113
115
|
}
|
|
@@ -4,7 +4,6 @@ import type { ParentInformation } from '../../../../../../r-bridge/lang-4.x/ast/
|
|
|
4
4
|
import type { PotentiallyEmptyRArgument } from '../../../../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call';
|
|
5
5
|
import type { RSymbol } from '../../../../../../r-bridge/lang-4.x/ast/model/nodes/r-symbol';
|
|
6
6
|
import type { NodeId } from '../../../../../../r-bridge/lang-4.x/ast/model/processing/node-id';
|
|
7
|
-
import type { ForceArguments } from '../common';
|
|
8
7
|
/**
|
|
9
8
|
* Process a special built-in binary operator, possibly lazily.
|
|
10
9
|
* Only `&&`/`||` short-circuit: their right-hand side gets a control dependency and only the left is read.
|
|
@@ -14,4 +13,4 @@ import type { ForceArguments } from '../common';
|
|
|
14
13
|
export declare function processSpecialBinOp<OtherInfo>(name: RSymbol<OtherInfo & ParentInformation>, args: readonly PotentiallyEmptyRArgument<OtherInfo & ParentInformation>[], rootId: NodeId, data: DataflowProcessorInformation<OtherInfo & ParentInformation>, config: {
|
|
15
14
|
readonly lazy: boolean;
|
|
16
15
|
readonly evalRhsWhen?: boolean;
|
|
17
|
-
}
|
|
16
|
+
}): DataflowInformation;
|
|
@@ -16,11 +16,11 @@ const built_in_proc_name_1 = require("../../../../../environments/built-in-proc-
|
|
|
16
16
|
function processSpecialBinOp(name, args, rootId, data, config) {
|
|
17
17
|
if (args.length != 2) {
|
|
18
18
|
logger_1.dataflowLogger.warn(`Logical bin-op ${identifier_1.Identifier.toString(name.content)} has something else than 2 arguments, skipping`);
|
|
19
|
-
return (0, known_call_handling_1.processKnownFunctionCall)({ name, args, rootId, data,
|
|
19
|
+
return (0, known_call_handling_1.processKnownFunctionCall)({ name, args, rootId, data, origin: 'default' }).information;
|
|
20
20
|
}
|
|
21
21
|
/* the very dependency the right-hand side runs under, carried by its vertices and by the branch alike */
|
|
22
22
|
const evalsRhs = { id: rootId, when: config.evalRhsWhen ?? true };
|
|
23
|
-
const { information, processedArguments } = (0, known_call_handling_1.processKnownFunctionCall)({ name, args, rootId, data,
|
|
23
|
+
const { information, processedArguments } = (0, known_call_handling_1.processKnownFunctionCall)({ name, args, rootId, data,
|
|
24
24
|
patchData: (d, i) => {
|
|
25
25
|
if (config.lazy && i === 1) {
|
|
26
26
|
return { ...d, cds: [...d.cds ?? [], evalsRhs] };
|
|
@@ -93,8 +93,9 @@ function processStringTemplate(name, args, rootId, data, config) {
|
|
|
93
93
|
continue;
|
|
94
94
|
}
|
|
95
95
|
const template = arg.value;
|
|
96
|
+
/* one generator for the whole template so its interpolations do not collide on the same ids */
|
|
97
|
+
const generator = (0, decorate_1.sourcedDeterministicCountingIdGenerator)(`${name.lexeme}::${template.info.id}`, template.location);
|
|
96
98
|
for (const code of interpolationsOf(template.content.str, open, close, config.markup)) {
|
|
97
|
-
const generator = (0, decorate_1.sourcedDeterministicCountingIdGenerator)(`${name.lexeme}::${template.info.id}`, template.location);
|
|
98
99
|
const result = (0, built_in_source_1.sourceRequest)(rootId, (0, retriever_1.requestFromInput)(code), data, information, false, generator, true);
|
|
99
100
|
/* the template stands where the call does, so what it leaves open resolves against the bindings here */
|
|
100
101
|
(0, linker_1.linkInputs)([...result.in, ...result.unknownReferences], data.environment, [], result.graph, false);
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.processTryCatch = processTryCatch;
|
|
4
4
|
const match_args_1 = require("../../../../../graph/match-args");
|
|
5
|
+
const built_in_props_1 = require("../../../../../environments/built-in-props");
|
|
6
|
+
const condition_handlers_1 = require("../../../../../fn/condition-handlers");
|
|
5
7
|
const info_1 = require("../../../../../info");
|
|
6
8
|
const known_call_handling_1 = require("../known-call-handling");
|
|
7
9
|
const control_flow_1 = require("../../../../control-flow");
|
|
@@ -22,7 +24,7 @@ const r_function_definition_1 = require("../../../../../../r-bridge/lang-4.x/ast
|
|
|
22
24
|
* Process a built-in try-catch or similar handler.
|
|
23
25
|
*/
|
|
24
26
|
function processTryCatch(name, args, rootId, data, config) {
|
|
25
|
-
const res = (0, known_call_handling_1.processKnownFunctionCall)({ name, args: args.map(unpack_argument_1.tryUnpackNoNameArg), rootId, data, origin: built_in_proc_name_1.BuiltInProcName.Try,
|
|
27
|
+
const res = (0, known_call_handling_1.processKnownFunctionCall)({ name, args: args.map(unpack_argument_1.tryUnpackNoNameArg), rootId, data, origin: built_in_proc_name_1.BuiltInProcName.Try, sig: built_in_props_1.FnSig.every });
|
|
26
28
|
if (args.length < 1 || r_argument_1.RArgument.isEmpty(args[0])) {
|
|
27
29
|
logger_1.dataflowLogger.warn(`TryCatch Handler ${identifier_1.Identifier.toString(name.content)} does not have 1 argument, skipping`);
|
|
28
30
|
return res.information;
|
|
@@ -44,6 +46,10 @@ function processTryCatch(name, args, rootId, data, config) {
|
|
|
44
46
|
const blockArg = new Set(argMaps.get('block'));
|
|
45
47
|
const errorArg = new Set(argMaps.get('error'));
|
|
46
48
|
const finallyArg = new Set(argMaps.get('finally'));
|
|
49
|
+
/* handlers are matched by the class of the condition, so a call naming none for an error lets it out:
|
|
50
|
+
`tryCatch(stop("x"), warning = ...)` throws, and so does one with nothing but a `finally`.
|
|
51
|
+
A construct declaring no handler parameter at all, as `try` does, catches whatever arrives. */
|
|
52
|
+
const catchesError = config.handlers.error === undefined || (0, condition_handlers_1.namesAnErrorHandler)(args);
|
|
47
53
|
// only take those exit points from the block
|
|
48
54
|
// check whether blockArg has *always* happening exceptions, if so we do not constrain the error handler
|
|
49
55
|
const blockErrorExitPoints = [];
|
|
@@ -63,6 +69,9 @@ function processTryCatch(name, args, rootId, data, config) {
|
|
|
63
69
|
// not killing other args
|
|
64
70
|
return arg.exitPoints;
|
|
65
71
|
}
|
|
72
|
+
if (!catchesError) {
|
|
73
|
+
return arg.exitPoints;
|
|
74
|
+
}
|
|
66
75
|
blockErrorExitPoints.push(...arg.exitPoints.filter(ep => ep.type === 4 /* ExitPointType.Error */).flatMap(a => a.cds));
|
|
67
76
|
return arg.exitPoints.filter(ep => ep.type !== 4 /* ExitPointType.Error */);
|
|
68
77
|
});
|
|
@@ -114,6 +123,13 @@ function processTryCatch(name, args, rootId, data, config) {
|
|
|
114
123
|
const cleanup = res.processedArguments.find(arg => arg !== undefined && finallyArg.has(arg.entryPoint));
|
|
115
124
|
const caughtAt = handler !== undefined ? control_flow_1.ControlFlow.entryOf(handler)
|
|
116
125
|
: cleanup === undefined ? rootId : control_flow_1.ControlFlow.entryOf(cleanup);
|
|
126
|
+
/* R runs `finally` whatever leaves the block, so a jump reaches it on its way out just as an error does */
|
|
127
|
+
const cleanupEntry = cleanup !== undefined ? control_flow_1.ControlFlow.entryOf(cleanup) : undefined;
|
|
128
|
+
if (cleanupEntry !== undefined) {
|
|
129
|
+
/* and it leaves through the call, so whatever claims the jump links to where the cleanup ends, not to the
|
|
130
|
+
jump itself, which would let control out without running it */
|
|
131
|
+
info.exitPoints = info.exitPoints.map(e => JumpExitPoints.includes(e.type) ? { ...e, nodeId: rootId } : e);
|
|
132
|
+
}
|
|
117
133
|
for (const arg of res.processedArguments) {
|
|
118
134
|
if (arg === undefined || errorArg.has(arg.entryPoint) || finallyArg.has(arg.entryPoint)) {
|
|
119
135
|
continue;
|
|
@@ -122,6 +138,9 @@ function processTryCatch(name, args, rootId, data, config) {
|
|
|
122
138
|
if (exit.type === 4 /* ExitPointType.Error */) {
|
|
123
139
|
info.graph.addEdge(exit.nodeId, caughtAt, edge_1.EdgeType.FlowEdge);
|
|
124
140
|
}
|
|
141
|
+
else if (cleanupEntry !== undefined && JumpExitPoints.includes(exit.type)) {
|
|
142
|
+
info.graph.addEdge(exit.nodeId, cleanupEntry, edge_1.EdgeType.FlowEdge);
|
|
143
|
+
}
|
|
125
144
|
}
|
|
126
145
|
}
|
|
127
146
|
if (escaping.length === 0 && escapingKills === undefined) {
|
|
@@ -134,6 +153,8 @@ function processTryCatch(name, args, rootId, data, config) {
|
|
|
134
153
|
kill: escapingKills
|
|
135
154
|
};
|
|
136
155
|
}
|
|
156
|
+
/** the exits that leave the construct for a destination of their own, which `finally` still runs before */
|
|
157
|
+
const JumpExitPoints = [2 /* ExitPointType.Break */, 3 /* ExitPointType.Next */, 1 /* ExitPointType.Return */];
|
|
137
158
|
function promoteCallToFunction(call, arg, info, data) {
|
|
138
159
|
let functionId = undefined;
|
|
139
160
|
let functionName = undefined;
|
|
@@ -15,11 +15,9 @@ import type { REnvironmentInformation } from '../../../../environments/environme
|
|
|
15
15
|
import { type IdentifierReference } from '../../../../environments/identifier';
|
|
16
16
|
import { type DataflowGraphVertexAstLink, type FunctionOriginInformation } from '../../../../graph/vertex';
|
|
17
17
|
import type { RSymbol } from '../../../../../r-bridge/lang-4.x/ast/model/nodes/r-symbol';
|
|
18
|
-
export interface
|
|
19
|
-
/** which of the arguments
|
|
20
|
-
readonly
|
|
21
|
-
}
|
|
22
|
-
export interface ProcessAllArgumentInput<OtherInfo> extends ForceArguments {
|
|
18
|
+
export interface ProcessAllArgumentInput<OtherInfo> {
|
|
19
|
+
/** which of the arguments the call evaluates, as {@link FnSig.forced} answers it for the signature */
|
|
20
|
+
readonly forced?: readonly boolean[];
|
|
23
21
|
readonly functionName: DataflowInformation;
|
|
24
22
|
readonly args: readonly (RNode<OtherInfo & ParentInformation> | PotentiallyEmptyRArgument<OtherInfo & ParentInformation>)[];
|
|
25
23
|
readonly data: DataflowProcessorInformation<OtherInfo & ParentInformation>;
|
|
@@ -52,7 +50,7 @@ export declare function convertFnArgument<OtherInfo>(this: void, arg: typeof Emp
|
|
|
52
50
|
/**
|
|
53
51
|
* Processes all arguments for a function call, updating the given final graph and environment.
|
|
54
52
|
*/
|
|
55
|
-
export declare function processAllArguments<OtherInfo>({ functionName, args, data, finalGraph, functionRootId,
|
|
53
|
+
export declare function processAllArguments<OtherInfo>({ functionName, args, data, finalGraph, functionRootId, forced, patchData, nonFunction }: ProcessAllArgumentInput<OtherInfo>): ProcessAllArgumentResult;
|
|
56
54
|
export interface PatchFunctionCallInput<OtherInfo> {
|
|
57
55
|
readonly nextGraph: DataflowGraph;
|
|
58
56
|
readonly rootId: NodeId;
|
|
@@ -86,7 +86,7 @@ function convertFnArgument(arg) {
|
|
|
86
86
|
/**
|
|
87
87
|
* Processes all arguments for a function call, updating the given final graph and environment.
|
|
88
88
|
*/
|
|
89
|
-
function processAllArguments({ functionName, args, data, finalGraph, functionRootId,
|
|
89
|
+
function processAllArguments({ functionName, args, data, finalGraph, functionRootId, forced = [], patchData, nonFunction }) {
|
|
90
90
|
let finalEnv = functionName.environment;
|
|
91
91
|
// arg env contains the environments with other args defined
|
|
92
92
|
let argEnv = functionName.environment;
|
|
@@ -110,7 +110,7 @@ function processAllArguments({ functionName, args, data, finalGraph, functionRoo
|
|
|
110
110
|
else {
|
|
111
111
|
processed = r_argument_1.RArgument.is(arg) ? (0, process_argument_1.processFunctionArgument)(arg, data) : (0, processor_1.processDataflowFor)(arg, data);
|
|
112
112
|
}
|
|
113
|
-
if (r_argument_1.RArgument.isWithValue(arg) &&
|
|
113
|
+
if (r_argument_1.RArgument.isWithValue(arg) && forced[i] && !model_1.RConstant.is(arg.value)) {
|
|
114
114
|
forceVertexArgumentValueReferences(functionRootId, processed, processed.graph, data.environment);
|
|
115
115
|
}
|
|
116
116
|
processedArguments.push(processed);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AstIdMap, ParentInformation } from '../../../../../r-bridge/lang-4.x/ast/model/processing/decorate';
|
|
2
|
-
import
|
|
2
|
+
import { NodeId } from '../../../../../r-bridge/lang-4.x/ast/model/processing/node-id';
|
|
3
3
|
import type { DataflowGraph } from '../../../../graph/graph';
|
|
4
4
|
import type { ControlFlowGraph } from '../../../../../control-flow/control-flow-graph';
|
|
5
5
|
/** The reads that may force the expression, and the control flow deciding what they can see. */
|
|
@@ -66,7 +66,7 @@ exports.Deferred = {
|
|
|
66
66
|
const uses = new Map();
|
|
67
67
|
for (const [type, index] of [[vertex_1.VertexType.VariableDefinition, definitions], [vertex_1.VertexType.Use, uses]]) {
|
|
68
68
|
for (const [id] of graph.verticesOfType(type)) {
|
|
69
|
-
const name =
|
|
69
|
+
const name = node_id_1.NodeId.recoverName(id, idMap);
|
|
70
70
|
if (name !== undefined) {
|
|
71
71
|
add(index, name, id);
|
|
72
72
|
}
|
|
@@ -123,7 +123,7 @@ exports.Deferred = {
|
|
|
123
123
|
const reachedByAForce = (use) => forces === undefined
|
|
124
124
|
|| (!forces.sites.includes(use) && forces.sites.some(site => (0, happens_before_1.happensBefore)(forces.cfg, site, use) !== logic_1.Ternary.Never));
|
|
125
125
|
/* `delayedAssign` names its variable with a string literal, so the recovered name still carries quotes */
|
|
126
|
-
const bindingName = forces === undefined ? undefined : (0, retriever_1.removeRQuotes)(
|
|
126
|
+
const bindingName = forces === undefined ? undefined : (0, retriever_1.removeRQuotes)(node_id_1.NodeId.recoverName(forces.binding, idMap) ?? '');
|
|
127
127
|
for (const [node, name, writes] of within) {
|
|
128
128
|
if (writes) {
|
|
129
129
|
/* a write of the bound name replaces the binding, so a read it definitely reaches sees only it */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type DataflowProcessorInformation } from '../../../../processor';
|
|
2
|
+
import { FnSig } from '../../../../environments/built-in-props';
|
|
2
3
|
import type { DataflowInformation } from '../../../../info';
|
|
3
|
-
import { type ForceArguments } from './common';
|
|
4
4
|
import type { RSymbol } from '../../../../../r-bridge/lang-4.x/ast/model/nodes/r-symbol';
|
|
5
5
|
import type { ParentInformation } from '../../../../../r-bridge/lang-4.x/ast/model/processing/decorate';
|
|
6
6
|
import { type PotentiallyEmptyRArgument } from '../../../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call';
|
|
@@ -10,7 +10,9 @@ import { type IdentifierReference } from '../../../../environments/identifier';
|
|
|
10
10
|
import type { FunctionArgument } from '../../../../graph/graph';
|
|
11
11
|
import { DataflowGraph } from '../../../../graph/graph';
|
|
12
12
|
import { type FunctionOriginInformation } from '../../../../graph/vertex';
|
|
13
|
-
export interface ProcessKnownFunctionCallInput<OtherInfo>
|
|
13
|
+
export interface ProcessKnownFunctionCallInput<OtherInfo> {
|
|
14
|
+
/** the signature of the called function, the one place stating which arguments it evaluates */
|
|
15
|
+
readonly sig?: FnSig;
|
|
14
16
|
/** The name of the function being called. */
|
|
15
17
|
readonly name: RSymbol<OtherInfo & ParentInformation>;
|
|
16
18
|
/** The arguments to the function call. */
|
|
@@ -96,4 +98,4 @@ export declare function markArgumentsAsNonStandardEvaluation(graph: DataflowGrap
|
|
|
96
98
|
* The main processor for function calls for which we know the target but need not
|
|
97
99
|
* add any specific handling.
|
|
98
100
|
*/
|
|
99
|
-
export declare function processKnownFunctionCall<OtherInfo>({ name, args, rootId, data, reverseOrder, markAsNSE,
|
|
101
|
+
export declare function processKnownFunctionCall<OtherInfo>({ name, args, rootId, data, reverseOrder, markAsNSE, sig, patchData, hasUnknownSideEffect, origin, nonFunction, customControlFlow, alternativeArgsFrom }: ProcessKnownFunctionCallInput<OtherInfo>): ProcessKnownFunctionCallResult;
|
|
@@ -4,6 +4,7 @@ exports.NseKind = exports.NseArguments = void 0;
|
|
|
4
4
|
exports.markArgumentsAsNonStandardEvaluation = markArgumentsAsNonStandardEvaluation;
|
|
5
5
|
exports.processKnownFunctionCall = processKnownFunctionCall;
|
|
6
6
|
const processor_1 = require("../../../../processor");
|
|
7
|
+
const built_in_props_1 = require("../../../../environments/built-in-props");
|
|
7
8
|
const common_1 = require("./common");
|
|
8
9
|
const r_function_call_1 = require("../../../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
|
|
9
10
|
const r_argument_1 = require("../../../../../r-bridge/lang-4.x/ast/model/nodes/r-argument");
|
|
@@ -93,12 +94,13 @@ function markArgument(graph, rootId, arg, kind, evaluated) {
|
|
|
93
94
|
* The main processor for function calls for which we know the target but need not
|
|
94
95
|
* add any specific handling.
|
|
95
96
|
*/
|
|
96
|
-
function processKnownFunctionCall({ name, args, rootId, data, reverseOrder = false, markAsNSE = undefined,
|
|
97
|
+
function processKnownFunctionCall({ name, args, rootId, data, reverseOrder = false, markAsNSE = undefined, sig, patchData = d => d, hasUnknownSideEffect, origin, nonFunction, customControlFlow, alternativeArgsFrom }) {
|
|
97
98
|
const functionName = (0, processor_1.processDataflowFor)(name, data);
|
|
98
99
|
const finalGraph = new graph_1.DataflowGraph(data.completeAst.idMap);
|
|
99
100
|
const functionCallName = name.content;
|
|
100
101
|
const processArgs = reverseOrder ? args.toReversed() : args;
|
|
101
|
-
const
|
|
102
|
+
const forced = built_in_props_1.FnSig.forced(sig, processArgs.length);
|
|
103
|
+
const { finalEnv, callArgs, remainingReadInArgs, processedArguments } = (0, common_1.processAllArguments)({ functionName, args: processArgs, data, finalGraph, functionRootId: rootId, patchData, forced, nonFunction });
|
|
102
104
|
markArgumentsAsNonStandardEvaluation(finalGraph, rootId, processedArguments, markAsNSE, { kind: NseKind.Reevaluated });
|
|
103
105
|
const onlyBuiltin = data.builtInNoEnv === rootId;
|
|
104
106
|
finalGraph.addVertex({
|
|
@@ -122,10 +124,10 @@ function processKnownFunctionCall({ name, args, rootId, data, reverseOrder = fal
|
|
|
122
124
|
let exitPoints = undefined;
|
|
123
125
|
/* a jump that only happens under a condition still lets the call complete, so its default exit has to stay */
|
|
124
126
|
let alwaysJumps = false;
|
|
125
|
-
if (
|
|
127
|
+
if (forced) {
|
|
126
128
|
for (let i = 0; i < processedArguments.length; i++) {
|
|
127
129
|
const p = processedArguments[i];
|
|
128
|
-
if (p === undefined ||
|
|
130
|
+
if (p === undefined || !forced[i]) {
|
|
129
131
|
continue;
|
|
130
132
|
}
|
|
131
133
|
const before = exitPoints?.length ?? 0;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.markAsOnlyBuiltIn = markAsOnlyBuiltIn;
|
|
4
4
|
exports.processNamedCall = processNamedCall;
|
|
5
|
+
const built_in_props_1 = require("../../../../environments/built-in-props");
|
|
5
6
|
const info_1 = require("../../../../info");
|
|
6
7
|
const known_call_handling_1 = require("./known-call-handling");
|
|
7
8
|
const append_1 = require("../../../../environments/append");
|
|
8
9
|
const node_id_1 = require("../../../../../r-bridge/lang-4.x/ast/model/processing/node-id");
|
|
9
10
|
const identifier_1 = require("../../../../environments/identifier");
|
|
10
11
|
const r_base_packages_1 = require("../../../../../util/r-base-packages");
|
|
11
|
-
const built_in_1 = require("../../../../environments/built-in");
|
|
12
12
|
const edge_1 = require("../../../../graph/edge");
|
|
13
13
|
const built_in_library_1 = require("./built-in/built-in-library");
|
|
14
14
|
const vertex_1 = require("../../../../graph/vertex");
|
|
@@ -34,10 +34,11 @@ function mergeInformation(info, newInfo) {
|
|
|
34
34
|
/**
|
|
35
35
|
* The flowR definition of `pkg::fn` behind an export a signature database attached. Such an export binds the
|
|
36
36
|
* name in a layer below the global environment, which hides the built-in environment underneath, and with it
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
37
|
+
* everything the configuration models about the call: how it evaluates its arguments, the class it declares,
|
|
38
|
+
* the value it folds to. Without this lookup, attaching the package would silently disable all of it, so
|
|
39
|
+
* `library(dplyr); filter(df, id > 2)` would lose the data mask of `dplyr::filter`, and attaching `R6` would
|
|
40
|
+
* lose the class `R6Class("P")` declares. The call itself stays a call to the export, it is only
|
|
41
|
+
* processed by what flowR states about the very same name.
|
|
41
42
|
*/
|
|
42
43
|
function builtInBehindExport(data, definition) {
|
|
43
44
|
if (definition.type !== identifier_1.ReferenceType.Function || definition.name === undefined || !node_id_1.NodeId.isBuiltIn(definition.nodeId)
|
|
@@ -45,7 +46,13 @@ function builtInBehindExport(data, definition) {
|
|
|
45
46
|
return undefined;
|
|
46
47
|
}
|
|
47
48
|
const known = data.ctx.env.builtInFunctionOf(definition.name);
|
|
48
|
-
|
|
49
|
+
if (known !== undefined) {
|
|
50
|
+
return known;
|
|
51
|
+
}
|
|
52
|
+
/* an alias binds the export under a name no built-in lookup finds, but attaching it carried what the
|
|
53
|
+
configuration states about the exported name along */
|
|
54
|
+
const attached = definition;
|
|
55
|
+
return typeof attached.processor === 'function' ? attached : undefined;
|
|
49
56
|
}
|
|
50
57
|
/**
|
|
51
58
|
* Marks the given function call node as only calling built-in functions.
|
|
@@ -79,16 +86,15 @@ function processNamedCall(name, args, rootId, data) {
|
|
|
79
86
|
/* a set, because an export and the built-in behind it are two ways to the same definition */
|
|
80
87
|
const toRun = new Set();
|
|
81
88
|
for (const resolvedFunction of resolved) {
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
: builtInBehindExport(data, resolvedFunction);
|
|
89
|
+
const isBuiltIn = resolvedFunction.type === identifier_1.ReferenceType.BuiltInFunction && typeof resolvedFunction.processor === 'function';
|
|
90
|
+
/* the call goes through the attached export, so it is not built-in only, but flowR's own
|
|
91
|
+
definition of that export is what knows how to process it */
|
|
92
|
+
const own = isBuiltIn ? resolvedFunction : builtInBehindExport(data, resolvedFunction);
|
|
87
93
|
if (own === undefined) {
|
|
88
94
|
defaultProcessor = true;
|
|
89
95
|
continue;
|
|
90
96
|
}
|
|
91
|
-
builtIn ||=
|
|
97
|
+
builtIn ||= isBuiltIn && own.config?.libFn !== true;
|
|
92
98
|
toRun.add(own);
|
|
93
99
|
}
|
|
94
100
|
for (const own of toRun) {
|
|
@@ -96,7 +102,7 @@ function processNamedCall(name, args, rootId, data) {
|
|
|
96
102
|
}
|
|
97
103
|
if (defaultProcessor) {
|
|
98
104
|
/* if we do not know where we land, we force! reuse `resolved`, data.environment did not change above */
|
|
99
|
-
const call = (0, known_call_handling_1.processKnownFunctionCall)({ name, args, rootId, data,
|
|
105
|
+
const call = (0, known_call_handling_1.processKnownFunctionCall)({ name, args, rootId, data, sig: resolved.length > 0 ? undefined : built_in_props_1.FnSig.every, origin: 'default' });
|
|
100
106
|
information = mergeInformation(information, call.information);
|
|
101
107
|
}
|
|
102
108
|
else if (information && builtIn) {
|
|
@@ -14,8 +14,8 @@ import { linkExpressionIn } from '../../../linker';
|
|
|
14
14
|
*/
|
|
15
15
|
export declare const Quoted: {
|
|
16
16
|
readonly name: "Quoted";
|
|
17
|
-
/** The
|
|
18
|
-
readonly capturedBy: (this: void, graph: DataflowGraph, id: NodeId) => NodeId
|
|
17
|
+
/** The expressions a capturing call holds on to. */
|
|
18
|
+
readonly capturedBy: (this: void, graph: DataflowGraph, id: NodeId) => readonly NodeId[];
|
|
19
19
|
/** Every expression the value at `id` may hold, with the call that captured it. Several is normal. */
|
|
20
20
|
readonly sourcesOf: (this: void, graph: DataflowGraph, id: NodeId) => readonly CapturedExpression[];
|
|
21
21
|
/** Links every name in `expr` against `environment` and hands back what stays unresolved. */
|