Lines Matching defs:val1
96 function isEqualBoxedPrimitive(val1, val2) {
97 if (isNumberObject(val1)) {
99 ObjectIs(NumberPrototypeValueOf(val1),
102 if (isStringObject(val1)) {
104 StringPrototypeValueOf(val1) === StringPrototypeValueOf(val2);
106 if (isBooleanObject(val1)) {
108 BooleanPrototypeValueOf(val1) === BooleanPrototypeValueOf(val2);
110 if (isBigIntObject(val1)) {
112 BigIntPrototypeValueOf(val1) === BigIntPrototypeValueOf(val2);
114 if (isSymbolObject(val1)) {
116 SymbolPrototypeValueOf(val1) === SymbolPrototypeValueOf(val2);
119 assert.fail(`Unknown boxed type ${val1}`);
134 function innerDeepEqual(val1, val2, strict, memos) {
136 if (val1 === val2) {
137 if (val1 !== 0)
139 return strict ? ObjectIs(val1, val2) : true;
142 // Check more closely if val1 and val2 are equal.
144 if (typeof val1 !== 'object') {
145 return typeof val1 === 'number' && NumberIsNaN(val1) &&
148 if (typeof val2 !== 'object' || val1 === null || val2 === null) {
151 if (ObjectGetPrototypeOf(val1) !== ObjectGetPrototypeOf(val2)) {
155 if (val1 === null || typeof val1 !== 'object') {
158 return val1 == val2 || (NumberIsNaN(val1) && NumberIsNaN(val2));
166 const val1Tag = ObjectPrototypeToString(val1);
173 if (ArrayIsArray(val1)) {
175 if (!ArrayIsArray(val2) || val1.length !== val2.length) {
179 const keys1 = getOwnNonIndexProperties(val1, filter);
184 return keyCheck(val1, val2, strict, memos, kIsArray, keys1);
186 return keyCheck(val1, val2, strict, memos, kNoIterator);
187 } else if (isDate(val1)) {
189 DatePrototypeGetTime(val1) !== DatePrototypeGetTime(val2)) {
192 } else if (isRegExp(val1)) {
193 if (!isRegExp(val2) || !areSimilarRegExps(val1, val2)) {
196 } else if (isNativeError(val1) || val1 instanceof Error) {
200 val1.message !== val2.message ||
201 val1.name !== val2.name) {
204 } else if (isArrayBufferView(val1)) {
205 if (TypedArrayPrototypeGetSymbolToStringTag(val1) !==
209 if (!strict && (isFloat32Array(val1) || isFloat64Array(val1))) {
210 if (!areSimilarFloatArrays(val1, val2)) {
213 } else if (!areSimilarTypedArrays(val1, val2)) {
216 // Buffer.compare returns true, so val1.length === val2.length. If they both
220 const keys1 = getOwnNonIndexProperties(val1, filter);
225 return keyCheck(val1, val2, strict, memos, kNoIterator, keys1);
226 } else if (isSet(val1)) {
227 if (!isSet(val2) || val1.size !== val2.size) {
230 return keyCheck(val1, val2, strict, memos, kIsSet);
231 } else if (isMap(val1)) {
232 if (!isMap(val2) || val1.size !== val2.size) {
235 return keyCheck(val1, val2, strict, memos, kIsMap);
236 } else if (isAnyArrayBuffer(val1)) {
237 if (!isAnyArrayBuffer(val2) || !areEqualArrayBuffers(val1, val2)) {
240 } else if (isBoxedPrimitive(val1)) {
241 if (!isEqualBoxedPrimitive(val1, val2)) {
256 return keyCheck(val1, val2, strict, memos, kNoIterator);
266 function keyCheck(val1, val2, strict, memos, iterationType, aKeys) {
275 aKeys = ObjectKeys(val1);
293 const symbolKeysA = ObjectGetOwnPropertySymbols(val1);
298 if (ObjectPrototypePropertyIsEnumerable(val1, key)) {
324 (iterationType === kIsArray && val1.length === 0) ||
325 val1.size === 0)) {
332 val1: new SafeMap(),
340 const val2MemoA = memos.val1.get(val1);
350 memos.val1.set(val1, memos.position);
353 const areEq = objEquiv(val1, val2, strict, aKeys, memos, iterationType);
355 memos.val1.delete(val1);
361 function setHasEqualElement(set, val1, strict, memo) {
364 if (innerDeepEqual(val1, val2, strict, memo)) {
585 function isDeepEqual(val1, val2) {
586 return innerDeepEqual(val1, val2, kLoose);
589 function isDeepStrictEqual(val1, val2) {
590 return innerDeepEqual(val1, val2, kStrict);