Provide support for native modules with ES6 imports (#3090)

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
This commit is contained in:
Dániel Bátyai
2019-10-02 12:20:43 +02:00
committed by GitHub
parent 2a89eec98b
commit f1883b9e7d
10 changed files with 415 additions and 201 deletions
+15
View File
@@ -21,6 +21,7 @@
#include <stdio.h>
#include "jerryscript-compiler.h"
#include "jerryscript-core.h"
#ifdef __cplusplus
extern "C"
@@ -236,6 +237,20 @@ size_t jerry_port_normalize_path (const char *in_path_p,
size_t out_buf_size,
char *base_file_p);
/**
* Get the module object of a native module.
*
* Note:
* This port function is called by jerry-core when ES2015_MODULE_SYSTEM
* is enabled.
*
* @param name String value of the module specifier.
*
* @return Undefined, if 'name' is not a native module
* jerry_value_t containing the module object, otherwise
*/
jerry_value_t jerry_port_get_native_module (jerry_value_t name);
/**
* @}
*/