On 2016-01-22 02:54, Chris Wright wrote:

https://issues.dlang.org/show_bug.cgi?id=10023 for more context.

In short, this makes user-defined attributes discoverable at runtime at
the module level, if the attribute has opted in. I think. I'm not sure
how it would help here, though, so I kind of doubt my interpretation.

It's discoverable at compile time as well. Currently one would need to give a list of modules where the benchmark module would look for the @benchmark attributes, or something similar. With the PR I linked to that would not be necessary. One would just compile all code of interest that contains the attributes + the benchmark module. The benchmark module would basically register a callback that is called each time the compiler sees a new module. The callback would then iterate all symbols in the modules looking for the @benchmark attributes.

--
/Jacob Carlborg
  • JMH Andrei Alexandrescu via Digitalmars-d
    • Re: JMH Robert burner Schadek via Digitalmars-d
      • Re: JMH Russel Winder via Digitalmars-d
      • Re: JMH Jacob Carlborg via Digitalmars-d
        • Re: JMH Chris Wright via Digitalmars-d
          • Re: JMH Jacob Carlborg via Digitalmars-d
      • Re: JMH Jakob Jenkov via Digitalmars-d

Reply via email to