Merge Promise Guard with ESNEXT (#4725)
JerryScript-DCO-1.0-Signed-off-by: Bela Toth tbela@inf.u-szeged.hu
This commit is contained in:
@@ -46,14 +46,11 @@ const char * const ecma_error_json_not_supported_p = "JSON support is disabled";
|
||||
* Error message, if Symbol support is disabled
|
||||
*/
|
||||
const char * const ecma_error_symbol_not_supported_p = "Symbol support is disabled";
|
||||
#endif /* !JERRY_ESNEXT */
|
||||
|
||||
#if !JERRY_BUILTIN_PROMISE
|
||||
/**
|
||||
* Error message, if Promise support is disabled
|
||||
*/
|
||||
const char * const ecma_error_promise_not_supported_p = "Promise support is disabled";
|
||||
#endif /* !JERRY_BUILTIN_PROMISE */
|
||||
#endif /* !JERRY_ESNEXT */
|
||||
|
||||
#if !JERRY_BUILTIN_TYPEDARRAY
|
||||
/**
|
||||
|
||||
@@ -33,11 +33,9 @@ extern const char * const ecma_error_json_not_supported_p;
|
||||
|
||||
#if !JERRY_ESNEXT
|
||||
extern const char * const ecma_error_symbol_not_supported_p;
|
||||
#endif /* !JERRY_ESNEXT */
|
||||
|
||||
#if !JERRY_BUILTIN_PROMISE
|
||||
extern const char * const ecma_error_promise_not_supported_p;
|
||||
#endif /* !JERRY_BUILTIN_PROMISE */
|
||||
#endif /* !JERRY_ESNEXT */
|
||||
|
||||
#if !JERRY_BUILTIN_TYPEDARRAY
|
||||
extern const char * const ecma_error_typed_array_not_supported_p;
|
||||
|
||||
@@ -40,9 +40,9 @@
|
||||
#if JERRY_BUILTIN_TYPEDARRAY
|
||||
#include "ecma-typedarray-object.h"
|
||||
#endif /* JERRY_BUILTIN_TYPEDARRAY */
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
#if JERRY_ESNEXT
|
||||
#include "ecma-promise-object.h"
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/* TODO: Extract GC to a separate component */
|
||||
|
||||
@@ -483,7 +483,7 @@ ecma_gc_mark_bound_function_object (ecma_object_t *object_p) /**< bound function
|
||||
}
|
||||
} /* ecma_gc_mark_bound_function_object */
|
||||
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
#if JERRY_ESNEXT
|
||||
/**
|
||||
* Mark objects referenced by Promise built-in.
|
||||
*/
|
||||
@@ -527,7 +527,7 @@ ecma_gc_mark_promise_object (ecma_extended_object_t *ext_object_p) /**< extended
|
||||
}
|
||||
} /* ecma_gc_mark_promise_object */
|
||||
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#if JERRY_BUILTIN_CONTAINER
|
||||
/**
|
||||
@@ -957,13 +957,6 @@ ecma_gc_mark (ecma_object_t *object_p) /**< object to mark from */
|
||||
break;
|
||||
}
|
||||
#endif /* JERRY_MODULE_SYSTEM */
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
case ECMA_OBJECT_CLASS_PROMISE:
|
||||
{
|
||||
ecma_gc_mark_promise_object (ext_object_p);
|
||||
break;
|
||||
}
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#if JERRY_BUILTIN_DATAVIEW
|
||||
case ECMA_OBJECT_CLASS_DATAVIEW:
|
||||
{
|
||||
@@ -1001,6 +994,11 @@ ecma_gc_mark (ecma_object_t *object_p) /**< object to mark from */
|
||||
ecma_gc_mark_executable_object (object_p);
|
||||
break;
|
||||
}
|
||||
case ECMA_OBJECT_CLASS_PROMISE:
|
||||
{
|
||||
ecma_gc_mark_promise_object (ext_object_p);
|
||||
break;
|
||||
}
|
||||
case ECMA_OBJECT_CLASS_PROMISE_CAPABILITY:
|
||||
{
|
||||
ecma_promise_capabality_t *capability_p = (ecma_promise_capabality_t *) object_p;
|
||||
@@ -1923,18 +1921,6 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
|
||||
break;
|
||||
}
|
||||
#endif /* JERRY_BUILTIN_TYPEDARRAY */
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
case ECMA_OBJECT_CLASS_PROMISE:
|
||||
{
|
||||
ecma_free_value_if_not_object (ext_object_p->u.cls.u3.value);
|
||||
|
||||
/* Reactions only contains objects. */
|
||||
ecma_collection_destroy (((ecma_promise_object_t *) object_p)->reactions);
|
||||
|
||||
ext_object_size = sizeof (ecma_promise_object_t);
|
||||
break;
|
||||
}
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#if JERRY_BUILTIN_WEAKREF
|
||||
case ECMA_OBJECT_CLASS_WEAKREF:
|
||||
{
|
||||
@@ -1972,6 +1958,16 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
|
||||
ext_object_size = ecma_gc_free_executable_object (object_p);
|
||||
break;
|
||||
}
|
||||
case ECMA_OBJECT_CLASS_PROMISE:
|
||||
{
|
||||
ecma_free_value_if_not_object (ext_object_p->u.cls.u3.value);
|
||||
|
||||
/* Reactions only contains objects. */
|
||||
ecma_collection_destroy (((ecma_promise_object_t *) object_p)->reactions);
|
||||
|
||||
ext_object_size = sizeof (ecma_promise_object_t);
|
||||
break;
|
||||
}
|
||||
case ECMA_OBJECT_CLASS_PROMISE_CAPABILITY:
|
||||
{
|
||||
ext_object_size = sizeof (ecma_promise_capabality_t);
|
||||
|
||||
@@ -698,10 +698,10 @@ typedef enum
|
||||
#if JERRY_MODULE_SYSTEM
|
||||
ECMA_OBJECT_CLASS_MODULE, /**< Module (ECMAScript v6, 15.2) */
|
||||
#endif
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
#if JERRY_ESNEXT
|
||||
ECMA_OBJECT_CLASS_PROMISE, /**< Promise (ECMAScript v6, 25.4) */
|
||||
ECMA_OBJECT_CLASS_PROMISE_CAPABILITY, /**< Promise capability (ECMAScript v6, 25.4.1.1) */
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
#if JERRY_BUILTIN_DATAVIEW
|
||||
ECMA_OBJECT_CLASS_DATAVIEW, /**< DataView (ECMAScript v6, 24.2) */
|
||||
#endif /* JERRY_BUILTIN_DATAVIEW */
|
||||
@@ -1017,10 +1017,8 @@ typedef struct
|
||||
#if JERRY_ESNEXT
|
||||
uint8_t iterator_kind; /**< type of iterator */
|
||||
uint8_t regexp_string_iterator_flags; /**< flags for RegExp string iterator */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
uint8_t promise_flags; /**< Promise object flags */
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
#if JERRY_BUILTIN_CONTAINER
|
||||
uint8_t container_flags; /**< container object flags */
|
||||
#endif /* JERRY_BUILTIN_CONTAINER */
|
||||
@@ -1059,15 +1057,13 @@ typedef struct
|
||||
ecma_value_t date; /**< Date object [[DateValue]] internal property */
|
||||
#endif /* !JERRY_ESNEXT */
|
||||
ecma_value_t target; /**< [[ProxyTarget]] or [[WeakRefTarget]] internal property */
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
ecma_value_t promise; /**< PromiseCapability[[Promise]] internal slot */
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#if JERRY_BUILTIN_TYPEDARRAY
|
||||
ecma_value_t arraybuffer; /**< for typedarray: ArrayBuffer reference */
|
||||
#endif /* JERRY_BUILTIN_TYPEDARRAY */
|
||||
#if JERRY_ESNEXT
|
||||
ecma_value_t head; /**< points to the async generator task queue head item */
|
||||
ecma_value_t iterated_value; /**< for %Iterator%: [[IteratedObject]] property */
|
||||
ecma_value_t promise; /**< PromiseCapability[[Promise]] internal slot */
|
||||
ecma_value_t spread_value; /**< for spread object: spreaded element */
|
||||
int32_t tza; /**< TimeZone adjustment for date objects */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
@@ -56,9 +56,9 @@ ecma_init (void)
|
||||
JERRY_CONTEXT (stack_base) = (uintptr_t) &sp;
|
||||
#endif /* (JERRY_STACK_LIMIT != 0) */
|
||||
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
#if JERRY_ESNEXT
|
||||
ecma_job_queue_init ();
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#if JERRY_ESNEXT
|
||||
JERRY_CONTEXT (current_new_target_p) = NULL;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "ecma-string-object.h"
|
||||
#include "jrt.h"
|
||||
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -33,4 +33,4 @@
|
||||
#define BUILTIN_UNDERSCORED_ID aggregate_error_prototype
|
||||
#include "ecma-builtin-internal-routines-template.inc.h"
|
||||
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
/* Object properties:
|
||||
* (property name, object pointer getter) */
|
||||
@@ -39,6 +39,6 @@ STRING_VALUE (LIT_MAGIC_STRING_MESSAGE,
|
||||
LIT_MAGIC_STRING__EMPTY,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "jrt.h"
|
||||
#include "jcontext.h"
|
||||
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -109,4 +109,4 @@ ecma_builtin_aggregate_error_dispatch_construct (const ecma_value_t *arguments_l
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
/* Number properties:
|
||||
* (property name, number value, writable, enumerable, configurable) */
|
||||
@@ -40,6 +40,6 @@ STRING_VALUE (LIT_MAGIC_STRING_NAME,
|
||||
LIT_MAGIC_STRING_AGGREGATE_ERROR_UL,
|
||||
ECMA_PROPERTY_FLAG_CONFIGURABLE)
|
||||
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -127,12 +127,6 @@ OBJECT_VALUE (LIT_MAGIC_STRING_TYPE_ERROR_UL,
|
||||
ECMA_BUILTIN_ID_TYPE_ERROR,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_AGGREGATE_ERROR_UL,
|
||||
ECMA_BUILTIN_ID_AGGREGATE_ERROR,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
|
||||
/* ECMA-262 v5, 15.1.4.15 */
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_URI_ERROR_UL,
|
||||
ECMA_BUILTIN_ID_URI_ERROR,
|
||||
@@ -218,12 +212,6 @@ OBJECT_VALUE (LIT_MAGIC_STRING_UINT8_CLAMPED_ARRAY_UL,
|
||||
|
||||
#endif /* JERRY_BUILTIN_TYPEDARRAY */
|
||||
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_PROMISE_UL,
|
||||
ECMA_BUILTIN_ID_PROMISE,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
|
||||
#if JERRY_BUILTIN_CONTAINER
|
||||
/* ECMA-262 v6, 23.1.1.1 */
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_WEAKSET_UL,
|
||||
@@ -253,6 +241,14 @@ OBJECT_VALUE (LIT_MAGIC_STRING_WEAKREF_UL,
|
||||
#endif /* JERRY_BUILTIN_WEAKREF */
|
||||
|
||||
#if JERRY_ESNEXT
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_AGGREGATE_ERROR_UL,
|
||||
ECMA_BUILTIN_ID_AGGREGATE_ERROR,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_PROMISE_UL,
|
||||
ECMA_BUILTIN_ID_PROMISE,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
|
||||
/* ECMA-262 v6, 19.4.1.1 */
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_SYMBOL_UL,
|
||||
ECMA_BUILTIN_ID_SYMBOL,
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "ecma-globals.h"
|
||||
#include "ecma-promise-object.h"
|
||||
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -95,4 +95,4 @@ ecma_builtin_promise_prototype_dispatch_routine (uint8_t builtin_routine_id, /**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
/* Object properties:
|
||||
* (property name, object pointer getter) */
|
||||
@@ -33,6 +33,6 @@ ROUTINE (LIT_MAGIC_STRING_THEN, ECMA_PROMISE_PROTOTYPE_ROUTINE_THEN, 2, 2)
|
||||
ROUTINE (LIT_MAGIC_STRING_CATCH, ECMA_PROMISE_PROTOTYPE_ROUTINE_CATCH, 1, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_FINALLY, ECMA_PROMISE_PROTOTYPE_ROUTINE_FINALLY, 1, 1)
|
||||
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "ecma-promise-object.h"
|
||||
#include "jcontext.h"
|
||||
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -563,4 +563,4 @@ ecma_builtin_promise_dispatch_routine (uint8_t builtin_routine_id, /**< built-in
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
/* Number properties:
|
||||
* (property name, number value, writable, enumerable, configurable) */
|
||||
@@ -53,6 +53,6 @@ ACCESSOR_READ_ONLY (LIT_GLOBAL_SYMBOL_SPECIES,
|
||||
ECMA_PROMISE_ROUTINE_SPECIES_GET,
|
||||
ECMA_PROPERTY_FLAG_CONFIGURABLE)
|
||||
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -283,7 +283,7 @@ BUILTIN_ROUTINE (ECMA_BUILTIN_ID_TYPE_ERROR,
|
||||
true,
|
||||
type_error)
|
||||
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
#if JERRY_ESNEXT
|
||||
/* The AggregateError.prototype object (15.11.6.5) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_AGGREGATE_ERROR_PROTOTYPE,
|
||||
ECMA_OBJECT_TYPE_GENERAL,
|
||||
@@ -297,7 +297,7 @@ BUILTIN_ROUTINE (ECMA_BUILTIN_ID_AGGREGATE_ERROR,
|
||||
ECMA_BUILTIN_NATIVE_ERROR_PROTOTYPE_ID,
|
||||
true,
|
||||
aggregate_error)
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/* The URIError.prototype object (15.11.6.6) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_URI_ERROR_PROTOTYPE,
|
||||
@@ -507,7 +507,7 @@ BUILTIN (ECMA_BUILTIN_ID_BIGUINT64ARRAY_PROTOTYPE,
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
#endif /* JERRY_BUILTIN_TYPEDARRAY */
|
||||
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
BUILTIN (ECMA_BUILTIN_ID_PROMISE_PROTOTYPE,
|
||||
ECMA_OBJECT_TYPE_GENERAL,
|
||||
@@ -521,7 +521,7 @@ BUILTIN_ROUTINE (ECMA_BUILTIN_ID_PROMISE,
|
||||
true,
|
||||
promise)
|
||||
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#if JERRY_BUILTIN_CONTAINER
|
||||
|
||||
|
||||
@@ -84,13 +84,13 @@ ecma_new_standard_error (jerry_error_t error_type, /**< native error type */
|
||||
break;
|
||||
}
|
||||
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
#if JERRY_ESNEXT
|
||||
case JERRY_ERROR_AGGREGATE:
|
||||
{
|
||||
prototype_id = ECMA_BUILTIN_ID_AGGREGATE_ERROR_PROTOTYPE;
|
||||
break;
|
||||
}
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
case JERRY_ERROR_URI:
|
||||
{
|
||||
prototype_id = ECMA_BUILTIN_ID_URI_ERROR_PROTOTYPE;
|
||||
@@ -169,7 +169,7 @@ ecma_new_standard_error (jerry_error_t error_type, /**< native error type */
|
||||
return error_object_p;
|
||||
} /* ecma_new_standard_error */
|
||||
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
#if JERRY_ESNEXT
|
||||
/**
|
||||
* aggregate-error object constructor.
|
||||
*
|
||||
@@ -273,7 +273,7 @@ ecma_new_aggregate_error (ecma_value_t error_list_val, /**< errors list */
|
||||
return ecma_make_object_value (new_error_object_p);
|
||||
} /* ecma_new_aggregate_error */
|
||||
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/**
|
||||
* Return the error type for an Error object.
|
||||
@@ -490,7 +490,7 @@ ecma_raise_uri_error (const char *msg_p) /**< error message */
|
||||
return ecma_raise_standard_error (JERRY_ERROR_URI, (const lit_utf8_byte_t *) msg_p);
|
||||
} /* ecma_raise_uri_error */
|
||||
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
/**
|
||||
* Raise a AggregateError with the given errors and message.
|
||||
@@ -508,7 +508,7 @@ ecma_raise_aggregate_error (ecma_value_t error_list_val, /**< errors list */
|
||||
return ECMA_VALUE_ERROR;
|
||||
} /* ecma_raise_aggregate_error */
|
||||
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -43,10 +43,10 @@ ecma_value_t ecma_raise_reference_error (const char *msg_p);
|
||||
ecma_value_t ecma_raise_syntax_error (const char *msg_p);
|
||||
ecma_value_t ecma_raise_type_error (const char *msg_p);
|
||||
ecma_value_t ecma_raise_uri_error (const char *msg_p);
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
#if JERRY_ESNEXT
|
||||
ecma_value_t ecma_new_aggregate_error (ecma_value_t error_list_val, ecma_value_t message_val);
|
||||
ecma_value_t ecma_raise_aggregate_error (ecma_value_t error_list_val, ecma_value_t message_val);
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "opcodes.h"
|
||||
#include "vm-stack.h"
|
||||
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
/**
|
||||
* Mask for job queue type.
|
||||
@@ -638,4 +638,4 @@ ecma_free_all_enqueued_jobs (void)
|
||||
* @}
|
||||
* @}
|
||||
*/
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#ifndef ECMA_JOB_QUEUE_H
|
||||
#define ECMA_JOB_QUEUE_H
|
||||
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
/** \addtogroup ecma ECMA
|
||||
* @{
|
||||
@@ -60,5 +60,5 @@ ecma_value_t ecma_process_all_enqueued_jobs (void);
|
||||
* @}
|
||||
* @}
|
||||
*/
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
#endif /* !ECMA_JOB_QUEUE_H */
|
||||
|
||||
@@ -2754,9 +2754,6 @@ ecma_object_check_class_name_is_object (ecma_object_t *obj_p) /**< object */
|
||||
{
|
||||
#ifndef JERRY_NDEBUG
|
||||
return (ecma_builtin_is_global (obj_p)
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_PROMISE_PROTOTYPE)
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#if JERRY_BUILTIN_TYPEDARRAY
|
||||
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_ARRAYBUFFER_PROTOTYPE)
|
||||
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_SHARED_ARRAYBUFFER_PROTOTYPE)
|
||||
@@ -2796,6 +2793,7 @@ ecma_object_check_class_name_is_object (ecma_object_t *obj_p) /**< object */
|
||||
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_REGEXP_PROTOTYPE)
|
||||
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_SYMBOL_PROTOTYPE)
|
||||
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_ASYNC_FUNCTION_PROTOTYPE)
|
||||
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_PROMISE_PROTOTYPE)
|
||||
#endif /* JERRY_ESNEXT */
|
||||
#if JERRY_BUILTIN_CONTAINER
|
||||
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_MAP_PROTOTYPE)
|
||||
@@ -2849,10 +2847,10 @@ static const uint16_t ecma_class_object_magic_string_id[] =
|
||||
#if JERRY_MODULE_SYSTEM
|
||||
LIT_MAGIC_STRING_MODULE_UL, /**< magic string id of ECMA_OBJECT_CLASS_MODULE */
|
||||
#endif
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
#if JERRY_ESNEXT
|
||||
LIT_MAGIC_STRING_PROMISE_UL, /**< magic string id of ECMA_OBJECT_CLASS_PROMISE */
|
||||
LIT_MAGIC_STRING_OBJECT_UL, /**< magic string id of ECMA_OBJECT_CLASS_PROMISE_CAPABILITY */
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
#if JERRY_BUILTIN_DATAVIEW
|
||||
LIT_MAGIC_STRING_DATAVIEW_UL, /**< magic string id of ECMA_OBJECT_CLASS_DATAVIEW */
|
||||
#endif /* JERRY_BUILTIN_DATAVIEW */
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "ecma-promise-object.h"
|
||||
#include "jcontext.h"
|
||||
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
/** \addtogroup ecma ECMA
|
||||
* @{
|
||||
@@ -1328,4 +1328,4 @@ ecma_promise_async_await (ecma_extended_object_t *async_generator_object_p, /**<
|
||||
* @}
|
||||
* @}
|
||||
*/
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#ifndef ECMA_PROMISE_OBJECT_H
|
||||
#define ECMA_PROMISE_OBJECT_H
|
||||
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
#if JERRY_ESNEXT
|
||||
#include "ecma-globals.h"
|
||||
|
||||
/** \addtogroup ecma ECMA
|
||||
@@ -137,5 +137,5 @@ uint32_t ecma_promise_remaining_inc_or_dec (ecma_value_t remaining, bool is_inc)
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
#endif /* !ECMA_PROMISE_OBJECT_H */
|
||||
|
||||
Reference in New Issue
Block a user