Age | Commit message (Collapse) | Author |
|
* 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.
|
|
|
|
|
|
Don't waste time calling a trivial function in the run-time library
for encoding and decoding of NULL values.
|
|
Currently, the generated code suppresses warnings for unusued variables
by assigning to the "_Val" variable, for example:
_Val = Tmpval5
To be completely safe, that should have been:
_ = Tmpval5
in case there happens to more than one such assignment in the same
scope.
However, a better way to suppress warnings is to simply use the
'nowarn_unused_vars' compiler option. That method will also work
for more complicated expressions there it would be cumbersome to
suppress warnings by assignment to "_".
|
|
While at it, also make the generated code for the attributes
more readable.
|
|
The NIF library is now mandatory.
The call to application:get_env/2 to find out whether the NIF
library is loaded is surprisingly expensive.
|
|
|
|
|
|
|
|
|
|
|
|
|