aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-04-12 06:08:07 +0200
committerBjörn Gustavsson <[email protected]>2016-04-14 12:00:34 +0200
commitc74f998b9ad46785aaa2557a4033c056574dc937 (patch)
treee2a57988fa5ab0f363e84da307e5d909e4011329 /erts/emulator
parentf2d068bb92b49360e04c7150a643f1f9026c288d (diff)
downloadotp-c74f998b9ad46785aaa2557a4033c056574dc937.tar.gz
otp-c74f998b9ad46785aaa2557a4033c056574dc937.tar.bz2
otp-c74f998b9ad46785aaa2557a4033c056574dc937.zip
v3_kernel: Construct literal lists properly
Use cerl:make_list/1 instead of a home-made make_list/1 to ensure that literal lists are constructed as literals. In a future release, we would like to forbid in the loader construction of literal lists using instructions like: put_list {atom,a} [] Dst The proper way is: move {literal,[a]} {x,0} Also update the comment about "put_list Const [] Dst" in ops.tab.
Diffstat (limited to 'erts/emulator')
-rw-r--r--erts/emulator/beam/ops.tab6
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/beam/ops.tab b/erts/emulator/beam/ops.tab
index 96a3a72bb5..83b0299ddd 100644
--- a/erts/emulator/beam/ops.tab
+++ b/erts/emulator/beam/ops.tab
@@ -529,9 +529,9 @@ i_put_tuple x I
i_put_tuple y I
#
-# The instruction "put_list Const [] Dst" will not be generated by
-# the current BEAM compiler. But until R15A, play it safe by handling
-# that instruction with the following transformation.
+# The instruction "put_list Const [] Dst" were generated in rare
+# circumstances up to and including OTP 18. Starting with OTP 19,
+# AFAIK, it should never be generated.
#
put_list Const=c n Dst => move Const x | put_list x n Dst