Ignore:
Timestamp:
Oct 21, 2021, 9:31:45 PM (4 years ago)
Author:
[email protected]
Message:

Clean up some code around checking the state of Watchpoints
https://bugs.webkit.org/show_bug.cgi?id=232111

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

No need to have state() and stateOnJSThread(), since they're now the same.
Also, there is no need to check the allocation watchpoint twice for the
function/internal function allocation profiles.

  • bytecode/Watchpoint.h:

(JSC::WatchpointSet::isStillValid const):
(JSC::WatchpointSet::stateOnJSThread const): Deleted.
(JSC::WatchpointSet::isStillValidOnJSThread const): Deleted.
(JSC::InlineWatchpointSet::stateOnJSThread const): Deleted.

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::handleCreateInternalFieldObject):

  • dfg/DFGConstantFoldingPhase.cpp:

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

  • runtime/ArrayPrototype.cpp:

(JSC::speciesWatchpointIsValid):
(JSC::canUseDefaultArrayJoinForToString):

  • runtime/InferredValue.h:

(JSC::InferredValue::notifyWrite):
(JSC::InferredValue::stateOnJSThread const): Deleted.

  • runtime/JSArrayBufferPrototypeInlines.h:

(JSC::speciesWatchpointIsValid):

  • runtime/ObjectPropertyChangeAdaptiveWatchpoint.h:

Source/WebCore:

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::JSDOMWindow::getOwnPropertySlot):

File:
1 edited

Legend:

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

    r284576 r284664  
    737737                                JSObject* prototype = rareData->objectAllocationPrototype();
    738738                                if (structure
    739                                     && (structure->hasMonoProto() || prototype)
    740                                     && rareData->allocationProfileWatchpointSet().isStillValid()) {
    741 
     739                                    && (structure->hasMonoProto() || prototype)) {
    742740                                    m_graph.freeze(rareData);
    743741                                    m_graph.watchpoints().addLazily(rareData->allocationProfileWatchpointSet());
     
    759757                                    changed = true;
    760758                                    break;
    761 
    762759                                }
    763760                            }
     
    782779                                if (structure
    783780                                    && structure->classInfo() == (node->isInternalPromise() ? JSInternalPromise::info() : JSPromise::info())
    784                                     && structure->globalObject() == globalObject
    785                                     && rareData->allocationProfileWatchpointSet().isStillValid()) {
     781                                    && structure->globalObject() == globalObject) {
    786782                                    m_graph.freeze(rareData);
    787783                                    m_graph.watchpoints().addLazily(rareData->allocationProfileWatchpointSet());
     
    808804                                    if (structure
    809805                                        && structure->classInfo() == classInfo
    810                                         && structure->globalObject() == globalObject
    811                                         && rareData->allocationProfileWatchpointSet().isStillValid()) {
     806                                        && structure->globalObject() == globalObject) {
    812807                                        m_graph.freeze(rareData);
    813808                                        m_graph.watchpoints().addLazily(rareData->allocationProfileWatchpointSet());
Note: See TracChangeset for help on using the changeset viewer.