From ee91c4291212035b8e054072407c74afdd66f1d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Fri, 20 Mar 2015 15:07:24 +0100 Subject: Remove the fail label operand of the new_map instruction The new_map instruction cannot fail, and thus needs no fail label. --- erts/emulator/beam/beam_debug.c | 2 +- erts/emulator/beam/beam_emu.c | 8 ++++---- erts/emulator/beam/ops.tab | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'erts/emulator') diff --git a/erts/emulator/beam/beam_debug.c b/erts/emulator/beam/beam_debug.c index 6bb987985d..38e54e9d1a 100644 --- a/erts/emulator/beam/beam_debug.c +++ b/erts/emulator/beam/beam_debug.c @@ -661,7 +661,7 @@ print_op(int to, void *to_arg, int op, int size, BeamInstr* addr) case op_i_put_tuple_rI: case op_i_put_tuple_xI: case op_i_put_tuple_yI: - case op_new_map_jdII: + case op_new_map_dII: case op_update_map_assoc_jsdII: case op_update_map_exact_jsdII: case op_i_has_map_fields_fsI: diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c index fdb84aae42..a264669e50 100644 --- a/erts/emulator/beam/beam_emu.c +++ b/erts/emulator/beam/beam_emu.c @@ -2379,16 +2379,16 @@ void process_main(void) Goto(*I); } - OpCase(new_map_jdII): { + OpCase(new_map_dII): { Eterm res; x(0) = r(0); SWAPOUT; - res = new_map(c_p, reg, I); + res = new_map(c_p, reg, I-1); SWAPIN; r(0) = x(0); - StoreResult(res, Arg(1)); - Next(4+Arg(3)); + StoreResult(res, Arg(0)); + Next(3+Arg(2)); } OpCase(i_has_map_fields_fsI): { diff --git a/erts/emulator/beam/ops.tab b/erts/emulator/beam/ops.tab index 2c4458ae74..7993dd9e25 100644 --- a/erts/emulator/beam/ops.tab +++ b/erts/emulator/beam/ops.tab @@ -1473,8 +1473,8 @@ apply_last I P # Map instructions in R17. # -put_map_assoc F Map Dst Live Size Rest=* | is_empty_map(Map) => \ - new_map F Dst Live Size Rest +put_map_assoc j Map Dst Live Size Rest=* | is_empty_map(Map) => \ + new_map Dst Live Size Rest put_map_assoc F Src=s Dst Live Size Rest=* => \ update_map_assoc F Src Dst Live Size Rest put_map_assoc F Src Dst Live Size Rest=* => \ @@ -1485,7 +1485,7 @@ put_map_exact F Src=s Dst Live Size Rest=* => \ put_map_exact F Src Dst Live Size Rest=* => \ move Src x | update_map_exact F x Dst Live Size Rest -new_map j d I I +new_map d I I update_map_assoc j s d I I update_map_exact j s d I I -- cgit v1.2.3