Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[embind] Simplify createNamedFunction. NFC (#20479)
Further simplification of createNamedFunction on top of #18748: we can avoid extra JS wrapper by setting `name` of the function directly. This is only supported via "configuring" it by `Object.defineProperty` rather than plain assignment, but otherwise has exactly same effect - it sets debug name of the function in-place. Also, ever since #18748 switched away from `eval`, there is no requirement for the function name to be "legal" - we can set it to the plain demangled string, making debug names even more readable.