[dmd-internals] [D-Programming-Language/dmd] 5327b6: fix Issue 12574 - [ICE](statement.c, line 713) wit...

GitHub noreply at github.com
Tue Apr 15 11:17:35 PDT 2014


  Branch: refs/heads/master
  Home:   https://github.com/D-Programming-Language/dmd
  Commit: 5327b688775d7c40aa5283730e465760d71d7c03
      https://github.com/D-Programming-Language/dmd/commit/5327b688775d7c40aa5283730e465760d71d7c03
  Author: k-hara <k.hara.pg at gmail.com>
  Date:   2014-04-15 (Tue, 15 Apr 2014)

  Changed paths:
    M src/template.c
    M src/template.h
    M src/traits.c
    A test/fail_compilation/ice12574.d

  Log Message:
  -----------
  fix Issue 12574 - [ICE](statement.c, line 713) with reduce with wrong tuple arity

Make `TemplateInstance::semanticTiargs` reentrant against semantic errors.


  Commit: 42d3a795438c2820aeb59945cd2f132499eda6c5
      https://github.com/D-Programming-Language/dmd/commit/42d3a795438c2820aeb59945cd2f132499eda6c5
  Author: k-hara <k.hara.pg at gmail.com>
  Date:   2014-04-15 (Tue, 15 Apr 2014)

  Changed paths:
    M src/expression.c
    M src/template.c
    M src/template.h

  Log Message:
  -----------
  [Refactoring] Make long member function names short


  Commit: 0b002fc10eb0d09bfb4a30607a3b31c6ed4f6f45
      https://github.com/D-Programming-Language/dmd/commit/0b002fc10eb0d09bfb4a30607a3b31c6ed4f6f45
  Author: k-hara <k.hara.pg at gmail.com>
  Date:   2014-04-15 (Tue, 15 Apr 2014)

  Changed paths:
    M src/template.c

  Log Message:
  -----------
  [Refactoring] Add detailed comment


  Commit: de1a6e570e2b7a135d40ce0bebc312be90e2101a
      https://github.com/D-Programming-Language/dmd/commit/de1a6e570e2b7a135d40ce0bebc312be90e2101a
  Author: k-hara <k.hara.pg at gmail.com>
  Date:   2014-04-15 (Tue, 15 Apr 2014)

  Changed paths:
    M src/expression.c
    A test/fail_compilation/ice12581.d

  Log Message:
  -----------
  fix Issue 12581 - [ICE](statement.c, line 713) with invalid assignment + alias this

Make AssignExp::semantic reentrant for `op_overload` call.

-----

If an expression supports operator overloading, its `semantic` function should not store error expressions in itself until the point of `op_olverload` call (from [a] to [b]).

Example:

Expression *XXXExp::semantic(Scope sc)
{
  // [a]
    ...
    e1 = e1->semantic(sc);  // Bad: if semantic analysis returns ErrorExp,
                      // it is stored in this->e1 immediately.
    if (e1->op == TOKerror)
  return e1;

  // [b]
    Expression *e = op_overload(sc);
    if (e)
  return e;
    ...
}

If `XXXExp::semantic` is called from the `trySemantic` call for `alias this` analysis (from `op_overload` function in `opover.c`), the stored ErrorExp would accidentally escape from the gagged period.


  Commit: bbd174c5cf9352111d9a8730b785e452e4ecc6cf
      https://github.com/D-Programming-Language/dmd/commit/bbd174c5cf9352111d9a8730b785e452e4ecc6cf
  Author: Walter Bright <walter at walterbright.com>
  Date:   2014-04-15 (Tue, 15 Apr 2014)

  Changed paths:
    M src/expression.c
    M src/template.c
    M src/template.h
    M src/traits.c
    A test/fail_compilation/ice12574.d
    A test/fail_compilation/ice12581.d

  Log Message:
  -----------
  Merge pull request #3454 from 9rnsr/fix12501

[REG2.066a] Issue 12574 - [ICE](statement.c, line 713) with reduce with wrong tuple arity


Compare: https://github.com/D-Programming-Language/dmd/compare/6b238b36662f...bbd174c5cf93


More information about the dmd-internals mailing list