aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools
AgeCommit message (Collapse)Author
2014-01-22Merge remote-tracking branch 'vinoski/vinoski/emacs-skel-indent' into ↵Dan Gudmundsson
vinoski/emacs-fixes
2014-01-22Merge remote-tracking branch 'vinoski/vinoski/emacs-sexp-error' into ↵Dan Gudmundsson
vinoski/emacs-fixes
2014-01-22Merge remote-tracking branch 'vinoski/vinoski/emacs-fun-arity' into ↵Dan Gudmundsson
vinoski/emacs-fixes
2014-01-22Merge remote-tracking branch 'vinoski/vinoski/emacs-error-fixes' into ↵Dan Gudmundsson
vinoski/emacs-fixes
2014-01-16fix emacs erlang skeleton indentationSteve Vinoski
When inserting skeletons in emacs, some Erlang language elements such as case, receive, and if statements, are not indented properly. This patch, written by Leo Liu, corrects the indentation problems.
2014-01-10fix indentation error from scan-sexp in erlang.elSteve Vinoski
Fix an indentation error being returned by scan-sexp, and add a new indentation test case for the error.
2014-01-10Remove support for query keyword from emacs modePaul Oliver
2014-01-07prevent errors from erlang.elSteve Vinoski
In erlang.el, add a line to evaluate the cl package at compile time so that the use of the block macro (such as on line 3750), which is an alias for cl-block, is evaluated correctly when erlang.el is compiled. Also modify comparisons against (point) in functions erlang-electric-lt and erlang-after-bitsyntax-close so that typing the characters '<' and '>' (without the quotes) at the beginning of a buffer does not cause errors. Thanks to user leo2007 in the #erlang channel on IRC for reporting these problems and providing fixes.
2013-12-20fix erlang-mode erlang-get-function-aritySteve Vinoski
In the emacs erlang-mode the function erlang-get-function-arity failed to return a correct arity value for functions with literal binaries as parameters, for example: function(<<Bin:20/binary>>) -> Bin. Fix erlang-get-function-arity to recognize binary parameters correctly.
2013-12-17Merge tag 'OTP_R16B03_yielding_binary_to_term'Sverker Eriksson
Yielding binary_to_term. OTP-11535 * tag 'OTP_R16B03_yielding_binary_to_term': Increase versions for OTP_R16B03_yielding_binary_to_term erts: Adjust term_to_binary reduction factors erts: Yield after trapping term_to_binary if gc has been ordered erts: Let term_to_binary disable gc while trapping erts: Improve stress of binary_to_term in binary_SUITE erts: Fix bug in binary_to_term for compressed on halfword erts: Fix crash when binary_to_term throws badarg erts: Trapping memcpy in binary_to_term erts: Cleanup code for trapping binary_to_term erts: Add erlang wrappers to binary_to_term trapping uncompress trapping size calculation trapping binary_to_term/2 trapping STRING_EXT trapping lists and tuples trapping binary_to_term passing binary_SUITE Conflicts: erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/erts_internal.beam erts/vsn.mk lib/kernel/vsn.mk lib/stdlib/vsn.mk
2013-12-12Support EEP37 named funs in emacs erlang-modeSteve Vinoski
Change emacs erlang-mode to recognize EEP37 named funs so they're indented properly. Specifically, modify erlang-partial-parse to allow for an optional Erlang variable name to appear between the "fun" keyword and the opening parenthesis of its argument list.
2013-12-12Test named funsAnthony Ramine
2013-12-12Merge branch 'sverk/trapping-bin2term' into OTP_R16B03Sverker Eriksson
* sverk/trapping-bin2term: erts: Adjust term_to_binary reduction factors erts: Yield after trapping term_to_binary if gc has been ordered erts: Let term_to_binary disable gc while trapping erts: Improve stress of binary_to_term in binary_SUITE erts: Fix bug in binary_to_term for compressed on halfword erts: Fix crash when binary_to_term throws badarg erts: Trapping memcpy in binary_to_term erts: Cleanup code for trapping binary_to_term erts: Add erlang wrappers to binary_to_term trapping uncompress trapping size calculation trapping binary_to_term/2 trapping STRING_EXT trapping lists and tuples trapping binary_to_term passing binary_SUITE Parallel check_process_code when code_server purge a module Functionality for disabling garbage collection Use asynchronous check_process_code in code_parallel_SUITE Execution of system tasks in context of another process Conflicts: erts/emulator/beam/external.c erts/emulator/beam/sys.h erts/emulator/test/binary_SUITE.erl erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/erts_internal.beam
2013-12-12EEP 37: Funs with namesAnthony Ramine
This adds optional names to fun expressions. A named fun expression is parsed as a tuple `{named_fun,Loc,Name,Clauses}` in erl_parse. If a fun expression has a name, it must be present and be the same in every of its clauses. The function name shadows the environment of the expression shadowing the environment and it is shadowed by the environment of the clauses' arguments. An unused function name triggers a warning unless it is prefixed by _, just as every variable. Variable _ is allowed as a function name. It is not an error to put a named function in a record field default value. When transforming to Core Erlang, the named fun Fun is changed into the following expression: letrec 'Fun'/Arity = fun (Args) -> let <Fun> = 'Fun'/Arity in Case in 'Fun'/Arity where Args is the list of arguments of 'Fun'/Arity and Case the Core Erlang expression corresponding to the clauses of Fun. This transformation allows us to entirely skip any k_var to k_local transformation in the fun's clauses bodies.
2013-12-10Merge tag 'OTP_R16B03'Magnus Lidén
The R16B03 release Conflicts: lib/sasl/vsn.mk
2013-12-09Prepare releaseOTP_R16B03Erlang/OTP
2013-12-02Merge branch 'maint'Henrik Nord
2013-12-02Silence warnings about socklen_t pointers sign in erl_memoryAnthony Ramine
erl_memory.c:947:7: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign] &saddr_size) != 0) ^~~~~~~~~~~ /usr/include/sys/socket.h:616:74: note: passing argument to parameter here int getsockname(int, struct sockaddr * __restrict, socklen_t * __restrict) ^ erl_memory.c:2613:57: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign] sock = accept(lsock, (struct sockaddr *) &oth_addr, &oth_addr_len); ^~~~~~~~~~~~~ /usr/include/sys/socket.h:610:69: note: passing argument to parameter here int accept(int, struct sockaddr * __restrict, socklen_t * __restrict) ^
2013-12-02Silence warnings about different buffer types in erl_memoryAnthony Ramine
erl_memory.c:861:19: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] *p += sprintf(*p, "%*" USGND_INT_MAX_FSTR " ", fw, mi->size); ^~ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:863:16: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] *p += sprintf(*p, ^~ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:869:16: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] *p += sprintf(*p, "%*" USGND_INT_MAX_FSTR " ", fw, mi->no); ^~ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:871:20: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] *p += sprintf(*p, ^~ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:878:16: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] *p += sprintf(*p, ^~ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:900:19: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] *p += sprintf(*p, "%*" USGND_INT_MAX_FSTR " ", fw, mi->max_ever_size); ^~ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:902:16: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] *p += sprintf(*p, "%*s %*s ", fw, "", fw, ""); ^~ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:904:16: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] *p += sprintf(*p, "%*" USGND_INT_MAX_FSTR " ", fw, mi->max_ever_no); ^~ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:906:20: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] *p += sprintf(*p, "%*s %*s ", fw, "", fw, ""); ^~ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:909:16: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] *p += sprintf(*p, "%*s %*s %*s ", fw, "", fw, "", fw, ""); ^~ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:986:25: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] area.size = sprintf(area.ptr, format, carg); ^~~~~~~~ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:1103:25: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] area.size = sprintf(area.ptr, ^~~~~~~~ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:1109:23: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] area.size += sprintf(area.ptr + area.size, ^~~~~~~~~~~~~~~~~~~~ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:1120:26: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] area.size += sprintf(area.ptr + area.size, ^~~~~~~~~~~~~~~~~~~~ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:1190:18: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] p += sprintf(p, "> %-*s", EM_TIME_FIELD_WIDTH - 2, "Maximum:"); ^ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:1223:18: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] p += sprintf(p, "\n"); ^ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:1227:15: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] p += sprintf(p, "%s", stop_str); ^ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:1230:15: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] p += sprintf(p, exit_str, state->info.exit_status); ^ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:1236:18: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] p += sprintf(p, format, tsz, bw); ^ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:1286:18: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] p += sprintf(p, "%*" USGND_INT_32_FSTR " ", EM_TIME_FIELD_WIDTH - 1, secs); ^ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:1311:18: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] p += sprintf(p, "\n"); ^ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:2231:32: warning: passing 'char *' to parameter of type 'usgnd_int_8 *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign] size = write_header(state, state->output.header, 1); ^~~~~~~~~~~~~~~~~~~~ erl_memory.c:736:44: note: passing argument to parameter 'ptr' here write_header(em_state *state, usgnd_int_8 *ptr, int trunc) ^
2013-11-18erts: Add erlang wrappers to binary_to_termSverker Eriksson
to not expose the trapping BIF in the stacktrace when it throws badarg.
2013-10-31Merge branch 'maint'Fredrik Gustafsson
2013-10-30tools: Fix compile_beam_opts testcaseFredrik Gustafsson
2013-10-30Take compiler options from beam in cover:compile_beamPéter Gömöri
Similarly to cover compiling from source (in this case some user specified compiler options are allowed) when cover compiling from existing beam take a filtered list of compiler options from the beamfile. This way e.g. export_all can be preserved. See use case in eb02beb1c3
2013-10-25Merge branch 'maint'Fredrik Gustafsson
2013-10-25Merge branch 'puzza007/emacs_iodata_nonempty_string_builtin_types/OTP-11394' ↵Fredrik Gustafsson
into maint * puzza007/emacs_iodata_nonempty_string_builtin_types/OTP-11394: Add iodata, nonempty_string to built-in type highlighting for emacs
2013-10-22Merge branch 'maint'Fredrik Gustafsson
2013-10-22tools: Add Erlang-specific compilation error regexp for erlang-eunitFredrik Gustafsson
This defvar was removed in a87a9699735b0a25f99397fba9576f5756da54d3 which made eunit fail on running tests in emacs.
2013-10-14Merge branch 'maint'Fredrik Gustafsson
2013-10-14Merge branch 'fenollp/treewide_remove_unexpected_0xff/OTP-11323' into maintFredrik Gustafsson
* fenollp/treewide_remove_unexpected_0xff/OTP-11323: Remove ^L characters hidden randomly in the code. Not those used in text files as delimiters.
2013-10-10Add iodata, nonempty_string to built-in type highlighting for emacsPaul Oliver
These built-in types were missing from emacs highlighting
2013-09-17Merge tag 'OTP_R16B02'Magnus Lidén
The R16B02 release Conflicts: lib/sasl/vsn.mk
2013-09-16Prepare releaseOTP_R16B02Erlang/OTP
2013-09-12Remove ^L characters hidden randomly in the code. Not those used in text ↵Pierre Fenoll
files as delimiters. While working on a tool that processes Erlang code and testing it against this repo, I found out about those little sneaky 0xff. I thought it may be of help to other people build such tools to remove non-conforming-to-standard characters.
2013-09-06Change encoding of troublesome notes.xml files to utf-8Björn Gustavsson
Most notes.xml files will be updated in every release and cause the kind of the problems described in the previous commit.
2013-08-28Merge branch 'maint'Fredrik Gustafsson
2013-08-27tools:Fredrik Gustafsson
In Emacs it is possible to remotely edit a file, by opening for example /ssh:somehost.com:/path/to/file.erl. In Emacs, the feature that makes this possible, is called TRAMP. When compiling such a file, by typing C-c C-k, an inferior Erlang shell is opened on the remote host, but the compilation expression that was evaluated in the remote Erlang shell was: c("/ssh:somehost.com:/path/to/file", [...]). which resulted in a "no such file or directory" error. This commit changes the compilation expression into: c("/path/to/file", [...]). for files opened remotely via TRAMP. The file name is adjusted similarly when compiling .yrl and .xrl files. In a buffer opened remotely, the Elisp function buffer-file-name returns the full path with TRAMP syntax. In this example it would be "/ssh:somehost.com:/path/to/file.erl". A new function, erlang-local-buffer-file-name, has been introduced, which peels off the TRAMP syntax on remotely opened files, while for locally opened files, it just calls buffer-file-name.
2013-08-19Merge branch 'maint'Fredrik Gustafsson
2013-08-19Merge branch 'mh/line-initial-commas/OTP-11242' into maintFredrik Gustafsson
* mh/line-initial-commas/OTP-11242: Inside parentheses, line-initial commas align with the open parenthesis
2013-07-09Merge branch 'maint'Fredrik Gustafsson
2013-07-01Remove trailing spaces in Emacs templatesRoberto Aloi
2013-06-18Inside parentheses, line-initial commas align with the open parenthesisMagnus Henoch
For example: [ one , two , three ] This does not affect coding styles that don't put commas at the beginning of lines.
2013-06-18Merge tag 'OTP_R16B01'Björn-Egil Dahlberg
The R16B01 release Conflicts: lib/sasl/vsn.mk
2013-06-17Prepare releaseOTP_R16B01Erlang/OTP
2013-06-12Merge branch 'maint'Björn-Egil Dahlberg
2013-06-12Update copyright yearsBjörn-Egil Dahlberg
2013-06-05Merge branch 'maint'Björn-Egil Dahlberg
2013-06-05Merge branch 'egil/increase-eprof-usability/OTP-11144' into maintBjörn-Egil Dahlberg
* egil/increase-eprof-usability/OTP-11144: tools: Document new eprof options tools: Add options to eprof tools: Add testcase to eprof_SUITE tools: Refactor away ?line macro in eprof_SUITE
2013-06-05Merge branch 'maint'Fredrik Gustafsson
2013-06-04tools: Added gather_gc_info_result to bifsFredrik Gustafsson
2013-05-03tools: Document new eprof optionsBjörn-Egil Dahlberg