Fix large array optimization in baseDifference.

This commit is contained in:
John-David Dalton
2014-01-20 00:12:16 -08:00
parent a3d18d0429
commit f4de7422b3
5 changed files with 18 additions and 17 deletions

2
dist/lodash.min.js vendored
View File

@@ -10,7 +10,7 @@ for(var r in n)Ir.call(n,r)&&t.push(r);return t}function o(n,t){if(!tr(n))return
}function R(n,t,r,e,u){if(r){var o=r(n);if(typeof o!="undefined")return o}if(!tr(n))return n;var i=Cr.call(n);if(!ut[i])return n;var a=Zr[i];switch(i){case Q:case Y:return new a(+n);case nt:case et:return new a(n);case rt:return o=a(n.source,P.exec(n)),o.lastIndex=n.lastIndex,o}if(i=fe(n),t){var f=!e;e||(e=c()),u||(u=c());for(var l=e.length;l--;)if(e[l]==n)return u[l];o=i?a(n.length):{}}else o=i?Et(n):Ht({},n);return i&&(Ir.call(n,"index")&&(o.index=n.index),Ir.call(n,"input")&&(o.input=n.input)),t?(e.push(n),u.push(o),(i?st:vt)(n,function(n,i){o[i]=R(n,t,r,e,u)
}),f&&(p(e),p(u)),o):o}function at(n){return tr(n)?zr(n):{}}function ft(n,t,r){if(typeof n!="function")return or;if(typeof t=="undefined"||!("prototype"in n))return n;var e=n.__bindData__;if(typeof e=="undefined"&&(ne.funcNames&&(e=!n.name),e=e||!ne.funcDecomp,!e)){var u=Nr.call(n);ne.funcNames||(e=!K.test(u)),e||(e=V.test(u),ee(n,e))}if(false===e||true!==e&&e[1]&x)return n;switch(r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)
};case 4:return function(r,e,u,o){return n.call(t,r,e,u,o)}}return Xt(n,t)}function lt(n){function t(){var n=f?i:this;if(u){var g=Et(u);Tr.apply(g,arguments)}return(o||c)&&(g||(g=Et(arguments)),o&&Tr.apply(g,o),c&&g.length<a)?(e|=S,e&=~E,lt([r,p?e:e&~(x|C),g,null,i,a])):(g||(g=arguments),l&&(r=n[s]),this instanceof t?(n=at(r.prototype),g=r.apply(n,g),tr(g)?g:n):r.apply(n,g))}var r=n[0],e=n[1],u=n[2],o=n[3],i=n[4],a=n[5],f=e&x,l=e&C,c=e&O,p=e&A,s=r;return ee(t,n),t}function ct(n,e){var u=-1,o=jt(),i=n?n.length:0,a=[];
for(re&&o===t&&i>=N&&(o=r,e=re(e));++u<i;){var f=n[u];0>o(e,f)&&a.push(f)}return a}function st(n,t){var r=-1,e=n?n.length:0;if(typeof e=="number")for(;++r<e&&false!==t(n[r],r,n););else vt(n,t);return n}function gt(n,t,r,e){e=(e||0)-1;for(var u=n?n.length:0,o=[];++e<u;){var i=n[e];if(i&&typeof i=="object"&&typeof i.length=="number"&&(fe(i)||Ct(i))){t||(i=gt(i,t,r));var a=-1,f=i.length,l=o.length;for(o.length+=f;++a<f;)o[l++]=i[a]}else r||o.push(i)}return o}function vt(n,t){for(var r=-1,e=ce(n),u=e.length;++r<u;){var o=e[r];
for(re&&e&&o===t&&e.length>=N&&(o=r,e=re(e));++u<i;){var f=n[u];0>o(e,f)&&a.push(f)}return a}function st(n,t){var r=-1,e=n?n.length:0;if(typeof e=="number")for(;++r<e&&false!==t(n[r],r,n););else vt(n,t);return n}function gt(n,t,r,e){e=(e||0)-1;for(var u=n?n.length:0,o=[];++e<u;){var i=n[e];if(i&&typeof i=="object"&&typeof i.length=="number"&&(fe(i)||Ct(i))){t||(i=gt(i,t,r));var a=-1,f=i.length,l=o.length;for(o.length+=f;++a<f;)o[l++]=i[a]}else r||o.push(i)}return o}function vt(n,t){for(var r=-1,e=ce(n),u=e.length;++r<u;){var o=e[r];
if(false===t(n[o],o,n))break}return n}function yt(n,t,r,e,u,i){if(r){var a=r(n,t);if(typeof a!="undefined")return!!a}if(n===t)return 0!==n||1/n==1/t;var f=typeof n,l=typeof t;if(n===n&&(!n||"function"!=f&&"object"!=f)&&(!t||"function"!=l&&"object"!=l))return false;if(null==n||null==t)return n===t;if(l=Cr.call(n),f=Cr.call(t),l==H&&(l=tt),f==H&&(f=tt),l!=f)return false;switch(l){case Q:case Y:return+n==+t;case nt:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case rt:case et:return n==dr(t)}if(f=l==J,!f){var s=Ir.call(n,"__wrapped__"),g=Ir.call(t,"__wrapped__");
if(s||g)return yt(s?n.__wrapped__:n,g?t.__wrapped__:t,r,e,u,i);if(l!=tt)return false;if(l=n.constructor,s=t.constructor,l!=s&&!(Ir.call(n,"constructor")&&Ir.call(t,"constructor")||nr(l)&&l instanceof l&&nr(s)&&s instanceof s)&&"constructor"in n&&"constructor"in t)return false}for(l=!u,u||(u=c()),i||(i=c()),s=u.length;s--;)if(u[s]==n)return i[s]==t;var h=0,a=true;if(u.push(n),i.push(t),f){if(s=n.length,h=t.length,(a=h==s)||e)for(;h--;)if(f=s,g=t[h],e)for(;f--&&!(a=yt(n[f],g,r,e,u,i)););else if(!(a=yt(n[h],g,r,e,u,i)))break
}else o(t,function(t,o,f){return Ir.call(f,o)?(h++,a=Ir.call(n,o)&&yt(n[o],t,r,e,u,i)):void 0}),a&&!e&&o(n,function(n,t,r){return Ir.call(r,t)?a=-1<--h:void 0});return u.pop(),i.pop(),l&&(p(u),p(i)),a}function mt(n,t,r,e,u){(fe(t)?st:vt)(t,function(t,o){var i,a,f=t,l=n[o];if(t&&((a=fe(t))||le(t))){for(f=e.length;f--;)if(i=e[f]==t){l=u[f];break}if(!i){var c;r&&(f=r(l,t),c=typeof f!="undefined")&&(l=f),c||(l=a?fe(l)?l:[]:le(l)?l:{}),e.push(t),u.push(l),c||mt(l,t,r,e,u)}}else r&&(f=r(l,t),typeof f=="undefined"&&(f=t)),typeof f!="undefined"&&(l=f);