[fpc-devel] [patch] pscanner: differentiate between EOL & Tab characters from general Whitespace

Dimitri Smits smitco at telenet.be
Sun Aug 22 20:50:24 CEST 2010

----- "Graeme Geldenhuys" <graemeg.lists at gmail.com> schreef:

> On 22 August 2010 13:35, Marco van de Voort wrote:
> >
> > He wants the source as a kind of DOM model. That is IMHO a valid
> use, but I
> > doubt it is unifiable with the current parser.
> Not nearly as complicated as a DOM model really. I just want to
> insert
> some timing calls and a new entry to the uses clause. See my reply to
> Michael to understand what I am trying to accomplish.
> > This is typically one of the reasons why the "one parser to rule
> them all"
> > approach is flawed.
> For fpGUI IDE, I hope to do more code modification/generation using
> fcl-passrc, so then I'll can answer that question.  :)

mmm, looks to me that you are trying to implement some kind of AOP (Aspect Oriented Programming) for this. (which IS interesting)

The way most profilers that I've worked with did it was adding those timing-stuff (and counting) on a link-phase. (or through a custom exe-loader). Every PIC/method-table or VMT was replaced by a stubb. Or is it something else you want?

(custom attributes, the .net way, with AOP methods and a method sink?)

Anyway, if so, would this "profiling" stuff be optional, on/off all or on/off for a specific method/class/unit/package/program?

kind regards,
Dimitri Smits

More information about the fpc-devel mailing list