SUMMARY When using the YUI DataTable object, a column formatted as: {key:'date', formatter:YAHOO.widget.DataTable.formatDate, sortable:true, resizeable:true} ...shows the date incorrectly. For example, a date which should be shown as "03/24/1980" is instead shown as "03/d/1980". This does not happen on Safari 3, but it does happen on the latest WebKit nightly (r37764). STEPS TO REPRODUCE Go to the Yahoo UI example at: http://developer.yahoo.com/yui/examples/datatable/dt_basic_clean.html
This has also been filed as YUI bug #2187202. https://sourceforge.net/tracker2/?func=detail&aid=2187202&group_id=165715&atid=836476
Confirmed as a regression with r37807.
Filed with Apple's Bug Reporter (is that what "NeedsRadar" means?). The bug report is: rdar://problem/6341231
Thank you! NeedsRadar isn't necessarily a request for the reporter to file it with Apple (someone else can do that), but it is slightly better if both bugs are technically reported by the same person.
I have determined that this regressed between r36766 and r36847. I am also assigning this to myself.
There was a typo in my previous post. This regressed in r36821: http://trac.webkit.org/changeset/36821
Created attachment 24962 [details] Reduction Here is a reduction. I can't seem to reduce it any further. The code in the script tag also works in the commandline JSC shell.
The problem here is that the check in CodeGenerator::emitTypeOf() to determine whether a register is constant is wrong after r36821: && static_cast<unsigned>(src2->index()) < m_codeBlock->constantRegisters.size() I am kind of surprised that nothing else hit this.
Created attachment 24967 [details] Fix Here is the simple fix. I will make a bunch of tests based on this original pattern, covering all of the individual typeof cases.
In r36821, I had to fix many call sites making custom calculations about whether a register was constant. I guess I missed one. I think it would be nice to fix this bug by changing this call site to use the isConstant function I wrote -- that way, the next time constant register layout changes, we won't have the same problem again.
Created attachment 24972 [details] Proposed patch Here is a better fix that uses the isConstant() member function I just added to CodeBlock.
Comment on attachment 24972 [details] Proposed patch r=me
Landed in r38230.