Re: [GSOC] SoC 09 - Extending XDebug code coverage instrumentation
[email protected] ("Nuno Lopes") Mon, 4 May 2009 18:54:18 +0100
| Newsgroups | php.gsoc |
|---|---|
| Message-ID | <C3DEB6704D4F458D8D4FE67BE1C7D4C9@PC3EE1F19287> |
Hi and welcome, > My initial idea is to build an AST from the underlying PHP code and > then run analysis on the tree to determine how many branches there > are, then add custom opcode handlers which will fire when a particular > branch is taken So I don't think you really need to build an AST just to determine which branches were taken. You can just pass on the bytecode once and check how many branches exist. And to which were taken, just create a custom opcode that records this info. So I think you can skip this complexity of explicitly building the AST. It is implicit in the bytecode anyway. Nuno