Rework ES2015 module system and add missing features. (#2792)

Co-authored-by: Dániel Bátyai <dbatyai@inf.u-szeged.hu>
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Daniel Vince vinced@inf.u-szeged.hu
This commit is contained in:
Daniel Vince
2019-04-25 14:57:17 +02:00
committed by Robert Fancsik
parent 938e9c7530
commit 37b7645e6a
59 changed files with 2209 additions and 991 deletions
+2 -13
View File
@@ -67,17 +67,6 @@ typedef struct jerry_context_data_header
*/
#define JERRY_CONTEXT_FIRST_MEMBER ecma_builtin_objects
#if ENABLED (JERRY_ES2015_MODULE_SYSTEM)
/**
* Contains the lexical environments of the loaded modules.
*/
typedef struct ecma_module_lex_envs
{
ecma_object_t *lex_env_p; /**< pointer to loaded module's lexical environment */
struct ecma_module_lex_envs *next_p; /**< pointer to the next item in the linked list */
} ecma_module_lex_envs_t;
#endif /* ENABLED (JERRY_ES2015_MODULE_SYSTEM) */
/**
* JerryScript context
*
@@ -116,8 +105,8 @@ struct jerry_context_t
ecma_object_t *ecma_global_lex_env_p; /**< global lexical environment */
#if ENABLED (JERRY_ES2015_MODULE_SYSTEM)
ecma_module_lex_envs_t *ecma_module_lex_envs_p; /**< list of module's lexical environments */
parser_module_context_t *module_top_context_p; /**< top (current) module parser context */
ecma_module_t *ecma_modules_p; /**< list of referenced modules */
ecma_module_context_t *module_top_context_p; /**< top (current) module parser context */
#endif /* ENABLED (JERRY_ES2015_MODULE_SYSTEM) */
vm_frame_ctx_t *vm_top_context_p; /**< top (current) interpreter context */