* SUMMARY Basic Block Annotations and Type Profiler annotations wrong for script with "class". * TEST (bad-script.js) var a; var b = 1; var c = 1; class Foo {}; * STEPS TO REPRODUCE 1. Turn on the Type Profiler / Code Coverage 2. Run the above script => mis-highlighted regions and types
Created attachment 261369 [details] [IMAGE] Issue
This seems like a bug in JSC. I'll take it
I think the problem here has to do with default constructors.
<rdar://problem/22785402>
(In reply to comment #3) > I think the problem here has to do with default constructors. It does. And their bogus "text ranges" that we interpret as being part of the user program's source code. It's obviously not. We parse these default constructors from C++ Strings we create.
Created attachment 261679 [details] patch This is one possible solution. Another solution is to set a bit on UnlinkedFunctionExecutable indicating it's a default constructor (or we can generalize the bit to mean that this thing was created outside the user's source code). And, if that bit is set, we will not insert the function as an unexecuted range.
Comment on attachment 261679 [details] patch r=me
Comment on attachment 261679 [details] patch Clearing flags on attachment: 261679 Committed r190086: <http://trac.webkit.org/changeset/190086>
All reviewed patches have been landed. Closing bug.
Re-opened since this is blocked by bug 149427
landed in: http://trac.webkit.org/changeset/190108