未验证 提交 aac59cad 编写于 作者: O openharmony_ci 提交者: Gitee

!105 轻量&小型设备使能部分es2015支持

Merge pull request !105 from piggyguy_jdx/support_es6_latest
......@@ -35,6 +35,7 @@ if (defined(ohos_lite)) { # is on lite Os for ipcamera
"JERRY_HEAPDUMP",
"JERRY_REF_TRACKER",
]
defines += es6_support_defines
cflags = [
"-Wno-unused-function",
"-Wno-sign-compare",
......@@ -47,7 +48,6 @@ if (defined(ohos_lite)) { # is on lite Os for ipcamera
defines = [
"JERRY_CPOINTER_32_BIT=0",
"JERRY_DEBUGGER=1",
"JERRY_ES2015=0",
"JERRY_FUNCTION_BACKTRACE",
"JERRY_FUNCTION_NAME",
"JERRY_GC_LIMIT=(0)",
......@@ -65,6 +65,7 @@ if (defined(ohos_lite)) { # is on lite Os for ipcamera
"JERRY_VALGRIND=0",
"JERRY_VM_EXEC_STOP=0",
]
defines += es6_support_defines
if (thirdparty_jerryscript_enable_external_context == true) {
defines += [ "JERRY_EXTERNAL_CONTEXT=1" ]
}
......
......@@ -26,3 +26,18 @@ ext_path = "${engine_path}/jerry-ext"
libm_path = "${engine_path}/jerry-libm"
port_path = "${engine_path}/jerry-port"
# support es6 with limitation
es6_support_defines = [
"JERRY_ES2015=1",
"JERRY_ES2015_BUILTIN_TYPEDARRAY=1",
"JERRY_ES2015_BUILTIN_SET=1",
"JERRY_ES2015_BUILTIN_PROMISE=1",
"JERRY_ES2015_BUILTIN_PROXY=1",
"JERRY_ES2015_MODULE_SYSTEM=1",
"JERRY_ES2015_BUILTIN_MAP=1",
"JERRY_ES2015_BUILTIN_WEAKMAP=0",
"JERRY_ES2015_BUILTIN_WEAKSET=0",
"JERRY_ES2015_BUILTIN_DATAVIEW=0",
"JERRY_ES2015_BUILTIN_REFLECT=0",
]
......@@ -223,6 +223,7 @@ if (board_toolchain_type != "iccarm") {
"JERRY_FUNCTION_BACKTRACE",
"JERRY_STACK_LIMIT=0",
]
jerry_core_defines += es6_support_defines
} else {
jerry_core_sources += [
"api/external-context-helpers.c",
......@@ -245,7 +246,6 @@ if (board_toolchain_type != "iccarm") {
"JERRY_DEBUGGER=0",
"JERRY_MEM_GC_BEFORE_EACH_ALLOC=0",
"JERRY_PARSER_DUMP_BYTE_CODE=0",
"JERRY_ES2015=0",
"JERRY_REGEXP_STRICT_MODE=0",
"JERRY_REGEXP_DUMP_BYTE_CODE=0",
"JERRY_SNAPSHOT_EXEC=1",
......@@ -259,6 +259,7 @@ if (board_toolchain_type != "iccarm") {
"SNAPSHOT_BUFFER_SIZE=48*1024",
"_BSD_SOURCE",
]
defines += es6_support_defines
if (thirdparty_jerryscript_enable_external_context == true) {
defines += [ "JERRY_EXTERNAL_CONTEXT=1" ]
}
......
......@@ -83,23 +83,55 @@
#ifdef JERRY_FOR_IAR_CONFIG
# error "Should not define this macro on WIN simulator!"
#endif
#ifndef JERRY_BUILTIN_REGEXP
# define JERRY_BUILTIN_REGEXP 0
#endif
#ifndef JERRY_ES2015
# define JERRY_ES2015 0
#endif
#ifndef JERRY_ES2015_BUILTIN_TYPEDARRAY
# define JERRY_ES2015_BUILTIN_TYPEDARRAY 1
#endif
//Maximum size of heap in kilobytes
#ifndef JERRY_GLOBAL_HEAP_SIZE
# define JERRY_GLOBAL_HEAP_SIZE (64)
#endif
#ifndef JERRY_DISABLE_HEAVY_DEBUG
# define JERRY_DISABLE_HEAVY_DEBUG
#endif
#ifndef JERRY_ERROR_MESSAGES
# define JERRY_ERROR_MESSAGES 1
#endif
#ifndef JERRY_LINE_INFO
# define JERRY_LINE_INFO 1
#endif
#ifndef JERRY_MEM_STATS
# define JERRY_MEM_STATS 1
#endif
#ifndef JERRY_SNAPSHOT_EXEC
# define JERRY_SNAPSHOT_EXEC 1
#endif
#ifndef JERRY_SNAPSHOT_SAVE
# define JERRY_SNAPSHOT_SAVE 1
#endif
#ifndef JERRY_LOGGING
# define JERRY_LOGGING 1
#endif
// following config controls temp changes in jerry for debugger function with IDE
#ifndef ACE_DEBUGGER_CUSTOM
# define ACE_DEBUGGER_CUSTOM
#endif
#ifndef JERRY_BUILTIN_EVAL_DISABLED
// disable builtin eval() function
......
......@@ -68,7 +68,6 @@ if (board_toolchain_type == "iccarm") {
"JERRY_DEBUGGER=0",
"JERRY_MEM_GC_BEFORE_EACH_ALLOC=0",
"JERRY_PARSER_DUMP_BYTE_CODE=0",
"JERRY_ES2015=0",
"JERRY_REGEXP_STRICT_MODE=0",
"JERRY_REGEXP_DUMP_BYTE_CODE=0",
"JERRY_SNAPSHOT_EXEC=1",
......@@ -81,6 +80,7 @@ if (board_toolchain_type == "iccarm") {
"INPUTJS_BUFFER_SIZE=64*1024",
"SNAPSHOT_BUFFER_SIZE=48*1024",
]
defines += es6_support_defines
if (thirdparty_jerryscript_enable_external_context == true) {
defines += [ "JERRY_EXTERNAL_CONTEXT=1" ]
}
......
......@@ -53,7 +53,6 @@ if (board_toolchain_type == "iccarm") {
"JERRY_DEBUGGER=0",
"JERRY_MEM_GC_BEFORE_EACH_ALLOC=0",
"JERRY_PARSER_DUMP_BYTE_CODE=0",
"JERRY_ES2015=0",
"JERRY_REGEXP_STRICT_MODE=0",
"JERRY_REGEXP_DUMP_BYTE_CODE=0",
"JERRY_SNAPSHOT_EXEC=1",
......@@ -66,6 +65,7 @@ if (board_toolchain_type == "iccarm") {
"INPUTJS_BUFFER_SIZE=64*1024",
"SNAPSHOT_BUFFER_SIZE=48*1024",
]
defines += es6_support_defines
if (thirdparty_jerryscript_enable_external_context == true) {
defines += [ "JERRY_EXTERNAL_CONTEXT=1" ]
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册