Commits on Jun 2, 2010
  1. Merge branch 'jl/windows-file-share-delete' into dev

    * jl/windows-file-share-delete:
      Windows: Open files with FILE_SHARE_DELETE to get closer to UNIX semantics
    
    OTP-8667 jl/windows-file-share-delete
    
    On Windows, files are now opened with FILE_SHARE_DELETE to get closer to
    Unix semantics.
    Erlang/OTP committed Jun 2, 2010
  2. @janl @RaimoNiskanen
  3. @bjorng
  4. @bjorng

    beam_dead: Combine is_eq_exact instructions into select_val instructions

    Combine a sequence of chained is_eq_exact instructions into
    a select_val instruction.
    bjorng committed Mar 12, 2010
  5. @bjorng
  6. @bjorng

    Evaluate element/2 at compile-time using type information

    The erl_expand_records compiler pass translates the
    following code:
    
      h(X) when X#r1.a =:= 1 -> ok.
    
    to (essentially):
    
      h({r1,V1,V2}=X) when element(2, X) =:= 1 -> ok.
    
    Since the guard can only be executed when the pattern matching
    has succeeded, we know that the second element in the tuple X
    must have been bound to V2. Thus we can eliminate the call
    to element/2 like this:
    
      h({r1,V1,V2}=X) when V1 =:= 1 -> ok.
    bjorng committed Mar 12, 2010
  7. @bjorng

    erl_expand_records: Replace is_record() with matching

    The compiler currently generates better code for:
    
     f(#r1{}) -> r1;
     f(#r2{}) -> r2;
     f(#r3{}) -> r3.
    
    than for:
    
     g(X) when is_record(X, r1) -> r1;
     g(X) when is_record(X, r2) -> r2;
     g(X) when is_record(X, r3) -> r3.
    
    The compiler generates good code for pattern matching (as in f/1),
    but in g/1 there are no patterns to match, and the clause to be
    executed must be chosen by evaluating the guards sequentially
    until one succeeds.
    
    Make the compiler generate better code by replacing calls to
    is_record() with matching in the function head (basically,
    g/1 will automatically be rewritten to do pattern matching
    as in f/1).
    
    Note that this rewrite will also benefit code such as:
    
     h(X) when X#r1.a =:= 1 -> ok.
    
    because it would have been rewritten to:
    
     h(X) when (is_record(X, r1, 3) orelse fail) and (element(2, X) =:= 1) ->
         ok.
    
    which in turn will be rewritten to:
    
     h({r1,_,_}=X) when (true orelse fail) and (element(2, X) =:= 1) ->
         ok.
    
    (That will be further simplified in later compiler passes.)
    bjorng committed Mar 12, 2010
  8. Merge branch 'rn/resolver-leaking-ports' into dev

    * rn/resolver-leaking-ports:
      Resolver: make inet_dns decode ugly truncated reply
      Resolver: stop inet_res leaking ports
    
    OTP-8652 inet_res leaking ports
    
    The kernel DNS resolver was leaking one or two ports if the DNS reply could
    not be parsed or if the resolver(s) caused noconnection type errors. Bug
    now fixed. A DNS specification borderline truncated reply triggering the
    port leakage bug has also been fixed.
    Erlang/OTP committed Jun 2, 2010
  9. @bufflig
  10. @bufflig
Commits on Jun 1, 2010
  1. @trapexit @RaimoNiskanen

    Add catch all handle_call to net_kernel

    Of the core networking apps only net_kernel fails to have a catchall
    for unknown gen_server:call messages causing it to exit and eventually
    bring down kernal_sup and beam if it had not been manually started.
    For stability and consistancy it has been altered to include a
    catchall which does not reply.
    trapexit committed with RaimoNiskanen Feb 20, 2010
  2. @bufflig
  3. Merge branch 'dgud/emacs-catch-improvements' into dev

    * dgud/emacs-catch-improvements:
      Improved indentation of old catch.
      Added more type highlighting and fixed record indentation with types.
    Erlang/OTP committed Jun 1, 2010
  4. Merge branch 'kj/emacs-erlang-flymake' into dev

    * kj/emacs-erlang-flymake:
      erlang-flymake: Document in README
      erlang-flymake: Make the syntax check command configurable
      erlang-flymake: By default pass <app>/include and <app>/ebin to compiler
      erlang-flymake: Include in Makefile
      erlang-flymake: Syntax check erlang code on the fly (using flymake)
    Erlang/OTP committed Jun 1, 2010
  5. OTP-8643 Improvements of net_kernel

    Under certain circumstances the net kernel could hang. (Thanks to Scott
    Lystig Fritchie.)
    Hans Bolinder committed with Erlang/OTP Jun 1, 2010
  6. @rickard-green

    OTP-8541 Add erl-xcomp-mips-linux.conf

    Added cross configuration file for mips-linux. (Thanks to Matthias Lang for
    the configuration)
    rickard-green committed with Erlang/OTP Jun 1, 2010
  7. @rickard-green

    OTP-8662 Fix ethr_rwmutex_tryrlock

    ethr_rwmutex_tryrlock() acquired and refused to acquire a lock with
    inverted logic. The lock was however never acquired in a thread unsafe
    manner. (Thanks to JR Zhang for noting this issue)
    rickard-green committed with Erlang/OTP Jun 1, 2010
  8. @rickard-green

    OTP-8661 Enable writer preferred pthread read/write locks on Linux

    Writer preferred pthread read/write locks has been enabled on Linux.
    rickard-green committed with Erlang/OTP Jun 1, 2010
  9. @rickard-green

    OTP-8660 Increase atomic fallback locks

    The number of spinlocks used when implementing atomic fall-backs when no
    native atomic implementation is available has been increased from 16 to
    1024.
    rickard-green committed with Erlang/OTP Jun 1, 2010
  10. @rickard-green

    OTP-8612 Fix potential premature destruction of port locks

    Port locks could be prematurely destroyed.
    rickard-green committed with Erlang/OTP Jun 1, 2010
  11. @rickard-green

    OTP-8659 Add ethread support for gcc atomics

    Support for using gcc's built-in functions for atomic memory access has
    been added. This functionallity will be used if available and no other
    native atomic implementation in ERTS is available.
    rickard-green committed with Erlang/OTP Jun 1, 2010
  12. @rickard-green

    OTP-8658 Add missing memory barriers in erts_poll()

    Missing memory barriers in erts_poll() could cause the runtime system to
    hang indefinitely.
    rickard-green committed with Erlang/OTP Jun 1, 2010
  13. Merge branch 'bg/remove-stray-sae-support' into dev

    * bg/remove-stray-sae-support:
      Remove unsupported erlang:blocking_read_file/1
      Remove stray SAE support
    Erlang/OTP committed Jun 1, 2010
  14. Merge branch 'bg/dist_utils' into dev

    * bg/dist_utils:
      dist_utils: Eliminate crash when list_to_existing_atom/1 fails
    Erlang/OTP committed Jun 1, 2010
  15. @dgud @RaimoNiskanen

    Improved indentation of old catch.

    An example that didn't work previously.
    case Foo of 
         {ok, X} ->
             ok;
         _ ->
             catch file:close(FD)
    end.
    dgud committed with RaimoNiskanen May 28, 2010
  16. @dgud @RaimoNiskanen

    Added more type highlighting and fixed record indentation with types.

    Type highlighting reported by Jay Nelson
      non_neg_integer() will highlight purple but pos_integer() does not.
    
    Closing record indentation problem reported by Maxim Treskin:
    
    -record(state, {
             sequence_number = 1          :: integer()
                                                          }).
    dgud committed with RaimoNiskanen May 27, 2010
  17. @klajo @RaimoNiskanen
  18. @klajo @RaimoNiskanen
  19. @klajo @RaimoNiskanen

    erlang-flymake: By default pass <app>/include and <app>/ebin to compiler

    Hopefully this covers at least some of the common cases and makes the
    flymake support more usable as is.  The purpose of including the ebin
    directory is to support things like behaviours and parse transforms.
    klajo committed with RaimoNiskanen May 30, 2010
  20. @klajo @RaimoNiskanen
  21. @klajo @RaimoNiskanen
  22. @RaimoNiskanen

    Resolver: make inet_dns decode ugly truncated reply

    Bugfix: a DNS reply with the truncation bit set containing
    misleading section length (i.e header claimed length greater
    than what was actually in the reply section) in the header
    caused decode error in inet_dns.
    RaimoNiskanen committed May 27, 2010
  23. @RaimoNiskanen

    Resolver: stop inet_res leaking ports

    Bugfix: when all nameservers return a reply causing decode errors
    or when errors enetunreach or econnrefused occured while
    contacting them, one or two UDP ports was leaked i.e
    left open and forgotten.
    RaimoNiskanen committed May 27, 2010
  24. @bjorng @RaimoNiskanen

    Remove unsupported erlang:blocking_read_file/1

    This BIF was only used by the now broken SAE support.
    bjorng committed with RaimoNiskanen May 22, 2010
  25. @bjorng @RaimoNiskanen

    Remove stray SAE support

    The experimental Standalone Erlang (SAE) support based on
    Joe Armstrong's work has long been broken. Remove the remaining
    code and Makefile rules.
    bjorng committed with RaimoNiskanen May 22, 2010