aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
Diffstat (limited to 'erts')
-rw-r--r--erts/doc/src/absform.xml23
-rw-r--r--erts/emulator/beam/beam_emu.c6
-rw-r--r--erts/emulator/beam/ops.tab4
-rw-r--r--erts/emulator/drivers/common/gzio.c12
4 files changed, 34 insertions, 11 deletions
diff --git a/erts/doc/src/absform.xml b/erts/doc/src/absform.xml
index 4acc03b133..835a4fc692 100644
--- a/erts/doc/src/absform.xml
+++ b/erts/doc/src/absform.xml
@@ -217,6 +217,14 @@
Rep(E) = <c><![CDATA[{record_index,LINE,Name,Rep(Field)}]]></c>.</item>
<item>If E is <c><![CDATA[E_0#Name.Field]]></c>, then
Rep(E) = <c><![CDATA[{record_field,LINE,Rep(E_0),Name,Rep(Field)}]]></c>.</item>
+ <item>If E is <c><![CDATA[#{W_1, ..., W_k}]]></c> where each
+ <c><![CDATA[W_i]]></c> is a map assoc or exact field, then Rep(E) =
+ <c><![CDATA[{map,LINE,[Rep(W_1), ..., Rep(W_k)]}]]></c>. For Rep(W), see
+ below.</item>
+ <item>If E is <c><![CDATA[E_0#{W_1, ..., W_k}]]></c> where
+ <c><![CDATA[W_i]]></c> is a map assoc or exact field, then Rep(E) =
+ <c><![CDATA[{map,LINE,Rep(E_0),[Rep(W_1), ..., Rep(W_k)]}]]></c>. For
+ Rep(W), see below.</item>
<item>If E is <c><![CDATA[catch E_0]]></c>, then
Rep(E) = <c><![CDATA[{'catch',LINE,Rep(E_0)}]]></c>.</item>
<item>If E is <c><![CDATA[E_0(E_1, ..., E_k)]]></c>, then
@@ -334,6 +342,21 @@
is an integer, Rep(TS) = <c><![CDATA[{A, Value}]]></c>.</item>
</list>
</section>
+
+ <section>
+ <title>Map assoc and exact fields</title>
+ <p>When W is an assoc or exact field (in the body of a map), then:</p>
+ <list type="bulleted">
+ <item>If W is an assoc field <c><![CDATA[K => V]]></c>, where
+ <c><![CDATA[K]]></c> and <c><![CDATA[V]]></c> are both expressions,
+ then Rep(W) = <c><![CDATA[{map_field_assoc,LINE,Rep(K),Rep(V)}]]></c>.
+ </item>
+ <item>If W is an exact field <c><![CDATA[K := V]]></c>, where
+ <c><![CDATA[K]]></c> and <c><![CDATA[V]]></c> are both expressions,
+ then Rep(W) = <c><![CDATA[{map_field_exact,LINE,Rep(K),Rep(V)}]]></c>.
+ </item>
+ </list>
+ </section>
</section>
<section>
diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c
index 89d9442526..1ae413d46e 100644
--- a/erts/emulator/beam/beam_emu.c
+++ b/erts/emulator/beam/beam_emu.c
@@ -2355,7 +2355,7 @@ void process_main(void)
Next(4+Arg(3));
}
- OpCase(update_map_assoc_jddII): {
+ OpCase(update_map_assoc_jsdII): {
Eterm res;
Eterm map;
@@ -2373,7 +2373,7 @@ void process_main(void)
}
}
- OpCase(update_map_exact_jddII): {
+ OpCase(update_map_exact_jsdII): {
Eterm res;
Eterm map;
@@ -6614,7 +6614,7 @@ update_map_exact(Process* p, Eterm* reg, Eterm map, BeamInstr* I)
*/
if (num_old == 0) {
- return new_map(p, reg, I+1);
+ return THE_NON_VALUE;
}
/*
diff --git a/erts/emulator/beam/ops.tab b/erts/emulator/beam/ops.tab
index f35997efee..9ea3a3a8ea 100644
--- a/erts/emulator/beam/ops.tab
+++ b/erts/emulator/beam/ops.tab
@@ -1482,8 +1482,8 @@ put_map_exact F Src Dst Live Size Rest=* => \
update_map_exact F Src Dst Live Size Rest
new_map j d I I
-update_map_assoc j d d I I
-update_map_exact j d d I I
+update_map_assoc j s d I I
+update_map_exact j s d I I
is_map Fail cq => jump Fail
diff --git a/erts/emulator/drivers/common/gzio.c b/erts/emulator/drivers/common/gzio.c
index 653f3954b1..8ec2c3f762 100644
--- a/erts/emulator/drivers/common/gzio.c
+++ b/erts/emulator/drivers/common/gzio.c
@@ -73,15 +73,15 @@ typedef struct gz_stream {
int transparent; /* 1 if input file is not a .gz file */
char mode; /* 'w' or 'r' */
int position; /* Position (for seek) */
- int (*destroy)OF((struct gz_stream*)); /* Function to destroy
+ int (*destroy)(struct gz_stream*); /* Function to destroy
* this structure. */
} gz_stream;
-local ErtsGzFile gz_open OF((const char *path, const char *mode));
-local int get_byte OF((gz_stream *s));
-local void check_header OF((gz_stream *s));
-local int destroy OF((gz_stream *s));
-local uLong getLong OF((gz_stream *s));
+local ErtsGzFile gz_open (const char *path, const char *mode);
+local int get_byte (gz_stream *s);
+local void check_header (gz_stream *s);
+local int destroy (gz_stream *s);
+local uLong getLong (gz_stream *s);
#ifdef UNIX
/*