aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/compilation_SUITE_data
diff options
context:
space:
mode:
authorPaul Guyot <[email protected]>2010-07-04 15:08:47 +0200
committerBjörn Gustavsson <[email protected]>2010-07-29 09:11:52 +0200
commit173d1fd1c3fef385f73accc4b2bbb1b6f92ac3f5 (patch)
tree830f6e894ef2aba363ee7147ac2fd6a55d8eebac /lib/compiler/test/compilation_SUITE_data
parent6ec6250f8ad4fd13318d13e566602dccc9f6746f (diff)
downloadotp-173d1fd1c3fef385f73accc4b2bbb1b6f92ac3f5.tar.gz
otp-173d1fd1c3fef385f73accc4b2bbb1b6f92ac3f5.tar.bz2
otp-173d1fd1c3fef385f73accc4b2bbb1b6f92ac3f5.zip
beam_asm: Simplify string table generation for beams
The code for generating the string table (which is now only used for bit syntax matching) in a BEAM file is quite complicated and potentially expensive when compiling modules with many thousands of clauses doing bit syntax matching. Simplify and optimize the code using bit syntax and binary:match/2 instead of the list operations in the original code.
Diffstat (limited to 'lib/compiler/test/compilation_SUITE_data')
-rw-r--r--lib/compiler/test/compilation_SUITE_data/string_table.erl8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/compiler/test/compilation_SUITE_data/string_table.erl b/lib/compiler/test/compilation_SUITE_data/string_table.erl
new file mode 100644
index 0000000000..1da1d015dd
--- /dev/null
+++ b/lib/compiler/test/compilation_SUITE_data/string_table.erl
@@ -0,0 +1,8 @@
+-module(string_table).
+-export([f/1, g/1]).
+
+f(<<"string">>) -> string;
+f(<<"stringtable">>) -> stringtable.
+
+g(<<"stringtable">>) -> stringtable;
+g(<<"table">>) -> table.