aboutsummaryrefslogtreecommitdiff
path: root/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.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-regexp-prototype.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-regexp-prototype.inc.h')
-rw-r--r--jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.inc.h27
1 files changed, 2 insertions, 25 deletions
diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.inc.h b/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.inc.h
index c98bc730..857aef5e 100644
--- a/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.inc.h
+++ b/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.inc.h
@@ -16,25 +16,8 @@
/*
* RegExp.prototype built-in description
*/
-#ifndef OBJECT_VALUE
-# define OBJECT_VALUE(name, obj_builtin_id, prop_attributes)
-#endif /* !OBJECT_VALUE */
-#ifndef NUMBER_VALUE
-# define NUMBER_VALUE(name, number_value, prop_attributes)
-#endif /* !NUMBER_VALUE */
-
-#ifndef SIMPLE_VALUE
-# define SIMPLE_VALUE(name, simple_value, prop_attributes)
-#endif /* !SIMPLE_VALUE */
-
-#ifndef STRING_VALUE
-# define STRING_VALUE(name, magic_string_id, prop_attributes)
-#endif /* !STRING_VALUE */
-
-#ifndef ROUTINE
-# define ROUTINE(name, c_function_name, args_number, length_prop_value)
-#endif /* !ROUTINE */
+#include "ecma-builtin-helpers-macro-defines.inc.h"
/* ECMA-262 v5, 15.10.6.1 */
OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
@@ -73,10 +56,4 @@ ROUTINE (LIT_MAGIC_STRING_EXEC, ecma_builtin_regexp_prototype_exec, 1, 1)
ROUTINE (LIT_MAGIC_STRING_TEST, ecma_builtin_regexp_prototype_test, 1, 1)
ROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ecma_builtin_regexp_prototype_to_string, 0, 0)
-#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"