Improve builtin instantiation (#2226)

* Resolve linker errors with -O0 in some compilers
 * Reduce the stack usage

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
This commit is contained in:
László Langó
2018-03-02 14:37:03 +01:00
committed by GitHub
parent 55058cf151
commit 94760b1213
4 changed files with 267 additions and 246 deletions
@@ -23,6 +23,17 @@
*/
typedef enum
{
#define BUILTIN(a, b, c, d, e)
#define BUILTIN_ROUTINE(builtin_id, \
object_type, \
object_prototype_builtin_id, \
is_extensible, \
lowercase_name) \
builtin_id,
#include "ecma-builtins.inc.h"
#undef BUILTIN
#undef BUILTIN_ROUTINE
#define BUILTIN_ROUTINE(a, b, c, d, e)
#define BUILTIN(builtin_id, \
object_type, \
object_prototype_builtin_id, \
@@ -30,6 +41,8 @@ typedef enum
lowercase_name) \
builtin_id,
#include "ecma-builtins.inc.h"
#undef BUILTIN
#undef BUILTIN_ROUTINE
ECMA_BUILTIN_ID__COUNT /**< number of built-in objects */
} ecma_builtin_id_t;