You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
function bad(v) {
if (v == null) {
return null;
}
var a = v.a,
b = v.b;
if (a == null || b == null) {
return a && b;
}
return v;
}
__optimize(bad);
leads to this output
(function () {
var _$2 = this;
var _0 = function (v) {
var _$0 = v.a; // <== v can be null which is handled in input
var _$1 = v.b;
var _1 = v == null;
if (!_1) {
var _$0 = v.a;
var _$1 = v.b;
var _5 = _$0 == null;
var _7 = _$1 == null;
var _4 = _5 || _7;
if (!_4) {
var _$0 = v.a;
var _$1 = v.b;
}
}
var _B = _$0 && _$1;
var _A = _4 ? _B : v;
var _9 = _1 ? null : _A;
return _9;
};
_$2.bad = _0;
}).call(this);
The text was updated successfully, but these errors were encountered:
Summary:
Fixes#2151#2222#2279#2393#2399#2404#2411#2414#2415
Added a fuzz testing tool
Added test cases
Turn crash in JSON.stringify into a diagnostic
Adds a `arrayNestedOptimizedFunctionsEnabled` flag to enable nested optimized functions derived from Array.prototype methods (like `map`) and Array.from
Refactor assignment on partial or possibly deleted property
Rewrote the joining logic to always do a full join at every join point
Removed last remnants of delayUnsupportedRequires
Reviewed By: cblappert
Differential Revision: D9349841
fbshipit-source-id: 74a16dbb015777d59d23fdfde77abbe2489c292a
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
leads to this output
The text was updated successfully, but these errors were encountered: