aboutsummaryrefslogtreecommitdiff
path: root/jerry-core/ecma/base/ecma-globals.h
diff options
context:
space:
mode:
authorZoltan Herczeg <zherczeg.u-szeged@partner.samsung.com>2021-10-07 11:35:49 +0200
committerGitHub <noreply@github.com>2021-10-07 11:35:49 +0200
commitc696bc9327c0dd79264a3c73b61483c705197d51 (patch)
tree0c9bc5e65f065b99b6c3bf0e492da7b4ec0f9d4a /jerry-core/ecma/base/ecma-globals.h
parent7c21fb89b272e9e9f6fbd9804f4356b59a4a2c9c (diff)
Implement vm throw capture status management for API errors (#4783)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
Diffstat (limited to 'jerry-core/ecma/base/ecma-globals.h')
-rw-r--r--jerry-core/ecma/base/ecma-globals.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/jerry-core/ecma/base/ecma-globals.h b/jerry-core/ecma/base/ecma-globals.h
index cac25be7..117049e9 100644
--- a/jerry-core/ecma/base/ecma-globals.h
+++ b/jerry-core/ecma/base/ecma-globals.h
@@ -1938,17 +1938,22 @@ typedef struct
ecma_stringbuilder_header_t *header_p; /**< pointer to header */
} ecma_stringbuilder_t;
+#ifndef JERRY_BUILTIN_BIGINT
/**
- * Types for extended primitive values.
+ * BigInt type.
*/
-typedef enum
-{
-#ifndef JERRY_BUILTIN_BIGINT
- ECMA_EXTENDED_PRIMITIVE_BIGINT, /**< BigInt value */
+#define ECMA_EXTENDED_PRIMITIVE_BIGINT 0
#endif /* !defined (JERRY_BUILTIN_BIGINT) */
- ECMA_EXTENDED_PRIMITIVE_ERROR, /**< external API error reference */
- ECMA_EXTENDED_PRIMITIVE_ABORT, /**< external API abort reference */
-} ecma_extended_primitive_type_t;
+
+/**
+ * Abort flag for errors in C API.
+ */
+#define ECMA_ERROR_API_ABORT (1u << 0)
+
+/**
+ * Throw captured flag for errors in C API.
+ */
+#define ECMA_ERROR_API_THROW_CAPTURED (1u << 1)
/**
* Representation of a thrown value on API level.
@@ -1964,11 +1969,6 @@ typedef struct
} ecma_extended_primitive_t;
/**
- * Get the type of an extended primitve value.
- */
-#define ECMA_EXTENDED_PRIMITIVE_GET_TYPE(primitve_p) ((primitve_p)->refs_and_type & 0x7)
-
-/**
* Value for increasing or decreasing the reference counter.
*/
#define ECMA_EXTENDED_PRIMITIVE_REF_ONE (1u << 3)