Add symbol support to same_value function (#3030)

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
This commit is contained in:
Daniel Balla 2019-09-02 14:52:53 +03:00 committed by Robert Fancsik
parent ea77a79461
commit 29758101a3

View File

@ -148,6 +148,12 @@ ecma_op_same_value (ecma_value_t x, /**< ecma value */
{
return (ecma_is_value_true (x) == ecma_is_value_true (y));
}
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
else if (ecma_is_value_symbol (x))
{
return x == y;
}
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
else
{
JERRY_ASSERT (is_x_object);