DescriptionCorrect handling of arrays with callbacks in the prototype chain.
Our generic KeyedStoreIC doesn't handle the case when a callback is
set on array elements in the prototype chain of the object, nor do
we recognize that we need to avoid the monomorphic case if these
callbacks exist.
This CL addresses the issue by looking for dictionary elements in
the prototype chain on IC misses and crankshaft element store
instructions. When found, the generic IC is used. The generic IC is
changed to go to the runtime in this case too.
In general, keyed loads are immune from this problem because they
won't return the hole: discovery of the hole goes to the runtime where
the callback will be found in the prototype chain. Double array loads
in crankshaft can return the hole but only if the prototype chain is
unaltered (we will catch such alterations).
Includes the following patch as well (already reviewed by bmeurer):
Performance regression found in test regress-2185-2.js. The problem was
that the bailout method for TransitionAndStoreStub was not performing
the appropriate transition.
(Review URL for the ElementsTransitionAndStoreIC_Miss change:
https://codereview.chromium.org/26911007)
R=danno@chromium.org
Committed: https://code.google.com/p/v8/source/detail?r=17525
Patch Set 1 #Patch Set 2 : A few test updates and simpler prototype updating. #
Total comments: 22
Patch Set 3 : REBASE (actually small fix to previous rebase) #
Total comments: 2
Patch Set 4 : Quit deopting everything #Patch Set 5 : Fixes for correct transitions #Patch Set 6 : Test fixes #
Total comments: 27
Patch Set 7 : Allow a double transition, plus x64 port. #Patch Set 8 : Simply check on dictionary elements rather than transitioning #Patch Set 9 : ports. #
Total comments: 6
Patch Set 10 : Addressed Michaels comments. #
Total comments: 4
Patch Set 11 : Nit fixin. #Patch Set 12 : REBASE #Patch Set 13 : Bugfix: check on dictionary elements was incorrect. Added test. Re-enabled test. #
Messages
Total messages: 16 (0 generated)
|