Correctly handle variables imported or exported by modules. (#3270)
Remove var declaration workarounds and correctly create / use variables for modules. Still missing: create lexical environment for automatic module conversion. (Or remove this feature overall.) JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
committed by
Dániel Bátyai
parent
6f83da4c0b
commit
ab8fa74b86
@@ -105,6 +105,7 @@ typedef enum
|
||||
ECMA_PARSE_HAS_IMPL_SUPER = (1u << 4), /**< the current context has implicit parent class */
|
||||
ECMA_PARSE_HAS_STATIC_SUPER = (1u << 5), /**< the current context is a static class method */
|
||||
ECMA_PARSE_EVAL = (1u << 6), /**< eval is called */
|
||||
ECMA_PARSE_MODULE = (1u << 7), /**< module is parsed */
|
||||
} ecma_parse_opts_t;
|
||||
|
||||
/**
|
||||
|
||||
@@ -818,7 +818,7 @@ ecma_module_parse (ecma_module_t *module_p) /**< module */
|
||||
0,
|
||||
(jerry_char_t *) source_p,
|
||||
source_size,
|
||||
JERRY_PARSE_STRICT_MODE,
|
||||
ECMA_PARSE_STRICT_MODE | ECMA_PARSE_MODULE,
|
||||
&bytecode_data_p);
|
||||
|
||||
JERRY_CONTEXT (module_top_context_p) = module_p->context_p->parent_p;
|
||||
|
||||
Reference in New Issue
Block a user