Ignore:
Timestamp:
Nov 10, 2021, 10:54:59 AM (4 years ago)
Author:
[email protected]
Message:

in_by_val should not constant fold to in_by_id when the property is a property index
https://bugs.webkit.org/show_bug.cgi?id=232753

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/dont-in-by-id-when-index-2.js: Added.

(assert):
(main.v179):
(main.async v244):
(main):

  • stress/dont-in-by-id-when-index.js: Added.

(assert):
(test):

Source/JavaScriptCore:

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

  • dfg/DFGValidate.cpp:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp

    r284726 r285592  
    682682                    if (constant.isString()) {
    683683                        JSString* string = asString(constant);
    684                         if (CacheableIdentifier::isCacheableIdentifierCell(string)) {
     684                        if (CacheableIdentifier::isCacheableIdentifierCell(string) && !parseIndex(CacheableIdentifier::createFromCell(string).uid())) {
    685685                            const StringImpl* impl = string->tryGetValueImpl();
    686686                            RELEASE_ASSERT(impl);
Note: See TracChangeset for help on using the changeset viewer.