microsoft / Power-Fx

Power Fx low-code programming language
MIT License
3.18k stars 318 forks source link

IR should Call TryGetConstantValue #807

Open MikeStall opened 1 year ago

MikeStall commented 1 year ago

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 :)
MikeStall commented 1 year ago

Carlos used in #866, so that address the test coverage issue. So marking this as low pri.