Age | Commit message (Collapse) | Author |
|
|
|
enif_make_new_binary() cannot return NULL, so while at it,
remove the check for return value of enif_make_new_binary()
being NULL.
|
|
Also make sure that the error handling is contained within the
asn1rt_nif module and does not leak out to generated 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.
|
|
|
|
|
|
* nox/enable-silent-rules/OTP-10726:
Implement ./otp_build configure --enable-silent-rules
|
|
With silent rules, the output of make is less verbose and compilation
warnings are easier to spot. Silent rules are disabled by default and
can be disabled or enabled at will by make V=0 and make V=1.
|
|
* bjorn/asn1/extension-addition-groups/OTP-10664:
Fix a bug for multiple extension addition groups
|
|
Encoding would fail.
|
|
|
|
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
|
|
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.
|
|
|
|
Support for the notation was removed in 6ef8cbdaaaa1c30a7dc462063.
|
|
UNION and "|" are synonyms, as are INTERSECTION and "^". Use the same
parsing code for the synonyms.
|
|
The constraint simplification pass need to be seriously rethought
and rewritten.
As a starting point, add a test case to test that equivalent ways
to write a constraint are reduced to the same simplified constraint.
Fix a few obvious bugs to make the test cases to pass.
|
|
|
|
Extensions following a double bracket group were not skipped correctly.
Fix this bug and add tests to ensure that extensions are skipped
correctly.
|
|
Commit 1b622484ea984f3bc424d2a6760e2d961bfcf816 changed the type of
the extension bitmap for uper (from a tuple to a bitstring), but did
not do the the corresponding change to the run-time module.
|
|
|
|
|
|
Also run the test case for all back-ends.
|
|
|
|
|
|
|
|
Make the test suite more readable by introducing and using a
roundtrip/2 function.
|
|
|
|
|
|
Eliminate the spawning of the process since the original bug is
fixed.
|
|
|
|
|
|
|
|
|
|
In order to optimize the generated code, we will need data structures
that can be traversed in several passes before the actual code is
generated.
Refactor the code so that if first builds (essentially) a list of
funs that do the actual code generation, and a second function
that will call the funs one at the time.
|
|
|
|
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.
|
|
Decoding of a fragmented OCTET STRING with the size constrained to a
single value is implemented, but encoding is not implemented, and
decoding is not tested in any test case.
There is no urgent need to support encoding of fragmented OCTET STRINGs,
but not being able to encode such values complicates testing of decoding.
For example, eif we add the following type to PrimStrings.asn1 in the test
suite:
FixedOs65536 ::= OCTET STRING (SIZE (65536))
then asn1ct:test('PrimStrings') will fail because this value cannot
be encoded.
|
|
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.
|
|
|
|
|
|
|
|
Reduce verbosity and introduce readability by introducing the roundtrip/2
function. That will help us to do future extensions to this test suite.
|
|
|
|
|