aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src/asn1ct_gen_per_rt2ct.erl
AgeCommit message (Collapse)Author
2013-02-16Eliminate use of obsolete size/1 in generated codeBjörn Gustavsson
It is recommended to use byte_size/1 or tuple_size/1 instead of size/1.
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-23Share all code for dec_gen_prim/3 between per/uper back-endsBjörn Gustavsson
2013-01-23per,uper: Optimize decoding of the string data typesBjörn Gustavsson
2013-01-22Slightly optimize per encoding of large INTEGERs with constraintsBjörn Gustavsson
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-22Generate modules with selected run-time functions for compiler usageBjörn Gustavsson
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-19per: Slightly optimize encoding of fixed OCTET STRINGsBjörn Gustavsson
Do the following optimizations: * Optimize construction of OCTET STRINGs of size 2 by using the 45 opcode instead of the 10 opcode for each character. * Use exact comparison (implicit by matching) instead of '=='. * Use list literals when more than one integer is added to a list (e.g. [[45,16,2],...] instead of [45,16,2,...]). Results in fewer BEAM instructions and less garbage. * Cons instead of building a nested list when possible. Example: [20,TempLen|TmpVal] instead of [20,TempLen,TmpVal]. * Omit the "2" opcode (align to byte boundary) before the "20" and "21" opcodes (because they imply alignment). * Assign the value to be encoded to a temporary variable, to avoid calling element/2 more than once.
2012-12-19per: Fix encoding of OCTET STRINGs with fixed length of 256 or moreBjörn Gustavsson
2012-12-19Remove support for the {Typename,Value} notation in encodingBjörn Gustavsson
Support for the notation was removed in 6ef8cbdaaaa1c30a7dc462063.
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-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