Ignore:
Timestamp:
Apr 5, 2013, 4:52:20 PM (12 years ago)
Author:
[email protected]
Message:

tryCacheGetByID sets StructureStubInfo accessType to an incorrect value
https://bugs.webkit.org/show_bug.cgi?id=114068

Reviewed by Geoffrey Garen.

In the case where we have a non-Value cacheable property, we set the StructureStubInfo accessType to
get_by_id_self, but then we don't patch self and instead patch in a get_by_id_self_fail. This leads to
incorrect profiling data so when the DFG compiles the function, it uses a GetByOffset rather than a GetById,
which leads to loading a GetterSetter directly out of an object.

Source/JavaScriptCore:

  • jit/JITStubs.cpp:

(JSC::tryCacheGetByID):
(JSC::DEFINE_STUB_FUNCTION):

LayoutTests:

  • fast/js/jit-set-profiling-access-type-only-for-get-by-id-self-expected.txt: Added.
  • fast/js/jit-set-profiling-access-type-only-for-get-by-id-self.html: Added.
  • fast/js/script-tests/jit-set-profiling-access-type-only-for-get-by-id-self.js: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r147798 r147816  
     12013-04-05  Mark Hahnenberg  <[email protected]>
     2
     3        tryCacheGetByID sets StructureStubInfo accessType to an incorrect value
     4        https://bugs.webkit.org/show_bug.cgi?id=114068
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        In the case where we have a non-Value cacheable property, we set the StructureStubInfo accessType to
     9        get_by_id_self, but then we don't patch self and instead patch in a get_by_id_self_fail. This leads to
     10        incorrect profiling data so when the DFG compiles the function, it uses a GetByOffset rather than a GetById,
     11        which leads to loading a GetterSetter directly out of an object.
     12
     13        * jit/JITStubs.cpp:
     14        (JSC::tryCacheGetByID):
     15        (JSC::DEFINE_STUB_FUNCTION):
     16
    1172013-04-05  Filip Pizlo  <[email protected]>
    218
Note: See TracChangeset for help on using the changeset viewer.