[dmd-internals] [D-Programming-Language/dmd] 0a927f: Add 'gaggedErrors' to the gagging system

noreply at github.com noreply at github.com
Tue Sep 13 14:35:59 PDT 2011


  Branch: refs/heads/master
  Home:   https://github.com/D-Programming-Language/dmd

  Commit: 0a927f258e89f92f280c0e855a93ceb05e34a260
      https://github.com/D-Programming-Language/dmd/commit/0a927f258e89f92f280c0e855a93ceb05e34a260
  Author: Don Clugston <dclugston at googlemail.com>
  Date:   2011-09-13 (Tue, 13 Sep 2011)

  Changed paths:
    M src/dsymbol.c
  M src/lexer.c
  M src/mars.c
  M src/mars.h
  M src/traits.c

  Log Message:
  -----------
  Add 'gaggedErrors' to the gagging system

The existing gagging/error handling system doesn't allow errors to be
temporarily ungagged, from a context in which they are gagged. Instead of
restoring the total error count to the state it was in before gagging began,
only the gagged errors should be removed from the error count.


  Commit: 76aca35edbe5e3574c3780af9043c01801b88e7e
      https://github.com/D-Programming-Language/dmd/commit/76aca35edbe5e3574c3780af9043c01801b88e7e
  Author: Don Clugston <dclugston at googlemail.com>
  Date:   2011-09-13 (Tue, 13 Sep 2011)

  Changed paths:
    M src/declaration.c
  M src/expression.c
  M src/mtype.c
  M src/statement.c
  M src/traits.c

  Log Message:
  -----------
  All gagging now goes via startGagging/endGagging


  Commit: 9c7fecae52043d3082fa8e94d7abe8801267d91c
      https://github.com/D-Programming-Language/dmd/commit/9c7fecae52043d3082fa8e94d7abe8801267d91c
  Author: Don Clugston <dclugston at googlemail.com>
  Date:   2011-09-13 (Tue, 13 Sep 2011)

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

  Log Message:
  -----------
  Add 'speculative' flag to TemplateInstance

speculative=1 if the template has only been instantiated from inside
'is(typeof())', and thus may not have passed semantic analysis.


  Commit: 48cd5caf3495dbb31081b4823d37180737e658e4
      https://github.com/D-Programming-Language/dmd/commit/48cd5caf3495dbb31081b4823d37180737e658e4
  Author: Don Clugston <dclugston at googlemail.com>
  Date:   2011-09-13 (Tue, 13 Sep 2011)

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

  Log Message:
  -----------
  6650 ICE(glue.c): type inference of invalid template instantiation from
is(typeof())

When re-using the same template instance, make sure the errors aren't
ignored.


  Commit: a75196aea5a124bed0d857e474d5e2fcd02637cd
      https://github.com/D-Programming-Language/dmd/commit/a75196aea5a124bed0d857e474d5e2fcd02637cd
  Author: Don Clugston <dclugston at googlemail.com>
  Date:   2011-09-13 (Tue, 13 Sep 2011)

  Changed paths:
    M src/template.c

  Log Message:
  -----------
  6661 Templates instantiated only through is(typeof()) shouldn't cause errors

If a template instantiation reached semantic3 without a non-speculative
instantiation, errors should be gagged.


  Commit: 2fe75e885b51da9a2c9dd8853789a69d5f00a4b2
      https://github.com/D-Programming-Language/dmd/commit/2fe75e885b51da9a2c9dd8853789a69d5f00a4b2
  Author: Don Clugston <dclugston at googlemail.com>
  Date:   2011-09-13 (Tue, 13 Sep 2011)

  Changed paths:
    M src/interpret.c

  Log Message:
  -----------
  4197+5453 ICE with CTFE forward reference

Fixes two ice-on-invalid-code bugs:
4197 ICE(glue.c): error in forward-referenced in/out contract
5453 ICE(statement.c): invalid switch statement forward referenced by CTFE

When CTFE finds that it needs to run semantic on a function, it should ungag
errors, unless the function is part of a speculative template.


  Commit: 91108df90e86cb8c3ec95c3800907a45072f9200
      https://github.com/D-Programming-Language/dmd/commit/91108df90e86cb8c3ec95c3800907a45072f9200
  Author: Walter Bright <walter at walterbright.com>
  Date:   2011-09-13 (Tue, 13 Sep 2011)

  Changed paths:
    M src/declaration.c
  M src/dsymbol.c
  M src/expression.c
  M src/interpret.c
  M src/lexer.c
  M src/mars.c
  M src/mars.h
  M src/mtype.c
  M src/statement.c
  M src/template.c
  M src/template.h
  M src/traits.c

  Log Message:
  -----------
  Merge pull request #380 from donc/gagging

Fix the gagging system: bugs 4197 5453 6296 6661


Compare: https://github.com/D-Programming-Language/dmd/compare/569077b...91108df


More information about the dmd-internals mailing list