Permalink
Commits on Nov 7, 2011
  1. Merge branch 'ta/nif-variadic-funs'

    OTP-9675
    proxyles committed Nov 7, 2011
  2. Minor improvemnts to the emasurement tool mstone1.

    OTP-9604
    
    The profiling test tool has been rewritten.
    H�kan Mattsson
    OTP-9679
    
    Merge branch 'bmk/megaco/r15_integration'
    bmk committed Nov 7, 2011
  3. Update primary bootstrap

    bjorng committed Nov 7, 2011
  4. Merge branch 'bjorn/fun-improvements/OTP-9667'

    * bjorn/fun-improvements/OTP-9667:
      sys_pre_expand: Remove incorrect comment
      compiler: Eliminate use of deprecated erlang:hash/2
      beam_asm: Fix broken NewIndex in fun entries
      beam_asm: Strenghten the calculation of Uniq for funs
    bjorng committed Nov 7, 2011
  5. Merge branch 'bjorn/external-funs/OTP-9643'

    * bjorn/external-funs/OTP-9643:
      EEP-23: Allow variables in fun M:F/A
      Reference manual: Improve the documentation for external funs
      Test calling a parameterized module within a fun
      beam_loader: Support external funs in the literal pool
    bjorng committed Nov 7, 2011
  6. sys_pre_expand: Remove incorrect comment

    sys_pre_expand does not keep track of used or new variables (and have
    not done since about the time Core Erlang was introduced).
    bjorng committed Oct 9, 2011
  7. compiler: Eliminate use of deprecated erlang:hash/2

    Now that beam_asm computes the Index and Uniq values for funs, there
    is no need to compute those values in the sys_pre_expand and v3_kernel
    modules, thus eliminating the calls to the deprecated erlang:hash/2
    function.
    
    It would be tempting to stop generating the name for the fun in
    sys_pre_expand so that we did not have to add the Info field to a tuple.
    
    But:
    
    * The debugger depends on the name being there. (Simple solution:
      Let the debugger generate the name itself.)
    
    * When a fun has been inlined into another function, the fun name in
      'id' annotation will be used to notice the inlining and change the
      final clause of the top-level case from generating a 'function_clause'
      exception to a case_clause exception. (Possible workaround: Have the
      inliner set an inlined attribute on functions that have been inlined, or
      have the inliner rewrite 'function_clause' exceptions itself.)
    bjorng committed Oct 8, 2011
  8. beam_asm: Fix broken NewIndex in fun entries

    The calculation of the NewIndex field in fun entries is broken: the
    sys_pre_expand and v3_kernel modules keep separate index counters
    starting at zero; thus there is no guarantee that each fun within a
    module will have its own unique NewIndex.
    
    We don't really need the NewIndex any more (see below), but since
    we do need the NewUniq field, we should fix NewIndex for cleanliness
    sake. The simplest way is to assign NewIndex as late as possible,
    namely in beam_asm, and to set it to the same value as Index.
    
    Historical Note: Why NewIndex Was Introduced
    
    There was once an idea that the debugger should be able to interpret
    only a single function in a module (for speed). To make sure that
    interpreted funs could be called from BEAM code and vice versa,
    the fun identification must be visible in the abstract code.
    Therefore a NewIndex field was introduced in each fun in the abstract
    code.
    
    However, it turned out that interpreting single functions does not
    play well with aggressive code optimization. For example, in this
    code:
    
    f() ->
        X = 1,
        fun() -> X+2 end.
    
    the variable X will seem to be free in the fun, but an aggressive
    optimizer will replace X with 1 in the fun; thus the fun will no
    longer have any free variables. Therefore, the debugger will always
    interpret entire modules.
    bjorng committed Sep 29, 2011
  9. beam_asm: Strenghten the calculation of Uniq for funs

    Funs are identified by a triple, <Module,Uniq,Index>, where Module is
    the module name, Uniq is a 27 bit hash value of some intermediate
    representation of the code for the fun, and index is a small integer.
    
    When a fun is loaded, the triple for the fun will be compared to
    previously loaded funs. If all elements in the triple in the newly
    loaded fun are the same, the newly loaded fun will replace the previous
    fun. The idea is that if Uniq are the same, the code for the fun is also
    the same.
    
    The problem is that Uniq is only based on the intermediate representation
    of the fun itself. If the fun calls local functions in the same module,
    Uniq may remain the same even if the behavior of the fun has been changed.
    
    See
    
      http://erlang.org/pipermail/erlang-bugs/2007-June/000368.htlm
    
    for an example.
    
    As a long-term plan to fix this problem, the NewIndex and NewUniq
    fields was added to each fun in the R8 release (where NewUniq is the
    MD5 of the BEAM code for the module). Unfortunately, it turns
    out that the compiler does not assign unique value to NewIndex (if it
    isn't tested, it doesn't work), so we cannot use the
    <Module,NewUniq,NewIndex> triple as identification.
    
    It would be possible to use <Module,NewUniq,Index>, but that seems
    ugly. Therefore, fix the problem by making Uniq more unique by
    taking 27 bits from the MD5 for the BEAM code. That only requires
    a change to the compiler.
    
    Also update a test case for cover, which now fails because of the
    stronger Uniq calculation. (The comment in test case about why the
    Pid2 process survived is not correct.)
    bjorng committed Sep 29, 2011
  10. EEP-23: Allow variables in fun M:F/A

    Currently, the external fun syntax "fun M:F/A" only supports
    literals. That is, "fun lists:reverse/1" is allowed but not
    "fun M:F/A".
    
    In many real-life situations, some or all of M, F, A are
    not known until run-time, and one is forced to either use
    the undocumented erlang:make_fun/3 BIF or to use a
    "tuple fun" (which is deprecated).
    
    EEP-23 suggests that the parser (erl_parse) should immediately
    transform "fun M:F/A" to "erlang:make_fun(M, F, A)". We have
    not followed that approach in this implementation, because we
    want the abstract code to mirror the source code as closely
    as possible, and we also consider erlang:make_fun/3 to
    be an implementation detail that we might want to remove in
    the future.
    
    Instead, we will change the abstract format for "fun M:F/A" (in a way
    that is not backwards compatible), and while we are at it, we will
    move the translation from "fun M:F/A" to "erlang:make_fun(M, F, A)"
    from sys_pre_expand down to the v3_core pass. We will also update
    the debugger and xref to use the new format.
    
    We did consider making the abstract format backward compatible if
    no variables were used in the fun, but decided against it. Keeping
    it backward compatible would mean that there would be different
    abstract formats for the no-variable and variable case, and tools
    would have to handle both formats, probably forever.
    
    Reference: http://www.erlang.org/eeps/eep-0023.html
    bjorng committed Apr 9, 2010
  11. OTP-9683

    Merge branch 'ssl-cbc-fix'
    
    * ssl-cbc-fix:
      fix handling of block_decipher/5 failure
    IngelaAndin committed Nov 7, 2011
Commits on Nov 4, 2011
  1. Minor improvements to the meas tools.

    OTP-9604
    
    Merge branch 'bmk/megaco/20111003/improving_mstone1/OTP-9604' into bmk/megaco/r15_integration
    
    Conflicts:
    	lib/megaco/doc/src/notes.xml
    bmk committed Nov 4, 2011
  2. The profiling test tool has been rewritten.

    H�kan Mattsson.
    OTP-9679
    Merge branch 'bmk/megaco/improving_profiling_tool/OTP-9679' into bmk/megaco/r15_integration
    bmk committed Nov 4, 2011
  3. Updated release notes and appup file.

    OTP-9679
    bmk committed Nov 4, 2011
Commits on Nov 2, 2011
  1. Test calling a parameterized module within a fun

    It is tempting to transform code such as:
    
      fun(X) -> M:foo(X) end
    
    to:
    
      fun M:foo/1
    
    Unfortunately, that transformation is not safe if
    M happens to be a parameterized module. Add a test
    case so that we don't attempt to do such an optimization
    in the future.
    bjorng committed May 30, 2010
  2. beam_loader: Support external funs in the literal pool

    A future release of the compiler might want to treat external
    funs as literals. Make sure that the loader can cope with an
    export entry being created from both an entry in the literal
    pool and from the export table (i.e. if an external fun refers
    to an exported function in the same module).
    bjorng committed May 26, 2010
  3. beam_load.c: Clarify error message when loading unsupported BEAM files

    Make it clear for the user what has happened and how to fix it when
    an attempt is made to load a BEAM file containing new instructions
    that the current run-time system cannot handle.
    
    Suggested-by: Thomas Lindgren
    bjorng committed Oct 31, 2011
Commits on Nov 1, 2011
  1. Merge branch 'lukas/kernel/tc_fixes'

    * lukas/kernel/tc_fixes:
      Kill nodes inbetween tests
    garazdawi committed Nov 1, 2011
  2. Merge branch 'rc/remote-shell-completion'

    OTP-9673
    proxyles committed Nov 1, 2011
  3. Merge branch 'lukas/erts/large_float_cmp/OTP-9497'

    * lukas/erts/large_float_cmp/OTP-9497:
      Update documentation after changes in integer and float comparison
      Do small optimisation on platforms with 32 bit Eterm
      Add tests for equality checking
      Optimize comparison of huge floats and smaller bignums
      Add tests for comparing large floats and small bignums
      Cleanup double_to_bignum conversion code
      Update size of tmp cmp bignum buffer
      Expand tests for float and number comparison
      Update heauristic to work on halfword
      Add heauristics bignum vs float checks
      Optimise bugnum and small comparison
      Add float vs integer comparison tests
      Update integer and floating point number comparisons
    garazdawi committed Nov 1, 2011
  4. Merge branch 'lukas/megaco/remove_driver_warning/OTP-9672'

    * lukas/megaco/remove_driver_warning/OTP-9672:
      Remove the warning that driver option is replaced by nif
    garazdawi committed Nov 1, 2011
Commits on Oct 28, 2011
  1. Merge branch 'siri/observer/ttb-test-cleanup-slave-nodes/OTP-9644'

    * siri/observer/ttb-test-cleanup-slave-nodes/OTP-9644:
      Adjust ttb_SUITE to work better on windows
      Cleanup after testcases in ttb_SUITE
    sirihansen committed Oct 28, 2011
  2. Merge branch 'siri/observer/close-ip-to-file-trace-port/OTP-9665'

    * siri/observer/close-ip-to-file-trace-port/OTP-9665:
      Close ip_to_file trace port in ttb:stop
    sirihansen committed Oct 28, 2011
Commits on Oct 27, 2011
  1. erts: Make erl_nif.h compile with gcc on Windows

    and some added comments
    sverker committed Oct 27, 2011
  2. Remove unused */doc/src/make.dep files

    These dependency files was once used when building the documentation,
    but are no longer needed.
    bjorng committed Oct 20, 2011
  3. doc Makefiles: Eliminate DOCSUPPORT ifdefs

    Some applications still have support for an ancient documentation
    build system. Eliminate the DOCSUPPORT define in otp.mk.in and the
    not taken arm of the ifdefs in the Makefiles.
    bjorng committed Oct 20, 2011
  4. Merge branch 'bjorn/eliminate-regexp-usage'

    * bjorn/eliminate-regexp-usage:
      erl_tidy: Eliminate two references to 'regexp' in the documentation
      erts/z_SUITE: Eliminate use of deprecated regexp module
      erts/nt_SUITE: Eliminate use of deprecated regexp module
      erl_html_tools: Eliminate mention of deprecated regexp module
      erl_interface tests: Eliminate use of deprecated regexp module
      tools test suite: Eliminate compilation warnings for the eed module
      tools test suite: Eliminate use of deprecated regexp module
      xmerl test suite: Eliminate use of deprecated regexp module
      appmon: Eliminate use of deprecated regexp module
      tv: Eliminate use of deprecated regexp module
      gs: Eliminate use of deprecated regexp module
      inviso: Eliminate use of deprecated regexp module
    bjorng committed Oct 27, 2011