aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2013-01-22erl_interface: even more utf8 atom stuffSverker Eriksson
2013-01-22erts: Fix bug in analyze_utf8 causing faulty latin1 detectionSverker Eriksson
2013-01-22Teach encode functions to accept a bitstring term for a BIT STRINGBjörn Gustavsson
We do it in the simplest possible way by converting the bitstring to a compact bitstring tuple. The encoding of BIT STRINGs should be cleaned up and optimized.
2013-01-22Fix EXTERNAL 1990/1994 conversion information lossBjörn Gustavsson
There are two different definitions of the EXTERNAL data type in ASN.1: the original from 1990 and an updated from 1994. Both defintions are encoded in the same way (in BER). There are still systems in use that use the old definition of EXTERNAL, so the asn1 application must still support both. It has been decided that the asn1 application should handle both the forms without any compiler options. Internally the asn1 application uses the 1990 definition. The encode functions will accept both definitions, but translate the 1994 format to the 1990 format if needed. When decoding, it will decode to the 1990 definition format first and then translate to the 1994 defintion format. One problem with this approach is that the conversion to the 1994 format may not be loss-less (where the 1990 defintion had a CHOICE between an OPEN TYPE, OCTET STRING, or BIT STRING, the 1994 definition only supports an OCTET STRING), and therefore it might not be possible to correctly re-encode the data in the 1990 format. It seems that the only reliable way to handle that problem is to not do the conversion to the 1994 format if the conversion is not loss-less. (There is an attempt when translating to the 1990 format to recover the CHOICE alternative based on the Erlang type of the data value, but that is neither reliable nor future-proof.) That is, when decoding an EXTERNAL value, the resulting tuple could either conform to the 1990 or 1994 definition, and applications must be prepared to handle that. The mail conversation where this issue was first reported can be found here: http://erlang.org/pipermail/erlang-questions/2011-April/057697.html Reported-by: Harald Welte <[email protected]>
2013-01-22uper: Look up some SizeConstraints at compile-timeBjörn Gustavsson
2013-01-22Enumeration decoding: Don't emit a default clause if it cannot matchBjörn Gustavsson
Dialyzer will warn for default clauses that cannot possible match.
2013-01-22Slightly optimize per encoding of large INTEGERs with constraintsBjörn Gustavsson
2013-01-22BER run-time: Refactor decoding of string data typesBjörn Gustavsson
In the BER run-time code (asn1rtt_ber), there is a general function for decoding a string: decode_restricted_string(Tlv, Range, StringType, TagsIn) But the StringType argument is not important. It is only used internally in asn1rtt_ber to distinguish universal strings and BMP strings from other strings. By slightly refactoring the string decoding code, we can eliminate the StringType argument and a subsequent run-time test on the string type. That will slightly reduce code size, slightly increase speed, and eliminate Dialyzer warnings.
2013-01-22Refactor decoding of BIT STRINGsBjörn Gustavsson
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.
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-22Remove the unused run-time modulesBjörn Gustavsson
2013-01-22eldap: Remove calls to undocumented asn1rt* functionsBjörn Gustavsson
We are about to remove the old asn1rt* modules, so we must remove the calls that eldap make to them. Since the calls are just a sanity check, we can just remove the calls. Just doing the decode will do roughly the same tests and generate similar exceptions.
2013-01-22BER: Correct bug in 'undec_rest'Björn Gustavsson
enif_make_new_binary() cannot return NULL, so while at it, remove the check for return value of enif_make_new_binary() being NULL.
2013-01-22Correct error handling for the NIF functionsBjörn Gustavsson
Also make sure that the error handling is contained within the asn1rt_nif module and does not leak out to generated code.
2013-01-22Generate modules with selected run-time functions for compiler usageBjörn Gustavsson
2013-01-22Remove the 'inline' and '{inline,OutputFile}' optionsBjörn Gustavsson
2013-01-22Add and use asn1rtt_extBjörn Gustavsson
2013-01-22Add and use asn1rtt_checkBjö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.
2013-01-22Add a mechanism for embedding run-time functions into the generated codeBjörn Gustavsson
2013-01-22Fix a bug where necessary alignment would be skippedBjörn Gustavsson
2013-01-22Add UTF-8 node name support for epmdRickard Green
2013-01-22erts: Force windows to use two-digit exponentBjörn-Egil Dahlberg
sprintf on windows uses a three-digit exponent default
2013-01-22Properly support functions with arbitrary arity in type specs.Stavros Aronis
2013-01-22Merge branch 'sa/dialyzer-list-spec/OTP-10740'Fredrik Gustafsson
* sa/dialyzer-list-spec/OTP-10740: Report spec discrepancy on mismatching lists
2013-01-22Merge branch 'fredrik/ssh/update_versions/R16'Fredrik Gustafsson
* fredrik/ssh/update_versions/R16: Fixed some specs - ssh Bumped version numbers
2013-01-22Merge branch 'ia/public_key/prepare-for-release'Ingela Anderton Andin
* ia/public_key/prepare-for-release: public_key: Prepare for R16
2013-01-22public_key: Prepare for R16Ingela Anderton Andin
2013-01-22Merge branch 'ia/ssl/prepare-for-release'Ingela Anderton Andin
* ia/ssl/prepare-for-release: ssl: Prepare for R16 release
2013-01-22Merge branch 'ae/stdlib/faster_queue/OTP-10722'Fredrik Gustafsson
* ae/stdlib/faster_queue/OTP-10722: Fix bug in queue:out/1, queue:out_r/1 that makes it O(N^2) in worst case
2013-01-22ssl: Prepare for R16 releaseIngela Anderton Andin
Remove very old and obsolete release notes, update version and appup.
2013-01-22Merge branch 'sverk/hipe-debug-compile-fix'Sverker Eriksson
* sverk/hipe-debug-compile-fix: Fix compiler error for hipe in debug emulator
2013-01-22Fixed some specs - sshFredrik Gustafsson
2013-01-22Bumped version numbersFredrik Gustafsson
2013-01-22Merge branch 'ia/ssl/incompatible-error-msg/OTP-10451'Ingela Anderton Andin
* ia/ssl/incompatible-error-msg/OTP-10451: ssl: Enhance error handling
2013-01-22Add registered server names to app fileAnders Svensson
This was simply missed.
2013-01-22Merge branch 'lh/forget-mnemosyne/OTP-10729'Fredrik Gustafsson
* lh/forget-mnemosyne/OTP-10729: Remove what remains of the Mnemosyne code Remove support for the query keyword and query expressions
2013-01-22Merge branch 'hb/type_corrections/OTP-10624'Hans Bolinder
* hb/type_corrections/OTP-10624: [hipe, kernel, stdlib] Correct a few types
2013-01-22Removed deprecated functionsFredrik Gustafsson
2013-01-22handle_pref_algs with correct return valuesFredrik Gustafsson
2013-01-22Merge branch 'fredrik/eldap/ssl-opts/OTP-10728'Fredrik Gustafsson
* fredrik/eldap/ssl-opts/OTP-10728: Added doc for sslopts Configure the SSL options fully
2013-01-21Raise default reader group limit to 64Rickard Green
2013-01-21Use async threads by defaultRickard Green
2013-01-21Update all bif highlighting for emacsLukas Larsson
All bifs should now be highlighted correctly. Also added a testcase which will check for any future bif additions and deletions.
2013-01-21[hipe, kernel, stdlib] Correct a few typesHans Bolinder
The type ascii_string() in the base64 module has been corrected. The type file:file_info() has been cleaned up. The type file:fd() has been made opaque in the documentation. The type nodes() has been removed from erl_bif_types.erl.
2013-01-21Fix compiler error for hipe in debug emulatorSverker Eriksson
Use am_undefined as it seems to be more releable to exist.
2013-01-21Merge branch 'lukas/kernel/iter_max_socks_to_node/OTP-10734'Lukas Larsson
* lukas/kernel/iter_max_socks_to_node/OTP-10734: Isolate iter_max_socks to own node
2013-01-21Isolate iter_max_socks to own nodeLukas Larsson
This prevents this testcase from ruining the entire testrun if it should fail critically.
2013-01-21workaround...Rickard Green
2013-01-21Text representation of a float formatted using given options.Serge Aleynikov
This BIF solves a problem of float_to_list/1 that doesn't allow specifying the number of digits after the decimal point when formatting floats. float_to_list(Float, Options) -> string() Float = float() Options = [Option] Option = {decimals, Decimals::0..249} | {scientific, Decimals::0..249} | compact Returns a string which corresponds to the text representation of a `Float` formatted using given options. When decimals option is specified the returned value will contain at most `Decimals` number of digits past the decimal point. When `compact` option is provided the trailing zeros at the end of the list are truncated (this option is only meaningful together with the `decimals` option). When `scientific` option is provided, the float will be formatted using scientific notation with `Decimals` digits of precision. If `Options` is `[]` the function behaves like `float_to_list/1`. When using `decimals` option and the number doesn't fit in the static internal buffer of 256 bytes the function throws `badarg`.