RESOLVED FIXED 96891
Array profiling has convergence issues
https://bugs.webkit.org/show_bug.cgi?id=96891
Summary Array profiling has convergence issues
Filip Pizlo
Reported 2012-09-16 17:19:45 PDT
Consider the following code: function foo() { var o = {}; o.length = 5; for (var i = 0; i < o.length; ++i) o[i] = i; } Currently, array profiling will always say that 'o' is NonArrayWithArrayStorage, even though on the first iteration it's a NonArray (as in it has no array storage). We could catch this corner case in one of two ways: (1) OSR exit profiling or (2) more precise baseline profiling. I prefer (2) because we usually only like to rely on (1) in pathological cases. The above does not feel like a pathological case - it seems rather sensible to write a program that has a loop, where the first iteration of that loop does special things. Of course, we could also kill off this pathology, at least in most cases, by relying on loop peeling. But for now, I think having a more precise array profiler just feels like a nicer solution
Attachments
the patch (20.17 KB, patch)
2012-09-16 17:28 PDT, Filip Pizlo
buildbot: commit-queue-
the patch (20.62 KB, patch)
2012-09-16 18:06 PDT, Filip Pizlo
barraclough: review+
Filip Pizlo
Comment 1 2012-09-16 17:28:57 PDT
Created attachment 164328 [details] the patch
Build Bot
Comment 2 2012-09-16 17:56:50 PDT
Filip Pizlo
Comment 3 2012-09-16 18:06:46 PDT
Created attachment 164330 [details] the patch Fix non-DFG builds.
Filip Pizlo
Comment 4 2012-09-17 12:07:38 PDT
Csaba Osztrogonác
Comment 5 2012-09-17 16:10:33 PDT
(In reply to comment #4) > Landed in http://trac.webkit.org/changeset/128790 It broke the Qt ARM build - https://bugs.webkit.org/show_bug.cgi?id=96968 Could you check it, please?
Filip Pizlo
Comment 6 2012-09-17 16:11:17 PDT
(In reply to comment #5) > (In reply to comment #4) > > Landed in http://trac.webkit.org/changeset/128790 > > It broke the Qt ARM build - https://bugs.webkit.org/show_bug.cgi?id=96968 > > Could you check it, please? It broke your build because I introduced new assembler functionality. It's up to you guys to implement assembler functionality on your platforms.
Note You need to log in before you can comment on or make changes to this bug.