microsoft / microsoft/Power-Fx

IR should Call TryGetConstantValue

Open
#807 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

low priority
Dominant language
C#
Stars
3.4k
Forks
358
Avg merge
10h 34m
Merged PRs (30d)
3

Description

Have IR leverage Binder.TryGetConstantValue.
This function exists and is used by PAClient to do constant folding for strings.

Ie, at compile time, it will translate "A" & "B" into a single string "AB".
This is only used by PAClient today, so it's a test hole.

Call it from IR some that:

  1. we get test coverage of this function
  2. More convergence between C# and JS backends.
  3. potential perf benefits :)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the IR code and Binder.TryGetConstantValue, then inspect how PAClient currently uses the function for string constant folding. Compare the C# and JavaScript backend paths and existing tests. Done means IR invokes the binder functionality and coverage verifies that expressions such as "A" & "B" fold to "AB".

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, javascript
Domain
compilers, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.