feat(es/minifier): Mark ref to fn as non-call in alias analyzer (#6088)

This commit is contained in:
Donny/강동윤 2022-10-09 09:21:54 +09:00 committed by GitHub
parent 516320009a
commit b0c57458c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 116 additions and 114 deletions

View File

@ -378,7 +378,7 @@ function nu(n, t) {
return D(n.getFullYear() % 100, t, 2);
}
function nc(n, t) {
return n = nn(n), D(n.getFullYear() % 100, t, 2);
return D((n = nn(n)).getFullYear() % 100, t, 2);
}
function ni(n, t) {
return D(n.getFullYear() % 10000, t, 4);
@ -442,7 +442,7 @@ function nM(n, t) {
return D(n.getUTCFullYear() % 100, t, 2);
}
function np(n, t) {
return n = nx(n), D(n.getUTCFullYear() % 100, t, 2);
return D((n = nx(n)).getUTCFullYear() % 100, t, 2);
}
function nH(n, t) {
return D(n.getUTCFullYear() % 10000, t, 4);

View File

@ -119,9 +119,9 @@ var ItemsList = function(_Component) {
if (!_instanceof(instance, Constructor)) throw TypeError("Cannot call a class as a function");
}(this, ItemsList);
for(var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++)args[_key] = arguments[_key];
return _this = _super.call.apply(_super, [
return _defineProperty(_assertThisInitialized(_this = _super.call.apply(_super, [
this
].concat(args)), _defineProperty(_assertThisInitialized(_this), "storeHighlightedItemReference", function(highlightedItem) {
].concat(args))), "storeHighlightedItemReference", function(highlightedItem) {
_this.props.onHighlightedItemChange(null === highlightedItem ? null : highlightedItem.item);
}), _this;
}

View File

@ -85,6 +85,7 @@ pub(crate) struct VarUsageInfo {
/// `true` if the enclosing function defines this variable as a parameter.
pub declared_as_fn_param: bool,
pub declared_as_fn_decl: bool,
pub declared_as_fn_expr: bool,
pub assign_count: u32,
@ -224,19 +225,22 @@ impl ProgramData {
let infects = &info.infects;
if !infects.is_empty() {
let old_len = ids.len();
match iid.1 {
AccessKind::Reference => {
// This is not a call, so effects from call can be skipped
ids.extend(
infects
.iter()
.filter(|(_, kind)| *kind != AccessKind::Call)
.cloned(),
);
}
AccessKind::Call => {
ids.extend_from_slice(infects.as_slice());
}
// This is not a call, so effects from call can be skipped
let can_skip_non_call = matches!(iid.1, AccessKind::Reference)
|| (info.declared_count == 1
&& info.declared_as_fn_decl
&& !info.reassigned());
if can_skip_non_call {
ids.extend(
infects
.iter()
.filter(|(_, kind)| *kind != AccessKind::Call)
.cloned(),
);
} else {
ids.extend_from_slice(infects.as_slice());
}
let new_len = ids.len();
ranges.push(old_len..new_len);
@ -390,11 +394,17 @@ where
i: &Ident,
has_init: bool,
kind: Option<VarDeclKind>,
_is_fn_decl: bool,
is_fn_decl: bool,
) -> &mut S::VarData {
self.scope.add_declared_symbol(i);
self.data.declare_decl(self.ctx, i, has_init, kind)
let v = self.data.declare_decl(self.ctx, i, has_init, kind);
if is_fn_decl {
v.mark_declared_as_fn_decl();
}
v
}
fn visit_in_cond<T: VisitWith<Self>>(&mut self, t: &T) {

View File

@ -49,6 +49,8 @@ pub(crate) trait VarDataLike: Sized {
/// See `declared_as_fn_param` of [crate::analyzer::VarUsageInfo].
fn mark_declared_as_fn_param(&mut self);
fn mark_declared_as_fn_decl(&mut self);
fn mark_declared_as_fn_expr(&mut self);
fn mark_has_property_access(&mut self);

View File

@ -62,6 +62,7 @@ impl Storage for ProgramData {
e.get_mut().declared |= var_info.declared;
e.get_mut().declared_count += var_info.declared_count;
e.get_mut().declared_as_fn_param |= var_info.declared_as_fn_param;
e.get_mut().declared_as_fn_decl |= var_info.declared_as_fn_decl;
e.get_mut().declared_as_fn_expr |= var_info.declared_as_fn_expr;
// If a var is registered at a parent scope, it means that it's delcared before
@ -295,6 +296,10 @@ impl VarDataLike for VarUsageInfo {
self.declared_as_fn_param = true;
}
fn mark_declared_as_fn_decl(&mut self) {
self.declared_as_fn_decl = true;
}
fn mark_declared_as_fn_expr(&mut self) {
self.declared_as_fn_expr = true;
}

View File

@ -13138,12 +13138,12 @@
}, ECharts.prototype.convertFromPixel = function(finder, value) {
return doConvertPixel(this, 'convertFromPixel', finder, value);
}, ECharts.prototype.containPixel = function(finder, value) {
var result;
if (this._disposed) {
disposedWarning(this.id);
return;
}
var result, findResult = parseFinder(this._model, finder);
return each(findResult, function(models, key) {
return each(parseFinder(this._model, finder), function(models, key) {
key.indexOf('Models') >= 0 && each(models, function(model) {
var coordSys = model.coordinateSystem;
if (coordSys && coordSys.containPoint) result = result || !!coordSys.containPoint(value);
@ -31185,7 +31185,7 @@
if (!1 === clipPathOpt) el && el.getClipPath() && el.removeClipPath();
else if (clipPathOpt) {
var clipPath = el.getClipPath();
clipPath && doesElNeedRecreate(clipPath, clipPathOpt) && (clipPath = null), !clipPath && (clipPath = createEl(clipPathOpt), assert(clipPath instanceof Path, 'Only any type of `path` can be used in `clipPath`, rather than ' + clipPath.type + '.'), el.setClipPath(clipPath)), updateElNormal(null, clipPath, null, dataIndex, clipPathOpt, null, null, seriesModel, isInit, !1);
clipPath && doesElNeedRecreate(clipPath, clipPathOpt) && (clipPath = null), !clipPath && (assert((clipPath = createEl(clipPathOpt)) instanceof Path, 'Only any type of `path` can be used in `clipPath`, rather than ' + clipPath.type + '.'), el.setClipPath(clipPath)), updateElNormal(null, clipPath, null, dataIndex, clipPathOpt, null, null, seriesModel, isInit, !1);
}
}(el, dataIndex, elOption, seriesModel, isInit);
var pendingAllPropsFinal = updateElNormal(api, el, thisElIsMorphTo, dataIndex, elOption, elOption.style, attachedTxInfoTmp, seriesModel, isInit, !1);

View File

@ -2421,7 +2421,7 @@
});
}, lodash.conforms = function(source) {
var source1, props;
return source1 = baseClone(source, 1), props = keys(source1), function(object) {
return props = keys(source1 = baseClone(source, 1)), function(object) {
return baseConformsTo(object, source1, props);
};
}, lodash.constant = constant, lodash.countBy = countBy, lodash.create = function(prototype, properties) {

View File

@ -951,8 +951,8 @@
}
function createAdder(direction, name) {
return function(val, period) {
var dur, tmp;
return null === period || isNaN(+period) || (deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."), tmp = val, val = period, period = tmp), dur = createDuration(val, period), addSubtract(this, dur, direction), this;
var tmp;
return null === period || isNaN(+period) || (deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."), tmp = val, val = period, period = tmp), addSubtract(this, createDuration(val, period), direction), this;
};
}
function addSubtract(mom, duration, isAdding, updateOffset) {
@ -1771,7 +1771,7 @@
}, proto$2.months = months, proto$2.years = years, proto$2.humanize = function(argWithSuffix, argThresholds) {
if (!this.isValid()) return this.localeData().invalidDate();
var posNegDuration, withoutSuffix, thresholds1, locale, duration, seconds, minutes, hours, days, months, weeks, years, a, locale1, output, withSuffix = !1, th = thresholds;
return 'object' == typeof argWithSuffix && (argThresholds = argWithSuffix, argWithSuffix = !1), 'boolean' == typeof argWithSuffix && (withSuffix = argWithSuffix), 'object' == typeof argThresholds && (th = Object.assign({}, thresholds, argThresholds), null != argThresholds.s && null == argThresholds.ss && (th.ss = argThresholds.s - 1)), locale1 = this.localeData(), withoutSuffix = !withSuffix, thresholds1 = th, duration = createDuration(this).abs(), seconds = round(duration.as('s')), minutes = round(duration.as('m')), hours = round(duration.as('h')), days = round(duration.as('d')), months = round(duration.as('M')), weeks = round(duration.as('w')), years = round(duration.as('y')), a = seconds <= thresholds1.ss && [
return 'object' == typeof argWithSuffix && (argThresholds = argWithSuffix, argWithSuffix = !1), 'boolean' == typeof argWithSuffix && (withSuffix = argWithSuffix), 'object' == typeof argThresholds && (th = Object.assign({}, thresholds, argThresholds), null != argThresholds.s && null == argThresholds.ss && (th.ss = argThresholds.s - 1)), locale1 = this.localeData(), withoutSuffix = !withSuffix, thresholds1 = th, seconds = round((duration = createDuration(this).abs()).as('s')), minutes = round(duration.as('m')), hours = round(duration.as('h')), days = round(duration.as('d')), months = round(duration.as('M')), weeks = round(duration.as('w')), years = round(duration.as('y')), a = seconds <= thresholds1.ss && [
's',
seconds
] || seconds < thresholds1.s && [

View File

@ -566,11 +566,7 @@
!error$1 || error$1 instanceof Error || (setCurrentlyValidatingElement(element), error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || 'React class', location, typeSpecName, typeof error$1), setCurrentlyValidatingElement(null)), error$1 instanceof Error && !(error$1.message in loggedTypeFailures) && (loggedTypeFailures[error$1.message] = !0, setCurrentlyValidatingElement(element), error('Failed %s type: %s', location, error$1.message), setCurrentlyValidatingElement(null));
}
}(propTypes, element.props, 'prop', name, element);
} else if (void 0 !== type.PropTypes && !propTypesMisspellWarningShown) {
propTypesMisspellWarningShown = !0;
var _name = getComponentName(type);
error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
}
} else void 0 === type.PropTypes || propTypesMisspellWarningShown || (propTypesMisspellWarningShown = !0, error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', getComponentName(type) || 'Unknown'));
'function' != typeof type.getDefaultProps || type.getDefaultProps.isReactClassApproved || error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
}
}

View File

@ -765,7 +765,7 @@
createTextVNode(children)
] : Array.isArray(children) ? function normalizeArrayChildren(children, nestedIndex) {
var i, c, lastIndex, last, res = [];
for(i = 0; i < children.length; i++)!isUndef(c = children[i]) && 'boolean' != typeof c && (last = res[lastIndex = res.length - 1], Array.isArray(c) ? c.length > 0 && (c = normalizeArrayChildren(c, (nestedIndex || '') + "_" + i), isTextNode(c[0]) && isTextNode(last) && (res[lastIndex] = createTextVNode(last.text + c[0].text), c.shift()), res.push.apply(res, c)) : isPrimitive(c) ? isTextNode(last) ? res[lastIndex] = createTextVNode(last.text + c) : '' !== c && res.push(createTextVNode(c)) : isTextNode(c) && isTextNode(last) ? res[lastIndex] = createTextVNode(last.text + c.text) : (isTrue(children._isVList) && isDef(c.tag) && isUndef(c.key) && isDef(nestedIndex) && (c.key = "__vlist" + nestedIndex + "_" + i + "__"), res.push(c)));
for(i = 0; i < children.length; i++)!isUndef(c = children[i]) && 'boolean' != typeof c && (last = res[lastIndex = res.length - 1], Array.isArray(c) ? c.length > 0 && (isTextNode((c = normalizeArrayChildren(c, (nestedIndex || '') + "_" + i))[0]) && isTextNode(last) && (res[lastIndex] = createTextVNode(last.text + c[0].text), c.shift()), res.push.apply(res, c)) : isPrimitive(c) ? isTextNode(last) ? res[lastIndex] = createTextVNode(last.text + c) : '' !== c && res.push(createTextVNode(c)) : isTextNode(c) && isTextNode(last) ? res[lastIndex] = createTextVNode(last.text + c.text) : (isTrue(children._isVList) && isDef(c.tag) && isUndef(c.key) && isDef(nestedIndex) && (c.key = "__vlist" + nestedIndex + "_" + i + "__"), res.push(c)));
return res;
}(children) : void 0;
}
@ -2226,54 +2226,7 @@
function _enter(_, vnode) {
!0 !== vnode.data.show && enter(vnode);
}
var modules = [
{
create: updateAttrs,
update: updateAttrs
},
{
create: updateClass,
update: updateClass
},
{
create: updateDOMListeners,
update: updateDOMListeners
},
{
create: updateDOMProps,
update: updateDOMProps
},
{
create: updateStyle,
update: updateStyle
},
inBrowser ? {
create: _enter,
activate: _enter,
remove: function(vnode, rm) {
!0 !== vnode.data.show ? leave(vnode, rm) : rm();
}
} : {}
].concat([
{
create: function(_, vnode) {
registerRef(vnode);
},
update: function(oldVnode, vnode) {
oldVnode.data.ref !== vnode.data.ref && (registerRef(oldVnode, !0), registerRef(vnode));
},
destroy: function(vnode) {
registerRef(vnode, !0);
}
},
{
create: updateDirectives,
update: updateDirectives,
destroy: function(vnode) {
updateDirectives(vnode, emptyNode);
}
}
]), patch = function(backend) {
var patch = function(backend) {
var i, j, cbs = {}, modules = backend.modules, nodeOps = backend.nodeOps;
for(i = 0; i < hooks.length; ++i)for(j = 0, cbs[hooks[i]] = []; j < modules.length; ++j)isDef(modules[j][hooks[i]]) && cbs[hooks[i]].push(modules[j][hooks[i]]);
function removeNode(el) {
@ -2434,12 +2387,12 @@
var i, key, map = {};
for(i = beginIdx; i <= endIdx; ++i)isDef(key = children[i].key) && (map[key] = i);
return map;
}(oldCh, oldStartIdx, oldEndIdx)), idxInOld = isDef(newStartVnode.key) ? oldKeyToIdx[newStartVnode.key] : function(node, oldCh, start, end) {
}(oldCh, oldStartIdx, oldEndIdx)), isUndef(idxInOld = isDef(newStartVnode.key) ? oldKeyToIdx[newStartVnode.key] : function(node, oldCh, start, end) {
for(var i = start; i < end; i++){
var c = oldCh[i];
if (isDef(c) && sameVnode(node, c)) return i;
}
}(newStartVnode, oldCh, oldStartIdx, oldEndIdx), isUndef(idxInOld) ? createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, !1, newCh, newStartIdx) : sameVnode(vnodeToMove = oldCh[idxInOld], newStartVnode) ? (patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue, newCh, newStartIdx), oldCh[idxInOld] = void 0, canMove && nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm)) : createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, !1, newCh, newStartIdx), newStartVnode = newCh[++newStartIdx]);
}(newStartVnode, oldCh, oldStartIdx, oldEndIdx)) ? createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, !1, newCh, newStartIdx) : sameVnode(vnodeToMove = oldCh[idxInOld], newStartVnode) ? (patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue, newCh, newStartIdx), oldCh[idxInOld] = void 0, canMove && nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm)) : createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, !1, newCh, newStartIdx), newStartVnode = newCh[++newStartIdx]);
oldStartIdx > oldEndIdx ? addVnodes(parentElm, isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue) : newStartIdx > newEndIdx && removeVnodes(oldCh, oldStartIdx, oldEndIdx);
}(elm, oldCh, ch, insertedVnodeQueue, removeOnly) : isDef(ch) ? (checkDuplicateKeys(ch), isDef(oldVnode.text) && nodeOps.setTextContent(elm, ''), addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue)) : isDef(oldCh) ? removeVnodes(oldCh, 0, oldCh.length - 1) : isDef(oldVnode.text) && nodeOps.setTextContent(elm, '') : oldVnode.text !== vnode.text && nodeOps.setTextContent(elm, vnode.text), isDef(data) && isDef(i = data.hook) && isDef(i = i.postpatch) && i(oldVnode, vnode);
}
@ -2471,7 +2424,54 @@
};
}({
nodeOps: nodeOps,
modules: modules
modules: [
{
create: updateAttrs,
update: updateAttrs
},
{
create: updateClass,
update: updateClass
},
{
create: updateDOMListeners,
update: updateDOMListeners
},
{
create: updateDOMProps,
update: updateDOMProps
},
{
create: updateStyle,
update: updateStyle
},
inBrowser ? {
create: _enter,
activate: _enter,
remove: function(vnode, rm) {
!0 !== vnode.data.show ? leave(vnode, rm) : rm();
}
} : {}
].concat([
{
create: function(_, vnode) {
registerRef(vnode);
},
update: function(oldVnode, vnode) {
oldVnode.data.ref !== vnode.data.ref && (registerRef(oldVnode, !0), registerRef(vnode));
},
destroy: function(vnode) {
registerRef(vnode, !0);
}
},
{
create: updateDirectives,
update: updateDirectives,
destroy: function(vnode) {
updateDirectives(vnode, emptyNode);
}
}
])
});
isIE9 && document.addEventListener('selectionchange', function() {
var el = document.activeElement;

View File

@ -378,7 +378,7 @@ function formatYear(d, p) {
return pad(d.getFullYear() % 100, p, 2);
}
function formatYearISO(d, p) {
return d = dISO(d), pad(d.getFullYear() % 100, p, 2);
return pad((d = dISO(d)).getFullYear() % 100, p, 2);
}
function formatFullYear(d, p) {
return pad(d.getFullYear() % 10000, p, 4);
@ -442,7 +442,7 @@ function formatUTCYear(d, p) {
return pad(d.getUTCFullYear() % 100, p, 2);
}
function formatUTCYearISO(d, p) {
return d = UTCdISO(d), pad(d.getUTCFullYear() % 100, p, 2);
return pad((d = UTCdISO(d)).getUTCFullYear() % 100, p, 2);
}
function formatUTCFullYear(d, p) {
return pad(d.getUTCFullYear() % 10000, p, 4);

View File

@ -950,8 +950,8 @@
}
function createAdder(direction, name) {
return function(val, period) {
var dur, tmp;
return null === period || isNaN(+period) || (deprecateSimple(name, "moment()." + name + "(period, number) is deprecated. Please use moment()." + name + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."), tmp = val, val = period, period = tmp), dur = createDuration(val, period), addSubtract(this, dur, direction), this;
var tmp;
return null === period || isNaN(+period) || (deprecateSimple(name, "moment()." + name + "(period, number) is deprecated. Please use moment()." + name + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."), tmp = val, val = period, period = tmp), addSubtract(this, createDuration(val, period), direction), this;
};
}
function addSubtract(mom, duration, isAdding, updateOffset) {
@ -1760,7 +1760,7 @@
}, proto$2.months = months, proto$2.years = years, proto$2.humanize = function(argWithSuffix, argThresholds) {
if (!this.isValid()) return this.localeData().invalidDate();
var withoutSuffix, thresholds1, duration, seconds, minutes, hours, days, months, weeks, years, a, locale, output, withSuffix = !1, th = thresholds;
return "object" == typeof argWithSuffix && (argThresholds = argWithSuffix, argWithSuffix = !1), "boolean" == typeof argWithSuffix && (withSuffix = argWithSuffix), "object" == typeof argThresholds && (th = Object.assign({}, thresholds, argThresholds), null != argThresholds.s && null == argThresholds.ss && (th.ss = argThresholds.s - 1)), locale = this.localeData(), withoutSuffix = !withSuffix, thresholds1 = th, duration = createDuration(this).abs(), seconds = round(duration.as("s")), minutes = round(duration.as("m")), hours = round(duration.as("h")), days = round(duration.as("d")), months = round(duration.as("M")), weeks = round(duration.as("w")), years = round(duration.as("y")), a = seconds <= thresholds1.ss && [
return "object" == typeof argWithSuffix && (argThresholds = argWithSuffix, argWithSuffix = !1), "boolean" == typeof argWithSuffix && (withSuffix = argWithSuffix), "object" == typeof argThresholds && (th = Object.assign({}, thresholds, argThresholds), null != argThresholds.s && null == argThresholds.ss && (th.ss = argThresholds.s - 1)), locale = this.localeData(), withoutSuffix = !withSuffix, thresholds1 = th, seconds = round((duration = createDuration(this).abs()).as("s")), minutes = round(duration.as("m")), hours = round(duration.as("h")), days = round(duration.as("d")), months = round(duration.as("M")), weeks = round(duration.as("w")), years = round(duration.as("y")), a = seconds <= thresholds1.ss && [
"s",
seconds
] || seconds < thresholds1.s && [

View File

@ -115,9 +115,9 @@ var ItemsList = function(_Component) {
if (!(instance instanceof Constructor)) throw TypeError("Cannot call a class as a function");
}(this, ItemsList);
for(var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++)args[_key] = arguments[_key];
return _this = _super.call.apply(_super, [
return _defineProperty(_assertThisInitialized(_this = _super.call.apply(_super, [
this
].concat(args)), _defineProperty(_assertThisInitialized(_this), "storeHighlightedItemReference", function(highlightedItem) {
].concat(args))), "storeHighlightedItemReference", function(highlightedItem) {
_this.props.onHighlightedItemChange(null === highlightedItem ? null : highlightedItem.item);
}), _this;
}

View File

@ -1991,11 +1991,6 @@
c ? (a = ag(a, b, Wf), d.__reactInternalMemoizedMergedChildContext = a, E(Vf), E(H), G(H, a)) : E(Vf), G(Vf, c);
}
var dg = null, eg = !1, fg = !1;
function gg(a) {
null === dg ? dg = [
a
] : dg.push(a);
}
function ig() {
if (!fg && null !== dg) {
fg = !0;
@ -4077,7 +4072,7 @@
return (null !== P || null !== vg) && 0 != (1 & a.mode) && 0 == (2 & W);
}
function Ck(a, b) {
var a1, b1, a2, c = a.callbackNode;
var a1, a2, b1, c = a.callbackNode;
!function(a, b) {
for(var c = a.suspendedLanes, d = a.pingedLanes, e = a.expirationTimes, f = a.pendingLanes; 0 < f;){
var g = 31 - nc(f), h = 1 << g, k = e[g];
@ -4116,7 +4111,9 @@
var d = tc(a, a === P ? Y : 0);
if (0 === d) null !== c && ac(c), a.callbackNode = null, a.callbackPriority = 0;
else if (b = d & -d, a.callbackPriority !== b) {
if (null != c && ac(c), 1 === b) 0 === a.tag ? (a2 = Dk.bind(null, a), eg = !0, gg(a2)) : gg(Dk.bind(null, a)), If(function() {
if (null != c && ac(c), 1 === b) 0 === a.tag && (eg = !0), a1 = Dk.bind(null, a), null === dg ? dg = [
a1
] : dg.push(a1), If(function() {
0 === W && ig();
}), c = null;
else {
@ -4134,7 +4131,7 @@
case 536870912:
c = ic;
}
a1 = c, b1 = Fk.bind(null, a), c = $b(a1, b1);
a2 = c, b1 = Fk.bind(null, a), c = $b(a2, b1);
}
a.callbackPriority = b, a.callbackNode = c;
}
@ -5583,7 +5580,7 @@
var b = a._reactInternals;
if (void 0 === b) {
if ("function" == typeof a.render) throw Error(p(188));
throw a = Object.keys(a).join(","), Error(p(268, a));
throw Error(p(268, a = Object.keys(a).join(",")));
}
return a = null === (a = Yb(b)) ? null : a.stateNode;
}, exports.flushSync = function(a) {

View File

@ -3853,7 +3853,7 @@
}), -1 !== index && eventData.splice(index, 1), debounceListener && element.removeEventListener(event[j], debounceListener);
}, j = 0; j < event.length; j++)_loop_1(j);
}, EventHandler.clearEvents = function(element) {
eventData = EventHandler.addOrGetEventData(element), copyData = util_extend([], copyData, eventData);
copyData = util_extend([], copyData, eventData = EventHandler.addOrGetEventData(element));
for(var eventData, copyData, i = 0; i < copyData.length; i++)element.removeEventListener(copyData[i].name, copyData[i].debounce), eventData.shift();
}, EventHandler.trigger = function(element, eventName, eventProp) {
for(var eventData = EventHandler.addOrGetEventData(element), _i = 0; _i < eventData.length; _i++){
@ -4727,7 +4727,7 @@
}, Component.prototype.addOnPersist = function(options) {
for(var _this = this, persistObj = {}, _i = 0; _i < options.length; _i++){
var key = options[_i], objValue = void 0;
objValue = util_getValue(key, this), util_isUndefined(objValue) || setValue(key, this.getActualProperties(objValue), persistObj);
util_isUndefined(objValue = util_getValue(key, this)) || setValue(key, this.getActualProperties(objValue), persistObj);
}
return JSON.stringify(persistObj, function(key, value) {
return _this.getActualProperties(value);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -566,11 +566,7 @@
!error$1 || error$1 instanceof Error || (setCurrentlyValidatingElement(element), error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1), setCurrentlyValidatingElement(null)), error$1 instanceof Error && !(error$1.message in loggedTypeFailures) && (loggedTypeFailures[error$1.message] = !0, setCurrentlyValidatingElement(element), error("Failed %s type: %s", location, error$1.message), setCurrentlyValidatingElement(null));
}
}(propTypes, element.props, "prop", name, element);
} else if (void 0 !== type.PropTypes && !propTypesMisspellWarningShown) {
propTypesMisspellWarningShown = !0;
var _name = getComponentName(type);
error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
}
} else void 0 === type.PropTypes || propTypesMisspellWarningShown || (propTypesMisspellWarningShown = !0, error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", getComponentName(type) || "Unknown"));
"function" != typeof type.getDefaultProps || type.getDefaultProps.isReactClassApproved || error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
}
}

View File

@ -5306,7 +5306,7 @@
}, dispatcher.useEffect(function() {
if (refs.getSnapshot = getSnapshot, refs.setSnapshot = setSnapshot, !objectIs(version, getVersion(source._source))) {
var maybeNewSnapshot = getSnapshot(source._source);
"function" == typeof maybeNewSnapshot && error("Mutable source should not return a function as the snapshot value. Functions may close over mutable values and cause tearing."), !objectIs(snapshot, maybeNewSnapshot) && (setSnapshot(maybeNewSnapshot), markRootMutableRead(root, requestUpdateLane(fiber))), !function(root, entangledLanes) {
"function" == typeof maybeNewSnapshot && error("Mutable source should not return a function as the snapshot value. Functions may close over mutable values and cause tearing."), objectIs(snapshot, maybeNewSnapshot) || (setSnapshot(maybeNewSnapshot), markRootMutableRead(root, requestUpdateLane(fiber))), function(root, entangledLanes) {
root.entangledLanes |= entangledLanes;
for(var entanglements = root.entanglements, lanes = entangledLanes; lanes > 0;){
var index = pickArbitraryLaneIndex(lanes), lane = 1 << index;
@ -7661,11 +7661,7 @@
case 11:
case 15:
var renderingComponentName = workInProgress && getComponentName(workInProgress.type) || "Unknown";
if (!didWarnAboutUpdateInRenderForAnotherComponent.has(renderingComponentName)) {
didWarnAboutUpdateInRenderForAnotherComponent.add(renderingComponentName);
var setStateComponentName = getComponentName(fiber.type) || "Unknown";
error("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render", setStateComponentName, renderingComponentName, renderingComponentName);
}
didWarnAboutUpdateInRenderForAnotherComponent.has(renderingComponentName) || (didWarnAboutUpdateInRenderForAnotherComponent.add(renderingComponentName), error("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render", getComponentName(fiber.type) || "Unknown", renderingComponentName, renderingComponentName));
break;
case 1:
didWarnAboutUpdateInRender || (error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."), didWarnAboutUpdateInRender = !0);