[Issue 14640] New: Special grammar for skipping unittest blocks

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Jun 1 12:31:08 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14640

          Issue ID: 14640
           Summary: Special grammar for skipping unittest blocks
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: bugzilla at digitalmars.com

A recent pull request:

  https://github.com/D-Programming-Language/dmd/pull/4704

reduces memory consumed by parsing unittest blocks that are subsequently
ignored. A further refinement to that suggested by Andrei was to switch to a
specialized grammar for it, that only recognizes:

  . {
  . }
  . comments
  . string literals
  . anything else

so it can lex much faster, i.e. it won't need to enter identifiers into the
stringtable or convert integer literals to integers.

The idea is we wish to encourage extensive unit tests, but not punish users for
having them with slower compile times.

--


More information about the Digitalmars-d-bugs mailing list