@eagleoutice/flowr 2.8.6 → 2.8.7
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 +13 -13
- package/abstract-interpretation/absint-visitor.d.ts +20 -68
- package/abstract-interpretation/absint-visitor.js +44 -54
- package/abstract-interpretation/data-frame/dataframe-domain.d.ts +0 -9
- package/abstract-interpretation/data-frame/dataframe-domain.js +1 -14
- package/abstract-interpretation/data-frame/mappers/function-mapper.js +1 -1
- package/abstract-interpretation/data-frame/mappers/replacement-mapper.d.ts +2 -0
- package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +5 -2
- package/abstract-interpretation/data-frame/shape-inference.d.ts +15 -7
- package/abstract-interpretation/data-frame/shape-inference.js +20 -17
- package/abstract-interpretation/domains/abstract-domain.d.ts +1 -1
- package/abstract-interpretation/domains/abstract-domain.js +1 -2
- package/abstract-interpretation/domains/product-domain.d.ts +1 -1
- package/abstract-interpretation/domains/product-domain.js +1 -1
- package/abstract-interpretation/domains/set-range-domain.d.ts +1 -1
- package/abstract-interpretation/domains/set-range-domain.js +1 -1
- package/abstract-interpretation/domains/state-abstract-domain.d.ts +3 -1
- package/abstract-interpretation/domains/state-abstract-domain.js +6 -0
- package/abstract-interpretation/normalized-ast-fold.d.ts +2 -1
- package/abstract-interpretation/normalized-ast-fold.js +8 -1
- package/cli/repl/commands/repl-query.js +7 -9
- package/cli/wiki.d.ts +2 -1
- package/cli/wiki.js +2 -0
- package/control-flow/cfg-dead-code.js +3 -0
- package/control-flow/extract-cfg.js +27 -7
- package/control-flow/semantic-cfg-guided-visitor.d.ts +57 -4
- package/control-flow/semantic-cfg-guided-visitor.js +89 -28
- package/control-flow/useless-loop.d.ts +2 -1
- package/control-flow/useless-loop.js +13 -6
- package/dataflow/environments/built-in-config.d.ts +6 -5
- package/dataflow/environments/built-in.d.ts +107 -34
- package/dataflow/environments/built-in.js +115 -39
- package/dataflow/environments/default-builtin-config.d.ts +113 -67
- package/dataflow/environments/default-builtin-config.js +71 -66
- package/dataflow/environments/diff.js +2 -2
- package/dataflow/environments/environment.js +7 -7
- package/dataflow/environments/identifier.d.ts +4 -2
- package/dataflow/environments/identifier.js +2 -0
- package/dataflow/environments/reference-to-maybe.d.ts +2 -2
- package/dataflow/environments/reference-to-maybe.js +11 -11
- package/dataflow/environments/resolve-by-name.js +17 -6
- package/dataflow/eval/resolve/alias-tracking.js +1 -1
- package/dataflow/eval/resolve/resolve.js +6 -6
- package/dataflow/eval/values/intervals/interval-constants.js +3 -3
- package/dataflow/eval/values/scalar/{scalar-consatnts.d.ts → scalar-constants.d.ts} +2 -2
- package/dataflow/eval/values/scalar/{scalar-consatnts.js → scalar-constants.js} +3 -3
- package/dataflow/eval/values/sets/set-constants.d.ts +4 -2
- package/dataflow/eval/values/sets/set-constants.js +4 -2
- package/dataflow/extractor.js +1 -1
- package/dataflow/fn/exceptions-of-function.d.ts +1 -1
- package/dataflow/fn/exceptions-of-function.js +3 -3
- package/dataflow/graph/call-graph.js +2 -2
- package/dataflow/graph/dataflowgraph-builder.d.ts +4 -4
- package/dataflow/graph/dataflowgraph-builder.js +14 -14
- package/dataflow/graph/diff-dataflow-graph.js +3 -3
- package/dataflow/graph/graph.d.ts +1 -1
- package/dataflow/graph/graph.js +4 -4
- package/dataflow/graph/vertex.d.ts +3 -3
- package/dataflow/info.d.ts +3 -3
- package/dataflow/info.js +11 -11
- package/dataflow/internal/linker.d.ts +9 -0
- package/dataflow/internal/linker.js +33 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-access.js +16 -12
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +11 -10
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +20 -17
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +4 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +9 -9
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.d.ts +5 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +11 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +0 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +39 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-get.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.d.ts +12 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +36 -12
- package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +3 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-list.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-local.d.ts +18 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-local.js +67 -0
- 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 +11 -10
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +3 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.js +5 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +3 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.d.ts +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +7 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +3 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.d.ts +18 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +103 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +8 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +4 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-stop-if-not.js +13 -12
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +6 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-vector.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +7 -6
- package/dataflow/internal/process/functions/call/common.js +7 -7
- package/dataflow/internal/process/functions/call/known-call-handling.js +7 -8
- package/dataflow/internal/process/functions/call/unnamed-call-handling.d.ts +1 -2
- package/dataflow/internal/process/functions/call/unnamed-call-handling.js +6 -6
- package/dataflow/internal/process/functions/process-argument.js +2 -2
- package/dataflow/internal/process/functions/process-parameter.js +3 -3
- package/dataflow/internal/process/process-symbol.js +3 -3
- package/dataflow/internal/process/process-uninteresting-leaf.d.ts +3 -1
- package/dataflow/internal/process/process-uninteresting-leaf.js +3 -1
- package/dataflow/internal/process/process-value.d.ts +1 -1
- package/dataflow/internal/process/process-value.js +4 -4
- package/dataflow/origin/dfg-get-symbol-refs.js +1 -1
- package/dataflow/processor.d.ts +1 -1
- package/documentation/doc-util/doc-structure.js +1 -1
- package/documentation/doc-util/doc-types.d.ts +10 -3
- package/documentation/doc-util/doc-types.js +110 -33
- package/documentation/wiki-absint.d.ts +6 -0
- package/documentation/wiki-absint.js +149 -0
- package/documentation/wiki-dataflow-graph.js +11 -10
- package/documentation/wiki-interface.js +2 -1
- package/documentation/wiki-mk/doc-context.d.ts +3 -3
- package/documentation/wiki-mk/doc-context.js +2 -2
- package/documentation/wiki-mk/doc-maker.js +2 -2
- package/documentation/wiki-normalized-ast.d.ts +9 -0
- package/documentation/wiki-normalized-ast.js +40 -52
- package/linter/linter-rules.d.ts +1 -1
- package/linter/rules/seeded-randomness.js +5 -4
- package/linter/rules/useless-loop.d.ts +3 -3
- package/package.json +1 -1
- package/queries/catalog/control-flow-query/control-flow-query-executor.d.ts +1 -1
- package/queries/catalog/control-flow-query/control-flow-query-executor.js +1 -1
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +4 -0
- package/queries/catalog/dependencies-query/dependencies-query-format.js +5 -0
- package/queries/catalog/dependencies-query/function-info/test-functions.d.ts +2 -0
- package/queries/catalog/dependencies-query/function-info/test-functions.js +82 -0
- package/queries/catalog/df-shape-query/df-shape-query-format.d.ts +3 -2
- package/queries/catalog/df-shape-query/df-shape-query-format.js +3 -3
- package/queries/catalog/normalized-ast-query/normalized-ast-query-executor.d.ts +1 -1
- package/queries/catalog/normalized-ast-query/normalized-ast-query-executor.js +1 -1
- package/r-bridge/data/data.d.ts +6 -1
- package/r-bridge/data/data.js +8 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +7 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.js +19 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-project.d.ts +4 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-project.js +7 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +3 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.js +2 -1
- package/r-bridge/lang-4.x/convert-values.d.ts +5 -0
- package/search/flowr-search-filters.d.ts +2 -2
- package/slicing/static/static-slicer.js +2 -2
- package/util/mermaid/cfg.d.ts +10 -3
- package/util/mermaid/cfg.js +39 -10
- package/util/mermaid/dfg.js +5 -5
- package/util/simple-df/dfg-view.js +1 -1
- package/util/text/ansi.d.ts +4 -0
- package/util/text/ansi.js +7 -0
- package/util/version.js +1 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.loopyFunctions = void 0;
|
|
4
4
|
exports.onlyLoopsOnce = onlyLoopsOnce;
|
|
5
|
+
const built_in_1 = require("../dataflow/environments/built-in");
|
|
5
6
|
const alias_tracking_1 = require("../dataflow/eval/resolve/alias-tracking");
|
|
6
7
|
const general_1 = require("../dataflow/eval/values/general");
|
|
7
8
|
const r_value_1 = require("../dataflow/eval/values/r-value");
|
|
@@ -10,7 +11,7 @@ const info_1 = require("../dataflow/info");
|
|
|
10
11
|
const r_function_call_1 = require("../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
|
|
11
12
|
const assert_1 = require("../util/assert");
|
|
12
13
|
const semantic_cfg_guided_visitor_1 = require("./semantic-cfg-guided-visitor");
|
|
13
|
-
exports.loopyFunctions = new Set([
|
|
14
|
+
exports.loopyFunctions = new Set([built_in_1.BuiltInProcName.ForLoop, built_in_1.BuiltInProcName.WhileLoop, built_in_1.BuiltInProcName.RepeatLoop]);
|
|
14
15
|
/**
|
|
15
16
|
* Checks whether a loop only loops once
|
|
16
17
|
* @param loop - nodeid of the loop to analyse
|
|
@@ -42,7 +43,7 @@ function onlyLoopsOnce(loop, dataflow, controlflow, ast, ctx) {
|
|
|
42
43
|
resolve: ctx.config.solver.variables,
|
|
43
44
|
ctx: ctx
|
|
44
45
|
}));
|
|
45
|
-
if (values
|
|
46
|
+
if (values?.elements.length !== 1 || values.elements[0].type !== 'vector' || !(0, r_value_1.isValue)(values.elements[0].elements)) {
|
|
46
47
|
return undefined;
|
|
47
48
|
}
|
|
48
49
|
if (values.elements[0].elements.length === 1) {
|
|
@@ -79,7 +80,7 @@ class CfgSingleIterationLoopDetector extends semantic_cfg_guided_visitor_1.Seman
|
|
|
79
80
|
resolve: this.config.ctx.config.solver.variables,
|
|
80
81
|
ctx: this.config.ctx
|
|
81
82
|
}));
|
|
82
|
-
if (values
|
|
83
|
+
if (values?.elements.length !== 1 || values.elements[0].type != 'logical' || !(0, r_value_1.isValue)(values.elements[0].value)) {
|
|
83
84
|
return undefined;
|
|
84
85
|
}
|
|
85
86
|
return Boolean(values.elements[0].value);
|
|
@@ -119,23 +120,29 @@ class CfgSingleIterationLoopDetector extends semantic_cfg_guided_visitor_1.Seman
|
|
|
119
120
|
}
|
|
120
121
|
}
|
|
121
122
|
}
|
|
122
|
-
|
|
123
|
+
handleFunctionCall(data) {
|
|
123
124
|
for (const origin of data.call.origin) {
|
|
124
125
|
if (origin === 'builtin:stop' || origin === 'builtin:return' || origin === 'builtin:break') {
|
|
125
126
|
this.encounteredLoopBreaker = true;
|
|
126
|
-
this.app(data.call.
|
|
127
|
+
this.app(data.call.cds);
|
|
127
128
|
return;
|
|
128
129
|
}
|
|
129
130
|
else if (origin === 'builtin:stopifnot') {
|
|
130
131
|
const arg = this.getBoolArgValue(data);
|
|
131
132
|
if (arg === false) {
|
|
132
133
|
this.encounteredLoopBreaker = true;
|
|
133
|
-
this.app(data.call.
|
|
134
|
+
this.app(data.call.cds);
|
|
134
135
|
return;
|
|
135
136
|
}
|
|
136
137
|
}
|
|
137
138
|
}
|
|
138
139
|
}
|
|
140
|
+
onDefaultFunctionCall(data) {
|
|
141
|
+
this.handleFunctionCall(data);
|
|
142
|
+
}
|
|
143
|
+
onStopIfNotCall(data) {
|
|
144
|
+
this.handleFunctionCall(data);
|
|
145
|
+
}
|
|
139
146
|
loopsOnlyOnce() {
|
|
140
147
|
this.startVisitor([]);
|
|
141
148
|
return this.onlyLoopyOnce;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { BuiltInProcessorMapper, ConfigOfBuiltInMappingName } from './built-in';
|
|
2
|
+
import { BuiltIns } from './built-in';
|
|
2
3
|
import type { Identifier } from './identifier';
|
|
3
4
|
export interface BaseBuiltInDefinition {
|
|
4
5
|
/** The type of the built-in configuration */
|
|
@@ -21,7 +22,7 @@ export interface BuiltInConstantDefinition<Value> extends BaseBuiltInDefinition
|
|
|
21
22
|
* Define a built-in function (like `print` or `c`) and the processor to use.
|
|
22
23
|
* @template BuiltInProcessor - The processor to use for this function
|
|
23
24
|
*/
|
|
24
|
-
export interface BuiltInFunctionDefinition<BuiltInProcessor extends
|
|
25
|
+
export interface BuiltInFunctionDefinition<BuiltInProcessor extends keyof typeof BuiltInProcessorMapper> extends BaseBuiltInDefinition {
|
|
25
26
|
readonly type: 'function';
|
|
26
27
|
readonly processor: BuiltInProcessor;
|
|
27
28
|
readonly config?: ConfigOfBuiltInMappingName<BuiltInProcessor> & {
|
|
@@ -40,11 +41,11 @@ export interface BuiltInReplacementDefinition extends BaseBuiltInDefinition {
|
|
|
40
41
|
readIndices: boolean;
|
|
41
42
|
};
|
|
42
43
|
}
|
|
43
|
-
export type BuiltInDefinition<T extends
|
|
44
|
+
export type BuiltInDefinition<T extends keyof typeof BuiltInProcessorMapper = keyof typeof BuiltInProcessorMapper> = BuiltInConstantDefinition<unknown> | BuiltInFunctionDefinition<T> | BuiltInReplacementDefinition;
|
|
44
45
|
/**
|
|
45
46
|
* @see DefaultBuiltinConfig
|
|
46
47
|
*/
|
|
47
|
-
export type BuiltInDefinitions<Keys extends
|
|
48
|
+
export type BuiltInDefinitions<Keys extends (keyof typeof BuiltInProcessorMapper)[] = (keyof typeof BuiltInProcessorMapper)[]> = [...{
|
|
48
49
|
[K in keyof Keys]: BuiltInDefinition<Keys[K]>;
|
|
49
50
|
}];
|
|
50
51
|
/**
|
|
@@ -56,4 +57,4 @@ export declare function getDefaultBuiltInDefinitions(): BuiltIns;
|
|
|
56
57
|
* @param definitions - the list of built-in definitions
|
|
57
58
|
* @param loadDefaults - whether to first add the {@link DefaultBuiltinConfig} before the given {@link definitions}
|
|
58
59
|
*/
|
|
59
|
-
export declare function getBuiltInDefinitions<Keys extends
|
|
60
|
+
export declare function getBuiltInDefinitions<Keys extends (keyof typeof BuiltInProcessorMapper)[]>(definitions: BuiltInDefinitions<Keys>, loadDefaults: boolean | undefined): BuiltIns;
|
|
@@ -37,6 +37,8 @@ import type { ReadOnlyFlowrAnalyzerContext } from '../../project/context/flowr-a
|
|
|
37
37
|
import { processStopIfNot } from '../internal/process/functions/call/built-in/built-in-stop-if-not';
|
|
38
38
|
import { processTryCatch } from '../internal/process/functions/call/built-in/built-in-try-catch';
|
|
39
39
|
import { processRegisterHook } from '../internal/process/functions/call/built-in/built-in-register-hook';
|
|
40
|
+
import { processLocal } from '../internal/process/functions/call/built-in/built-in-local';
|
|
41
|
+
import { processS3Dispatch } from '../internal/process/functions/call/built-in/built-in-s-three-dispatch';
|
|
40
42
|
export type BuiltIn = `built-in:${string}`;
|
|
41
43
|
/**
|
|
42
44
|
* Generate a built-in id for the given name
|
|
@@ -56,7 +58,7 @@ export interface BuiltInIdentifierDefinition extends IdentifierReference {
|
|
|
56
58
|
type: ReferenceType.BuiltInFunction;
|
|
57
59
|
definedAt: BuiltIn;
|
|
58
60
|
processor: BuiltInIdentifierProcessor;
|
|
59
|
-
config?: ConfigOfBuiltInMappingName<
|
|
61
|
+
config?: ConfigOfBuiltInMappingName<keyof typeof BuiltInProcessorMapper> & {
|
|
60
62
|
libFn?: boolean;
|
|
61
63
|
};
|
|
62
64
|
}
|
|
@@ -65,7 +67,6 @@ export interface BuiltInIdentifierConstant<T = unknown> extends IdentifierRefere
|
|
|
65
67
|
definedAt: BuiltIn;
|
|
66
68
|
value: T;
|
|
67
69
|
}
|
|
68
|
-
export type UseAsProcessors = 'builtin:default' | 'builtin:return' | 'builtin:stop';
|
|
69
70
|
export interface DefaultBuiltInProcessorConfiguration extends ForceArguments {
|
|
70
71
|
readonly returnsNthArgument?: number | 'last';
|
|
71
72
|
readonly cfg?: ExitPointType;
|
|
@@ -77,36 +78,109 @@ export interface DefaultBuiltInProcessorConfiguration extends ForceArguments {
|
|
|
77
78
|
* Name that should be used for the origin (useful when needing to differentiate between
|
|
78
79
|
* functions like 'return' that use the default builtin processor)
|
|
79
80
|
*/
|
|
80
|
-
readonly useAsProcessor?:
|
|
81
|
+
readonly useAsProcessor?: BuiltInProcName;
|
|
81
82
|
}
|
|
82
83
|
export type BuiltInEvalHandler = (resolve: VariableResolve, a: RNodeWithParent, ctx: ReadOnlyFlowrAnalyzerContext, env?: REnvironmentInformation, graph?: DataflowGraph, map?: AstIdMap) => Value;
|
|
83
84
|
declare function defaultBuiltInProcessor<OtherInfo>(name: RSymbol<OtherInfo & ParentInformation>, args: readonly RFunctionArgument<OtherInfo & ParentInformation>[], rootId: NodeId, data: DataflowProcessorInformation<OtherInfo & ParentInformation>, { returnsNthArgument, useAsProcessor, forceArgs, readAllArguments, cfg, hasUnknownSideEffects, treatAsFnCall }: DefaultBuiltInProcessorConfiguration): DataflowInformation;
|
|
85
|
+
/**
|
|
86
|
+
* This contains all names of built-in function handlers and origins
|
|
87
|
+
*/
|
|
88
|
+
export declare enum BuiltInProcName {
|
|
89
|
+
/** for subsetting operations, see {@link processAccess} */
|
|
90
|
+
Access = "builtin:access",
|
|
91
|
+
/** for the `*apply` family, see {@link processApply} */
|
|
92
|
+
Apply = "builtin:apply",
|
|
93
|
+
/** for assignments like `<-` and `=`, see {@link processAssignment} */
|
|
94
|
+
Assignment = "builtin:assignment",
|
|
95
|
+
/** for assignment like functions that may do additional work, see {@link processAssignmentLike} */
|
|
96
|
+
AssignmentLike = "builtin:assignment-like",
|
|
97
|
+
/** for `break` calls */
|
|
98
|
+
Break = "builtin:break",
|
|
99
|
+
/** the default built-in processor, see {@link defaultBuiltInProcessor} */
|
|
100
|
+
Default = "builtin:default",
|
|
101
|
+
/** for `eval` calls, see {@link processEvalCall} */
|
|
102
|
+
Eval = "builtin:eval",
|
|
103
|
+
/** for expression lists, see {@link processExpressionList} */
|
|
104
|
+
ExpressionList = "builtin:expression-list",
|
|
105
|
+
/** for `for` loops, see {@link processForLoop} */
|
|
106
|
+
ForLoop = "builtin:for-loop",
|
|
107
|
+
/** We resolved a function call, similar to {@link BuiltInProcName#Default} */
|
|
108
|
+
Function = "function",
|
|
109
|
+
/** for function definitions, see {@link processFunctionDefinition} */
|
|
110
|
+
FunctionDefinition = "builtin:function-definition",
|
|
111
|
+
/** for `get` calls, see {@link processGet} */
|
|
112
|
+
Get = "builtin:get",
|
|
113
|
+
/** for `if-then-else` constructs, see {@link processIfThenElse} */
|
|
114
|
+
IfThenElse = "builtin:if-then-else",
|
|
115
|
+
/** for `library` and `require` calls, see {@link processLibrary} */
|
|
116
|
+
Library = "builtin:library",
|
|
117
|
+
/** for `list` calls, see {@link processList} */
|
|
118
|
+
List = "builtin:list",
|
|
119
|
+
/** for `local` calls, see {@link processLocal} */
|
|
120
|
+
Local = "builtin:local",
|
|
121
|
+
/** for the pipe operators, see {@link processPipe} */
|
|
122
|
+
Pipe = "builtin:pipe",
|
|
123
|
+
/** for `quote`, and other substituting calls, see {@link processQuote} */
|
|
124
|
+
Quote = "builtin:quote",
|
|
125
|
+
/** for `on.exìt` and other hooks, see {@link processRegisterHook} */
|
|
126
|
+
RegisterHook = "builtin:register-hook",
|
|
127
|
+
/** for `repeat` loops, see {@link processRepeatLoop} */
|
|
128
|
+
RepeatLoop = "builtin:repeat-loop",
|
|
129
|
+
/** for replacement functions like `names<-`, see {@link processReplacementFunction} */
|
|
130
|
+
Replacement = "builtin:replacement",
|
|
131
|
+
/** for `return` calls */
|
|
132
|
+
Return = "builtin:return",
|
|
133
|
+
/** for `rm` calls, see {@link processRm} */
|
|
134
|
+
Rm = "builtin:rm",
|
|
135
|
+
/** for `UseMethod` calls, see {@link processS3Dispatch} */
|
|
136
|
+
S3Dispatch = "builtin:s3-dispatch",
|
|
137
|
+
/** for `source` calls, see {@link processSourceCall} */
|
|
138
|
+
Source = "builtin:source",
|
|
139
|
+
/** for special binary operators like `%x%`, see {@link processSpecialBinOp} */
|
|
140
|
+
SpecialBinOp = "builtin:special-bin-op",
|
|
141
|
+
/** for `stop` calls */
|
|
142
|
+
Stop = "builtin:stop",
|
|
143
|
+
/** for `stopifnot` calls, see {@link processStopIfNot} */
|
|
144
|
+
StopIfNot = "builtin:stopifnot",
|
|
145
|
+
/** support for `:=` in subsetting assignments, see {@link processAccess} */
|
|
146
|
+
TableAssignment = "table:assign",
|
|
147
|
+
/** for `try` calls, see {@link processTryCatch} */
|
|
148
|
+
Try = "builtin:try",
|
|
149
|
+
/** for unnamed directly-linked function calls */
|
|
150
|
+
Unnamed = "unnamed",
|
|
151
|
+
/** for vector construction calls, see {@link processVector} */
|
|
152
|
+
Vector = "builtin:vector",
|
|
153
|
+
/** for `while` loops, see {@link processWhileLoop} */
|
|
154
|
+
WhileLoop = "builtin:while-loop"
|
|
155
|
+
}
|
|
84
156
|
export declare const BuiltInProcessorMapper: {
|
|
85
|
-
readonly
|
|
86
|
-
readonly
|
|
87
|
-
readonly
|
|
88
|
-
readonly
|
|
89
|
-
readonly
|
|
90
|
-
readonly
|
|
91
|
-
readonly
|
|
92
|
-
readonly
|
|
93
|
-
readonly
|
|
94
|
-
readonly
|
|
95
|
-
readonly
|
|
96
|
-
readonly
|
|
97
|
-
readonly
|
|
98
|
-
readonly
|
|
99
|
-
readonly
|
|
100
|
-
readonly
|
|
101
|
-
readonly
|
|
102
|
-
readonly
|
|
103
|
-
readonly
|
|
104
|
-
readonly
|
|
105
|
-
readonly
|
|
106
|
-
readonly
|
|
107
|
-
readonly
|
|
108
|
-
readonly
|
|
109
|
-
readonly
|
|
157
|
+
readonly "builtin:access": typeof processAccess;
|
|
158
|
+
readonly "builtin:apply": typeof processApply;
|
|
159
|
+
readonly "builtin:assignment": typeof processAssignment;
|
|
160
|
+
readonly "builtin:assignment-like": typeof processAssignmentLike;
|
|
161
|
+
readonly "builtin:default": typeof defaultBuiltInProcessor;
|
|
162
|
+
readonly "builtin:eval": typeof processEvalCall;
|
|
163
|
+
readonly "builtin:expression-list": typeof processExpressionList;
|
|
164
|
+
readonly "builtin:for-loop": typeof processForLoop;
|
|
165
|
+
readonly "builtin:function-definition": typeof processFunctionDefinition;
|
|
166
|
+
readonly "builtin:get": typeof processGet;
|
|
167
|
+
readonly "builtin:if-then-else": typeof processIfThenElse;
|
|
168
|
+
readonly "builtin:library": typeof processLibrary;
|
|
169
|
+
readonly "builtin:list": typeof processList;
|
|
170
|
+
readonly "builtin:local": typeof processLocal;
|
|
171
|
+
readonly "builtin:pipe": typeof processPipe;
|
|
172
|
+
readonly "builtin:quote": typeof processQuote;
|
|
173
|
+
readonly "builtin:register-hook": typeof processRegisterHook;
|
|
174
|
+
readonly "builtin:repeat-loop": typeof processRepeatLoop;
|
|
175
|
+
readonly "builtin:replacement": typeof processReplacementFunction;
|
|
176
|
+
readonly "builtin:rm": typeof processRm;
|
|
177
|
+
readonly "builtin:s3-dispatch": typeof processS3Dispatch;
|
|
178
|
+
readonly "builtin:source": typeof processSourceCall;
|
|
179
|
+
readonly "builtin:special-bin-op": typeof processSpecialBinOp;
|
|
180
|
+
readonly "builtin:stopifnot": typeof processStopIfNot;
|
|
181
|
+
readonly "builtin:try": typeof processTryCatch;
|
|
182
|
+
readonly "builtin:vector": typeof processVector;
|
|
183
|
+
readonly "builtin:while-loop": typeof processWhileLoop;
|
|
110
184
|
};
|
|
111
185
|
export declare const BuiltInEvalHandlerMapper: {
|
|
112
186
|
readonly 'built-in:c': typeof resolveAsVector;
|
|
@@ -114,24 +188,23 @@ export declare const BuiltInEvalHandlerMapper: {
|
|
|
114
188
|
readonly 'built-in:+': typeof resolveAsPlus;
|
|
115
189
|
readonly 'built-in:-': typeof resolveAsMinus;
|
|
116
190
|
};
|
|
117
|
-
export type
|
|
118
|
-
export type ConfigOfBuiltInMappingName<N extends BuiltInMappingName> = Parameters<typeof BuiltInProcessorMapper[N]>[4];
|
|
191
|
+
export type ConfigOfBuiltInMappingName<N extends keyof typeof BuiltInProcessorMapper> = Parameters<typeof BuiltInProcessorMapper[N]>[4];
|
|
119
192
|
export type BuiltInMemory = Map<Identifier, IdentifierDefinition[]>;
|
|
120
193
|
export declare class BuiltIns {
|
|
121
194
|
/**
|
|
122
|
-
* Register a built-in constant (like `NULL` or `TRUE`) to the given {@link
|
|
195
|
+
* Register a built-in constant (like `NULL` or `TRUE`) to the given {@link BuiltIns}
|
|
123
196
|
*/
|
|
124
197
|
registerBuiltInConstant<T>({ names, value, assumePrimitive }: BuiltInConstantDefinition<T>): void;
|
|
125
198
|
/**
|
|
126
|
-
* Register a built-in function (like `print` or `c`) to the given {@link
|
|
199
|
+
* Register a built-in function (like `print` or `c`) to the given {@link BuiltIns}
|
|
127
200
|
*/
|
|
128
|
-
registerBuiltInFunctions<BuiltInProcessor extends
|
|
201
|
+
registerBuiltInFunctions<BuiltInProcessor extends keyof typeof BuiltInProcessorMapper>({ names, processor, config, assumePrimitive }: BuiltInFunctionDefinition<BuiltInProcessor>): void;
|
|
129
202
|
/**
|
|
130
203
|
* Registers all combinations of replacements
|
|
131
204
|
*/
|
|
132
205
|
registerReplacementFunctions({ names, suffixes, assumePrimitive, config }: BuiltInReplacementDefinition): void;
|
|
133
206
|
/**
|
|
134
|
-
* Register a single {@link BuiltInDefinition} to the given memories in {@link
|
|
207
|
+
* Register a single {@link BuiltInDefinition} to the given memories in {@link BuiltIns}
|
|
135
208
|
*/
|
|
136
209
|
registerBuiltInDefinition(definition: BuiltInDefinition): void;
|
|
137
210
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BuiltIns = exports.BuiltInEvalHandlerMapper = exports.BuiltInProcessorMapper = void 0;
|
|
3
|
+
exports.BuiltIns = exports.BuiltInEvalHandlerMapper = exports.BuiltInProcessorMapper = exports.BuiltInProcName = void 0;
|
|
4
4
|
exports.builtInId = builtInId;
|
|
5
5
|
exports.isBuiltIn = isBuiltIn;
|
|
6
6
|
exports.dropBuiltInPrefix = dropBuiltInPrefix;
|
|
@@ -36,6 +36,8 @@ const resolve_1 = require("../eval/resolve/resolve");
|
|
|
36
36
|
const built_in_stop_if_not_1 = require("../internal/process/functions/call/built-in/built-in-stop-if-not");
|
|
37
37
|
const built_in_try_catch_1 = require("../internal/process/functions/call/built-in/built-in-try-catch");
|
|
38
38
|
const built_in_register_hook_1 = require("../internal/process/functions/call/built-in/built-in-register-hook");
|
|
39
|
+
const built_in_local_1 = require("../internal/process/functions/call/built-in/built-in-local");
|
|
40
|
+
const built_in_s_three_dispatch_1 = require("../internal/process/functions/call/built-in/built-in-s-three-dispatch");
|
|
39
41
|
/**
|
|
40
42
|
* Generate a built-in id for the given name
|
|
41
43
|
*/
|
|
@@ -56,7 +58,7 @@ function dropBuiltInPrefix(name) {
|
|
|
56
58
|
return name.slice(builtInPrefixLength);
|
|
57
59
|
}
|
|
58
60
|
function defaultBuiltInProcessor(name, args, rootId, data, { returnsNthArgument, useAsProcessor, forceArgs, readAllArguments, cfg, hasUnknownSideEffects, treatAsFnCall }) {
|
|
59
|
-
const activeProcessor = useAsProcessor ??
|
|
61
|
+
const activeProcessor = useAsProcessor ?? BuiltInProcName.Default;
|
|
60
62
|
const { information: res, processedArguments } = (0, known_call_handling_1.processKnownFunctionCall)({ name, args, rootId, data, forceArgs, origin: activeProcessor });
|
|
61
63
|
if (returnsNthArgument !== undefined) {
|
|
62
64
|
const arg = returnsNthArgument === 'last' ? processedArguments[args.length - 1] : processedArguments[returnsNthArgument];
|
|
@@ -72,11 +74,11 @@ function defaultBuiltInProcessor(name, args, rootId, data, { returnsNthArgument,
|
|
|
72
74
|
}
|
|
73
75
|
}
|
|
74
76
|
if (hasUnknownSideEffects) {
|
|
75
|
-
if (typeof hasUnknownSideEffects
|
|
76
|
-
(0, unknown_side_effect_1.handleUnknownSideEffect)(res.graph, res.environment, rootId
|
|
77
|
+
if (typeof hasUnknownSideEffects === 'boolean') {
|
|
78
|
+
(0, unknown_side_effect_1.handleUnknownSideEffect)(res.graph, res.environment, rootId);
|
|
77
79
|
}
|
|
78
80
|
else {
|
|
79
|
-
(0, unknown_side_effect_1.handleUnknownSideEffect)(res.graph, res.environment, rootId);
|
|
81
|
+
(0, unknown_side_effect_1.handleUnknownSideEffect)(res.graph, res.environment, rootId, hasUnknownSideEffects);
|
|
80
82
|
}
|
|
81
83
|
}
|
|
82
84
|
const fnCallNames = treatAsFnCall?.[name.content];
|
|
@@ -104,43 +106,117 @@ function defaultBuiltInProcessor(name, args, rootId, data, { returnsNthArgument,
|
|
|
104
106
|
args: [],
|
|
105
107
|
environment: data.environment,
|
|
106
108
|
onlyBuiltin: false,
|
|
107
|
-
|
|
109
|
+
cds: data.cds,
|
|
108
110
|
origin: [activeProcessor]
|
|
109
111
|
});
|
|
110
112
|
}
|
|
111
113
|
}
|
|
112
114
|
}
|
|
113
115
|
if (cfg !== undefined) {
|
|
114
|
-
res.exitPoints.push({ type: cfg, nodeId: rootId,
|
|
116
|
+
res.exitPoints.push({ type: cfg, nodeId: rootId, cds: data.cds });
|
|
115
117
|
}
|
|
116
118
|
return res;
|
|
117
119
|
}
|
|
120
|
+
/**
|
|
121
|
+
* This contains all names of built-in function handlers and origins
|
|
122
|
+
*/
|
|
123
|
+
var BuiltInProcName;
|
|
124
|
+
(function (BuiltInProcName) {
|
|
125
|
+
/** for subsetting operations, see {@link processAccess} */
|
|
126
|
+
BuiltInProcName["Access"] = "builtin:access";
|
|
127
|
+
/** for the `*apply` family, see {@link processApply} */
|
|
128
|
+
BuiltInProcName["Apply"] = "builtin:apply";
|
|
129
|
+
/** for assignments like `<-` and `=`, see {@link processAssignment} */
|
|
130
|
+
BuiltInProcName["Assignment"] = "builtin:assignment";
|
|
131
|
+
/** for assignment like functions that may do additional work, see {@link processAssignmentLike} */
|
|
132
|
+
BuiltInProcName["AssignmentLike"] = "builtin:assignment-like";
|
|
133
|
+
/** for `break` calls */
|
|
134
|
+
BuiltInProcName["Break"] = "builtin:break";
|
|
135
|
+
/** the default built-in processor, see {@link defaultBuiltInProcessor} */
|
|
136
|
+
BuiltInProcName["Default"] = "builtin:default";
|
|
137
|
+
/** for `eval` calls, see {@link processEvalCall} */
|
|
138
|
+
BuiltInProcName["Eval"] = "builtin:eval";
|
|
139
|
+
/** for expression lists, see {@link processExpressionList} */
|
|
140
|
+
BuiltInProcName["ExpressionList"] = "builtin:expression-list";
|
|
141
|
+
/** for `for` loops, see {@link processForLoop} */
|
|
142
|
+
BuiltInProcName["ForLoop"] = "builtin:for-loop";
|
|
143
|
+
/** We resolved a function call, similar to {@link BuiltInProcName#Default} */
|
|
144
|
+
BuiltInProcName["Function"] = "function";
|
|
145
|
+
/** for function definitions, see {@link processFunctionDefinition} */
|
|
146
|
+
BuiltInProcName["FunctionDefinition"] = "builtin:function-definition";
|
|
147
|
+
/** for `get` calls, see {@link processGet} */
|
|
148
|
+
BuiltInProcName["Get"] = "builtin:get";
|
|
149
|
+
/** for `if-then-else` constructs, see {@link processIfThenElse} */
|
|
150
|
+
BuiltInProcName["IfThenElse"] = "builtin:if-then-else";
|
|
151
|
+
/** for `library` and `require` calls, see {@link processLibrary} */
|
|
152
|
+
BuiltInProcName["Library"] = "builtin:library";
|
|
153
|
+
/** for `list` calls, see {@link processList} */
|
|
154
|
+
BuiltInProcName["List"] = "builtin:list";
|
|
155
|
+
/** for `local` calls, see {@link processLocal} */
|
|
156
|
+
BuiltInProcName["Local"] = "builtin:local";
|
|
157
|
+
/** for the pipe operators, see {@link processPipe} */
|
|
158
|
+
BuiltInProcName["Pipe"] = "builtin:pipe";
|
|
159
|
+
/** for `quote`, and other substituting calls, see {@link processQuote} */
|
|
160
|
+
BuiltInProcName["Quote"] = "builtin:quote";
|
|
161
|
+
/** for `on.exìt` and other hooks, see {@link processRegisterHook} */
|
|
162
|
+
BuiltInProcName["RegisterHook"] = "builtin:register-hook";
|
|
163
|
+
/** for `repeat` loops, see {@link processRepeatLoop} */
|
|
164
|
+
BuiltInProcName["RepeatLoop"] = "builtin:repeat-loop";
|
|
165
|
+
/** for replacement functions like `names<-`, see {@link processReplacementFunction} */
|
|
166
|
+
BuiltInProcName["Replacement"] = "builtin:replacement";
|
|
167
|
+
/** for `return` calls */
|
|
168
|
+
BuiltInProcName["Return"] = "builtin:return";
|
|
169
|
+
/** for `rm` calls, see {@link processRm} */
|
|
170
|
+
BuiltInProcName["Rm"] = "builtin:rm";
|
|
171
|
+
/** for `UseMethod` calls, see {@link processS3Dispatch} */
|
|
172
|
+
BuiltInProcName["S3Dispatch"] = "builtin:s3-dispatch";
|
|
173
|
+
/** for `source` calls, see {@link processSourceCall} */
|
|
174
|
+
BuiltInProcName["Source"] = "builtin:source";
|
|
175
|
+
/** for special binary operators like `%x%`, see {@link processSpecialBinOp} */
|
|
176
|
+
BuiltInProcName["SpecialBinOp"] = "builtin:special-bin-op";
|
|
177
|
+
/** for `stop` calls */
|
|
178
|
+
BuiltInProcName["Stop"] = "builtin:stop";
|
|
179
|
+
/** for `stopifnot` calls, see {@link processStopIfNot} */
|
|
180
|
+
BuiltInProcName["StopIfNot"] = "builtin:stopifnot";
|
|
181
|
+
/** support for `:=` in subsetting assignments, see {@link processAccess} */
|
|
182
|
+
BuiltInProcName["TableAssignment"] = "table:assign";
|
|
183
|
+
/** for `try` calls, see {@link processTryCatch} */
|
|
184
|
+
BuiltInProcName["Try"] = "builtin:try";
|
|
185
|
+
/** for unnamed directly-linked function calls */
|
|
186
|
+
BuiltInProcName["Unnamed"] = "unnamed";
|
|
187
|
+
/** for vector construction calls, see {@link processVector} */
|
|
188
|
+
BuiltInProcName["Vector"] = "builtin:vector";
|
|
189
|
+
/** for `while` loops, see {@link processWhileLoop} */
|
|
190
|
+
BuiltInProcName["WhileLoop"] = "builtin:while-loop";
|
|
191
|
+
})(BuiltInProcName || (exports.BuiltInProcName = BuiltInProcName = {}));
|
|
118
192
|
exports.BuiltInProcessorMapper = {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
193
|
+
[BuiltInProcName.Access]: built_in_access_1.processAccess,
|
|
194
|
+
[BuiltInProcName.Apply]: built_in_apply_1.processApply,
|
|
195
|
+
[BuiltInProcName.Assignment]: built_in_assignment_1.processAssignment,
|
|
196
|
+
[BuiltInProcName.AssignmentLike]: built_in_assignment_1.processAssignmentLike,
|
|
197
|
+
[BuiltInProcName.Default]: defaultBuiltInProcessor,
|
|
198
|
+
[BuiltInProcName.Eval]: built_in_eval_1.processEvalCall,
|
|
199
|
+
[BuiltInProcName.ExpressionList]: built_in_expression_list_1.processExpressionList,
|
|
200
|
+
[BuiltInProcName.ForLoop]: built_in_for_loop_1.processForLoop,
|
|
201
|
+
[BuiltInProcName.FunctionDefinition]: built_in_function_definition_1.processFunctionDefinition,
|
|
202
|
+
[BuiltInProcName.Get]: built_in_get_1.processGet,
|
|
203
|
+
[BuiltInProcName.IfThenElse]: built_in_if_then_else_1.processIfThenElse,
|
|
204
|
+
[BuiltInProcName.Library]: built_in_library_1.processLibrary,
|
|
205
|
+
[BuiltInProcName.List]: built_in_list_1.processList,
|
|
206
|
+
[BuiltInProcName.Local]: built_in_local_1.processLocal,
|
|
207
|
+
[BuiltInProcName.Pipe]: built_in_pipe_1.processPipe,
|
|
208
|
+
[BuiltInProcName.Quote]: built_in_quote_1.processQuote,
|
|
209
|
+
[BuiltInProcName.RegisterHook]: built_in_register_hook_1.processRegisterHook,
|
|
210
|
+
[BuiltInProcName.RepeatLoop]: built_in_repeat_loop_1.processRepeatLoop,
|
|
211
|
+
[BuiltInProcName.Replacement]: built_in_replacement_1.processReplacementFunction,
|
|
212
|
+
[BuiltInProcName.Rm]: built_in_rm_1.processRm,
|
|
213
|
+
[BuiltInProcName.S3Dispatch]: built_in_s_three_dispatch_1.processS3Dispatch,
|
|
214
|
+
[BuiltInProcName.Source]: built_in_source_1.processSourceCall,
|
|
215
|
+
[BuiltInProcName.SpecialBinOp]: built_in_special_bin_op_1.processSpecialBinOp,
|
|
216
|
+
[BuiltInProcName.StopIfNot]: built_in_stop_if_not_1.processStopIfNot,
|
|
217
|
+
[BuiltInProcName.Try]: built_in_try_catch_1.processTryCatch,
|
|
218
|
+
[BuiltInProcName.Vector]: built_in_vector_1.processVector,
|
|
219
|
+
[BuiltInProcName.WhileLoop]: built_in_while_loop_1.processWhileLoop,
|
|
144
220
|
};
|
|
145
221
|
exports.BuiltInEvalHandlerMapper = {
|
|
146
222
|
'built-in:c': resolve_1.resolveAsVector,
|
|
@@ -150,7 +226,7 @@ exports.BuiltInEvalHandlerMapper = {
|
|
|
150
226
|
};
|
|
151
227
|
class BuiltIns {
|
|
152
228
|
/**
|
|
153
|
-
* Register a built-in constant (like `NULL` or `TRUE`) to the given {@link
|
|
229
|
+
* Register a built-in constant (like `NULL` or `TRUE`) to the given {@link BuiltIns}
|
|
154
230
|
*/
|
|
155
231
|
registerBuiltInConstant({ names, value, assumePrimitive }) {
|
|
156
232
|
for (const name of names) {
|
|
@@ -158,7 +234,7 @@ class BuiltIns {
|
|
|
158
234
|
const d = [{
|
|
159
235
|
type: identifier_1.ReferenceType.BuiltInConstant,
|
|
160
236
|
definedAt: id,
|
|
161
|
-
|
|
237
|
+
cds: undefined,
|
|
162
238
|
value,
|
|
163
239
|
name,
|
|
164
240
|
nodeId: id
|
|
@@ -167,18 +243,18 @@ class BuiltIns {
|
|
|
167
243
|
}
|
|
168
244
|
}
|
|
169
245
|
/**
|
|
170
|
-
* Register a built-in function (like `print` or `c`) to the given {@link
|
|
246
|
+
* Register a built-in function (like `print` or `c`) to the given {@link BuiltIns}
|
|
171
247
|
*/
|
|
172
248
|
registerBuiltInFunctions({ names, processor, config, assumePrimitive }) {
|
|
249
|
+
(0, assert_1.guard)(processor !== undefined, () => `Processor for ${JSON.stringify(names)} is undefined, maybe you have an import loop? You may run 'npm run detect-circular-deps' - although by far not all are bad`);
|
|
173
250
|
const mappedProcessor = exports.BuiltInProcessorMapper[processor];
|
|
174
251
|
(0, assert_1.guard)(mappedProcessor !== undefined, () => `Processor for ${processor} is undefined! Please pass a valid builtin name ${JSON.stringify(Object.keys(exports.BuiltInProcessorMapper))}!`);
|
|
175
252
|
for (const name of names) {
|
|
176
|
-
(0, assert_1.guard)(processor !== undefined, `Processor for ${name} is undefined, maybe you have an import loop? You may run 'npm run detect-circular-deps' - although by far not all are bad`);
|
|
177
253
|
const id = builtInId(name);
|
|
178
254
|
const d = [{
|
|
179
255
|
type: identifier_1.ReferenceType.BuiltInFunction,
|
|
180
256
|
definedAt: id,
|
|
181
|
-
|
|
257
|
+
cds: undefined,
|
|
182
258
|
/* eslint-disable-next-line @typescript-eslint/no-explicit-any,@typescript-eslint/no-unsafe-argument */
|
|
183
259
|
processor: (name, args, rootId, data) => mappedProcessor(name, args, rootId, data, config),
|
|
184
260
|
config,
|
|
@@ -208,7 +284,7 @@ class BuiltIns {
|
|
|
208
284
|
makeMaybe: true
|
|
209
285
|
},
|
|
210
286
|
name: effectiveName,
|
|
211
|
-
|
|
287
|
+
cds: undefined,
|
|
212
288
|
nodeId: id
|
|
213
289
|
}];
|
|
214
290
|
this.set(effectiveName, d, assumePrimitive);
|
|
@@ -216,7 +292,7 @@ class BuiltIns {
|
|
|
216
292
|
}
|
|
217
293
|
}
|
|
218
294
|
/**
|
|
219
|
-
* Register a single {@link BuiltInDefinition} to the given memories in {@link
|
|
295
|
+
* Register a single {@link BuiltInDefinition} to the given memories in {@link BuiltIns}
|
|
220
296
|
*/
|
|
221
297
|
registerBuiltInDefinition(definition) {
|
|
222
298
|
switch (definition.type) {
|