Remove usage of isalpha, isdigit, isxdigit, isspace in the whole engine except implementation of JSON built-in, moving the functions to JSON built-in's module.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
This commit is contained in:
Ruben Ayrapetyan
2015-07-03 02:17:14 +03:00
parent bcedc901cd
commit 7b3042fdc9
6 changed files with 72 additions and 94 deletions
@@ -39,6 +39,27 @@
#define BUILTIN_UNDERSCORED_ID json
#include "ecma-builtin-internal-routines-template.inc.h"
/*
* FIXME:
* Replace usage of isalpha and isdigit functions in the module with lit_char helpers and remove the functions.
*
* Related issue: #424
*/
/** Checks for an alphabetic character. */
static int
isalpha (int c)
{
return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z');
}
/** Checks for a digit (0 through 9). */
static int
isdigit (int c)
{
return c >= '0' && c <= '9';
}
/** \addtogroup ecma ECMA
* @{
*