aboutsummaryrefslogtreecommitdiffstats
path: root/system
AgeCommit message (Collapse)Author
2016-03-15update copyright-yearHenrik Nord
2016-03-04erts: Use 'bit string' in The Abstract Format documentHans Bolinder
2016-03-01Generalize bit string comprehensionsBjörn Gustavsson
The expression in a bit string comprehension is limited to a literal bit string expression. That is, the following code is legal: << <<X>> || X <- List >> but not this code: << foo(X) || X <- List >> The limitation is annoying. For one thing, tools that transform the abstract format must be careful not to produce code such as: << begin %% Some instrumentation code. <<X>> end || X <- List >> One reason for the limitation could be that we'll get reduce/reduce conflicts if we try to allow an arbitrary expression in a bit string comprehension: binary_comprehension -> '<<' expr '||' lc_exprs '>>' : {bc,?anno('$1'),'$2','$4'}. Unfortunately, there does not seem to be an easy way to work around that problem. The best we can do is to allow 'expr_max' expressions (as in the binary syntax): binary_comprehension -> '<<' expr_max '||' lc_exprs '>>' : {bc,?anno('$1'),'$2','$4'}. That will work, but functions calls must be enclosed in parentheses: << (foo(X)) || X <- List >>
2016-02-17Implement ?FUNCTION_NAME and ?FUNCTION_ARITY macrosBjörn Gustavsson
For a long time, users have asked for one or more macros that would return the name and arity of the current function. We could define a single ?FUNCTION macro that would return a {Name,Arity} tuple. However, to access just the name or just the arity for the function, element/2 must be used. That would limit its usefulness, because element/2 is not allowed in all contexts. Therefore, it seems that we will need two macros. ?FUNCTION_NAME that expands to the name of the current function and ?FUNCTION_ARITY that expands to arity of the current function. Converting the function name to a string can be done like this: f() -> atom_to_list(?FUNCTION_NAME) ++ "/" ++ integer_to_list(?FUNCTION_ARITY). f/0 will return "f/0". The BEAM compiler will evaluate the entire expression at compile-time, so there will not be any run-time penalty for the function calls. The implementation is non-trivial because the preprocessor is run before the parser. One way to implement the macros would be to replace them with some placeholder and then let the parser or possibly a later pass replace the placeholder with correct value. That could potentially slow down the compiler and cause incompatibilities for parse transforms. Another way is to let the preprocessor do the whole job. That means that the preprocessor will have to scan the function head to find out the name and arity. The scanning of the function head can be delayed until the first occurrence of a ?FUNCTION_NAME or ?FUNCTION_ARITY. I have chosen the second way because it seems less likely to cause weird compatibility problems.
2016-01-26Delete a couple of leftover chars in Dialyzer docLuca Favatella
2016-01-20doc: Update a refman exampleHans Bolinder
2015-12-15doc: Remove 'is_subtype' from Types and Function SpecificationsHans Bolinder
It is harder to remove is_subtype from the parser since the abstract format does not separate is_subtype from the '::' syntax.
2015-12-07doc: Fix some minor issues in Types and Function SpecificationsHans Bolinder
2015-11-11Merge branch 'legoscia/patch-2' into maintHenrik Nord
* legoscia/patch-2: Remove mention of erlang:fault
2015-11-03Merge branch 'essen/weird-strncmp-len' into maintHenrik Nord
* essen/weird-strncmp-len: Fix weird strncmp length in erl_interface example OTP-13081
2015-10-27Fix weird strncmp length in erl_interface exampleLoïc Hoguin
2015-10-27Remove mention of erlang:faultMagnus Henoch
erlang:fault no longer exists, so don't mention it in the reference manual. Also fix minor markup issue in following paragraph.
2015-10-27Merge branch 'gomoripeti/bindoc_fix' into maintHenrik Nord
* gomoripeti/bindoc_fix: Very minor fixes to binary handling documentation
2015-09-30Merge branch 'entropiae/patch-1' into maintHenrik Nord
* entropiae/patch-1: Fixed typo in otp design principles OTP-13017
2015-09-25Fixed typo in otp design principlesRiccardo
2015-09-14[typo] perspektive -> perspectiveJosh Adams
2015-09-09Very minor fixes to binary handling documentationPéter Gömöri
- at appending when allocating new binary object its size will be double (the old size + size of data to be appended) not just double the old size - correct some unused byte counts
2015-09-08doc: Update term comparison with MapsBjörn-Egil Dahlberg
2015-06-18Change license text to APLv2Bruce Yinhe
2015-06-13Add the link to Fun expressions manual pageYoshihiro Tanaka
2015-05-27Update compiler documentationBjörn Gustavsson
Language cleaned up by the technical writer tmanevik from Combitech. Proofreading and corrections by Björn Gustavsson.
2015-05-08Merge branch 'richcarl/md5-fixes'Björn Gustavsson
* richcarl/md5-fixes: Set module_info md5 for native modules properly Add module_info entry for native code Gracefully handle empty md5 field in module_info Remove 'imports' key from spec of get_module_info()
2015-05-08dialyzer: document the type identifier()Hans Bolinder
2015-05-07Set module_info md5 for native modules properlyRichard Carlsson
Use the md5 of the native code chunk instead of the Beam code md5.
2015-05-07Add module_info entry for native codeRichard Carlsson
2015-03-26doc: Use module() in the definition of the built-in type mfa()Hans Bolinder
2015-03-20Merge branch 'rickard/time_api/OTP-11997'Rickard Green
* rickard/time_api/OTP-11997: (22 commits) Update primary bootstrap inets: Suppress deprecated warning on erlang:now/0 inets: Cleanup of multiple copies of functions Add inets_lib with common functions used by multiple modules inets: Update comments Suppress deprecated warning on erlang:now/0 Use new time API and be back-compatible in inets Remove unused functions and removed redundant test asn1 test SUITE: Eliminate use of now/0 Disable deprecated warning on erlang:now/0 in diameter_lib Use new time API and be back-compatible in ssh Replace all calls to now/0 in CT with new time API functions test_server: Replace usage of erlang:now() with usage of new API Replace usage of erlang:now() with usage of new API Replace usage of erlang:now() with usage of new API Replace usage of erlang:now() with usage of new API Replace usage of erlang:now() with usage of new API otp_SUITE: Warn for calls to erlang:now/0 Replace usage of erlang:now() with usage of new API Multiple timer wheels Erlang based BIF timer implementation for scalability Implement ethread events with timeout ... Conflicts: bootstrap/bin/start.boot bootstrap/bin/start_clean.boot bootstrap/lib/compiler/ebin/beam_asm.beam bootstrap/lib/compiler/ebin/compile.beam bootstrap/lib/kernel/ebin/auth.beam bootstrap/lib/kernel/ebin/dist_util.beam bootstrap/lib/kernel/ebin/global.beam bootstrap/lib/kernel/ebin/hipe_unified_loader.beam bootstrap/lib/kernel/ebin/inet_db.beam bootstrap/lib/kernel/ebin/inet_dns.beam bootstrap/lib/kernel/ebin/inet_res.beam bootstrap/lib/kernel/ebin/os.beam bootstrap/lib/kernel/ebin/pg2.beam bootstrap/lib/stdlib/ebin/dets.beam bootstrap/lib/stdlib/ebin/dets_utils.beam bootstrap/lib/stdlib/ebin/erl_tar.beam bootstrap/lib/stdlib/ebin/escript.beam bootstrap/lib/stdlib/ebin/file_sorter.beam bootstrap/lib/stdlib/ebin/otp_internal.beam bootstrap/lib/stdlib/ebin/qlc.beam bootstrap/lib/stdlib/ebin/random.beam bootstrap/lib/stdlib/ebin/supervisor.beam bootstrap/lib/stdlib/ebin/timer.beam erts/aclocal.m4 erts/emulator/beam/bif.c erts/emulator/beam/erl_bif_info.c erts/emulator/beam/erl_db_hash.c erts/emulator/beam/erl_init.c erts/emulator/beam/erl_process.h erts/emulator/beam/erl_thr_progress.c erts/emulator/beam/utils.c erts/emulator/sys/unix/sys.c erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/erts_internal.beam erts/preloaded/ebin/init.beam erts/preloaded/src/erts_internal.erl lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl lib/diameter/src/base/diameter_lib.erl lib/kernel/src/os.erl lib/ssh/test/ssh_basic_SUITE.erl system/doc/efficiency_guide/advanced.xml
2015-03-20Introduce a new time APIRickard Green
The old time API is based on erlang:now/0. The major issue with erlang:now/0 is that it was intended to be used for so many unrelated things. This tied these unrelated operations together and unnecessarily caused performance, scalability as well as accuracy, and precision issues for operations that do not need to have such issues. The new API spreads different functionality over multiple functions in order to improve on this. The new API consists of a number of new BIFs: - erlang:convert_time_unit/3 - erlang:monotonic_time/0 - erlang:monotonic_time/1 - erlang:system_time/0 - erlang:system_time/1 - erlang:time_offset/0 - erlang:time_offset/1 - erlang:timestamp/0 - erlang:unique_integer/0 - erlang:unique_integer/1 - os:system_time/0 - os:system_time/1 and a number of extensions of existing BIFs: - erlang:monitor(time_offset, clock_service) - erlang:system_flag(time_offset, finalize) - erlang:system_info(os_monotonic_time_source) - erlang:system_info(time_offset) - erlang:system_info(time_warp_mode) - erlang:system_info(time_correction) - erlang:system_info(start_time) See the "Time and Time Correction in Erlang" chapter of the ERTS User's Guide for more information.
2015-03-18Merge branch 'hb/doc/fix_links'Hans Bolinder
* hb/doc/fix_links: Correct links in the system documentation
2015-03-17Merge branch 'maint'Rickard Green
* maint: Minor fixes Conflicts: system/doc/system_principles/versions.xml
2015-03-17Minor fixesRickard Green
2015-03-17Merge branch 'maint'Rickard Green
* maint: Add support for patching of individual applications Conflicts: system/doc/installation_guide/part.xml
2015-03-17Add support for patching of individual applicationsRickard Green
2015-03-17Correct links in the system documentationHans Bolinder
2015-03-12Replace "lambda head" with "fun" in compiler warningBjörn Gustavsson
We no longer use the term "lambda".
2015-03-12Remove an historical note about fun representation before R6BBjörn Gustavsson
It is hardly useful to mention that funs used to be represented as tuples in ancient releases.
2015-03-12Replace mention of a tuple fun with an external funBjörn Gustavsson
2015-03-12Update Interoperability TutorialHans Bolinder
Language cleaned up by the technical writers xsipewe and tmanevik from Combitech. Proofreading and corrections by Hans Bolinder.
2015-03-12Update System PrinciplesHans Bolinder
Language cleaned up by the technical writers xsipewe and tmanevik from Combitech. Proofreading and corrections by Hans Bolinder.
2015-03-12Update Erlang Reference ManualHans Bolinder
Language cleaned up by the technical writers xsipewe and tmanevik from Combitech. Proofreading and corrections by Hans Bolinder.
2015-03-12Update Getting StartedHans Bolinder
Language cleaned up by the technical writers xsipewe and tmanevik from Combitech. Proofreading and corrections by Hans Bolinder.
2015-03-12Update Programming ExamplesBjörn Gustavsson
Language cleaned up by the technical writers xsipewe and tmanevik from Combitech. Proofreading and corrections by Björn Gustavsson.
2015-03-12Update OAM PrinciplesBjörn Gustavsson
Language cleaned up by the technical writers xsipewe and tmanevik from Combitech. Proofreading and corrections by Björn Gustavsson.
2015-03-12Update Installation GuideBjörn Gustavsson
Language cleaned up by the technical writers xsipewe and tmanevik from Combitech. Proofreading and corrections by Björn Gustavsson.
2015-03-12Update Embedded Systems User's GuideBjörn Gustavsson
Language cleaned up by the technical writers xsipewe and tmanevik from Combitech. Proofreading and corrections by Björn Gustavsson.
2015-03-12Update Efficiency GuideBjörn Gustavsson
Language cleaned up by the technical writers xsipewe and tmanevik from Combitech. Proofreading and corrections by Björn Gustavsson.
2015-03-12Update Design PrinciplesBjörn Gustavsson
Language cleaned up by the technical writers xsipewe and tmanevik from Combitech. Proofreading and corrections by Björn Gustavsson.
2015-02-27Two minor fixesLeo Liu
* Fix documentation on $char for unicode * Remove duplicate declaration for erts_encode_ext_dist_header_size
2015-02-13Merge branch 'maint'Zandra Hird
2015-02-11Fixed fun_test examplesyannayl
Removed false example from fun_test.erl Removed unused code from fun_test.erl