diff --git a/BUILD.gn b/BUILD.gn index 8d929a0d040d106f77504ce35b7276eec3b0e6a3..cb45a8925d45fe6ff07513ef81c318895742c2c6 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -69,6 +69,16 @@ if (defined(ohos_lite)) { # is on lite Os for ipcamera if (thirdparty_jerryscript_enable_external_context == true) { defines += [ "JERRY_EXTERNAL_CONTEXT=1" ] } + defines += + [ "INPUTJS_BUFFER_SIZE=${thirdparty_jerryscript_inputjs_buffer_size}" ] + defines += [ + "SNAPSHOT_BUFFER_SIZE=${thirdparty_jerryscript_snapshot_buffer_size}", + ] + defines += + [ "BMS_TASK_HEAP_SIZE=${thirdparty_jerryscript_bms_task_heap_size}" ] + defines += + [ "JS_TASK_HEAP_SIZE=${thirdparty_jerryscript_js_task_heap_size}" ] + cflags = [ "-Wno-unused-function", "-Wno-sign-compare", diff --git a/bundle.json b/bundle.json index 747e5b4318732d4d14dabb5458303321b5eff5f2..be1d40e341d6405d0b1df1706dfc356b18dd8429 100644 --- a/bundle.json +++ b/bundle.json @@ -13,7 +13,13 @@ "name": "thirdparty_jerryscript", "subsystem": "", "syscap": [], - "features": ["thirdparty_jerryscript_enable_external_context"], + "features": [ + "thirdparty_jerryscript_enable_external_context", + "thirdparty_jerryscript_inputjs_buffer_size", + "thirdparty_jerryscript_snapshot_buffer_size", + "thirdparty_jerryscript_bms_task_heap_size", + "thirdparty_jerryscript_js_task_heap_size" + ], "adapted_system_type": [], "rom": "", "ram": "", diff --git a/engine.gni b/engine.gni index 420aa27a70ae3fd2a9b4b490c8d8d736c3c970b5..7ee69a24b01136479f8c703e4da94d4009071c3c 100644 --- a/engine.gni +++ b/engine.gni @@ -13,6 +13,10 @@ declare_args() { thirdparty_jerryscript_enable_external_context = true + thirdparty_jerryscript_inputjs_buffer_size = 32768 + thirdparty_jerryscript_snapshot_buffer_size = 24576 + thirdparty_jerryscript_bms_task_heap_size = 64 + thirdparty_jerryscript_js_task_heap_size = 64 } engine_path = "//third_party/jerryscript" diff --git a/jerry-core/BUILD.gn b/jerry-core/BUILD.gn index fbabc70de6647c050ab979a3abc87d930ab15dd8..53283ccf339dbfca27a5eed37a1c2e6fafc9bd02 100644 --- a/jerry-core/BUILD.gn +++ b/jerry-core/BUILD.gn @@ -263,6 +263,16 @@ if (board_toolchain_type != "iccarm") { if (thirdparty_jerryscript_enable_external_context == true) { defines += [ "JERRY_EXTERNAL_CONTEXT=1" ] } + defines += + [ "INPUTJS_BUFFER_SIZE=${thirdparty_jerryscript_inputjs_buffer_size}" ] + defines += [ + "SNAPSHOT_BUFFER_SIZE=${thirdparty_jerryscript_snapshot_buffer_size}", + ] + defines += + [ "BMS_TASK_HEAP_SIZE=${thirdparty_jerryscript_bms_task_heap_size}" ] + defines += + [ "JS_TASK_HEAP_SIZE=${thirdparty_jerryscript_js_task_heap_size}" ] + include_dirs = jerry_core_includes include_dirs += [ "$port_path", diff --git a/jerry-ext/BUILD.gn b/jerry-ext/BUILD.gn index 0d289df887365a584fb679f44a8339dbd2e791eb..8afc631f2f26c6db1b88ff7dce6ef48f4d5a554b 100644 --- a/jerry-ext/BUILD.gn +++ b/jerry-ext/BUILD.gn @@ -84,6 +84,16 @@ if (board_toolchain_type == "iccarm") { if (thirdparty_jerryscript_enable_external_context == true) { defines += [ "JERRY_EXTERNAL_CONTEXT=1" ] } + defines += + [ "INPUTJS_BUFFER_SIZE=${thirdparty_jerryscript_inputjs_buffer_size}" ] + defines += [ + "SNAPSHOT_BUFFER_SIZE=${thirdparty_jerryscript_snapshot_buffer_size}", + ] + defines += + [ "BMS_TASK_HEAP_SIZE=${thirdparty_jerryscript_bms_task_heap_size}" ] + defines += + [ "JS_TASK_HEAP_SIZE=${thirdparty_jerryscript_js_task_heap_size}" ] + include_dirs = jerry_ext_include_dirs include_dirs += [ "${core_path}", diff --git a/jerry-port/default/BUILD.gn b/jerry-port/default/BUILD.gn index 12b7bf77844f480792c42992bfb7129679c20c35..e3f58f53f90fb16de2e21cc79b94e526b88cb287 100644 --- a/jerry-port/default/BUILD.gn +++ b/jerry-port/default/BUILD.gn @@ -69,6 +69,16 @@ if (board_toolchain_type == "iccarm") { if (thirdparty_jerryscript_enable_external_context == true) { defines += [ "JERRY_EXTERNAL_CONTEXT=1" ] } + defines += + [ "INPUTJS_BUFFER_SIZE=${thirdparty_jerryscript_inputjs_buffer_size}" ] + defines += [ + "SNAPSHOT_BUFFER_SIZE=${thirdparty_jerryscript_snapshot_buffer_size}", + ] + defines += + [ "BMS_TASK_HEAP_SIZE=${thirdparty_jerryscript_bms_task_heap_size}" ] + defines += + [ "JS_TASK_HEAP_SIZE=${thirdparty_jerryscript_js_task_heap_size}" ] + include_dirs = jerry_port_default_include_dirs include_dirs += [ "${core_path}",