Age | Commit message (Collapse) | Author |
|
The record #typereference{} is only used internally within
the asn1ct_parser2 module (the parser translates it to
an #'Externaltypereference{} record).
|
|
The only code that is really different between the PER
and UPER backends is encoding of primitive types.
|
|
|
|
|
|
The wrong backend was used.
|
|
|
|
|
|
|
|
Improve readability and maintainability.
|
|
Optimize the decoding of CHOICE. Most important is to inline decoding
of the extension bit (if present) and decoding of the choice index
to give the BEAM compiler more opportunities for optimization.
We will also change the structure of the generated code. The current
code uses a flattened case for both the root and extension alternatives:
case Choice + NumRootChoices * Ext of
%% Root alternatives.
0 - ...;
:
LastRootAlternative -> ...;
%% Extension alternatives.
LastRootAlternative+1 -> ...;
:
%% Unknown extension.
_ -> ...;
end
We will instead generate nested cases:
case Ext of
0 ->
case Choice of
%% Root alternatives.
0 - ...;
:
LastRootAlternative -> ...
end;
1 ->
%% Extension alternatives.
<Decode the open type here>
case Choice of
0 -> ...;
:
LastExtensionAlternative -> ...;
%% Unknown extension.
_ -> ...;
end
end
Nested cases should be slightly faster. For decoding of the extensions,
it also makes it possible to hoist the decoding of the open type up
from each case to before the case switching on the extension index,
thus reducing the size of the generated code.
We will also do another change to the structure. Currently, the
big flat clase is wrapped in code that repackages the return values:
{Alt,{Value,RemainingEncodedData}} =
case Choice + NumRootChoices * Ext of
:
end,
{{Value,Alt},RemainingEncodedData}.
We still need to do the repackaging, but we can push it down to
the case arm for decoding each alternative. In many cases, that
will give the BEAM compiler the opportunity to avoid building the
temporary tuples.
|
|
We will need more explicit control of decoding of open types for
CHOICEs, so refactor the gen_dec_line() and gen_dec_line_imm()
to break out the decoding of the open types.
Note that gen_dec_line_special() will not generate correct code
if Ext =/= noext; thus, we can eliminate the Ext parameter.
|
|
gen_dec_choice2() is unnecessarily complicated. Code is duplicated
merely to avoid outputting a ";" separator after the last item,
and there is code to skip extensionmarks that are never actually
present.
While at it, eliminate the the wrap_gen_dec_line() function which is
not needed. It puts a {component_type,C} key in the process
dictionary, but that is actually never used. Besides that, it only
shuffles the argument.
|
|
gen_enc_choice2() duplicates code merely to avoid outputting a ";"
separator after the last item.
|
|
Ensure that asn1ct_name:start/0 will call asn1ct_name:clear/0 if the
name server process is already running so that we can be sure that
the variables are cleared.
|
|
active/1 always returned 'true' (curr(Var) can never return 'nil',
except if Var =:= 'nil'). Therefore, we can eliminate its use and
remove it.
|
|
clean/1 is used quite lot; while not a bottleneck it does seem
unnecessary to stop and start the name server just to clear the
variables.
Since the change to clean/1 makes stop/1 unused, we can remove it.
|
|
Since new/1 does not return any useful value and cannot fail, there
is no reason to wait for a response from the name server process.
|
|
|
|
Since we no longer need to support push/1 and pop/1, we can simplify
the data structures used for keeping track of the variables.
Each entry in the list can be simply {Var,integer()} instead of
{Var,[integer()]}.
While at it, eliminate calls to the obsolete lists:keysearch/3
function, don't use integer_to_list/0 within a call to lists:concat/1,
and the catch all clause in get_prev/2 and get_next/2.
|
|
asn1ct_name:delete/1 is used from asn1ct_gen_ber_bin_v2:add_removed_bytes/1,
but that function is not used.
|
|
* sla/odbc_in_non_standard_location/OTP-11126:
Fix checking for odbc in standard locations when "with-odbc" flag present.
|
|
* anders/diameter/watchdog_function_clause/OTP-11115:
Fix watchdog function_clause
|
|
* anders/diameter/missed_5001/OTP-11087:
Remove redundant integer type specifiers from binaries
Fix recognition of 5001 on mandatory AVP's
|
|
* anders/diameter/avp_decode/OTP-11007:
Detect all 5005 (MISSING_AVP) errors and don't reverse errors
Adapt Failed-AVP setting to RFC 6733
Add spec to diameter_codec
Add spec to diameter_gen
Fix recognition of 5014 (INVALID_AVP_LENGTH) errors
Ensure setting Failed-AVP is appropriate
Correct AVP Length error testcases
|
|
* anders/diameter/avp_length_failure/OTP-11026:
Fix decode failure when AVP Length < 8
|
|
* md/httpc-stream-once-fix/OTP-11122:
Remove http_chunk:decode/4 as it is no longer used
Fix {stream, {self, once}} in httpc
|
|
|
|
An AVP setting the M-bit was not regarded as erroneous if it was defined
in the dictionary in question and its container (message or Grouped AVP)
had an 'AVP' field. It's now regarded as a 5001 error (AVP_UNSUPPORTED),
as in the case that the AVP is not defined.
|
|
* bjorn/stdlib/improve-ls/OTP-11108:
Teach c:ls/1 to show non-directory files
|
|
* anders/diameter/timetraps/OTP-10914:
Add examples testcase to help identify timetrap failures
Minor traffic suite fix
Add gen_tcp suite
Lighten up on suite timetraps
Add more information to traffic suite timeout failures
|
|
* avi/fix-os-cmd-win/OTP-11104:
Add testcase to exported
Added primary bootstrap for os.beam
kernel: redefined deep_list_command test
Remove unnecessary whitespaces in os.erl and os_SUITE.erl
Fix deep list argument error under Windows in os:cmd/1
|
|
* ia/ssl/public_key/crypto/elliptic_curve/OTP-11009: (21 commits)
ssl: Do not advertise EC ciphers if crypto support is insufficient
crypto: Ctify tests and test new API
crypto: Allow integer as srp_private arguments according to docs
ssl: Remove unused `srp_parameters` type spec
crypto, public_key & ssl: Make more functions accept integer keys
snmp: Remove use of deprecated crypto functions
crypto,ssh, netconf, inets: binary_to_integer -> bytes_to_integer
netconf: Remove use of deprecated crypto functions
crypto: Documentation fixes from review
crypto: Change argument order of crypto:next_iv/3
crypto,public_key,ssl: Change return value of crypto:generate_key(ecdh,..)
ssl, public_key, crypto: crypto:algorithms/0 -> crypto:supports/0
ssl, public_key & inets: Remove use of deprecated crypto functions from test code
ssl: Remove use of deprecated crypto functions
public_key: Remove use of deprecated crypto functions
dialyzer: Remove use of deprecated crypto functions
ssh & crypto: Remove use of deprecated crypto functions from ssh
Update primary bootstrap
common_test: Replace use of deprecated crypto functions
beam_lib, compile: Replace use of deprecated crypto functions
...
|
|
|
|
Commit 0b7c87dc caused diameter_watchdog:restart/2 to start returning
'stop', so that a watchdog process for a listening transport that
allowed multiple connections to the same peer would die one watchdog
timeout after losing a connection. The new return value was supposed to
be passed up to transition/2, but was instead passed to set_watchdog/1,
resulting in a function_clause error. The resulting crash was harmless
but unseemly.
Not detected by dialyzer.
Thanks to Aleksander Nycz.
|
|
Also fix bugs found by new tests
|
|
* siri/ct_telnet/no-more-after-timetrap/OTP-10648:
[common_test] Unregister connection if killed
|
|
|
|
As the file 'lib/ssl/src/ssl_srp_primes.hrl' only contains a
specification of a `srp_parameters` type that isn't exported and also
isn't referenced anywhere (neither in the code nor in the
documentation), the type specification (and hence the file as well) can
be removed.
|
|
|
|
|
|
The symptom of this bug was that a (named) telnet connection which was
open and hanging during a timetrap timeout could no longer be opened
again in subsequent test cases.
Since the connection was hanging, ct_telnet:close/1 which was called
during end_per_testcase would fail (timeout) and cause common_test to
brutally kill the connection. The bug was that the connection was not
unregistered at this point. When trying to open the connection again
in the next testcase, common_test attempted to reuse the same
connection since it had not been unregistered. This failed since the
connection in fact was dead.
|
|
* nox/fix-silent-rules/OTP-11111:
Fix some Makefile rules that didn't support silent rules
|
|
In an email to erlang-questions, Bengt Kleberg wrote:
When I use c:ls/1 it reminds me so much of Unix "ls" that I
expect c:ls("filename") to work. The resulting error surprises
me every time (not the same day).
While teaching c:ls/1 to show non-directory files, update the
error handling to make use of the POSIX error codes from
file:list_dir/1 and file:format_error/1 (which had not been
invented when the c module was first implemented).
Suggested-by: Bengt Kleberg
Test-suite-by: Bengt Kleberg
|
|
|
|
* siri/ct/no_prompt_check/OTP-11095:
[common_test] Refactor ct_telnet_SUITE.erl
[common_test] Add new option 'no_prompt_check' to ct_telnet:expect/3.
[common_test] Add debug printouts in ct_telnet_client
[common_test] Backed out wait_for_linebreak option from ct_telnet
[common_test] Add test for ct_telnet using own telnet server
[common_test] Add telnet server to use for testing
|
|
|
|
http_chunk:decode/4, the side-effecting chunk decoder, was only used
by httpc_handler:handle_http_body/2 but now it's completely unused.
|
|
Previously the only difference between {stream, self} and {stream,
{self, once}} was an extra Pid in the stream_start message due to a
bug in httpc_handler. It was immediately sending a bunch of messages
till the end instead of waiting for httpc:stream_next/1 being called.
|
|
|
|
Conflicts:
lib/crypto/doc/src/crypto.xml
Conflicts:
lib/crypto/doc/src/crypto.xml
|