Skip to content

[DF] support for fastutil::evalText#2448

Merged
EagleoutIce merged 9 commits intomainfrom
2380-support-for-fastutilsevaltext
Apr 23, 2026
Merged

[DF] support for fastutil::evalText#2448
EagleoutIce merged 9 commits intomainfrom
2380-support-for-fastutilsevaltext

Conversation

@EagleoutIce
Copy link
Copy Markdown
Member

No description provided.

@EagleoutIce EagleoutIce requested a review from Copilot April 14, 2026 11:02
@EagleoutIce EagleoutIce linked an issue Apr 14, 2026 that may be closed by this pull request
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for treating evalText() like an eval()-style built-in evaluation function in the dataflow engine, and extends slicing test coverage accordingly.

Changes:

  • Register evalText as a built-in handled by the existing Eval processor.
  • Extend eval-string resolution logic to optionally accept direct string/symbol/function-call arguments (not only parse(text=...)).
  • Add backward slicing tests covering evalText() usage patterns (direct, indirect, conditional string selection, etc.).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
test/functionality/slicing/backward/static-backward-program-slices/eval.test.ts Adds new slicing tests for evalText() scenarios.
src/dataflow/internal/process/functions/call/built-in/built-in-eval.ts Extends eval code-string resolution to support direct arguments when configured.
src/dataflow/environments/default-builtin-config.ts Registers evalText to be processed by the built-in eval handler with the new flag enabled.
Comments suppressed due to low confidence (1)

src/dataflow/internal/process/functions/call/built-in/built-in-eval.ts:53

  • processEvalCall still bails out unless args.length === 1. This means evalText("...", env(...)) (and eval(expr, envir, ...)) will skip string evaluation entirely, reducing slicing precision and emitting a misleading warning. Consider accepting 1+ arguments (use the first as the code expression, optionally interpret/ignore the rest), and update the warning to include the actual function name (e.g., eval vs evalText) and the supported signature.
): DataflowInformation {
	if(args.length !== 1 || args[0] === EmptyArgument || !args[0].value) {
		dataflowLogger.warn(`Expected exactly one argument for eval currently, but got ${args.length} instead, skipping`);
		return processKnownFunctionCall({ name, args, rootId, data, origin: 'default' }).information;

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/functionality/slicing/backward/static-backward-program-slices/eval.test.ts Outdated
Comment thread src/dataflow/internal/process/functions/call/built-in/built-in-eval.ts Outdated
Comment thread src/dataflow/environments/default-builtin-config.ts
Comment thread src/dataflow/internal/process/functions/call/built-in/built-in-eval.ts Outdated
Comment thread src/dataflow/internal/process/functions/call/built-in/built-in-eval.ts Outdated
Comment thread src/dataflow/internal/process/functions/call/built-in/built-in-eval.ts Outdated
Comment thread src/dataflow/internal/process/functions/call/built-in/built-in-eval.ts Outdated
Comment thread test/functionality/slicing/backward/static-backward-program-slices/eval.test.ts Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 8 changed files in this pull request and generated 5 comments.

Comments suppressed due to low confidence (1)

src/dataflow/internal/process/functions/call/built-in/built-in-eval.ts:54

  • The warning message is hard-coded to eval, but this processor now also handles evalText (via config). Please use the actual called function name (e.g., from name.content) in the warning so diagnostics are correct for both functions.
	if(args.length !== 1 || args[0] === EmptyArgument || !args[0].value) {
		dataflowLogger.warn(`Expected exactly one argument for eval currently, but got ${args.length} instead, skipping`);
		return processKnownFunctionCall({ name, args, rootId, data, origin: 'default' }).information;

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/functionality/slicing/backward/static-backward-program-slices/eval.test.ts Outdated
Comment thread test/functionality/slicing/backward/static-backward-program-slices/eval.test.ts Outdated
@EagleoutIce EagleoutIce merged commit f270c5b into main Apr 23, 2026
19 checks passed
@EagleoutIce EagleoutIce deleted the 2380-support-for-fastutilsevaltext branch April 23, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for FastUtils::evalText

2 participants