if (IS_NUMBER(y)) return %NumberEquals(x, y);
if (IS_NULL_OR_UNDEFINED(y)) return 1; // not equal
if (!IS_SPEC_OBJECT(y)) {
- if (IS_SYMBOL(y) || IS_SIMD_OBJECT(y)) return 1; // not equal
+ if (IS_SYMBOL(y) || IS_SIMD_VALUE(y)) return 1; // not equal
// String or boolean.
return %NumberEquals(x, %$toNumber(y));
}
if (IS_NUMBER(y)) return %NumberEquals(%$toNumber(x), y);
if (IS_BOOLEAN(y)) return %NumberEquals(%$toNumber(x), %$toNumber(y));
if (IS_NULL_OR_UNDEFINED(y)) return 1; // not equal
- if (IS_SYMBOL(y) || IS_SIMD_OBJECT(y)) return 1; // not equal
+ if (IS_SYMBOL(y) || IS_SIMD_VALUE(y)) return 1; // not equal
y = %$toPrimitive(y, NO_HINT);
}
} else if (IS_SYMBOL(x)) {
if (IS_NULL_OR_UNDEFINED(y)) return 1;
if (IS_NUMBER(y)) return %NumberEquals(%$toNumber(x), y);
if (IS_STRING(y)) return %NumberEquals(%$toNumber(x), %$toNumber(y));
- if (IS_SYMBOL(y) || IS_SIMD_OBJECT(y)) return 1; // not equal
+ if (IS_SYMBOL(y) || IS_SIMD_VALUE(y)) return 1; // not equal
// y is object.
x = %$toNumber(x);
y = %$toPrimitive(y, NO_HINT);
} else if (IS_NULL_OR_UNDEFINED(x)) {
return IS_NULL_OR_UNDEFINED(y) ? 0 : 1;
- } else if (IS_SIMD_OBJECT(x)) {
+ } else if (IS_SIMD_VALUE(x)) {
return %SimdEquals(x, y);
} else {
// x is an object.
if (IS_NULL_OR_UNDEFINED(y)) return 1; // not equal
if (IS_BOOLEAN(y)) {
y = %$toNumber(y);
- } else if (IS_SYMBOL(y) || IS_SIMD_OBJECT(y)) {
+ } else if (IS_SYMBOL(y) || IS_SIMD_VALUE(y)) {
return 1; // not equal
}
x = %$toPrimitive(x, NO_HINT);
return %NumberEquals(this, x);
}
- if (IS_SIMD_OBJECT(this)) return %SimdEquals(this, x);
+ if (IS_SIMD_VALUE(this)) return %SimdEquals(this, x);
// If anything else gets here, we just do simple identity check.
// Objects (including functions), null, undefined and booleans were
if (IS_STRING(x)) return x;
// Normal behavior.
if (!IS_SPEC_OBJECT(x)) return x;
- if (IS_SIMD_OBJECT(x)) return x;
+ if (IS_SIMD_VALUE(x)) return x;
if (hint == NO_HINT) hint = (IS_DATE(x)) ? STRING_HINT : NUMBER_HINT;
return (hint == NUMBER_HINT) ? DefaultNumber(x) : DefaultString(x);
}
return false;
}
}
- if (IS_SIMD_OBJECT(x)) return %SimdSameValue(x, y);
+ if (IS_SIMD_VALUE(x)) return %SimdSameValue(x, y);
return x === y;
}
if (IS_NUMBER(x)) {
if (NUMBER_IS_NAN(x) && NUMBER_IS_NAN(y)) return true;
}
- if (IS_SIMD_OBJECT(x)) return %SimdSameValueZero(x, y);
+ if (IS_SIMD_VALUE(x)) return %SimdSameValueZero(x, y);
return x === y;
}
if (IS_SPEC_FUNCTION(valueOf)) {
var v = %_CallFunction(x, valueOf);
if (IS_SYMBOL(v)) throw MakeTypeError(kSymbolToNumber);
- if (IS_SIMD_OBJECT(x)) throw MakeTypeError(kSimdToNumber);
+ if (IS_SIMD_VALUE(x)) throw MakeTypeError(kSimdToNumber);
if (IsPrimitive(v)) return v;
}
var toString = x.toString;