Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Nov 7, 2011
  1. Henrik Nord

    Merge branch 'ta/nif-variadic-funs'

    proxyles authored
  2. Micael Karlberg

    Minor improvemnts to the emasurement tool mstone1.

    bmk authored
    The profiling test tool has been rewritten.
    H�kan Mattsson
    Merge branch 'bmk/megaco/r15_integration'
  3. Micael Karlberg
  4. Björn Gustavsson

    Update primary bootstrap

    bjorng authored
  5. Björn Gustavsson

    Merge branch 'bjorn/fun-improvements/OTP-9667'

    bjorng authored
    * 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
  6. Björn Gustavsson

    Merge branch 'bjorn/external-funs/OTP-9643'

    bjorng authored
    * 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
  7. Björn Gustavsson

    sys_pre_expand: Remove incorrect comment

    bjorng authored
    sys_pre_expand does not keep track of used or new variables (and have
    not done since about the time Core Erlang was introduced).
  8. Björn Gustavsson

    compiler: Eliminate use of deprecated erlang:hash/2

    bjorng authored
    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
    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.
    * 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.)
  9. Björn Gustavsson

    beam_asm: Fix broken NewIndex in fun entries

    bjorng authored
    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
    However, it turned out that interpreting single functions does not
    play well with aggressive code optimization. For example, in this
    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.
  10. Björn Gustavsson

    beam_asm: Strenghten the calculation of Uniq for funs

    bjorng authored
    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.
    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.)
  11. Björn Gustavsson

    EEP-23: Allow variables in fun M:F/A

    bjorng authored
    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.
  12. Ingela Andin


    IngelaAndin authored
    Merge branch 'ssl-cbc-fix'
    * ssl-cbc-fix:
      fix handling of block_decipher/5 failure
Commits on Nov 4, 2011
  1. Micael Karlberg

    Minor improvements to the meas tools.

    bmk authored
    Merge branch 'bmk/megaco/20111003/improving_mstone1/OTP-9604' into bmk/megaco/r15_integration
  2. Micael Karlberg

    The profiling test tool has been rewritten.

    bmk authored
    H�kan Mattsson.
    Merge branch 'bmk/megaco/improving_profiling_tool/OTP-9679' into bmk/megaco/r15_integration
  3. Micael Karlberg

    Updated release notes and appup file.

    bmk authored
Commits on Nov 2, 2011
  1. Björn Gustavsson
  2. Björn Gustavsson

    Test calling a parameterized module within a fun

    bjorng authored
    It is tempting to transform code such as:
      fun(X) -> M:foo(X) end
      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.
  3. Björn Gustavsson

    beam_loader: Support external funs in the literal pool

    bjorng authored
    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).
  4. Björn Gustavsson

    beam_load.c: Clarify error message when loading unsupported BEAM files

    bjorng authored
    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
Commits on Nov 1, 2011
  1. Micael Karlberg
  2. Lukas Larsson

    Merge branch 'lukas/kernel/tc_fixes'

    garazdawi authored
    * lukas/kernel/tc_fixes:
      Kill nodes inbetween tests
  3. Henrik Nord
  4. Lukas Larsson

    Merge branch 'lukas/erts/large_float_cmp/OTP-9497'

    garazdawi authored
    * 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
  5. Lukas Larsson

    Merge branch 'lukas/megaco/remove_driver_warning/OTP-9672'

    garazdawi authored
    * lukas/megaco/remove_driver_warning/OTP-9672:
      Remove the warning that driver option is replaced by nif
Commits on Oct 28, 2011
  1. Siri Hansen

    Merge branch 'siri/observer/ttb-test-cleanup-slave-nodes/OTP-9644'

    sirihansen authored
    * siri/observer/ttb-test-cleanup-slave-nodes/OTP-9644:
      Adjust ttb_SUITE to work better on windows
      Cleanup after testcases in ttb_SUITE
  2. Siri Hansen

    Merge branch 'siri/observer/close-ip-to-file-trace-port/OTP-9665'

    sirihansen authored
    * siri/observer/close-ip-to-file-trace-port/OTP-9665:
      Close ip_to_file trace port in ttb:stop
Commits on Oct 27, 2011
  1. Sverker Eriksson

    erts: Make erl_nif.h compile with gcc on Windows

    sverker authored
    and some added comments
  2. Björn Gustavsson

    Remove unused */doc/src/make.dep files

    bjorng authored
    These dependency files was once used when building the documentation,
    but are no longer needed.
  3. Björn Gustavsson

    doc Makefiles: Eliminate DOCSUPPORT ifdefs

    bjorng authored
    Some applications still have support for an ancient documentation
    build system. Eliminate the DOCSUPPORT define in and the
    not taken arm of the ifdefs in the Makefiles.
  4. Björn Gustavsson

    Merge branch 'bjorn/eliminate-regexp-usage'

    bjorng authored
    * 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
  5. Björn Gustavsson
  6. Björn Gustavsson
  7. Björn Gustavsson
  8. Björn Gustavsson
  9. Björn Gustavsson
Something went wrong with that request. Please try again.