bool InferredType::willStoreValueSlow(VM& vm, PropertyName propertyName, JSValue value) { Descriptor oldType; Descriptor myType; bool result; { ConcurrentJSLocker locker(m_lock); oldType = descriptor(locker); myType = Descriptor::forValue(value); myType.merge(oldType); ASSERT(oldType != myType); // The type must have changed if we're on the slow path. bool setResult = set(locker, vm, myType); result = kind(locker) != Top; if (!setResult) return result; } InferredTypeFireDetail detail(this, propertyName.uid(), oldType, myType, value); m_watchpointSet.fireAll(vm, detail); return result; }
bool InferredType::Descriptor::subsumes(const Descriptor& other) const { Descriptor merged = *this; merged.merge(other); return *this == merged; }