emscripten-core / emscripten-core/emscripten

EMBIND_AOT should AOT method callers

Open
#24,540 12 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

We have `emval_methodCallers` mechanism used for `foo()` and `foo.call<...>(...)` on `emscripten::val` instances here: https://github.com/emscripten-core/emscripten/blob/2fe9aeb84fb2b3f4462ecd6a8d7f156c06349312/src/lib/libemval.js#L284-L352

Right now it either constructs a JS function from strings on the fly, or uses a slower mechanism with looking up all the types on each invocation.

As far as I can tell, it should be fairly straightforward to add it to the `EMBIND_AOT` processing so that specialized function is generated during compile-time and then reused. cc @brendandahl

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.