Age | Commit message (Collapse) | Author |
|
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.
|
|
Always pre-encode the values for the enumeration. Clean up the
code and let the per and uper back-ends share the code.
|
|
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.
|
|
|
|
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
|
|
Support for the notation was removed in 6ef8cbdaaaa1c30a7dc462063.
|
|
|
|
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.
|
|
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.
|
|
It is error-prone to have several copies of the same function.
|
|
Don't waste time calling a trivial function in the run-time library
for encoding and decoding of NULL values.
|
|
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.
|
|
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.
|
|
|
|
|
|
Enable re-use of integer definitions in subsequent definitions and
added clauses to check greatest common range for sequence definitions
|
|
Handle the new error messages from the asn1 nifs
Remove dead code for erlang optimized per decode
|
|
|
|
* kenneth/asn1/nested_extaddgroup/OTP-8797:
Add support for ExtensionAdditionGroup notation in nested types as well
Conflicts:
lib/asn1/test/test_undecoded_rest.erl
|
|
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.
|
|
* 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.)
|
|
Change asn1ct to print verbose information only when asked to.
Signed-off-by: Tuncer Ayaz <[email protected]>
|
|
|