Title: [295714] trunk/Source/_javascript_Core/dfg
- Revision
- 295714
- Author
- [email protected]
- Date
- 2022-06-21 19:38:43 -0700 (Tue, 21 Jun 2022)
Log Message
[JSC] Use m_structureCacheClearedWatchpoint in more DFG nodes
https://bugs.webkit.org/show_bug.cgi?id=241575
Reviewed by Yusuke Suzuki.
Not sure if this is observable, but it's worth to align with ObjectCreate for consistency.
* Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* Source/_javascript_Core/dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::handleCreateInternalFieldObject):
* Source/_javascript_Core/dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
Canonical link: https://commits.webkit.org/251719@main
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h (295713 => 295714)
--- trunk/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h 2022-06-22 02:14:04 UTC (rev 295713)
+++ trunk/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h 2022-06-22 02:38:43 UTC (rev 295714)
@@ -3017,7 +3017,8 @@
if (JSValue base = forNode(node->child1()).m_value) {
if (auto* function = jsDynamicCast<JSFunction*>(base)) {
if (FunctionRareData* rareData = function->rareData()) {
- if (rareData->allocationProfileWatchpointSet().isStillValid()) {
+ JSGlobalObject* globalObject = m_graph.globalObjectFor(node->origin.semantic);
+ if (rareData->allocationProfileWatchpointSet().isStillValid() && m_graph.isWatchingStructureCacheClearedWatchpoint(globalObject)) {
if (Structure* structure = rareData->objectAllocationStructure()) {
m_graph.freeze(rareData);
m_graph.watchpoints().addLazily(rareData->allocationProfileWatchpointSet());
@@ -3046,7 +3047,7 @@
}
if (auto* function = jsDynamicCast<JSFunction*>(base)) {
if (FunctionRareData* rareData = function->rareData()) {
- if (rareData->allocationProfileWatchpointSet().isStillValid()) {
+ if (rareData->allocationProfileWatchpointSet().isStillValid() && m_graph.isWatchingStructureCacheClearedWatchpoint(globalObject)) {
Structure* structure = rareData->internalFunctionAllocationStructure();
if (structure
&& structure->classInfoForCells() == (node->isInternalPromise() ? JSInternalPromise::info() : JSPromise::info())
@@ -3074,7 +3075,7 @@
if (JSValue base = forNode(node->child1()).m_value) {
if (auto* function = jsDynamicCast<JSFunction*>(base)) {
if (FunctionRareData* rareData = function->rareData()) {
- if (rareData->allocationProfileWatchpointSet().isStillValid()) {
+ if (rareData->allocationProfileWatchpointSet().isStillValid() && m_graph.isWatchingStructureCacheClearedWatchpoint(globalObject)) {
Structure* structure = rareData->internalFunctionAllocationStructure();
if (structure
&& structure->classInfoForCells() == classInfo
Modified: trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp (295713 => 295714)
--- trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp 2022-06-22 02:14:04 UTC (rev 295713)
+++ trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp 2022-06-22 02:38:43 UTC (rev 295714)
@@ -5556,7 +5556,8 @@
bool alreadyEmitted = false;
if (function) {
if (FunctionRareData* rareData = function->rareData()) {
- if (rareData->allocationProfileWatchpointSet().isStillValid()) {
+ JSGlobalObject* globalObject = m_graph.globalObjectFor(currentNodeOrigin().semantic);
+ if (rareData->allocationProfileWatchpointSet().isStillValid() && m_graph.isWatchingStructureCacheClearedWatchpoint(globalObject)) {
Structure* structure = rareData->objectAllocationStructure();
JSObject* prototype = rareData->objectAllocationPrototype();
if (structure
@@ -5637,7 +5638,7 @@
if (function) {
if (FunctionRareData* rareData = function->rareData()) {
- if (rareData->allocationProfileWatchpointSet().isStillValid()) {
+ if (rareData->allocationProfileWatchpointSet().isStillValid() && m_graph.isWatchingStructureCacheClearedWatchpoint(globalObject)) {
Structure* structure = rareData->internalFunctionAllocationStructure();
if (structure
&& structure->classInfoForCells() == (bytecode.m_isInternalPromise ? JSInternalPromise::info() : JSPromise::info())
@@ -9019,7 +9020,7 @@
if (function) {
if (FunctionRareData* rareData = function->rareData()) {
- if (rareData->allocationProfileWatchpointSet().isStillValid()) {
+ if (rareData->allocationProfileWatchpointSet().isStillValid() && m_graph.isWatchingStructureCacheClearedWatchpoint(globalObject)) {
Structure* structure = rareData->internalFunctionAllocationStructure();
if (structure
&& structure->classInfoForCells() == classInfo
Modified: trunk/Source/_javascript_Core/dfg/DFGConstantFoldingPhase.cpp (295713 => 295714)
--- trunk/Source/_javascript_Core/dfg/DFGConstantFoldingPhase.cpp 2022-06-22 02:14:04 UTC (rev 295713)
+++ trunk/Source/_javascript_Core/dfg/DFGConstantFoldingPhase.cpp 2022-06-22 02:38:43 UTC (rev 295714)
@@ -732,7 +732,8 @@
if (JSValue base = m_state.forNode(node->child1()).m_value) {
if (auto* function = jsDynamicCast<JSFunction*>(base)) {
if (FunctionRareData* rareData = function->rareData()) {
- if (rareData->allocationProfileWatchpointSet().isStillValid()) {
+ JSGlobalObject* globalObject = m_graph.globalObjectFor(node->origin.semantic);
+ if (rareData->allocationProfileWatchpointSet().isStillValid() && m_graph.isWatchingStructureCacheClearedWatchpoint(globalObject)) {
Structure* structure = rareData->objectAllocationStructure();
JSObject* prototype = rareData->objectAllocationPrototype();
if (structure
@@ -774,7 +775,7 @@
}
if (auto* function = jsDynamicCast<JSFunction*>(base)) {
if (FunctionRareData* rareData = function->rareData()) {
- if (rareData->allocationProfileWatchpointSet().isStillValid()) {
+ if (rareData->allocationProfileWatchpointSet().isStillValid() && m_graph.isWatchingStructureCacheClearedWatchpoint(globalObject)) {
Structure* structure = rareData->internalFunctionAllocationStructure();
if (structure
&& structure->classInfoForCells() == (node->isInternalPromise() ? JSInternalPromise::info() : JSPromise::info())
@@ -799,7 +800,7 @@
if (JSValue base = m_state.forNode(node->child1()).m_value) {
if (auto* function = jsDynamicCast<JSFunction*>(base)) {
if (FunctionRareData* rareData = function->rareData()) {
- if (rareData->allocationProfileWatchpointSet().isStillValid()) {
+ if (rareData->allocationProfileWatchpointSet().isStillValid() && m_graph.isWatchingStructureCacheClearedWatchpoint(globalObject)) {
Structure* structure = rareData->internalFunctionAllocationStructure();
if (structure
&& structure->classInfoForCells() == classInfo
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes