aboutsummaryrefslogtreecommitdiff
path: root/jerry-core/ecma/builtin-objects/ecma-builtin-evalerror.inc.h
diff options
context:
space:
mode:
authorAkos Kiss <akiss@inf.u-szeged.hu>2017-03-23 09:36:29 +0100
committerGitHub <noreply@github.com>2017-03-23 09:36:29 +0100
commit4a5df52aa1831d6481f9679f6428ee5ebcca787d (patch)
treec0928c1ae64edc9f5b65b43b1fb74e7464d1c85b /jerry-core/ecma/builtin-objects/ecma-builtin-evalerror.inc.h
parent852a6aef53cc379c2b5961363d4a1b1a5a671c42 (diff)
Factor out common macro un/definitions used for built-in descriptions (#1678)
The default definitions and undefinitions of macros used for built-in descriptions (SIMPLE_VALUE, NUMBER_VALUE, STRING_VALUE, OBJECT_VALUE, ROUTINE, ACCESSOR_READ_WRITE, ACCESSOR_READ_ONLY) are heavily cloned all over the builtin-objects directory. This commit factors them out into two header files, which are then included in the place of the clones. This way, maintenance becomes a lot easier: e.g., if a new macro gets introduced, default definition and undefinition don't have to be added to all description files (of which there are 56 right now, and their number will most probably just grow). JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
Diffstat (limited to 'jerry-core/ecma/builtin-objects/ecma-builtin-evalerror.inc.h')
-rw-r--r--jerry-core/ecma/builtin-objects/ecma-builtin-evalerror.inc.h19
1 files changed, 2 insertions, 17 deletions
diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-evalerror.inc.h b/jerry-core/ecma/builtin-objects/ecma-builtin-evalerror.inc.h
index 4c991e9e..30a43e1d 100644
--- a/jerry-core/ecma/builtin-objects/ecma-builtin-evalerror.inc.h
+++ b/jerry-core/ecma/builtin-objects/ecma-builtin-evalerror.inc.h
@@ -16,17 +16,8 @@
/*
* EvalError built-in description
*/
-#ifndef NUMBER_VALUE
-# define NUMBER_VALUE(name, number_value, prop_attributes)
-#endif /* !NUMBER_VALUE */
-#ifndef STRING_VALUE
-# define STRING_VALUE(name, magic_string_id, prop_attributes)
-#endif /* !STRING_VALUE */
-
-#ifndef OBJECT_VALUE
-# define OBJECT_VALUE(name, obj_builtin_id, prop_attributes)
-#endif /* !OBJECT_VALUE */
+#include "ecma-builtin-helpers-macro-defines.inc.h"
/* Number properties:
* (property name, number value, writable, enumerable, configurable) */
@@ -44,10 +35,4 @@ OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
ECMA_BUILTIN_ID_EVAL_ERROR_PROTOTYPE,
ECMA_PROPERTY_FIXED)
-#undef SIMPLE_VALUE
-#undef NUMBER_VALUE
-#undef STRING_VALUE
-#undef OBJECT_VALUE
-#undef ROUTINE
-#undef ACCESSOR_READ_WRITE
-#undef ACCESSOR_READ_ONLY
+#include "ecma-builtin-helpers-macro-undefs.inc.h"