aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2012-01-27Move types and specs from erl_bif_types.erl to modulesHans Bolinder
2012-01-27Merge branch 'bjorn/erts/bif-stubs/OTP-9861'Björn Gustavsson
* bjorn/erts/bif-stubs/OTP-9861: beam_load.c: Allow stubs for BIFs beam_load.c: Don't show unnecessary context in errors beam_load.c: Remove useless call to next_heap_size() beam_load.c: apply/2 does not need a special case
2012-01-26Merge branch 'maint'Björn Gustavsson
* maint: Update primary bootstrap erl_lint: Disallow call to is_record/3 if there is a local is_record/3 Fix crash in trace_info({M,F,A}, Flags) when M:F/A has native code Ensure that generated record operations don't call local functions
2012-01-26Merge branch 'bjorn/erts/fix-hipe-crash/OTP-9886' into maintBjörn Gustavsson
* bjorn/erts/fix-hipe-crash/OTP-9886: Fix crash in trace_info({M,F,A}, Flags) when M:F/A has native code
2012-01-26Update primary bootstrapBjörn Gustavsson
2012-01-26Merge branch 'bjorn/compiler/bif-call-bug/OTP-9866' into maintBjörn Gustavsson
* bjorn/compiler/bif-call-bug/OTP-9866: erl_lint: Disallow call to is_record/3 if there is a local is_record/3 Ensure that generated record operations don't call local functions
2012-01-26erl_lint: Disallow call to is_record/3 if there is a local is_record/3Björn Gustavsson
Attempting to call is_record/3 (without an erlang: prefix) from a guard if there was a local function named is_record/3 would cause a compiler crash. For consistency with other guard tests, disallow the call. is_record/2 in a guard will still be allowed (and work correctly) even if there is a local is_record/2. It could be argued that is_record/2 should be handled in the same way as is_record/3, but changing that now could break working code.
2012-01-25Merge branch 'maint'Björn Gustavsson
* maint: compile_SUITE: Eliminate race condition
2012-01-25compile_SUITE: Eliminate race conditionBjörn Gustavsson
Compiling the same source code with the same options may not produce the same BEAM file because the compilation time is included in the "CInf" chunk.
2012-01-25Fix crash in trace_info({M,F,A}, Flags) when M:F/A has native codeBjörn Gustavsson
2012-01-25Merge branch 'maint'Björn Gustavsson
* maint: Update primary bootstrap compiler: Correct live calculation when get/1 is used in try...catch
2012-01-25Update primary bootstrapBjörn Gustavsson
2012-01-25Merge branch 'bjorn/compiler/get-in-try/OTP-9867' into maintBjörn Gustavsson
* bjorn/compiler/get-in-try/OTP-9867: compiler: Correct live calculation when get/1 is used in try...catch
2012-01-25Merge branch 'maint'Lukas Larsson
* maint: Look for port in priv/bin/arch/ as well as priv/bin/ Fix on_load handling in modules loaded by code:load_binary/3
2012-01-25Merge branch 'lukas/os_mon/work_in_source_tree/OTP-9883' into maintLukas Larsson
* lukas/os_mon/work_in_source_tree/OTP-9883: Look for port in priv/bin/arch/ as well as priv/bin/
2012-01-25Merge branch 'bjorn/kernel/on_load-bug/OTP-9875' into maintBjörn Gustavsson
* bjorn/kernel/on_load-bug/OTP-9875: Fix on_load handling in modules loaded by code:load_binary/3
2012-01-25Merge branch 'maint'Raimo Niskanen
2012-01-25Look for port in priv/bin/arch/ as well as priv/bin/Lukas Larsson
2012-01-25Merge branch 'raimo/parallel-make/OTP-9857' into maintRaimo Niskanen
* raimo/parallel-make/OTP-9857: hipe: Fix rtl dependencies erts: Simplify toplevel makefile due to better dependencies erts: Fix make omissions for void emulators erts: Fix dependencies between targets generate and depend erts: Cleanup dependencies for target generate erts,tools: Fix parallel make for erts/lib_src erts: Fix parallel make for emulator zlib Conflicts: erts/emulator/Makefile.in
2012-01-25Ensure that generated record operations don't call local functionsBjörn Gustavsson
Consistently use external (remote) calls to the BIFs element/2, setelement/3, and is_record/3.
2012-01-24beam_load.c: Allow stubs for BIFsBjörn Gustavsson
We want to be able to write type specifications for BIFs in the same way as for any other function. Currently, the type for BIFs need to be described in erl_bif_types. To avoid extending the compiler and Dialyzer with special directives for providing specifications for BIFs, we have decided to let the loader accept a local definition for a function which exists as a BIF. As an example, here is how a stub for lists:reverse/2 can be defined: -export([reverse/2]). -spec reverse([term()], term()) -> [term()]. reverse(_, _) -> erlang:nif_error(undef). Essentially, the loader will discard the local definition of reverse/2. Other functions in the same module must *not* do local calls to a BIF stub. If a local call to a BIF is found, the loader will refuse to load the module. That is, the following call is not allowed: reverse(List) -> reverse(List, []). but the following is: reverse(List) -> ?MODULE:reverse(List, []). A few words about the implementation. It turns out to be too complicated to actually discard the BIF stubs. Although it would be possibly with some jiggery pokery in ops.tab, the code would be difficult to maintain and it could slow down loading of modules that don't define BIFs (which are almost all modules). Therefore, the stub functions are kept in the loaded code, but their names in the func_info instruction are invalidated so that module_info(functions) can filter them out.
2012-01-24Merge branch 'maint'Hans Bolinder
* maint: Correct two contracts in gen_sctp.erl
2012-01-24Merge branch 'hb/kernel/correct_contracts/OTP-9874' into maintHans Bolinder
* hb/kernel/correct_contracts/OTP-9874: Correct two contracts in gen_sctp.erl
2012-01-24hipe: Fix rtl dependenciesRaimo Niskanen
2012-01-24Merge branch 'maint'Björn-Egil Dahlberg
2012-01-24Merge branch 'egil/fix-profiler-pid' into maintBjörn-Egil Dahlberg
* egil/fix-profiler-pid: erts: Do not profile profiler pid (non smp) erts: Do not profile profiler pid (smp) Revert "erts: Do not profile system profiler pid"
2012-01-23erts: Simplify toplevel makefile due to better dependenciesRaimo Niskanen
2012-01-23erts: Fix make omissions for void emulatorsRaimo Niskanen
2012-01-23erts: Fix dependencies between targets generate and dependRaimo Niskanen
* Make generate and depend.mk automatically. * Do not make depend.mk for targets clean and generate. * Remove old replaced CREATE_DIRS cruft. * Fiercer remove by target clean. * Move depend.mk to Target/Type/Flavor directory.
2012-01-23Fix on_load handling in modules loaded by code:load_binary/3Björn Gustavsson
In "13.4 Running a function when a module is loaded" in the Reference Manual, it is said that: A process that calls any function in a module whose on_load function has not yet returned will be suspended until the on_load function has returned. That did not work if the module was loaded using code:load_binary/3. Instead, the callers would get an 'undef' exception.
2012-01-23Merge branch 'master' of super:otpMicael Karlberg
2012-01-23Merge branch 'maint'Micael Karlberg
2012-01-23Merge branch 'maint-r15' into maintMicael Karlberg
2012-01-23Correct two contracts in gen_sctp.erlHans Bolinder
binary should be binary().
2012-01-23Merge branch 'maint'Henrik Nord
2012-01-23Merge branch 'jz/error-logic-efile_sendfile' into maintHenrik Nord
* jz/error-logic-efile_sendfile: erts: minor fix for unnecessary condition OTP-9872
2012-01-23Merge branch 'jz/sendfile_chunk_size' into maintHenrik Nord
* jz/sendfile_chunk_size: erts: change SENDFILE_CHUNK_SIZE from signed to unsigned Conflicts: erts/emulator/drivers/unix/unix_efile.c OTP-9872
2012-01-23Merge branch 'henrik/wx/fix-pdf-name/OTP-9850' into maintHenrik Nord
* henrik/wx/fix-pdf-name/OTP-9850: Change the name of generated pdf file for documentation consistency
2012-01-20Merge branch 'bmk/inets/inets581_integration/r15' into maint-r15Erlang/OTP
* bmk/inets/inets581_integration/r15: [inets/httpc] The client incorrectly streams 404 responses [inets/httpc] Add proper code change code [inets/httpc] Add test case [inets] Add proper release notes for OTP-9847 [inets/httpc] Fix the selection of session for keep-alive mode When selecting a session, the "state" of the session (specifically if the server has responded) was not taken into account. Attempting to fix this, a "state" field (actually available) has been added to the session record. [ftp] Fails to open IPv6 connection
2012-01-20[inets] Merged from R14B and also fixed appupMicael Karlberg
Merge from R14B integration branch (for inets-5.7.3) and fixed appup and corresponding code-change code to work in new version (inets-5.8.1). Also some minor (R15B specific) test suite fixes. Merge branch 'bmk/inets/inets573_integration' into bmk/inets/inets581_integration/r15 Conflicts: lib/inets/doc/src/notes.xml lib/inets/src/http_client/httpc_internal.hrl lib/inets/src/inets_app/inets.appup.src lib/inets/vsn.mk
2012-01-19Merge branch 'maint'Micael Karlberg
2012-01-19Merge branch 'maint-r15' into maintMicael Karlberg
2012-01-18compiler: Correct live calculation when get/1 is used in try...catchBjörn Gustavsson
In the following code excerpt, the instruction marked below was incorrectly removed: . . . {'try',{y,2},{f,TryCaseLabel}}. {bif,get,{f,0},[{x,0}],{x,0}}. {move,{x,1},{y,0}}. {move,{x,3},{y,1}}. <======= Incorrectly removed {jump,{f,TryEndLabel}}. {label,TryEndLabel}. {try_end,{y,2}}. {deallocate,3}. return. {label,TryCaseLabel}. {try_case,{y,2}}. . . . beam_utils indicated that {y,1} was not used at TryEndLabel, which by itself is correct. But it is still not safe to remove the instruction, because {y,1} might be used at TryCaseLabel if an exception occurs. Noticed-by: Eric Merritt
2012-01-18Merge branch 'maint'Björn Gustavsson
* maint: Update primary bootstrap erl_lint: Consistently reject local calls from guards
2012-01-18Update primary bootstrapBjörn Gustavsson
2012-01-18Merge branch 'bjorn/compiler/bif-call-bug/OTP-9866' into maintBjörn Gustavsson
* bjorn/compiler/bif-call-bug/OTP-9866: erl_lint: Consistently reject local calls from guards
2012-01-18Merge branch 'maint'Björn-Egil Dahlberg
2012-01-18Merge branch 'egil/fix-error_logger-calendar/OTP-9854' into maintBjörn-Egil Dahlberg
* egil/fix-error_logger-calendar/OTP-9854: stdlib: Refactor to tag all times in error logger stdlib: Use utc time as base in error logger
2012-01-18Merge branch 'raimo/64-bit-efile_drv/OTP-9820' into maintErlang/OTP
* raimo/64-bit-efile_drv/OTP-9820: file_SUITE: Assume 64-bit windows has enough memory erts: Badarg if port output overflows iov_len prim_file_SUITE: large_file success depends on wordsize file_SUITE: Increase timeout for large_file file_SITE,prim_file_SUITE: Accept old OpenBSD pecularity prim_file_SUITE: large_write - meaner test data and check result content file_SUITE: large_write - check mem size before creating huge binary erts: rewrite efile_writev to handle partial writes correctly erts: Bugfix - driver_deq freed wrong length due to short type (int) prim_file_SUITE: Add large_write/1 file_SUITE: Add large_write/1 file_SUITE: Refactor large_file/1 file_SUITE: Fix unix_free/1
2012-01-17erl_lint: Consistently reject local calls from guardsBjörn Gustavsson
If a guard test (such as is_list/1) has a local definition in a module (or is imported), erl_lint will reject a call to it from a guard if the call is not at the top-level: foo(L) when is_list(L) =:= true -> %% Will be rejected. ok. is_list(_) -> ok. But if the call is at the top-level, it will be accepted (and cause a crash in a later compiler pass): foo(L) when is_list(L) -> %% Will be accepted by erl_lint ok. is_list(_) -> ok. This inconsistency was an oversight introduced when it became possible to override BIFs with local definitions.