summaryrefslogtreecommitdiff
path: root/bootstrap/lib/stdlib/ebin/edlin.beam
diff options
context:
space:
mode:
authorJohn Högberg <john@erlang.org>2022-05-06 17:50:44 +0200
committerJohn Högberg <john@erlang.org>2022-06-03 14:47:10 +0200
commita321b779d1457044bf1d3090ea7dbcaf1fafe419 (patch)
tree27847f96d88f020df68e7f8c3854e1f2fb7c6f99 /bootstrap/lib/stdlib/ebin/edlin.beam
parent515df2f87b950c16391d1a54eda375f1857667be (diff)
downloaderlang-a321b779d1457044bf1d3090ea7dbcaf1fafe419.tar.gz
compiler: Add `update_record` instruction.
This instruction updates several tuple fields at once, improving on the old `setelement/3 + set_tuple_element` method in the following ways: * Eliminates BIF call overhead, the tuple is copied and updated inline. * Doesn't require special treatment in the validator. * Uses heap allocations in the same manner as `put_tuple2` and friends. * When all fields are updated with the same value (runtime check), we can set `Dst=Src` and move on with our day. This is impossible with `set_tuple_element` as it requires a new copy every time to avoid creating illegal references from the old heap to the new heap.
Diffstat (limited to 'bootstrap/lib/stdlib/ebin/edlin.beam')
0 files changed, 0 insertions, 0 deletions