aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/cerl/erl_bif_types.erl
AgeCommit message (Collapse)Author
2011-01-17Merge branch 'bjorn/beam-loader/OTP-9030' into devBjörn Gustavsson
* bjorn/beam-loader/OTP-9030: (43 commits) c: Reduce memory footprint erl_posix_msg: Reduce memory footprint Introduce a few more variations of the move instructions Combine a move + jump sequence into the move_jump instruction Optimize and clean-up the exact equality/non-equality instructions Optimize addition of a small integer to a variable Introduce a special instruction for select_val with two values Introduce a few more specialized put_list instructions Eliminate the "put_list c n Dst" instructions Eliminate the specific move_sd instruction Eliminate use of GetArg1() in the badmatch and case_end instructions Eliminate use of GetArg2() in the i_element instruction Eliminate use of GetArg1() in the fast_element instruction Eliminate use of GetArg1() in the jump_on_val* instructions Eliminate use of GetArg1() in the select_val instruction beam_emu: Eliminate sloppy use of tmp_arg1 and tmp_arg2 beam_emu: Don't inline helper functions into process_main() beam_emu: Clean up calling of the error_handler module Simplify a select_val instruction that selects only one value Optimize creation of tuples ...
2011-01-17Add erts_debug:instructions/0 for listing all specific instructionsBjörn Gustavsson
erts_debug:instructions/0 is useful for finding which specific instructions that are not used at all.
2010-12-21Merge branch 'ja/fix-hipe-spec-ets-new' into devNiclas Axelsson
2010-12-16Set types correctly for open_port({spawn_executable, ...Patrik Nyblom
2010-12-16Fix type specification of the ets:new/2 BIFJesper Louis Andersen
The options for the ets:new/2 call has changed recently. There are read_concurrency hints as well as compressed tables. The hipe/dialyzer did not take this into account. This patch corrects the problem by going through the documentation and altering the type specification. The error fixed is with the dialyzer. When constructing an ETS table with, e.g., {read_concurrency, true}, the dialyzer will report that the caller of ets:new/2 will not return. ; First, we update the documentation from the ets man page. ; Second, we reorder the type specification of keypos so they appear in the same order as in the documentation. ; Finally, we add the missing read_concurrency and compressed Tweak options.
2010-12-13Fix native code compiler infinite loop and update type info for 're'Kostis Sagonas
The introduction of filenames being unicode binaries revealed a problem in the type analysis of the native code compiler which resulted in an infinite loop when compiling the 'filename' module. In addition, the hard-coded type information for the built-in functions of the 're' module was out-of-date, which resulted in erroneous type information for 'filelib' functions being stored in the PLT.
2010-12-03Merge branch 'ks/erl_bif_types-cleanup/OTP-8961' into devPatrik Nyblom
* ks/erl_bif_types-cleanup/OTP-8961: Fix type information of 'file' and 'code' modules Conflicts: lib/hipe/cerl/erl_bif_types.erl
2010-12-03Merge branch 'pan/unicode-filenames/OTP-8887' into devPatrik Nyblom
* pan/unicode-filenames/OTP-8887: (27 commits) Test and correct filelib and filename Add documentation to erlang.xml and slight correction to unicode_usage.xml Add section about Unicode file names to stdlib users guide Correct bug in file_name_SUITE making it fail on Unix instead of Windows7 Add documentation about raw filenames and Unicode file name translation mode Make filelib not crash on re codepoints beyond 255 in re when filename is raw Mend on_load_embedded testcase which did not handle windows links Correct testcase regarding windows versions supporting soft links. Teach filelib to use re in unicode mode when filenames are not raw Treat soft links on Windows correctly in file_name_SUITE Adapt new soft and hard link routines on Windos to Unicode Corrected testcases broken by unicode filenames Update preloaded prim_file Teach prim_file not to accept atoms and not to throw exceptions Adapt inet_drv to Visual Studio 2008 Teach spawn_executable about Unicode Convert filenames read on MacOSX to canonical form Teach file to accept codepoints beyond 255. Add testcases Correct shell utilities to handle unicode and possibly binaries ...
2010-12-01Merge branch 'lukas/hipe/decode_packet_type' into devLukas Larsson
* lukas/hipe/decode_packet_type: Update httppacket type to return both strings and binaries
2010-11-30Corrected testcases broken by unicode filenamesPatrik Nyblom
Also corrected type-info for bifs
2010-11-29Fix type information of 'file' and 'code' modulesKostis Sagonas
Dialyzer for a long time now has had hard-coded type information about key functions of the 'file' and 'code' modules in 'erl_bif_types'. Some of this information was not up-to-date according to the published Erlang/OTP documentation, while some other part contained small errors. Now that specs are available, this information should be moved to the corresponding files, not be hard-coded in erl_bif_types. This change takes out all information for the 'file' module and fixes some small errors in type information for the 'code' module.
2010-10-15Update httppacket type to return both strings and binariesLukas Larsson
2010-10-14Add the {encoding, _} options to file:open/2's modesKostis Sagonas
Although the {encoding, encoding()} set of options is documented in the manual page of the 'file' module, they do not appear in the Mode description on that page nor in the mode() type declaration. The patch adds this information in both the code of the module and the documentation of the module. To avoid duplication, the declaration of the encoding() type is added to the 'unicode' module where it most probably belongs. While at it, added a proper declaration for posix(), took out the now superfluous information about the types of file:open/2 from the erl_bif_types module, and corrected the return type of file:open/2 so that it corresponds to the published documentation.
2010-10-02Fix type of ets:update_counter/3 to correspond with the documentationKostis Sagonas
2010-08-17erts: Remove broken elib_mallocBjörn Gustavsson
elib_malloc is an alternate memory allocator that is no longer possible to build.
2010-07-07Fix a bug in the type of lists:flatmap/2.Kostis Sagonas
The code handling this BIF did not take into account that the fun in the first argument that could return [] and therefore the return value of the BIF could also be [].
2010-06-09Dialyzer cleanup for eprofBjörn-Egil Dahlberg
2010-06-08Merge branch 'bg/bif-types' into devErlang/OTP
* bg/bif-types: Add type information for erlang:garbage_collect_message_area/0 Add type information for erts_debug:* BIFs Add type information for erlang:port_call/2 Add type information for erlang:display* BIFs Add type information for the BIFs in the binary module Introduce and use the t_endian() helper Add type information for erlang:binary_part/2,3 Add type info for erlang:append/2 and erlang:subtract/2 Add type information for the erlang:adler32* BIFs Add ppc64 return for erlang:system_info(hipe_architecture) Test that all BIFs have known types erl_types: Export is_erl_type/1
2010-06-07Add type information for erlang:garbage_collect_message_area/0Björn Gustavsson
erlang:garbage_collect_message_area/0 is undocumented and unsupported.
2010-06-07Add type information for erts_debug:* BIFsBjörn Gustavsson
2010-06-07Add type information for erlang:port_call/2Björn Gustavsson
(erlang:port_call/2 is undocumented.)
2010-06-07Add type information for erlang:display* BIFsBjörn Gustavsson
2010-06-07Add type information for the BIFs in the binary moduleBjörn Gustavsson
2010-06-07Introduce and use the t_endian() helperBjörn Gustavsson
2010-06-07Add type information for erlang:binary_part/2,3Björn Gustavsson
2010-06-07Add type info for erlang:append/2 and erlang:subtract/2Kostis Sagonas
These are aliases for '++'/2 and '--'/2.
2010-06-07Add type information for the erlang:adler32* BIFsKostis Sagonas
While at it, introduce a new type for adler32 and crc32 and use it consistently within the file.
2010-06-07Add ppc64 return for erlang:system_info(hipe_architecture)Kostis Sagonas
2010-05-31Add erlang:nif_error/1,2Björn Gustavsson
A stub function that is supposed to be replaced by a NIF usually calls erlang:error/1 to cause an exception if the NIF library is not loaded. For example: foo() -> erlang:error(nif_not_loaded). The problem is that although erlang:error/1 will normally never be called, Dialyzer will think that any call to the function will fail and thus generate false warnings. Adding a spec for the function will not help because Dialyzer will not believe the spec. Add erlang:nif_error/1,2 that work exactly like erlang:error/1,2. Define the return types for both BIFs to be t_any(). erlang:nif_error is used like this: -spec foo() -> binary(). foo() -> erlang:nif_error(nif_not_loaded). (The -spec is optional but highly recommended, since Dialyzer otherwise has no chance to figure out the types.)
2010-05-03Add type info for erlang:load_nif/2Kostis Sagonas
2010-03-29Add type information about erlang:integer_to_list/2 and erlang:list_to_integer/2Kostis Sagonas
2010-03-20Add missing type in erlang:decode_packet/3Kostis Sagonas
2010-02-17Merge branch 'ks/hipe' into ccase/r13b04_devErlang/OTP
* ks/hipe: dialyzer: Fix system_limit exception in race analysis syntax_tools: Add types and specs for most exported functions syntax_tools: Support the --enable-native-libs configure option syntax_tools: Remove $Id$ annotations dialyzer: New version for the R13B04 release hipe: Miscellaneous additions typer: New version for the R13B04 release Fix a HiPE compiler bug evaluating an expression that throws system_limit OTP-8460 ks/hipe
2010-02-16Merge branch 'bg/erl_bif_types' into ccase/r13b04_devErlang/OTP
* bg/erl_bif_types: Add types for erts_debug:lock_counters/1 Add types for os:timestamp/0 Add types for erts_debug:dist_ext_to_term/2 erl_bif_types: add 'http_bin' as a valid packet option OTP-8437: bg/erl_bif_types
2010-02-14Add types for erts_debug:lock_counters/1Björn Gustavsson
erts_debug:lock_counters/1 is an undocumented BIF used by the 'lcnt' module in the 'tools' application.
2010-02-14Add types for os:timestamp/0Björn Gustavsson
2010-02-14Add types for erts_debug:dist_ext_to_term/2Björn Gustavsson
2010-02-14erl_bif_types: add 'http_bin' as a valid packet optionBjörn Gustavsson
{packet,http_bin} is now a valid packet option for the gen_tcp and inet modules.
2010-02-14dialyzer: New version for the R13B04 releaseKostis Sagonas
2010-02-14Fix a HiPE compiler bug evaluating an expression that throws system_limitKostis Sagonas
2009-11-27Add type information for on_loadBjörn Gustavsson
The on_load feature introduced in R13B03 adds two new internal BIFs and extends the return value of erlang:load_module/2.
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP