void handleStringGetByVal() { if (!m_node->arrayMode().isOutOfBounds()) return; if (!globalObject()->stringPrototypeChainIsSane()) return; addLazily(globalObject()->stringPrototype()->structure()->transitionWatchpointSet()); addLazily(globalObject()->objectPrototype()->structure()->transitionWatchpointSet()); }
void handle() { switch (m_node->op()) { case CompareEqConstant: case IsUndefined: handleMasqueradesAsUndefined(); break; case CompareEq: if (m_node->isBinaryUseKind(ObjectUse) || (m_node->child1().useKind() == ObjectUse && m_node->child2().useKind() == ObjectOrOtherUse) || (m_node->child1().useKind() == ObjectOrOtherUse && m_node->child2().useKind() == ObjectUse)) handleMasqueradesAsUndefined(); break; case LogicalNot: case Branch: switch (m_node->child1().useKind()) { case ObjectOrOtherUse: case UntypedUse: handleMasqueradesAsUndefined(); break; default: break; } break; case VarInjectionWatchpoint: addLazily(globalObject()->varInjectionWatchpoint()); break; default: break; } }
bool DesiredWatchpoints::consider(Structure* structure) { if (!structure->dfgShouldWatch()) return false; addLazily(structure->transitionWatchpointSet()); return true; }
void handle() { switch (m_node->op()) { case CompareEqConstant: case IsUndefined: handleMasqueradesAsUndefined(); break; case CompareEq: if (m_node->isBinaryUseKind(ObjectUse) || (m_node->child1().useKind() == ObjectUse && m_node->child2().useKind() == ObjectOrOtherUse) || (m_node->child1().useKind() == ObjectOrOtherUse && m_node->child2().useKind() == ObjectUse)) handleMasqueradesAsUndefined(); break; case LogicalNot: case Branch: if (m_node->child1().useKind() == ObjectOrOtherUse) handleMasqueradesAsUndefined(); break; case GetByVal: if (m_node->arrayMode().type() == Array::Double && m_node->arrayMode().isSaneChain()) { addLazily(globalObject()->arrayPrototype()->structure()->transitionWatchpointSet()); addLazily(globalObject()->objectPrototype()->structure()->transitionWatchpointSet()); } if (m_node->arrayMode().type() == Array::String) handleStringGetByVal(); if (JSArrayBufferView* view = m_graph.tryGetFoldableViewForChild1(m_node)) addLazily(view); break; case PutByVal: if (JSArrayBufferView* view = m_graph.tryGetFoldableViewForChild1(m_node)) addLazily(view); break; case StringCharAt: handleStringGetByVal(); break; case NewArray: case NewArrayWithSize: case NewArrayBuffer: if (!globalObject()->isHavingABadTime() && !hasAnyArrayStorage(m_node->indexingType())) addLazily(globalObject()->havingABadTimeWatchpoint()); break; case AllocationProfileWatchpoint: addLazily(m_node->castOperand<JSFunction*>()->allocationProfileWatchpointSet()); break; case VarInjectionWatchpoint: addLazily(globalObject()->varInjectionWatchpoint()); break; case TypedArrayWatchpoint: addLazily(m_node->typedArray()); break; default: break; } }
void handleMasqueradesAsUndefined() { if (m_graph.masqueradesAsUndefinedWatchpointIsStillValid(m_node->origin.semantic)) addLazily(globalObject()->masqueradesAsUndefinedWatchpoint()); }