summaryrefslogtreecommitdiff
path: root/lib/compiler/src/beam_asm.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <bjorn@erlang.org>2021-09-22 14:09:17 +0200
committerBjörn Gustavsson <bjorn@erlang.org>2021-09-27 14:14:22 +0200
commitc7ddbcbe7d95a0dee3d0610ce7d73ebe53c23cdc (patch)
tree34027d7eab34b91ed8dda57a74c8420546f8a325 /lib/compiler/src/beam_asm.erl
parentd055a6b20c43bee3ac4ee4c2c8981128e0369596 (diff)
downloaderlang-c7ddbcbe7d95a0dee3d0610ce7d73ebe53c23cdc.tar.gz
Remove support for BEAM files compiled before OTP 22
Keeping compatibility with OTP 21 and earlier would complicate some of the things we are planning to do in OTP 25.
Diffstat (limited to 'lib/compiler/src/beam_asm.erl')
-rw-r--r--lib/compiler/src/beam_asm.erl14
1 files changed, 2 insertions, 12 deletions
diff --git a/lib/compiler/src/beam_asm.erl b/lib/compiler/src/beam_asm.erl
index d9de7031a0..7d1cf90c8e 100644
--- a/lib/compiler/src/beam_asm.erl
+++ b/lib/compiler/src/beam_asm.erl
@@ -142,9 +142,8 @@ build_file(Code, Attr, Dict, NumLabels, NumFuncs, ExtraChunks, CompileInfo, Comp
Code),
%% Create the atom table chunk.
- AtomEncoding = atom_encoding(CompilerOpts),
- {NumAtoms, AtomTab} = beam_dict:atom_table(Dict, AtomEncoding),
- AtomChunk = chunk(atom_chunk_name(AtomEncoding), <<NumAtoms:32>>, AtomTab),
+ {NumAtoms, AtomTab} = beam_dict:atom_table(Dict),
+ AtomChunk = chunk(<<"AtU8">>, <<NumAtoms:32>>, AtomTab),
%% Create the import table chunk.
@@ -220,15 +219,6 @@ build_file(Code, Attr, Dict, NumLabels, NumFuncs, ExtraChunks, CompileInfo, Comp
end,
build_form(<<"BEAM">>, Chunks).
-atom_encoding(Opts) ->
- case proplists:get_bool(no_utf8_atoms, Opts) of
- false -> utf8;
- true -> latin1
- end.
-
-atom_chunk_name(utf8) -> <<"AtU8">>;
-atom_chunk_name(latin1) -> <<"Atom">>.
-
%% finalize_fun_table(Essentials, MD5) -> FinalizedEssentials
%% Update the 'old_uniq' field in the entry for each fun in the
%% 'FunT' chunk. We'll use part of the MD5 for the module as a