diff --git a/jerry-core/ecma/base/ecma-error-messages.inc.h b/jerry-core/ecma/base/ecma-error-messages.inc.h index 17d978770d..218bbd3ecb 100644 --- a/jerry-core/ecma/base/ecma-error-messages.inc.h +++ b/jerry-core/ecma/base/ecma-error-messages.inc.h @@ -506,11 +506,8 @@ ECMA_ERROR_DEF (ECMA_ERR_ARGUMENT_THIS_NOT_GENERATOR_OBJECT, "Argument 'this' is ECMA_ERROR_DEF (ECMA_ERR_ARGUMENT_CANNOT_CONVERT_TO_OBJECT, "Argument cannot be converted to an object") #if JERRY_BUILTIN_BIGINT ECMA_ERROR_DEF (ECMA_ERR_ALLOCATE_BIGINT_VALUE, "Cannot allocate memory for a BigInt value") -#endif /* JERRY_BUILTIN_BIGINT */ -#if JERRY_BUILTIN_ATOMICS || JERRY_BUILTIN_BIGINT ECMA_ERROR_DEF (ECMA_ERR_CONVERT_BIGINT_TO_NUMBER, "Cannot convert a BigInt value to a number") -#endif /* JERRY_BUILTIN_ATOMICS \ -|| JERRY_BUILTIN_BIGINT */ +#endif /* JERRY_BUILTIN_BIGINT */ ECMA_ERROR_DEF (ECMA_ERR_CONVERT_SYMBOL_TO_NUMBER, "Cannot convert a Symbol value to a number") ECMA_ERROR_DEF (ECMA_ERR_CONVERT_SYMBOL_TO_STRING, "Cannot convert a Symbol value to a string") #if JERRY_BUILTIN_BIGINT && JERRY_BUILTIN_TYPEDARRAY diff --git a/tools/check-strings.sh b/tools/check-strings.sh index fdb917771e..3c9dd2be16 100755 --- a/tools/check-strings.sh +++ b/tools/check-strings.sh @@ -16,21 +16,44 @@ MAGIC_STRINGS_GEN="tools/gen-strings.py" MAGIC_STRINGS_INC_H="jerry-core/lit/lit-magic-strings.inc.h" -MAGIC_STRINGS_TEMP=`mktemp lit-magic-strings.inc.h.XXXXXXXXXX` +ECMA_ERROR_MESSAGES_INC_H="jerry-core/ecma/base/ecma-error-messages.inc.h" +PARSER_ERROR_MESSAGES_INC_H="jerry-core/parser/js/parser-error-messages.inc.h" +MAGIC_STRINGS_TEMP=$(mktemp lit-magic-strings.inc.h.XXXXXXXXXX) +ECMA_ERROR_MESSAGES_TEMP=$(mktemp ecma-error-messages.inc.h.XXXXXXXXXX) +PARSER_ERROR_MESSAGES_TEMP=$(mktemp parser-error-messages.inc.h.XXXXXXXXXX) -cp $MAGIC_STRINGS_INC_H $MAGIC_STRINGS_TEMP +cp $MAGIC_STRINGS_INC_H "$MAGIC_STRINGS_TEMP" +cp $ECMA_ERROR_MESSAGES_INC_H "$ECMA_ERROR_MESSAGES_TEMP" +cp $PARSER_ERROR_MESSAGES_INC_H "$PARSER_ERROR_MESSAGES_TEMP" $MAGIC_STRINGS_GEN DIFF_RESULT=$? if [ $DIFF_RESULT -eq 0 ] then - diff -q $MAGIC_STRINGS_INC_H $MAGIC_STRINGS_TEMP + diff -q $MAGIC_STRINGS_INC_H "$MAGIC_STRINGS_TEMP" DIFF_RESULT=$? if [ $DIFF_RESULT -ne 0 ] then echo -e "\e[1;33m$MAGIC_STRINGS_INC_H must be re-generated. Run $MAGIC_STRINGS_GEN\e[0m" + exit $DIFF_RESULT + fi + diff -q $ECMA_ERROR_MESSAGES_INC_H "$ECMA_ERROR_MESSAGES_TEMP" + DIFF_RESULT=$? + if [ $DIFF_RESULT -ne 0 ] + then + echo -e "\e[1;33m$ECMA_ERROR_MESSAGES_INC_H must be re-generated. Run $MAGIC_STRINGS_GEN\e[0m" + exit $DIFF_RESULT + fi + diff -q $PARSER_ERROR_MESSAGES_INC_H "$PARSER_ERROR_MESSAGES_TEMP" + DIFF_RESULT=$? + if [ $DIFF_RESULT -ne 0 ] + then + echo -e "\e[1;33m$PARSER_ERROR_MESSAGES_INC_H must be re-generated. Run $MAGIC_STRINGS_GEN\e[0m" + exit $DIFF_RESULT fi fi -mv $MAGIC_STRINGS_TEMP $MAGIC_STRINGS_INC_H +mv "$MAGIC_STRINGS_TEMP" $MAGIC_STRINGS_INC_H +mv "$ECMA_ERROR_MESSAGES_TEMP" $ECMA_ERROR_MESSAGES_INC_H +mv "$PARSER_ERROR_MESSAGES_TEMP" $PARSER_ERROR_MESSAGES_INC_H exit $DIFF_RESULT