diff options
author | Björn-Egil Dahlberg <[email protected]> | 2013-12-12 11:20:04 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2014-01-29 11:08:42 +0100 |
commit | f3821597383fa20d1093dab70fa75b4a1018a6b3 (patch) | |
tree | 62692b3f21fb5f7dd71ba86f5a5efaf7217de30b /erts/emulator/beam/beam_emu.c | |
parent | 862728a458729f4a71630f4a8fa93f1f26744c7f (diff) | |
download | otp-f3821597383fa20d1093dab70fa75b4a1018a6b3.tar.gz otp-f3821597383fa20d1093dab70fa75b4a1018a6b3.tar.bz2 otp-f3821597383fa20d1093dab70fa75b4a1018a6b3.zip |
erts: Update maps instructions to use term order
Maps internally uses term order to store keys in an ordered fashion.
Diffstat (limited to 'erts/emulator/beam/beam_emu.c')
-rw-r--r-- | erts/emulator/beam/beam_emu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c index fe2e196785..89d9442526 100644 --- a/erts/emulator/beam/beam_emu.c +++ b/erts/emulator/beam/beam_emu.c @@ -6316,7 +6316,7 @@ static int has_not_map_field(Eterm map, Eterm key) } } else { for (i = 0; i < n; i++) { - if (eq(keys[i], key)) { + if (EQ(keys[i], key)) { return 0; } } @@ -6343,7 +6343,7 @@ static Eterm get_map_element(Eterm map, Eterm key) } } else { for (i = 0; i < n; i++) { - if (eq(ks[i], key)) { + if (EQ(ks[i], key)) { return vs[i]; } } @@ -6506,7 +6506,7 @@ update_map_assoc(Process* p, Eterm* reg, Eterm map, BeamInstr* I) ASSERT(kp < (Eterm *)mp); key = *old_keys; - if ((c = CMP(key, new_key)) < 0) { + if ((c = CMP_TERM(key, new_key)) < 0) { /* Copy old key and value */ *kp++ = key; *hp++ = *old_vals; |