Lines Matching refs:val2

96 function isEqualBoxedPrimitive(val1, val2) {
98 return isNumberObject(val2) &&
100 NumberPrototypeValueOf(val2));
103 return isStringObject(val2) &&
104 StringPrototypeValueOf(val1) === StringPrototypeValueOf(val2);
107 return isBooleanObject(val2) &&
108 BooleanPrototypeValueOf(val1) === BooleanPrototypeValueOf(val2);
111 return isBigIntObject(val2) &&
112 BigIntPrototypeValueOf(val1) === BigIntPrototypeValueOf(val2);
115 return isSymbolObject(val2) &&
116 SymbolPrototypeValueOf(val1) === SymbolPrototypeValueOf(val2);
134 function innerDeepEqual(val1, val2, strict, memos) {
136 if (val1 === val2) {
139 return strict ? ObjectIs(val1, val2) : true;
142 // Check more closely if val1 and val2 are equal.
146 NumberIsNaN(val2);
148 if (typeof val2 !== 'object' || val1 === null || val2 === null) {
151 if (ObjectGetPrototypeOf(val1) !== ObjectGetPrototypeOf(val2)) {
156 if (val2 === null || typeof val2 !== 'object') {
158 return val1 == val2 || (NumberIsNaN(val1) && NumberIsNaN(val2));
162 if (val2 === null || typeof val2 !== 'object') {
167 const val2Tag = ObjectPrototypeToString(val2);
175 if (!ArrayIsArray(val2) || val1.length !== val2.length) {
180 const keys2 = getOwnNonIndexProperties(val2, filter);
184 return keyCheck(val1, val2, strict, memos, kIsArray, keys1);
186 return keyCheck(val1, val2, strict, memos, kNoIterator);
188 if (!isDate(val2) ||
189 DatePrototypeGetTime(val1) !== DatePrototypeGetTime(val2)) {
193 if (!isRegExp(val2) || !areSimilarRegExps(val1, val2)) {
199 if ((!isNativeError(val2) && !(val2 instanceof Error)) ||
200 val1.message !== val2.message ||
201 val1.name !== val2.name) {
206 TypedArrayPrototypeGetSymbolToStringTag(val2)) {
210 if (!areSimilarFloatArrays(val1, val2)) {
213 } else if (!areSimilarTypedArrays(val1, val2)) {
216 // Buffer.compare returns true, so val1.length === val2.length. If they both
221 const keys2 = getOwnNonIndexProperties(val2, filter);
225 return keyCheck(val1, val2, strict, memos, kNoIterator, keys1);
227 if (!isSet(val2) || val1.size !== val2.size) {
230 return keyCheck(val1, val2, strict, memos, kIsSet);
232 if (!isMap(val2) || val1.size !== val2.size) {
235 return keyCheck(val1, val2, strict, memos, kIsMap);
237 if (!isAnyArrayBuffer(val2) || !areEqualArrayBuffers(val1, val2)) {
241 if (!isEqualBoxedPrimitive(val1, val2)) {
244 } else if (ArrayIsArray(val2) ||
245 isArrayBufferView(val2) ||
246 isSet(val2) ||
247 isMap(val2) ||
248 isDate(val2) ||
249 isRegExp(val2) ||
250 isAnyArrayBuffer(val2) ||
251 isBoxedPrimitive(val2) ||
252 isNativeError(val2) ||
253 val2 instanceof Error) {
256 return keyCheck(val1, val2, strict, memos, kNoIterator);
266 function keyCheck(val1, val2, strict, memos, iterationType, aKeys) {
276 const bKeys = ObjectKeys(val2);
287 if (!ObjectPrototypePropertyIsEnumerable(val2, aKeys[i])) {
299 if (!ObjectPrototypePropertyIsEnumerable(val2, key)) {
304 } else if (ObjectPrototypePropertyIsEnumerable(val2, key)) {
308 const symbolKeysB = ObjectGetOwnPropertySymbols(val2);
310 getEnumerables(val2, symbolKeysB).length !== count) {
314 const symbolKeysB = ObjectGetOwnPropertySymbols(val2);
316 getEnumerables(val2, symbolKeysB).length !== 0) {
333 val2: new SafeMap(),
342 const val2MemoB = memos.val2.get(val2);
351 memos.val2.set(val2, memos.position);
353 const areEq = objEquiv(val1, val2, strict, aKeys, memos, iterationType);
356 memos.val2.delete(val2);
363 for (const val2 of set) {
364 if (innerDeepEqual(val1, val2, strict, memo)) {
366 set.delete(val2);
585 function isDeepEqual(val1, val2) {
586 return innerDeepEqual(val1, val2, kLoose);
589 function isDeepStrictEqual(val1, val2) {
590 return innerDeepEqual(val1, val2, kStrict);