aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src/asn1ct.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2014-01-22 16:19:10 +0100
committerBjörn Gustavsson <[email protected]>2014-01-22 16:19:10 +0100
commit990b655c92f889d2c45e6f43ee6fdae29ffc8464 (patch)
tree5e1fb70caadb1374130b86989537c9e024ffb8dd /lib/asn1/src/asn1ct.erl
parentd203887853971d58a4054400a88f91bbf73b19c8 (diff)
parent7699312823b259c3735d7045b4224a50d1256ec5 (diff)
downloadotp-990b655c92f889d2c45e6f43ee6fdae29ffc8464.tar.gz
otp-990b655c92f889d2c45e6f43ee6fdae29ffc8464.tar.bz2
otp-990b655c92f889d2c45e6f43ee6fdae29ffc8464.zip
Merge branch 'bjorn/asn1/optimizations/OTP-11573'
* bjorn/asn1/optimizations/OTP-11573: Optimize code surrounding calls to complete/1 asn1ct_imm: Add the intermediate instruction {list,List,Dst} Generate intermediate code that is easier to optimize asn1ct_imm: Add the {set,{var,Src},{var,Dst}} instruction Keep type information in the apply intermediate instruction asn1ct_imm: Add a field for intermediate code for call_gen Introduce asn1ct_gen:open_output_file/1 Factor out printing of verbose messages Improve optimization of alignment for encoding Improve construction of {cons,H,T} instructions Teach asn1ct_func:call_gen/4 to quote the generated function name Test open types that may need more than 128 bytes
Diffstat (limited to 'lib/asn1/src/asn1ct.erl')
-rw-r--r--lib/asn1/src/asn1ct.erl11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/asn1/src/asn1ct.erl b/lib/asn1/src/asn1ct.erl
index f2ccf5f212..f2e9606ccb 100644
--- a/lib/asn1/src/asn1ct.erl
+++ b/lib/asn1/src/asn1ct.erl
@@ -333,8 +333,7 @@ print_structured_errors([_|_]=Errors) ->
print_structured_errors(_) -> ok.
compile1(File, #st{opts=Opts}=St0) ->
- verbose("Erlang ASN.1 version ~p, compiling ~p~n", [?vsn,File], Opts),
- verbose("Compiler Options: ~p~n", [Opts], Opts),
+ compiler_verbose(File, Opts),
Passes = single_passes(),
Base = filename:rootname(filename:basename(File)),
OutFile = outfile(Base, "", Opts),
@@ -349,8 +348,7 @@ compile1(File, #st{opts=Opts}=St0) ->
%% compile_set/3 merges and compiles a number of asn1 modules
%% specified in a .set.asn file to one .erl file.
compile_set(SetBase, Files, #st{opts=Opts}=St0) ->
- verbose("Erlang ASN.1 version ~p compiling ~p ~n", [?vsn,Files], Opts),
- verbose("Compiler Options: ~p~n",[Opts], Opts),
+ compiler_verbose(Files, Opts),
OutFile = outfile(SetBase, "", Opts),
DbFile = outfile(SetBase, "asn1db", Opts),
InputModules = [begin
@@ -363,6 +361,11 @@ compile_set(SetBase, Files, #st{opts=Opts}=St0) ->
Passes = set_passes(),
run_passes(Passes, St).
+compiler_verbose(What, Opts) ->
+ verbose("Erlang ASN.1 compiler ~s\n", [?vsn], Opts),
+ verbose("Compiling: ~p\n", [What], Opts),
+ verbose("Options: ~p\n", [Opts], Opts).
+
%% merge_modules/2 -> returns a module record where the typeorval lists are merged,
%% the exports lists are merged, the imports lists are merged when the
%% elements come from other modules than the merge set, the tagdefault