@eagleoutice/flowr 2.13.9 → 2.13.11
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 +40 -40
- package/config.d.ts +50 -2
- package/config.js +37 -6
- package/dataflow/environments/apply-kill.js +4 -4
- package/dataflow/environments/built-in-props.d.ts +28 -4
- package/dataflow/environments/built-in-props.js +31 -8
- package/dataflow/environments/built-in.d.ts +7 -2
- package/dataflow/environments/built-in.js +10 -12
- package/dataflow/environments/default-builtin-config.d.ts +46 -6
- package/dataflow/environments/default-builtin-config.js +30 -16
- package/dataflow/environments/environment.d.ts +16 -0
- package/dataflow/environments/environment.js +114 -26
- package/dataflow/environments/identifier.d.ts +6 -0
- package/dataflow/environments/identifier.js +18 -5
- package/dataflow/environments/query-fn-props.js +34 -2
- package/dataflow/environments/reference-to-maybe.js +1 -1
- package/dataflow/environments/resolve-by-name.js +16 -6
- package/dataflow/environments/resolve-helper.d.ts +43 -0
- package/dataflow/environments/resolve-helper.js +47 -0
- package/dataflow/eval/resolve/alias-tracking.js +45 -1
- package/dataflow/eval/resolve/resolve-argument.js +25 -17
- package/dataflow/eval/resolve/resolve-strings.d.ts +17 -0
- package/dataflow/eval/resolve/resolve-strings.js +16 -9
- package/dataflow/eval/resolve/resolve.js +3 -1
- package/dataflow/graph/call-graph.d.ts +7 -0
- package/dataflow/graph/call-graph.js +103 -0
- package/dataflow/graph/df-helper.d.ts +50 -1
- package/dataflow/graph/df-helper.js +63 -0
- package/dataflow/graph/graph.d.ts +5 -8
- package/dataflow/graph/graph.js +24 -13
- package/dataflow/internal/linker.d.ts +5 -5
- package/dataflow/internal/linker.js +31 -92
- package/dataflow/internal/process/functions/call/built-in/built-in-access.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +3 -9
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +4 -30
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +7 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-load.js +3 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-pipe.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +5 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-with.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-with.js +5 -6
- package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +32 -14
- package/dataflow/internal/process/functions/call/known-call-handling.d.ts +16 -4
- package/dataflow/internal/process/functions/call/known-call-handling.js +29 -8
- package/documentation/data/faq/faqs.js +1 -1
- package/documentation/data/faq/wiki-faq-store.js +3 -2
- package/documentation/data/server/doc-data-server-messages.js +1 -1
- package/documentation/doc-readme.js +1 -1
- package/documentation/doc-util/doc-files.d.ts +5 -0
- package/documentation/doc-util/doc-files.js +13 -3
- package/documentation/doc-util/doc-sigdb.d.ts +9 -0
- package/documentation/doc-util/doc-sigdb.js +32 -0
- package/documentation/wiki-analyzer.js +10 -10
- package/documentation/wiki-core.js +1 -1
- package/documentation/wiki-dataflow-graph.js +3 -3
- package/documentation/wiki-interface.js +13 -2
- package/documentation/wiki-linting-and-testing.js +13 -13
- package/documentation/wiki-mk/doc-context.d.ts +1 -1
- package/documentation/wiki-mk/doc-context.js +9 -5
- package/documentation/wiki-normalized-ast.js +1 -1
- package/documentation/wiki-overview.js +2 -2
- package/documentation/wiki-query.js +4 -1
- package/documentation/wiki-setup.js +3 -3
- package/documentation/wiki-signature-database.js +2 -5
- package/gas.d.ts +6 -0
- package/gas.js +7 -1
- package/linter/linter-rules.d.ts +1 -1
- package/linter/rules/syntactically-valid.d.ts +12 -1
- package/linter/rules/syntactically-valid.js +88 -17
- package/package.json +7 -8
- package/project/attached-packages.d.ts +13 -0
- package/project/attached-packages.js +30 -0
- package/project/context/flowr-analyzer-context.d.ts +15 -0
- package/project/context/flowr-analyzer-context.js +14 -3
- package/project/context/flowr-analyzer-files-context.d.ts +11 -0
- package/project/context/flowr-analyzer-files-context.js +3 -0
- package/project/context/flowr-analyzer-incremental-analysis-context.d.ts +4 -0
- package/project/context/flowr-analyzer-incremental-analysis-context.js +69 -0
- package/project/context/flowr-analyzer-loading-order-context.d.ts +8 -0
- package/project/context/flowr-analyzer-loading-order-context.js +23 -2
- package/project/dependency-version-space.d.ts +33 -11
- package/project/dependency-version-space.js +58 -32
- package/project/plugins/file-plugins/files/flowr-namespace-file.js +52 -24
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-library-plugin.d.ts +22 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-library-plugin.js +101 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +30 -11
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +79 -37
- package/project/plugins/plugin-registry.d.ts +2 -1
- package/project/plugins/plugin-registry.js +2 -0
- package/project/sigdb/manifest.js +9 -5
- package/project/sigdb/reader.d.ts +20 -0
- package/project/sigdb/reader.js +93 -10
- package/project/sigdb/signature-match.d.ts +5 -18
- package/project/sigdb/signature-match.js +5 -18
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +1 -1
- package/queries/catalog/call-graph-query/call-graph-query-executor.js +3 -1
- package/queries/catalog/call-graph-query/call-graph-query-format.d.ts +4 -0
- package/queries/catalog/call-graph-query/call-graph-query-format.js +4 -0
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +11 -3
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +25 -1
- package/queries/catalog/dependencies-query/dependencies-query-format.js +22 -2
- package/queries/catalog/dependencies-query/function-info/library-functions.js +7 -1
- package/queries/catalog/dependencies-query/function-info/read-functions.js +5 -5
- package/queries/catalog/dependencies-query/function-info/remote-functions.d.ts +18 -0
- package/queries/catalog/dependencies-query/function-info/remote-functions.js +46 -0
- package/queries/catalog/dependencies-query/function-info/visualize-functions.js +52 -2
- package/queries/catalog/dependencies-query/function-info/write-functions.js +8 -4
- package/queries/catalog/dependencies-query/link-devices.d.ts +16 -0
- package/queries/catalog/dependencies-query/link-devices.js +104 -0
- package/queries/catalog/dice-query/dice-query-format.d.ts +2 -0
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.js +25 -6
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +37 -6
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +17 -4
- package/queries/catalog/happens-before-query/happens-before-query-executor.js +2 -1
- package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +14 -0
- package/queries/catalog/happens-before-query/happens-before-query-format.js +18 -2
- package/queries/catalog/input-sources-query/input-sources-query-format.js +4 -0
- package/queries/catalog/input-sources-query/input-types.d.ts +10 -0
- package/queries/catalog/input-sources-query/input-types.js +10 -0
- package/queries/catalog/location-map-query/location-map-query-executor.js +16 -6
- package/queries/catalog/location-map-query/location-map-query-format.d.ts +15 -1
- package/queries/catalog/location-map-query/location-map-query-format.js +22 -5
- package/queries/catalog/signature-query/signature-query-executor.js +3 -0
- package/queries/catalog/signature-query/signature-query-format.d.ts +5 -0
- package/queries/catalog/slice-query-options.d.ts +11 -1
- package/queries/catalog/slice-query-options.js +8 -4
- package/queries/catalog/static-slice-query/static-slice-query-executor.js +4 -1
- package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +5 -1
- package/queries/query.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/model/model.d.ts +23 -2
- package/r-bridge/lang-4.x/ast/model/model.js +44 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +8 -8
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.js +9 -46
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/processing/node-id.d.ts +0 -5
- package/r-bridge/lang-4.x/ast/model/processing/node-id.js +6 -3
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +1 -1
- package/reconstruct/reconstruct.d.ts +9 -0
- package/reconstruct/reconstruct.js +1 -0
- package/search/flowr-search-filters.d.ts +25 -1
- package/search/flowr-search-filters.js +42 -7
- package/search/search-executor/search-generators.js +7 -2
- package/search/search-executor/search-transformer.js +4 -1
- package/slicing/criterion/parse.d.ts +5 -25
- package/slicing/criterion/parse.js +15 -20
- package/slicing/static/fingerprint.js +18 -6
- package/slicing/static/slice-call.js +2 -2
- package/slicing/static/slicer-types.d.ts +10 -0
- package/slicing/static/static-slicer.d.ts +1 -1
- package/slicing/static/static-slicer.js +29 -6
- package/slicing/static/visiting-queue.d.ts +12 -2
- package/slicing/static/visiting-queue.js +28 -3
- package/util/arg-matching.d.ts +18 -0
- package/util/arg-matching.js +70 -0
- package/util/collections/bimap.d.ts +21 -1
- package/util/collections/bimap.js +43 -7
- package/util/r-regex.js +19 -1
- package/util/range.d.ts +7 -8
- package/util/range.js +10 -11
- package/util/version.js +1 -1
|
@@ -84,6 +84,11 @@ export interface DefaultBuiltInProcessorConfiguration extends ForceArguments, Bu
|
|
|
84
84
|
readonly treatAsFnCall?: Record<string, readonly string[]>;
|
|
85
85
|
/** Mark the given arguments as {@link EdgeType.NonStandardEvaluation|non-standard-evaluated}, like `quote`. */
|
|
86
86
|
readonly markArgsAsNSE?: NseArguments | readonly number[];
|
|
87
|
+
/**
|
|
88
|
+
* Mark the given arguments as evaluated in a data mask, like `subset`: their symbols may name columns of the
|
|
89
|
+
* data instead of variables, while everything else in them is evaluated in the caller's frame as usual.
|
|
90
|
+
*/
|
|
91
|
+
readonly markArgsAsMasked?: NseArguments | readonly number[];
|
|
87
92
|
/**
|
|
88
93
|
* Name that should be used for the origin (useful when needing to differentiate between
|
|
89
94
|
* functions like 'return' that use the default builtin processor)
|
|
@@ -96,8 +101,8 @@ export interface BuiltInEvalHandlerArgs extends ResolveInfo {
|
|
|
96
101
|
node: RNodeWithParent;
|
|
97
102
|
}
|
|
98
103
|
export type BuiltInEvalHandler = (args: BuiltInEvalHandlerArgs) => Value;
|
|
99
|
-
declare function defaultBuiltInProcessor<OtherInfo>(name: RSymbol<OtherInfo & ParentInformation>, args: readonly PotentiallyEmptyRArgument<OtherInfo & ParentInformation>[], rootId: NodeId, data: DataflowProcessorInformation<OtherInfo & ParentInformation>, { useAsProcessor, forceArgs, readAllArguments, cfg, hasUnknownSideEffects, treatAsFnCall, markArgsAsNSE: nse, keepArgumentOut, sig }: DefaultBuiltInProcessorConfiguration): DataflowInformation;
|
|
100
|
-
declare function defaultBuiltInProcessorReadallArgs<OtherInfo>(name: RSymbol<OtherInfo & ParentInformation>, args: readonly PotentiallyEmptyRArgument<OtherInfo & ParentInformation>[], rootId: NodeId, data: DataflowProcessorInformation<OtherInfo & ParentInformation>, { useAsProcessor, forceArgs, markArgsAsNSE: nse }: Pick<DefaultBuiltInProcessorConfiguration, 'useAsProcessor' | 'forceArgs' | 'markArgsAsNSE'>): DataflowInformation;
|
|
104
|
+
declare function defaultBuiltInProcessor<OtherInfo>(name: RSymbol<OtherInfo & ParentInformation>, args: readonly PotentiallyEmptyRArgument<OtherInfo & ParentInformation>[], rootId: NodeId, data: DataflowProcessorInformation<OtherInfo & ParentInformation>, { useAsProcessor, forceArgs, readAllArguments, cfg, hasUnknownSideEffects, treatAsFnCall, markArgsAsNSE: nse, markArgsAsMasked: masked, keepArgumentOut, sig }: DefaultBuiltInProcessorConfiguration): DataflowInformation;
|
|
105
|
+
declare function defaultBuiltInProcessorReadallArgs<OtherInfo>(name: RSymbol<OtherInfo & ParentInformation>, args: readonly PotentiallyEmptyRArgument<OtherInfo & ParentInformation>[], rootId: NodeId, data: DataflowProcessorInformation<OtherInfo & ParentInformation>, { useAsProcessor, forceArgs, markArgsAsNSE: nse, markArgsAsMasked: masked }: Pick<DefaultBuiltInProcessorConfiguration, 'useAsProcessor' | 'forceArgs' | 'markArgsAsNSE' | 'markArgsAsMasked'>): DataflowInformation;
|
|
101
106
|
export declare const BuiltInProcessorMapper: {
|
|
102
107
|
readonly "builtin:acc": typeof processAccess;
|
|
103
108
|
readonly "builtin:app": typeof processApply;
|
|
@@ -54,17 +54,16 @@ const built_in_with_1 = require("../internal/process/functions/call/built-in/bui
|
|
|
54
54
|
const built_in_namespace_access_1 = require("../internal/process/functions/call/built-in/built-in-namespace-access");
|
|
55
55
|
const built_in_load_1 = require("../internal/process/functions/call/built-in/built-in-load");
|
|
56
56
|
const built_in_props_1 = require("./built-in-props");
|
|
57
|
-
function defaultBuiltInProcessor(name, args, rootId, data, { useAsProcessor = built_in_proc_name_1.BuiltInProcName.Default, forceArgs, readAllArguments, cfg, hasUnknownSideEffects, treatAsFnCall, markArgsAsNSE: nse, keepArgumentOut, sig }) {
|
|
57
|
+
function defaultBuiltInProcessor(name, args, rootId, data, { useAsProcessor = built_in_proc_name_1.BuiltInProcName.Default, forceArgs, readAllArguments, cfg, hasUnknownSideEffects, treatAsFnCall, markArgsAsNSE: nse, markArgsAsMasked: masked, keepArgumentOut, sig }) {
|
|
58
58
|
/* a signature states per argument what the individual options state for all of them at once */
|
|
59
|
-
const layout = sig !== undefined ?
|
|
59
|
+
const layout = sig !== undefined ? built_in_props_1.FnSig.layout(sig) : undefined;
|
|
60
60
|
if (layout !== undefined) {
|
|
61
|
-
forceArgs ??= (layout.any & built_in_props_1.ArgProp.Forced) !== 0 ? args.map((_, i) => (
|
|
62
|
-
nse ??= (layout.any & built_in_props_1.ArgProp.Nse) !== 0 ?
|
|
61
|
+
forceArgs ??= (layout.any & built_in_props_1.ArgProp.Forced) !== 0 ? args.map((_, i) => (built_in_props_1.FnSig.propAt(layout, i) & built_in_props_1.ArgProp.Forced) !== 0) : undefined;
|
|
62
|
+
nse ??= (layout.any & built_in_props_1.ArgProp.Nse) !== 0 ? built_in_props_1.FnSig.posWith(layout, args.length, built_in_props_1.ArgProp.Nse) : undefined;
|
|
63
63
|
}
|
|
64
64
|
const { information: res, processedArguments } = (0, known_call_handling_1.processKnownFunctionCall)({ name, args, rootId, data, forceArgs, origin: useAsProcessor });
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
65
|
+
(0, known_call_handling_1.markArgumentsAsNonStandardEvaluation)(res.graph, rootId, processedArguments, nse);
|
|
66
|
+
(0, known_call_handling_1.markArgumentsAsNonStandardEvaluation)(res.graph, rootId, processedArguments, masked, known_call_handling_1.NseKind.DataMasked);
|
|
68
67
|
if (keepArgumentOut) {
|
|
69
68
|
res.out = [...res.out, ...processedArguments.flatMap(arg => arg?.out ?? [])];
|
|
70
69
|
}
|
|
@@ -82,7 +81,7 @@ function defaultBuiltInProcessor(name, args, rootId, data, { useAsProcessor = bu
|
|
|
82
81
|
}
|
|
83
82
|
}
|
|
84
83
|
else if (layout !== undefined && (layout.any & (built_in_props_1.ArgProp.Value | built_in_props_1.ArgProp.Shape)) !== 0) {
|
|
85
|
-
for (const i of
|
|
84
|
+
for (const i of built_in_props_1.FnSig.posWith(layout, processedArguments.length, built_in_props_1.ArgProp.Value | built_in_props_1.ArgProp.Shape)) {
|
|
86
85
|
const arg = processedArguments[i];
|
|
87
86
|
if (arg) {
|
|
88
87
|
res.graph.addEdge(rootId, arg.entryPoint, edge_1.EdgeType.Reads);
|
|
@@ -133,7 +132,7 @@ function defaultBuiltInProcessor(name, args, rootId, data, { useAsProcessor = bu
|
|
|
133
132
|
}
|
|
134
133
|
return res;
|
|
135
134
|
}
|
|
136
|
-
function defaultBuiltInProcessorReadallArgs(name, args, rootId, data, { useAsProcessor = built_in_proc_name_1.BuiltInProcName.Default, forceArgs, markArgsAsNSE: nse }) {
|
|
135
|
+
function defaultBuiltInProcessorReadallArgs(name, args, rootId, data, { useAsProcessor = built_in_proc_name_1.BuiltInProcName.Default, forceArgs, markArgsAsNSE: nse, markArgsAsMasked: masked }) {
|
|
137
136
|
const { information, processedArguments } = (0, known_call_handling_1.processKnownFunctionCall)({ name, args, rootId, data, forceArgs, origin: useAsProcessor });
|
|
138
137
|
const g = information.graph;
|
|
139
138
|
for (const arg of processedArguments) {
|
|
@@ -141,9 +140,8 @@ function defaultBuiltInProcessorReadallArgs(name, args, rootId, data, { useAsPro
|
|
|
141
140
|
g.addEdge(rootId, arg.entryPoint, edge_1.EdgeType.Reads);
|
|
142
141
|
}
|
|
143
142
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
143
|
+
(0, known_call_handling_1.markArgumentsAsNonStandardEvaluation)(g, rootId, processedArguments, nse);
|
|
144
|
+
(0, known_call_handling_1.markArgumentsAsNonStandardEvaluation)(g, rootId, processedArguments, masked, known_call_handling_1.NseKind.DataMasked);
|
|
147
145
|
return information;
|
|
148
146
|
}
|
|
149
147
|
exports.BuiltInProcessorMapper = {
|
|
@@ -126,7 +126,7 @@ export declare const WrittenBuiltinDefinitions: [{
|
|
|
126
126
|
readonly names: [Identifier];
|
|
127
127
|
readonly processor: BuiltInProcName.DefaultReadAllArgs;
|
|
128
128
|
readonly config: {
|
|
129
|
-
readonly
|
|
129
|
+
readonly markArgsAsMasked: NseArguments.All;
|
|
130
130
|
};
|
|
131
131
|
readonly assumePrimitive: false;
|
|
132
132
|
}, {
|
|
@@ -144,7 +144,7 @@ export declare const WrittenBuiltinDefinitions: [{
|
|
|
144
144
|
readonly names: Identifier[];
|
|
145
145
|
readonly processor: BuiltInProcName.Default;
|
|
146
146
|
readonly config: {
|
|
147
|
-
readonly
|
|
147
|
+
readonly markArgsAsMasked: NseArguments.AllButFirst;
|
|
148
148
|
readonly props: CallProp.Pure;
|
|
149
149
|
};
|
|
150
150
|
readonly assumePrimitive: false;
|
|
@@ -153,7 +153,7 @@ export declare const WrittenBuiltinDefinitions: [{
|
|
|
153
153
|
readonly names: [Identifier];
|
|
154
154
|
readonly processor: BuiltInProcName.Default;
|
|
155
155
|
readonly config: {
|
|
156
|
-
readonly
|
|
156
|
+
readonly markArgsAsMasked: NseArguments.AllButFirst;
|
|
157
157
|
readonly props: CallProp.Random;
|
|
158
158
|
};
|
|
159
159
|
readonly assumePrimitive: false;
|
|
@@ -162,7 +162,7 @@ export declare const WrittenBuiltinDefinitions: [{
|
|
|
162
162
|
readonly names: Identifier[];
|
|
163
163
|
readonly processor: BuiltInProcName.DefaultReadAllArgs;
|
|
164
164
|
readonly config: {
|
|
165
|
-
readonly
|
|
165
|
+
readonly markArgsAsMasked: NseArguments.All;
|
|
166
166
|
};
|
|
167
167
|
readonly assumePrimitive: false;
|
|
168
168
|
}, {
|
|
@@ -297,6 +297,17 @@ export declare const WrittenBuiltinDefinitions: [{
|
|
|
297
297
|
};
|
|
298
298
|
readonly assumePrimitive: true;
|
|
299
299
|
readonly evalHandler: BuiltInEvalName.StringFn;
|
|
300
|
+
}, {
|
|
301
|
+
readonly type: "function";
|
|
302
|
+
readonly names: [Identifier];
|
|
303
|
+
readonly processor: BuiltInProcName.DefaultReadAllArgs;
|
|
304
|
+
readonly config: {
|
|
305
|
+
readonly libFn: true;
|
|
306
|
+
readonly props: CallProp.Pure;
|
|
307
|
+
readonly sig: [["...", ArgProp.Value]];
|
|
308
|
+
};
|
|
309
|
+
readonly assumePrimitive: false;
|
|
310
|
+
readonly evalHandler: BuiltInEvalName.StringFn;
|
|
300
311
|
}, {
|
|
301
312
|
readonly type: "function";
|
|
302
313
|
readonly names: Identifier[];
|
|
@@ -513,7 +524,7 @@ export declare const WrittenBuiltinDefinitions: [{
|
|
|
513
524
|
readonly assumePrimitive: true;
|
|
514
525
|
}, {
|
|
515
526
|
readonly type: "function";
|
|
516
|
-
readonly names:
|
|
527
|
+
readonly names: Identifier[];
|
|
517
528
|
readonly processor: BuiltInProcName.DefaultReadAllArgs;
|
|
518
529
|
readonly config: {
|
|
519
530
|
readonly props: number;
|
|
@@ -731,6 +742,16 @@ export declare const WrittenBuiltinDefinitions: [{
|
|
|
731
742
|
readonly props: number;
|
|
732
743
|
};
|
|
733
744
|
readonly assumePrimitive: false;
|
|
745
|
+
}, {
|
|
746
|
+
readonly type: "function";
|
|
747
|
+
readonly names: Identifier[];
|
|
748
|
+
readonly processor: BuiltInProcName.Default;
|
|
749
|
+
readonly config: {
|
|
750
|
+
readonly hasUnknownSideEffects: true;
|
|
751
|
+
readonly forceArgs: "all";
|
|
752
|
+
readonly props: number;
|
|
753
|
+
};
|
|
754
|
+
readonly assumePrimitive: false;
|
|
734
755
|
}, {
|
|
735
756
|
readonly type: "function";
|
|
736
757
|
readonly names: [Identifier, Identifier];
|
|
@@ -955,7 +976,7 @@ export declare const WrittenBuiltinDefinitions: [{
|
|
|
955
976
|
readonly assumePrimitive: true;
|
|
956
977
|
}, {
|
|
957
978
|
readonly type: "function";
|
|
958
|
-
readonly names: [
|
|
979
|
+
readonly names: Identifier[];
|
|
959
980
|
readonly processor: BuiltInProcName.Default;
|
|
960
981
|
readonly config: {
|
|
961
982
|
readonly libFn: true;
|
|
@@ -2270,6 +2291,16 @@ export declare const WrittenBuiltinDefinitions: [{
|
|
|
2270
2291
|
readonly sig: [["path", ArgProp.Resource]];
|
|
2271
2292
|
};
|
|
2272
2293
|
readonly assumePrimitive: false;
|
|
2294
|
+
}, {
|
|
2295
|
+
readonly type: "function";
|
|
2296
|
+
readonly names: [Identifier];
|
|
2297
|
+
readonly processor: BuiltInProcName.Default;
|
|
2298
|
+
readonly config: {
|
|
2299
|
+
readonly forceArgs: "all";
|
|
2300
|
+
readonly props: number;
|
|
2301
|
+
readonly sig: [["paths", ArgProp.Resource]];
|
|
2302
|
+
};
|
|
2303
|
+
readonly assumePrimitive: false;
|
|
2273
2304
|
}, {
|
|
2274
2305
|
readonly type: "function";
|
|
2275
2306
|
readonly names: Identifier[];
|
|
@@ -2336,6 +2367,15 @@ export declare const WrittenBuiltinDefinitions: [{
|
|
|
2336
2367
|
readonly props: CallProp.Ambient;
|
|
2337
2368
|
};
|
|
2338
2369
|
readonly assumePrimitive: false;
|
|
2370
|
+
}, {
|
|
2371
|
+
readonly type: "function";
|
|
2372
|
+
readonly names: [Identifier];
|
|
2373
|
+
readonly processor: BuiltInProcName.Default;
|
|
2374
|
+
readonly config: {
|
|
2375
|
+
readonly forceArgs: "all";
|
|
2376
|
+
readonly props: number;
|
|
2377
|
+
};
|
|
2378
|
+
readonly assumePrimitive: false;
|
|
2339
2379
|
}, {
|
|
2340
2380
|
readonly type: "function";
|
|
2341
2381
|
readonly names: Identifier[];
|
|
@@ -57,7 +57,8 @@ exports.GraphicsPlotCreate = [
|
|
|
57
57
|
exports.PlotCreate = exports.GraphicsPlotCreate.concat(exports.TinyPlotCrate, exports.GgPlotCreate);
|
|
58
58
|
const GraphicDeviceOpen = [
|
|
59
59
|
'pdf', 'jpeg', 'png', 'windows', 'postscript', 'xfig', 'bitmap', 'pictex', 'cairo_pdf', 'svg', 'bmp', 'tiff', 'X11', 'quartz', 'image_graph',
|
|
60
|
-
'image_draw', 'dev.new', 'trellis.device', 'raster_pdf',
|
|
60
|
+
'image_draw', 'dev.new', 'trellis.device', 'raster_pdf',
|
|
61
|
+
'agg_png', 'agg_jpeg', 'agg_tiff', 'agg_ppm', 'agg_webp', 'agg_capture'
|
|
61
62
|
];
|
|
62
63
|
exports.TinyPlotAddons = [
|
|
63
64
|
'tinyplot_add', 'plt_add'
|
|
@@ -212,12 +213,12 @@ exports.WrittenBuiltinDefinitions = [
|
|
|
212
213
|
value: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], assumePrimitive: true },
|
|
213
214
|
{ type: 'constant', names: [identifier_1.Identifier.from(['month.name', "base" /* PkgName.Base */])],
|
|
214
215
|
value: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], assumePrimitive: true },
|
|
215
|
-
/* formula: operands are model terms/columns, not variables
|
|
216
|
+
/* formula: operands are model terms/columns, not variables */
|
|
216
217
|
{
|
|
217
218
|
type: 'function',
|
|
218
219
|
names: [identifier_1.Identifier.from(['~', "base" /* PkgName.Base */])],
|
|
219
220
|
processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs,
|
|
220
|
-
config: {
|
|
221
|
+
config: { markArgsAsMasked: known_call_handling_1.NseArguments.All },
|
|
221
222
|
assumePrimitive: false
|
|
222
223
|
},
|
|
223
224
|
/* cohortBuilder has a `filter` too, and built-ins go by name, so dplyr's entry below wins in the environment
|
|
@@ -229,12 +230,12 @@ exports.WrittenBuiltinDefinitions = [
|
|
|
229
230
|
config: { forceArgs: 'all', libFn: true, props: built_in_props_1.CallProp.Pure },
|
|
230
231
|
assumePrimitive: false
|
|
231
232
|
},
|
|
232
|
-
/* data-masking: the non-data arguments name columns of the (first) data object, not variables
|
|
233
|
+
/* data-masking: the non-data arguments name columns of the (first) data object, not variables */
|
|
233
234
|
{
|
|
234
235
|
type: 'function',
|
|
235
236
|
names: data_masking_functions_1.DataMaskingFunctionIdentifiers,
|
|
236
237
|
processor: built_in_proc_name_1.BuiltInProcName.Default,
|
|
237
|
-
config: {
|
|
238
|
+
config: { markArgsAsMasked: known_call_handling_1.NseArguments.AllButFirst, props: built_in_props_1.CallProp.Pure },
|
|
238
239
|
assumePrimitive: false
|
|
239
240
|
},
|
|
240
241
|
/* slice_sample draws rows at random; registered after the block above, so this definition is the one that sticks */
|
|
@@ -242,7 +243,7 @@ exports.WrittenBuiltinDefinitions = [
|
|
|
242
243
|
type: 'function',
|
|
243
244
|
names: [identifier_1.Identifier.from(['slice_sample', "dplyr" /* PkgName.Dplyr */])],
|
|
244
245
|
processor: built_in_proc_name_1.BuiltInProcName.Default,
|
|
245
|
-
config: {
|
|
246
|
+
config: { markArgsAsMasked: known_call_handling_1.NseArguments.AllButFirst, props: built_in_props_1.CallProp.Random },
|
|
246
247
|
assumePrimitive: false
|
|
247
248
|
},
|
|
248
249
|
/* data-masking without a data argument, e.g. `aes(x, y)` */
|
|
@@ -250,7 +251,7 @@ exports.WrittenBuiltinDefinitions = [
|
|
|
250
251
|
type: 'function',
|
|
251
252
|
names: identifier_1.Identifier.fromAll("ggplot2" /* PkgName.GgPlot2 */, ['aes', 'aes_string', 'vars']),
|
|
252
253
|
processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs,
|
|
253
|
-
config: {
|
|
254
|
+
config: { markArgsAsMasked: known_call_handling_1.NseArguments.All },
|
|
254
255
|
assumePrimitive: false
|
|
255
256
|
},
|
|
256
257
|
/* an {@link BuiltInEvalName} marks what the value solver folds; a test checks the names against the handler tables */
|
|
@@ -286,6 +287,9 @@ exports.WrittenBuiltinDefinitions = [
|
|
|
286
287
|
processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, config: { props: built_in_props_1.CallProp.Pure, sig: [['...', built_in_props_1.ArgProp.Value], ['sep', built_in_props_1.ArgProp.Value]] }, assumePrimitive: true, evalHandler: built_in_eval_name_1.BuiltInEvalName.StringFn },
|
|
287
288
|
{ type: 'function', names: [identifier_1.Identifier.from(['file.path', "base" /* PkgName.Base */])],
|
|
288
289
|
processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, config: { props: built_in_props_1.CallProp.Pure, sig: [['...', built_in_props_1.ArgProp.Value], ['fsep', built_in_props_1.ArgProp.Value]] }, assumePrimitive: true, evalHandler: built_in_eval_name_1.BuiltInEvalName.StringFn },
|
|
290
|
+
/* `here` joins its arguments below the project root, which stays implicit */
|
|
291
|
+
{ type: 'function', names: [identifier_1.Identifier.from(['here', "here" /* PkgName.Here */])],
|
|
292
|
+
processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, config: { libFn: true, props: built_in_props_1.CallProp.Pure, sig: [['...', built_in_props_1.ArgProp.Value]] }, assumePrimitive: false, evalHandler: built_in_eval_name_1.BuiltInEvalName.StringFn },
|
|
289
293
|
/* `x` carries the data, whatever follows only tunes the result */
|
|
290
294
|
{
|
|
291
295
|
type: 'function',
|
|
@@ -377,7 +381,7 @@ exports.WrittenBuiltinDefinitions = [
|
|
|
377
381
|
{ type: 'function', names: identifier_1.Identifier.fromAll("base" /* PkgName.Base */, ['which', 'which.max', 'which.min', 'seq_len', 'seq_along']),
|
|
378
382
|
processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, config: { props: built_in_props_1.CallProp.Pure | built_in_props_1.CallProp.Narrows }, assumePrimitive: true },
|
|
379
383
|
/* they open a device that writes the plot to the file they are given, under the name each of them uses */
|
|
380
|
-
{ type: 'function', names: [...identifier_1.Identifier.fromAll("grDevices" /* PkgName.GrDevices */, ['png', 'jpeg', 'bmp', 'tiff', 'svg', 'cairo_pdf']), identifier_1.Identifier.from(['raster_pdf', "rasterpdf" /* PkgName.RasterPdf */]), identifier_1.Identifier.
|
|
384
|
+
{ type: 'function', names: [...identifier_1.Identifier.fromAll("grDevices" /* PkgName.GrDevices */, ['png', 'jpeg', 'bmp', 'tiff', 'svg', 'cairo_pdf']), identifier_1.Identifier.from(['raster_pdf', "rasterpdf" /* PkgName.RasterPdf */]), ...identifier_1.Identifier.fromAll("ragg" /* PkgName.Ragg */, ['agg_png', 'agg_jpeg', 'agg_tiff', 'agg_ppm', 'agg_webp'])],
|
|
381
385
|
processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs,
|
|
382
386
|
config: { props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Graphics | built_in_props_1.CallProp.File | built_in_props_1.CallProp.Writes, sig: [['filename', built_in_props_1.ArgProp.Resource]] }, assumePrimitive: true },
|
|
383
387
|
{ type: 'function', names: identifier_1.Identifier.fromAll("grDevices" /* PkgName.GrDevices */, ['pdf', 'postscript', 'xfig', 'bitmap', 'pictex']),
|
|
@@ -458,8 +462,12 @@ exports.WrittenBuiltinDefinitions = [
|
|
|
458
462
|
processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, config: { props: built_in_props_1.CallProp.Lang }, assumePrimitive: true },
|
|
459
463
|
{ type: 'function', names: [identifier_1.Identifier.from(['rm', "base" /* PkgName.Base */])],
|
|
460
464
|
processor: built_in_proc_name_1.BuiltInProcName.Rm, config: { props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Scope }, assumePrimitive: true },
|
|
465
|
+
/* they read the state they set, so both bits apply */
|
|
461
466
|
{ type: 'function', names: [identifier_1.Identifier.from(['options', "base" /* PkgName.Base */])],
|
|
462
|
-
processor: built_in_proc_name_1.BuiltInProcName.Default, config: { hasUnknownSideEffects: true, forceArgs: 'all', props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Ambient }, assumePrimitive: false },
|
|
467
|
+
processor: built_in_proc_name_1.BuiltInProcName.Default, config: { hasUnknownSideEffects: true, forceArgs: 'all', props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Ambient | built_in_props_1.CallProp.Configures }, assumePrimitive: false },
|
|
468
|
+
/* `Sys.putenv` is defunct in current R, older scripts still use it */
|
|
469
|
+
{ type: 'function', names: identifier_1.Identifier.fromAll("base" /* PkgName.Base */, ['Sys.setenv', 'Sys.unsetenv', 'Sys.setlocale', 'Sys.putenv', 'Sys.setLanguage']),
|
|
470
|
+
processor: built_in_proc_name_1.BuiltInProcName.Default, config: { hasUnknownSideEffects: true, forceArgs: 'all', props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Configures }, assumePrimitive: false },
|
|
463
471
|
{ type: 'function', names: [identifier_1.Identifier.from(['mapply', "base" /* PkgName.Base */]), identifier_1.Identifier.from(['Mapply', "functools" /* PkgName.Functools */])],
|
|
464
472
|
processor: built_in_proc_name_1.BuiltInProcName.Apply, config: { indexOfFunction: 0, nameOfFunctionArgument: 'FUN', unquoteFunction: true, props: built_in_props_1.CallProp.MayPure, sig: [['FUN', built_in_props_1.ArgProp.Callee]] }, assumePrimitive: false },
|
|
465
473
|
{ type: 'function', names: identifier_1.Identifier.fromAll("base" /* PkgName.Base */, ['lapply', 'sapply', 'vapply']),
|
|
@@ -572,18 +580,18 @@ exports.WrittenBuiltinDefinitions = [
|
|
|
572
580
|
processor: built_in_proc_name_1.BuiltInProcName.Default,
|
|
573
581
|
config: { libFn: true, forceArgs: 'all', hasUnknownSideEffects: LinkToLastPlot, props: built_in_props_1.CallProp.Graphics | built_in_props_1.CallProp.File | built_in_props_1.CallProp.Writes, sig: [['image', built_in_props_1.ArgProp.Value], ['path', built_in_props_1.ArgProp.Resource]] },
|
|
574
582
|
assumePrimitive: true },
|
|
575
|
-
{ type: 'function', names:
|
|
583
|
+
{ type: 'function', names: identifier_1.Identifier.fromAll("grDevices" /* PkgName.GrDevices */, ['dev.off', 'graphics.off']),
|
|
576
584
|
processor: built_in_proc_name_1.BuiltInProcName.Default,
|
|
577
|
-
config: { libFn: true, forceArgs: 'all', hasUnknownSideEffects: LinkToLastPlot, props: built_in_props_1.CallProp.Graphics | built_in_props_1.CallProp.File | built_in_props_1.CallProp.Writes },
|
|
585
|
+
config: { libFn: true, forceArgs: 'all', hasUnknownSideEffects: LinkToLastPlot, props: built_in_props_1.CallProp.Graphics | built_in_props_1.CallProp.Closes | built_in_props_1.CallProp.File | built_in_props_1.CallProp.Writes },
|
|
578
586
|
assumePrimitive: true },
|
|
579
587
|
{ type: 'function', names: ['('],
|
|
580
588
|
processor: built_in_proc_name_1.BuiltInProcName.Default, config: { keepArgumentOut: true, props: built_in_props_1.CallProp.Pure, sig: [['x', built_in_props_1.ArgProp.Alias]] }, assumePrimitive: true, evalHandler: built_in_eval_name_1.BuiltInEvalName.Group },
|
|
581
589
|
{ type: 'function', names: [identifier_1.Identifier.from(['load_all', "pkgload" /* PkgName.PkgLoad */]), identifier_1.Identifier.from(['load_all', "devtools" /* PkgName.Devtools */])],
|
|
582
590
|
processor: built_in_proc_name_1.BuiltInProcName.Default, config: { hasUnknownSideEffects: true, forceArgs: [true], props: built_in_props_1.CallProp.Scope }, assumePrimitive: false },
|
|
583
591
|
{ type: 'function', names: [identifier_1.Identifier.from(['setwd', "base" /* PkgName.Base */])],
|
|
584
|
-
processor: built_in_proc_name_1.BuiltInProcName.Default, config: { hasUnknownSideEffects: true, forceArgs: [true], props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Ambient }, assumePrimitive: false },
|
|
592
|
+
processor: built_in_proc_name_1.BuiltInProcName.Default, config: { hasUnknownSideEffects: true, forceArgs: [true], props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Ambient | built_in_props_1.CallProp.Configures }, assumePrimitive: false },
|
|
585
593
|
{ type: 'function', names: [identifier_1.Identifier.from(['set.seed', "base" /* PkgName.Base */])],
|
|
586
|
-
processor: built_in_proc_name_1.BuiltInProcName.Default, config: { hasUnknownSideEffects: true, forceArgs: [true], props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Random }, assumePrimitive: false },
|
|
594
|
+
processor: built_in_proc_name_1.BuiltInProcName.Default, config: { hasUnknownSideEffects: true, forceArgs: [true], props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Random | built_in_props_1.CallProp.Configures }, assumePrimitive: false },
|
|
587
595
|
{ type: 'function', names: identifier_1.Identifier.fromAll("base" /* PkgName.Base */, ['body', 'formals']),
|
|
588
596
|
processor: built_in_proc_name_1.BuiltInProcName.Default, config: { hasUnknownSideEffects: true, forceArgs: [true], props: built_in_props_1.CallProp.Lang }, assumePrimitive: true },
|
|
589
597
|
{ type: 'function', names: [identifier_1.Identifier.from(['environment', "base" /* PkgName.Base */])],
|
|
@@ -1002,9 +1010,13 @@ exports.WrittenBuiltinDefinitions = [
|
|
|
1002
1010
|
/* `parse(text=)` turns text into an expression, with `file=` it reads that file */
|
|
1003
1011
|
{ type: 'function', names: [identifier_1.Identifier.from(['parse', "base" /* PkgName.Base */])],
|
|
1004
1012
|
processor: built_in_proc_name_1.BuiltInProcName.Default, config: { forceArgs: 'all', props: built_in_props_1.CallProp.Pure }, assumePrimitive: false },
|
|
1005
|
-
|
|
1013
|
+
/* they answer with whatever is on disk when they run */
|
|
1014
|
+
{ type: 'function', names: identifier_1.Identifier.fromAll("base" /* PkgName.Base */, ['list.files', 'dir', 'list.dirs']),
|
|
1006
1015
|
processor: built_in_proc_name_1.BuiltInProcName.Default,
|
|
1007
|
-
config: { forceArgs: 'all', props: built_in_props_1.CallProp.File | built_in_props_1.CallProp.Reads, sig: [['path', built_in_props_1.ArgProp.Resource]] }, assumePrimitive: false },
|
|
1016
|
+
config: { forceArgs: 'all', props: built_in_props_1.CallProp.File | built_in_props_1.CallProp.Reads | built_in_props_1.CallProp.Glob, sig: [['path', built_in_props_1.ArgProp.Resource]] }, assumePrimitive: false },
|
|
1017
|
+
{ type: 'function', names: [identifier_1.Identifier.from(['Sys.glob', "base" /* PkgName.Base */])],
|
|
1018
|
+
processor: built_in_proc_name_1.BuiltInProcName.Default,
|
|
1019
|
+
config: { forceArgs: 'all', props: built_in_props_1.CallProp.File | built_in_props_1.CallProp.Reads | built_in_props_1.CallProp.Glob, sig: [['paths', built_in_props_1.ArgProp.Resource]] }, assumePrimitive: false },
|
|
1008
1020
|
/* language objects */
|
|
1009
1021
|
{
|
|
1010
1022
|
type: 'function',
|
|
@@ -1034,8 +1046,10 @@ exports.WrittenBuiltinDefinitions = [
|
|
|
1034
1046
|
processor: built_in_proc_name_1.BuiltInProcName.Default,
|
|
1035
1047
|
config: { forceArgs: 'all', libFn: true, props: built_in_props_1.CallProp.Ffi | built_in_props_1.CallProp.File | built_in_props_1.CallProp.Reads, sig: [['file', built_in_props_1.ArgProp.Resource]] }, assumePrimitive: false },
|
|
1036
1048
|
/* ambient state: options, environment variables, the clock, the session itself */
|
|
1037
|
-
{ type: 'function', names: identifier_1.Identifier.fromAll("base" /* PkgName.Base */, ['getOption', 'Sys.getenv', 'Sys.info', 'Sys.getpid', 'getwd', 'getRversion', 'R.Version', 'Sys.time', 'Sys.Date', 'Sys.timezone', 'date', 'proc.time']),
|
|
1049
|
+
{ type: 'function', names: identifier_1.Identifier.fromAll("base" /* PkgName.Base */, ['getOption', 'Sys.getenv', 'Sys.info', 'Sys.getpid', 'getwd', 'getRversion', 'R.Version', 'Sys.time', 'Sys.Date', 'Sys.timezone', 'date', 'proc.time', 'interactive']),
|
|
1038
1050
|
processor: built_in_proc_name_1.BuiltInProcName.Default, config: { forceArgs: 'all', props: built_in_props_1.CallProp.Ambient }, assumePrimitive: false },
|
|
1051
|
+
{ type: 'function', names: [identifier_1.Identifier.from(['commandArgs', "base" /* PkgName.Base */])],
|
|
1052
|
+
processor: built_in_proc_name_1.BuiltInProcName.Default, config: { forceArgs: 'all', props: built_in_props_1.CallProp.Ambient | built_in_props_1.CallProp.CommandLine }, assumePrimitive: false },
|
|
1039
1053
|
/* system commands */
|
|
1040
1054
|
{ type: 'function', names: identifier_1.Identifier.fromAll("base" /* PkgName.Base */, ['system', 'system2', 'pipe', 'shell', 'shell.exec']),
|
|
1041
1055
|
processor: built_in_proc_name_1.BuiltInProcName.Default, config: { forceArgs: 'all', props: built_in_props_1.CallProp.Process }, assumePrimitive: false },
|
|
@@ -46,6 +46,8 @@ export declare class Environment implements IEnvironment {
|
|
|
46
46
|
memory: BuiltInMemory;
|
|
47
47
|
cache?: Map<Identifier, IdentifierDefinition[]>;
|
|
48
48
|
builtInEnv?: true;
|
|
49
|
+
/** {@link memory} is shared with a clone; writing needs {@link writableMemory} to unshare it first */
|
|
50
|
+
private sharedMemory?;
|
|
49
51
|
/** marks the global environment (`.GlobalEnv`); attached packages (see {@link EnvType}) live below it */
|
|
50
52
|
globalEnv?: true;
|
|
51
53
|
constructor(parent: Environment, isBuiltInDefault?: true | undefined);
|
|
@@ -57,8 +59,18 @@ export declare class Environment implements IEnvironment {
|
|
|
57
59
|
setClosureNodeId(nodeId: NodeId): void;
|
|
58
60
|
/** Provides the closure linked to this environment. */
|
|
59
61
|
get closure(): NodeId | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* This environment's {@link memory}, ready to be written to. Every in-place write must go through this
|
|
64
|
+
* rather than through {@link memory} directly, as {@link clone} hands the map itself to the clone and only
|
|
65
|
+
* the first writer of either side copies it (copy-on-write).
|
|
66
|
+
*/
|
|
67
|
+
get writableMemory(): BuiltInMemory;
|
|
60
68
|
/**
|
|
61
69
|
* Create a clone of this environment.
|
|
70
|
+
*
|
|
71
|
+
* The clone shares this environment's {@link memory} until either side writes to it (see
|
|
72
|
+
* {@link writableMemory}); cloning a frame is therefore independent of how many definitions it holds, which
|
|
73
|
+
* matters because attached packages contribute frames with thousands of them.
|
|
62
74
|
* @param recurseParents - Whether to also clone parent environments
|
|
63
75
|
*/
|
|
64
76
|
clone(recurseParents: boolean): Environment;
|
|
@@ -102,6 +114,8 @@ export declare class Environment implements IEnvironment {
|
|
|
102
114
|
}
|
|
103
115
|
/** Walks up to the global environment (see {@link Environment#globalEnv}), falling back to the last non-builtin env. */
|
|
104
116
|
declare function findGlobalEnvironment(this: void, env: Environment): Environment;
|
|
117
|
+
/** Walks up to the built-in environment. */
|
|
118
|
+
declare function findBuiltInEnvironment(this: void, env: Environment): Environment;
|
|
105
119
|
/** The `search()` position directly below the global environment; where R attaches by default. */
|
|
106
120
|
export declare const DefaultAttachPosition = 2;
|
|
107
121
|
/** Prefix of a package's entry in R's `search()` list. */
|
|
@@ -133,6 +147,8 @@ export declare const REnvironment: {
|
|
|
133
147
|
readonly name: "REnvironment";
|
|
134
148
|
/** Walks up to the global environment (`.GlobalEnv`); see {@link findGlobalEnvironment}. */
|
|
135
149
|
readonly findGlobal: typeof findGlobalEnvironment;
|
|
150
|
+
/** Walks up to the built-in environment; see {@link findBuiltInEnvironment}. */
|
|
151
|
+
readonly findBuiltIn: typeof findBuiltInEnvironment;
|
|
136
152
|
/** Attaches a package block at a `search()` position, below the global by default; see {@link attachPackageAt}. */
|
|
137
153
|
readonly attachAt: typeof attachPackageAt;
|
|
138
154
|
/** The `search()` position of a named entry; see {@link searchPositionOf}. */
|