Permalink
Commits on Aug 26, 2015
  1. Merge branch 'maint'

    * maint:
      Optimize zip:unzip/2 when uncompressing to memory
      wx: Fix assert log test
      debugger: Fix broken debugger:quick/3 start
      Remove erlang:now() and random usage in tests
    dgud committed Aug 26, 2015
  2. Merge branch 'dgud/stdlib/zip-optimize/OTP-12950' into maint

    * dgud/stdlib/zip-optimize/OTP-12950:
      Optimize zip:unzip/2 when uncompressing to memory
    dgud committed Aug 26, 2015
  3. Merge branch 'dgud/debugger/fix-case-clause/OTP-12911' into maint

    * dgud/debugger/fix-case-clause/OTP-12911:
      debugger: Fix broken debugger:quick/3 start
    dgud committed Aug 26, 2015
  4. Merge branch 'dgud/wx/fix-test' into maint

    * dgud/wx/fix-test:
      wx: Fix assert log test
    dgud committed Aug 26, 2015
  5. Merge branch 'dgud/mnesia/use_now_in_tests' into maint

    * dgud/mnesia/use_now_in_tests:
      Remove erlang:now() and random usage in tests
    dgud committed Aug 26, 2015
  6. Merge branch 'maint'

    HansN committed Aug 26, 2015
  7. Merge branch 'hans/ssh/random_extra_padding/OTP-12831' into maint

    * hans/ssh/random_extra_padding/OTP-12831:
      ssh: add extra random length padding in packets
    HansN committed Aug 26, 2015
Commits on Aug 25, 2015
  1. ssh: add extra random length padding in packets

    A new experimental option 'max_random_length_padding', not documented so it might change...
    HansN committed Aug 20, 2015
  2. Merge branch 'maint'

    HansN committed Aug 25, 2015
  3. Merge branch 'hans/ssh/deps_in_src_Makefile' into maint

    * hans/ssh/deps_in_src_Makefile:
      ssh: dependencies added in ssh/src/Makefile
    HansN committed Aug 25, 2015
  4. Merge branch 'hans/ssh/prolong_short_timetrap' into maint

    * hans/ssh/prolong_short_timetrap:
      ssh: doubled short timetrap in testcase
    HansN committed Aug 25, 2015
  5. Merge branch 'maint'

    proxyles committed Aug 25, 2015
  6. Merge branch 'eksperimental/patch-1' into maint

    * eksperimental/patch-1:
      Improve success message when 2 tests have passed
    
    OTP-12952
    proxyles committed Aug 25, 2015
  7. Merge branch 'maint'

    * maint:
      dialyzer: Correct the timing of the phase called 'remote'
      dialyzer: Optimize expansion of parameters of opaque types
      dialyzer: Optimize the expansion of parameterized types somewhat
      dialyzer: Improve the handling of recursive parameterized opaque types
      dialyzer: Generalize an argument of erl_types:t_from_form()
    uabboli committed Aug 25, 2015
  8. Merge branch 'hb/dialyzer/recursive_opaque_types/OTP-12865' into maint

    * hb/dialyzer/recursive_opaque_types/OTP-12865:
      dialyzer: Correct the timing of the phase called 'remote'
      dialyzer: Optimize expansion of parameters of opaque types
      dialyzer: Optimize the expansion of parameterized types somewhat
      dialyzer: Improve the handling of recursive parameterized opaque types
      dialyzer: Generalize an argument of erl_types:t_from_form()
    uabboli committed Aug 25, 2015
  9. dialyzer: Optimize expansion of parameters of opaque types

    Opaque recursive parameters are expanded faster.
    uabboli committed Jul 2, 2015
  10. dialyzer: Optimize the expansion of parameterized types somewhat

    Expand parameters when needed only.
    
    The opaqueness is removed from types expanded to any().
    uabboli committed Jul 2, 2015
  11. dialyzer: Generalize an argument of erl_types:t_from_form()

    Add more information about the caller of t_from_form(). Instead of
    just the module, also provide name of the type, spec, or record where
    the type form resides.
    uabboli committed Jun 29, 2015
Commits on Aug 24, 2015
  1. Optimize zip:unzip/2 when uncompressing to memory

    Optimize the case where we are appending to the end of the binary, use
    binary syntax to create binaries with room for expansion in the next
    loop, instead of using iolist_to_binary which creates a binary of the
    exact size and needs to be copied in each loop.
    
    Also remove support the unused Acc as iolists.
    dgud committed Aug 21, 2015
  2. Update primary bootstrap

    bjorng committed Aug 24, 2015
  3. Merge branch 'bjorn/compiler/opt/OTP-12951'

    * bjorn/compiler/opt/OTP-12951:
      beam_validator: Don't allow x(1023) to be used
      v3_core: Improve code generation for guards
      Move rewriting of select_val to is_boolean from beam_peep to beam_dead
      Put 'try' in blocks to optimize allocation instructions
      Reorder instructions across try/catch
      Delay get_tuple_element instructions until they are needed
      Optimize get_tuple_element instructions by moving them forward
      beam_block: Improve the move optimizations
      beam_block: Clean up optimization of move optimizations
      beam_block: Eliminate redundant wasteful call to opt/1
      Teach the compiler the 'da' and 'dz' options
    bjorng committed Aug 24, 2015
  4. Merge branch 'maint'

    * maint:
      hipe/dialyzer: Fix a bug concerning opaque types and keydelete/3
    uabboli committed Aug 24, 2015
  5. Merge branch 'hb/hipe/keydelete_fix/OTP-12949' into maint

    * hb/hipe/keydelete_fix/OTP-12949:
      hipe/dialyzer: Fix a bug concerning opaque types and keydelete/3
    uabboli committed Aug 24, 2015
Commits on Aug 21, 2015
  1. beam_validator: Don't allow x(1023) to be used

    In 45f469c, the BEAM loader started to use x(1023) as scratch
    register for some instructions. Therefore we should not allow
    x(1023) to be used in code emitted by the compiler.
    bjorng committed Aug 21, 2015
  2. v3_core: Improve code generation for guards

    When translating guards to Core Erlang, it is sometimes necessary
    to add an is_boolean/1 guard test. Here is an example when it is
    necessary:
    
      o(A, B) when A or B ->
        ok.
    
    That would be translated to something like:
    
      o(A, B) when ((A =:= true) or (B =:= true)) and
          is_boolean(A) and is_boolean(B) ->
        ok.
    
    The is_boolean/1 tests are necessary to ensure that the guard
    fails for calls such as:
    
      o(true, not_boolean)
    
    However, because of a bug in v3_core, is_boolean/1 tests were
    added when they were not necessary. Here is an example:
    
      f(B) when not B -> ok.
    
    That would be translated to:
    
      f(B) when (B =:= false) and is_boolean(B) -> ok.
    
    The following translation will work just as well.
    
      f(B) when B =:= false -> ok.
    
    Correct the bug to suppress those unnecessary is_boolean/1 tests.
    bjorng committed Aug 10, 2015
  3. Move rewriting of select_val to is_boolean from beam_peep to beam_dead

    We can rewrite more instances of select_val to is_boolean because
    it is not necessary that a particular label follows the select_val.
    bjorng committed Aug 10, 2015
  4. Put 'try' in blocks to optimize allocation instructions

    Put 'try' instructions inside block to improve the optimization
    of allocation instructions. Currently, the compiler only looks
    at initialization of y registers inside blocks when determining
    which y registers that will be "naturally" initialized.
    bjorng committed Aug 5, 2015
  5. Reorder instructions across try/catch

    Simplify further optimizations by moving safe instructions to
    before the 'try' or 'catch' instruction.
    bjorng committed Aug 5, 2015
  6. Delay get_tuple_element instructions until they are needed

    When matching tuples, the pattern matching compiler would generate
    code that would fetch all elements of the tuple that will ultimately
    be used, *before* testing that (for example) the first element is the
    correct record tag. For example:
    
      is_tuple Fail {x,0}
      test_arity Fail {x,0} 3
      get_tuple_element {x,0} 0 {x,1}
      get_tuple_element {x,0} 1 {x,2}
      get_tuple_element {x,0} 2 {x,3}
      is_eq_exact Fail {x,1} some_tag
    
    If {x,2} and {x,3} are not used at label Fail, we can re-arrange the
    code like this:
    
      is_tuple Fail {x,0}
      test_arity Fail {x,0} 3
      get_tuple_element {x,0} 0 {x,1}
      is_eq_exact Fail {x,1} some_tag
      get_tuple_element {x,0} 1 {x,2}
      get_tuple_element {x,0} 2 {x,3}
    
    Doing that may be beneficial in two ways.
    
    If the branch is taken, we have eliminated the execution of two
    unnecessary instructions.
    
    Even if the branch is never or rarely taken, there is the possibility
    for more optimizations following the is_eq_exact instructions.
    For example, imagine that the code looks like this:
    
      get_tuple_element {x,0} 1 {x,2}
      get_tuple_element {x,0} 2 {x,3}
      move {x,2} {y,0}
      move {x,3} {y,1}
    
    Assuming that {x,2} and {x,3} have no further uses in the code
    that follows, that can be rewritten to:
    
      get_tuple_element {x,0} 1 {y,0}
      get_tuple_element {x,0} 2 {y,1}
    
    When should we perform this optimization?
    
    At the very latest, it must be done before opt_blocks/1 in
    beam_block which does the elimination of unnecessary moves.
    Actually, we want do the optimization before the blocks have
    been established, since moving instructions out of one block
    into another is cumbersome.
    
    Therefore, we will do the optimization in a new pass that is
    run before beam_block. A new pass will make debugging easier,
    and beam_block already has a fair number of sub passes.
    bjorng committed Jul 7, 2015
  7. beam_block: Improve the move optimizations

    Here is an example of a move instruction that could not be optimized
    away because the {x,2} register was not killed:
    
      get_tuple_element Reg Pos {x,2}
      .
      .
      .
      move {x,2} {y,0}
      put_list {x,2} nil Any
    
    We can do the optimization if we replace all occurrences of the {x,2}
    register as a source with {y,0}:
    
      get_tuple_element Reg Pos {y,0}
      .
      .
      .
      put_list {y,0} nil Dst
    bjorng committed Jul 22, 2015