951d7c0adf
I found 4 separate problems, each of which broke this: - A hoistable class didnt generate bytecode, so the line number information was associated with whatever line the /next/ bytecode corresponded to. Often there was no next bytecode, so we got the line number of the end of the file. - If there /was/ a bytecode for the defClass, the line number recorded for it was that of the pseudoMain, not the class itself; so again, it would be reported as the end of the file. - The parser records two sets of line numbers for a class; its start, and end. The end line gets associated with the bytecode. - There were optimized paths where we didnt setup an ActRec at all, resulting in either reporting the file/line of the require (or often a require much higher up the stack), or not reporting a file/line at all. So now, we generate a nop if we would have skipped the defCls. We override the normal line info, and set both the start and end lines to the start. And we wrap all errors from defClass in a temporary frame to ensure the line info is seen. This changed the output for several of our tests. Spot checking a couple showed they now report the same line number as zend.
2 linhas
107 B
Plaintext
2 linhas
107 B
Plaintext
HipHop Fatal error: Class D may not inherit from final class (C) in hphp/test/vm/final_class.php on line 6
|