diff options
author | Björn Gustavsson <[email protected]> | 2012-11-30 06:13:49 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2012-12-06 14:22:37 +0100 |
commit | e0d377e57b9847b887ef61b13745f45c2f4deb54 (patch) | |
tree | df7d88cf5948ecaaf7defbcbd33dc36ee5c23034 /lib/asn1/src/asn1ct_imm.erl | |
parent | e958e6f5f9d95ce5828a2b858717512958b1f689 (diff) | |
download | otp-e0d377e57b9847b887ef61b13745f45c2f4deb54.tar.gz otp-e0d377e57b9847b887ef61b13745f45c2f4deb54.tar.bz2 otp-e0d377e57b9847b887ef61b13745f45c2f4deb54.zip |
Do alignment optimization of SEQUENCEs and SETs
Diffstat (limited to 'lib/asn1/src/asn1ct_imm.erl')
-rw-r--r-- | lib/asn1/src/asn1ct_imm.erl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/asn1/src/asn1ct_imm.erl b/lib/asn1/src/asn1ct_imm.erl index 1b6a25b917..0969dec272 100644 --- a/lib/asn1/src/asn1ct_imm.erl +++ b/lib/asn1/src/asn1ct_imm.erl @@ -20,7 +20,7 @@ -module(asn1ct_imm). -export([per_dec_boolean/0,per_dec_enumerated/2,per_dec_enumerated/3, per_dec_integer/2,per_dec_length/3,per_dec_named_integer/3, - per_dec_octet_string/2]). + per_dec_octet_string/2,per_dec_open_type/1]). -export([optimize_alignment/1,optimize_alignment/2, dec_slim_cg/2,dec_code_gen/2]). -export([effective_constraint/2]). @@ -98,11 +98,15 @@ per_dec_named_integer(Constraint, NamedList0, Aligned) -> per_dec_octet_string(Constraint, Aligned) -> dec_string(Constraint, 8, Aligned). +per_dec_open_type(Aligned) -> + {get_bits,decode_unconstrained_length(true, Aligned), + [8,binary,{align,Aligned}]}. + + %%% %%% Local functions. %%% - dec_string(Sv, U, _Aligned) when is_integer(Sv), U*Sv =< 16 -> {get_bits,Sv,[U,binary]}; dec_string(Sv, U, Aligned) when is_integer(Sv), Sv < 16#10000 -> |