diff options
author | Lukas Larsson <[email protected]> | 2016-07-14 16:19:26 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2016-07-14 16:19:26 +0200 |
commit | 2a74dd3344db6b6d1ae897dae221401df358eba1 (patch) | |
tree | a78cd6f373039ffad4ece5c05149823636e71a34 /erts/emulator/beam/beam_emu.c | |
parent | eeebefc37ae342f3d7cbbd329b6d75d3963e4811 (diff) | |
parent | 0737ad60e3ab97aa481d63c17eebafe1f2bddd55 (diff) | |
download | otp-2a74dd3344db6b6d1ae897dae221401df358eba1.tar.gz otp-2a74dd3344db6b6d1ae897dae221401df358eba1.tar.bz2 otp-2a74dd3344db6b6d1ae897dae221401df358eba1.zip |
Merge branch 'maint'
Diffstat (limited to 'erts/emulator/beam/beam_emu.c')
-rw-r--r-- | erts/emulator/beam/beam_emu.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c index c9fb5a3022..a05ca5c602 100644 --- a/erts/emulator/beam/beam_emu.c +++ b/erts/emulator/beam/beam_emu.c @@ -2826,13 +2826,7 @@ do { \ goto context_switch3; } - if (ERTS_MSACC_IS_ENABLED_CACHED_X()) { - if (GET_BIF_MODULE(Arg(0)) == am_ets) { - ERTS_MSACC_SET_STATE_CACHED_M_X(ERTS_MSACC_STATE_ETS); - } else { - ERTS_MSACC_SET_STATE_CACHED_M_X(ERTS_MSACC_STATE_BIF); - } - } + ERTS_MSACC_SET_BIF_STATE_CACHED_X(GET_BIF_MODULE(Arg(0)), GET_BIF_ADDRESS(Arg(0))); bf = GET_BIF_ADDRESS(Arg(0)); @@ -3593,13 +3587,7 @@ do { \ goto context_switch; } - if (ERTS_MSACC_IS_ENABLED_CACHED_X()) { - if ((Eterm)I[-3] == am_ets) { - ERTS_MSACC_SET_STATE_CACHED_M_X(ERTS_MSACC_STATE_ETS); - } else { - ERTS_MSACC_SET_STATE_CACHED_M_X(ERTS_MSACC_STATE_BIF); - } - } + ERTS_MSACC_SET_BIF_STATE_CACHED_X((Eterm)I[-3], (BifFunction)Arg(0)); c_p->current = I-3; /* In case we apply process_info/1,2 or load_nif/1 */ c_p->i = I; /* In case we apply check_process_code/2. */ @@ -7000,7 +6988,11 @@ update_map_assoc(Process* p, Eterm* reg, Eterm map, BeamInstr* I) /* The expensive case, need to build a hashmap */ if (n > MAP_SMALL_MAP_LIMIT) { - res = erts_hashmap_from_ks_and_vs(p,flatmap_get_keys(mp),flatmap_get_values(mp),n); + ErtsHeapFactory factory; + erts_factory_proc_init(&factory, p); + res = erts_hashmap_from_ks_and_vs(&factory,flatmap_get_keys(mp), + flatmap_get_values(mp),n); + erts_factory_close(&factory); } return res; } |