dcbaker / meson-plus-plus

An experimental and incomplete implementation of Meson in C++, for solving Meson's bootstrapping issue.
Apache License 2.0
50 stars 7 forks source link

function_argument_walker should start from innermost, not outermost argument call chain #99

Closed dcbaker closed 5 days ago

dcbaker commented 2 years ago

if you have something like

files(files(files(files('foo')))

It currently takes four loops to resolve this, because the evaluation order is from outside to inside (the simplest solution). However, by simply resolving from innermost files call first, we can avoid 3 iterations of the optimizer, since we can lower the whole thing to [File{'foo'}] on the first pass