diff options
author | Björn Gustavsson <[email protected]> | 2019-03-18 07:00:56 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2019-03-19 16:02:00 +0100 |
commit | 5836998a956966a5ecc6dddfc4f8b73fc3aa6f1e (patch) | |
tree | a5dc614d787d2f00239394baed2909ac56c356bb /erts/emulator/beam/beam_load.c | |
parent | f5ad8d333947da10fa712db4a579b838d00ad485 (diff) | |
download | otp-5836998a956966a5ecc6dddfc4f8b73fc3aa6f1e.tar.gz otp-5836998a956966a5ecc6dddfc4f8b73fc3aa6f1e.tar.bz2 otp-5836998a956966a5ecc6dddfc4f8b73fc3aa6f1e.zip |
Optimize funs converted to literals
Diffstat (limited to 'erts/emulator/beam/beam_load.c')
-rw-r--r-- | erts/emulator/beam/beam_load.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c index c2a54c85ce..21740caa2c 100644 --- a/erts/emulator/beam/beam_load.c +++ b/erts/emulator/beam/beam_load.c @@ -4352,7 +4352,11 @@ gen_make_fun2(LoaderState* stp, GenOpArg idx) funp->creator = erts_init_process_id; funp->arity = arity; - GENOP_NAME_ARITY(op, move, 2); + /* + * Use a move_fun/2 instruction to load the fun to enable + * further optimizations. + */ + GENOP_NAME_ARITY(op, move_fun, 2); op->a[0].type = TAG_q; op->a[0].val = lit; op->a[1].type = TAG_x; |