aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src/asn1ct_gen_per.erl
AgeCommit message (Collapse)Author
2013-02-14per,uper: Fix breakage of compilation of InformationFrameworkBjörn Gustavsson
Commit f16f43446a04c459486356c0b4ad517cc9201895 broke compilation of InformationFramework for per and uper.
2013-01-25Update copyright yearsBjörn-Egil Dahlberg
2013-01-24Remove vestiges of support for the {TypeName,Value} notationBjörn Gustavsson
Support in BER was removed in 3d1279f3cebfdd2483c3afea9f225613fe45cd00.
2013-01-23per,uper: Optimize decoding of the remaining data typesBjörn Gustavsson
2013-01-23per,uper: Optimize decoding of the remaining string typesBjörn Gustavsson
2013-01-23per,uper: Optimize decoding of the string data typesBjörn Gustavsson
2013-01-23By default, encode BIT STRING to bitstringsBjörn Gustavsson
Add the option 'legacy_bit_string' to decode to the old list format.
2013-01-22uper: Look up some SizeConstraints at compile-timeBjörn Gustavsson
2013-01-22Refactor decoding of BIT STRINGsBjörn Gustavsson
Refactor decoding of BIT STRINGs so that the run-time code does not spend testing conditions that are known already at compile-time (which wastes time and produces unnecessary Dialyzer warnings). There are three ways to decode BIT STRINGs: 1) To a list of bit names (and {bit,Position} for unnamed positions) if the BIT STRING type has any bit names. 2a) To a list of ones and zeros if there are no named bits, and the compact_bit_string option was NOT given. 2b) To a {Unused,Bin} tuple if there are no named bits compact_bit_string option WAS given. Structure the decoding functions in the same way.
2013-01-22Optimize encoding of ENUMERATED in per and uperBjörn Gustavsson
Always pre-encode the values for the enumeration. Clean up the code and let the per and uper back-ends share the code.
2013-01-22Add run-time library templates and use themBjörn Gustavsson
The template modules (asn1rtt_*.erl) are based on the existing run-time modules, but with some simplifications and improvements, for example: The run-time functions for BER encoding took a Constraint argument which was not used. It has been eliminated, along with the unused StringType argument for the encode_restricted_string function. The Range argument for decode_enumerated() has been dropped since it was not used.
2012-12-21Always inline decoding of open typesBjörn Gustavsson
2012-12-19Eliminate code duplicationBjörn Gustavsson
It seems that the code was duplicated only to avoid emitting a semi-colon before the first case clause. Handle that by passing a Sep argument instead. While at it, also do the following clean-ups: * Replace lists:keysearch/3 with lists:keyfind/3. * Replace the use of is_record/2 with matching
2012-12-19Remove support for the {Typename,Value} notation in encodingBjörn Gustavsson
Support for the notation was removed in 6ef8cbdaaaa1c30a7dc462063.
2012-12-06Do alignment optimization of SEQUENCEs and SETsBjörn Gustavsson
2012-12-06Optimize decoding of OCTET STRINGsBjörn Gustavsson
Decoding of fragmented OCTET STRINGs was only implemented when the size was constrained to a single value. While at it, support decoding fragmented OCTET STRINGS in all circumstances.
2012-12-06Use asn1ct_imm to optimize decoding of per and uperBjörn Gustavsson
A long term goal is to eleminate the asn1ct_gen_per_rt2ct module in favor of the asn1ct_gen_per module, so will have asn1ct_gen_per_rt2ct call asn1ct_gen_per.
2012-12-06Use asn1ct_imm:effective_constraint/2Björn Gustavsson
It is error-prone to have several copies of the same function.
2012-12-06Optimize encoding/decoding of NULL in the per and uper back-endsBjörn Gustavsson
Don't waste time calling a trivial function in the run-time library for encoding and decoding of NULL values.
2012-11-23Remove obsolete back-ends and simplify the optionsBjörn Gustavsson
It is time to clean up the mess of back-ends. Remove all the obsolete back-ends and simplify the options used to select them. New Option Old Equivalent ---------- -------------- ber ber_bin,optimize,nif per per,optimize,nif uper uper_bin The old options will still be recognized and translated to the new options, but will also print a warning. That implies that deprecated features that only are implemented in the old 'ber' back-end will no longer work (e.g. the {Typename,Value} notation). Also make the return type for the generated encode/2 function consistent. It used to be a binary for per and uper, and an iolist for ber. Always make it a binary.
2012-07-10In generation of encoding functions for enumeration types,Gustav Simonsson
the values used for generating the range check in case of a value range should be sorted and have duplicates removed. For per with optimization (per_rt2ct), sorting has been added. For both optimized and regular per, the sorting and duplicate removal code has been simplified. In case of value range, 'MIN' and 'MAX' is now also checked. The sorting of constraint values in the check phase remains.
2012-05-04Add support for multiple ExtensionAdditionGroupsKenneth Lundin
2012-03-30Update copyright yearsBjörn-Egil Dahlberg
2012-02-13Fix to integer and sequence definitionsGustav Simonsson
Enable re-use of integer definitions in subsequent definitions and added clauses to check greatest common range for sequence definitions
2011-08-01Remove driver support for per encodingLukas Larsson
Handle the new error messages from the asn1 nifs Remove dead code for erlang optimized per decode
2011-08-01Add support for nif option to optimized PER asn1 compilationLukas Larsson
2010-09-10Merge branch 'kenneth/asn1/nested_extaddgroup/OTP-8797' into devKenneth Lundin
* kenneth/asn1/nested_extaddgroup/OTP-8797: Add support for ExtensionAdditionGroup notation in nested types as well Conflicts: lib/asn1/test/test_undecoded_rest.erl
2010-09-07Add support for ExtensionAdditionGroup notation in nested types as wellKenneth Lundin
In the previous version support for ExtensionAdditionGroups (i.e [[...]]) was added but it did not handle the occurence of the notation in nested types. Now this is handled as well and the support is hopefully complete. Also cleanup of warnings for obsolete guard functions in test suites.
2010-04-09Merge branch 'ta/asn1-verbose' into devErlang/OTP
* ta/asn1-verbose: Add test for verbose option to asn1_SUITE Teach asn1ct verbose option OTP-8565 ta/asn1-verbose By default, the ASN.1 compiler is now silent in the absence of warnings or errors. The new 'verbose' option or the '-v' option for erlc can be given to show extra information (for instance, about the files that are generated). (Thanks to Tuncer Ayaz.)
2010-04-08Teach asn1ct verbose optionTuncer Ayaz
Change asn1ct to print verbose information only when asked to. Signed-off-by: Tuncer Ayaz <[email protected]>
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP