Skip to content

Commit a631e74

Browse files
update quickjs-ng to 0.6.1
1 parent fa02b86 commit a631e74

18 files changed

+3341
-3052
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
edition = "2018"
33
name = "hirofa-quickjs-sys"
44
description = "QuickJS, QuickJS-NG Javascript Engine FFI bindings"
5-
version = "0.6.0"
5+
version = "0.6.1"
66
readme = "README.md"
77
repository = "https://github.com/HiRoFa/quickjs-sys"
88
license = "MIT"

quickjs-ng/bindings.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ pub const JS_DEF_OBJECT: u32 = 8;
234234
pub const JS_DEF_ALIAS: u32 = 9;
235235
pub const QJS_VERSION_MAJOR: u32 = 0;
236236
pub const QJS_VERSION_MINOR: u32 = 6;
237-
pub const QJS_VERSION_PATCH: u32 = 0;
237+
pub const QJS_VERSION_PATCH: u32 = 1;
238238
pub const QJS_VERSION_SUFFIX: &[u8; 1] = b"\0";
239239
pub type __gnuc_va_list = __builtin_va_list;
240240
pub type __u_char = ::std::os::raw::c_uchar;
@@ -3022,6 +3022,12 @@ extern "C" {
30223022
extern "C" {
30233023
pub static mut signgam: ::std::os::raw::c_int;
30243024
}
3025+
//pub const FP_NAN: _bindgen_ty_1 = 0;
3026+
//pub const FP_INFINITE: _bindgen_ty_1 = 1;
3027+
//pub const FP_ZERO: _bindgen_ty_1 = 2;
3028+
//pub const FP_SUBNORMAL: _bindgen_ty_1 = 3;
3029+
//pub const FP_NORMAL: _bindgen_ty_1 = 4;
3030+
pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
30253031
#[repr(C)]
30263032
#[derive(Debug, Copy, Clone)]
30273033
pub struct JSRuntime {

quickjs-ng/quickjs/.gitattributes

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Don't show changes in generated files when doing git diff
2+
3+
gen/** -diff
4+

quickjs-ng/quickjs/.github/workflows/ci.yml

+34
Original file line numberDiff line numberDiff line change
@@ -484,3 +484,37 @@ jobs:
484484
run: |
485485
cmake --build build --config Release --target qjs
486486
ls -lh build
487+
488+
mimalloc-linux:
489+
runs-on: ubuntu-24.04
490+
env:
491+
BUILD_CLI_WITH_MIMALLOC: ON
492+
MIMALLOC_SHOW_STATS: 1
493+
steps:
494+
- uses: actions/checkout@v4
495+
- name: install dependencies
496+
run: |
497+
sudo apt update && sudo apt -y install libmimalloc-dev
498+
- name: build
499+
run: |
500+
make
501+
- name: test
502+
run: |
503+
make test
504+
505+
mimalloc-macos:
506+
runs-on: macos-latest
507+
env:
508+
BUILD_CLI_WITH_STATIC_MIMALLOC: ON
509+
MIMALLOC_SHOW_STATS: 1
510+
steps:
511+
- uses: actions/checkout@v4
512+
- name: install dependencies
513+
run: |
514+
brew install mimalloc
515+
- name: build
516+
run: |
517+
make
518+
- name: test
519+
run: |
520+
make test

quickjs-ng/quickjs/CMakeLists.txt

+8-3
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ endif()
112112
xoption(BUILD_EXAMPLES "Build examples" OFF)
113113
xoption(BUILD_STATIC_QJS_EXE "Build a static qjs executable" OFF)
114114
xoption(BUILD_CLI_WITH_MIMALLOC "Build the qjs executable with mimalloc" OFF)
115+
xoption(BUILD_CLI_WITH_STATIC_MIMALLOC "Build the qjs executable with mimalloc (statically linked)" OFF)
115116
xoption(CONFIG_ASAN "Enable AddressSanitizer (ASan)" OFF)
116117
xoption(CONFIG_MSAN "Enable MemorySanitizer (MSan)" OFF)
117118
xoption(CONFIG_UBSAN "Enable UndefinedBehaviorSanitizer (UBSan)" OFF)
@@ -255,10 +256,14 @@ endif()
255256
if(NOT WIN32)
256257
set_target_properties(qjs_exe PROPERTIES ENABLE_EXPORTS TRUE)
257258
endif()
258-
if(BUILD_CLI_WITH_MIMALLOC)
259+
if(BUILD_CLI_WITH_MIMALLOC OR BUILD_CLI_WITH_STATIC_MIMALLOC)
259260
find_package(mimalloc REQUIRED)
260-
target_compile_definitions(qjs_exe PRIVATE QJS_USE_MIMALLOC)
261-
target_link_libraries(qjs_exe mimalloc-static)
261+
# Upstream mimalloc doesn't provide a way to know if both libraries are supported.
262+
if(BUILD_CLI_WITH_STATIC_MIMALLOC)
263+
target_link_libraries(qjs_exe mimalloc-static)
264+
else()
265+
target_link_libraries(qjs_exe mimalloc)
266+
endif()
262267
endif()
263268

264269
# Test262 runner

quickjs-ng/quickjs/VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
quickjs-ng-0.6.0
1+
quickjs-ng-0.6.1

quickjs-ng/quickjs/gen/function_source.c

+51-50
Original file line numberDiff line numberDiff line change
@@ -2,57 +2,58 @@
22

33
#include "quickjs-libc.h"
44

5-
const uint32_t qjsc_function_source_size = 384;
5+
const uint32_t qjsc_function_source_size = 390;
66

7-
const uint8_t qjsc_function_source[384] = {
8-
0x0e, 0x06, 0x0c, 0x61, 0x63, 0x74, 0x75, 0x61,
9-
0x6c, 0x02, 0x66, 0x30, 0x74, 0x65, 0x73, 0x74,
10-
0x73, 0x2f, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,
11-
0x6f, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63,
12-
0x65, 0x2e, 0x6a, 0x73, 0x0c, 0x65, 0x78, 0x70,
13-
0x65, 0x63, 0x74, 0x14, 0x75, 0x73, 0x65, 0x20,
14-
0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x34, 0x66,
15-
0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20,
16-
0x66, 0x28, 0x29, 0x20, 0x7b, 0x20, 0x72, 0x65,
17-
0x74, 0x75, 0x72, 0x6e, 0x20, 0x34, 0x32, 0x20,
18-
0x7d, 0x0c, 0x00, 0xfa, 0x01, 0xa2, 0x01, 0x00,
19-
0x06, 0x00, 0x03, 0x00, 0x01, 0xa0, 0x01, 0x06,
20-
0xa4, 0x01, 0x00, 0x00, 0x00, 0xb8, 0x03, 0x02,
21-
0x00, 0x30, 0xba, 0x03, 0x04, 0x00, 0x70, 0xb8,
22-
0x03, 0x04, 0x03, 0x70, 0x10, 0x00, 0x01, 0x00,
23-
0xe4, 0x01, 0x00, 0x01, 0x00, 0x0c, 0x43, 0xfa,
24-
0x01, 0xba, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00,
25-
0x00, 0x03, 0x00, 0xbb, 0x2a, 0x28, 0xbc, 0x03,
26-
0x03, 0x01, 0x04, 0x02, 0x1e, 0x0c, 0x0e, 0x1a,
27-
0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
28-
0x20, 0x66, 0x28, 0x29, 0x20, 0x7b, 0x20, 0x72,
29-
0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x34, 0x32,
30-
0x20, 0x7d, 0x0c, 0x03, 0xc1, 0x05, 0x08, 0xc1,
31-
0x04, 0x3f, 0xdf, 0x00, 0x00, 0x00, 0x80, 0x3f,
32-
0xdd, 0x00, 0x00, 0x00, 0x40, 0x3e, 0xdf, 0x00,
33-
0x00, 0x00, 0x80, 0xbe, 0x00, 0x40, 0xdd, 0x00,
34-
0x00, 0x00, 0x00, 0x04, 0xe0, 0x00, 0x00, 0x00,
35-
0xc8, 0x04, 0xe1, 0x00, 0x00, 0x00, 0x3a, 0xdf,
36-
0x00, 0x00, 0x00, 0x61, 0x01, 0x00, 0x38, 0xdd,
37-
0x00, 0x00, 0x00, 0x42, 0x38, 0x00, 0x00, 0x00,
38-
0x24, 0x00, 0x00, 0xc9, 0x06, 0xc8, 0x62, 0x01,
39-
0x00, 0x38, 0xdf, 0x00, 0x00, 0x00, 0xaf, 0xe9,
40-
0x0b, 0x38, 0x94, 0x00, 0x00, 0x00, 0x62, 0x01,
41-
0x00, 0xee, 0x2f, 0x61, 0x03, 0x00, 0x61, 0x02,
42-
0x00, 0x38, 0x3b, 0x00, 0x00, 0x00, 0x38, 0xdf,
43-
0x00, 0x00, 0x00, 0x04, 0xdd, 0x00, 0x00, 0x00,
44-
0x9d, 0x31, 0x01, 0x00, 0x04, 0x00, 0xca, 0x62,
45-
0x02, 0x00, 0x42, 0x38, 0x00, 0x00, 0x00, 0x24,
46-
0x00, 0x00, 0xcb, 0x06, 0xc8, 0x62, 0x03, 0x00,
47-
0x38, 0xdf, 0x00, 0x00, 0x00, 0xaf, 0xe9, 0x0b,
48-
0x38, 0x94, 0x00, 0x00, 0x00, 0x62, 0x03, 0x00,
49-
0xee, 0x2f, 0x68, 0x03, 0x00, 0x68, 0x02, 0x00,
50-
0xc4, 0x28, 0xbc, 0x03, 0x01, 0x01, 0x28, 0x60,
51-
0x01, 0x49, 0x02, 0x21, 0x1a, 0x1b, 0x04, 0x1e,
52-
0x1d, 0x12, 0x26, 0x49, 0x1d, 0x0c, 0x06, 0x11,
53-
0x18, 0x2a, 0x1c, 0x37, 0x41, 0x21, 0x1c, 0x34,
54-
0x18, 0x1b, 0x04, 0x26, 0x11, 0x3f, 0x1d, 0x0c,
55-
0x06, 0x11, 0x18, 0x2a, 0x1c, 0x53, 0x41, 0x00,
7+
const uint8_t qjsc_function_source[390] = {
8+
0x10, 0x06, 0x01, 0x0c, 0x61, 0x63, 0x74, 0x75,
9+
0x61, 0x6c, 0x01, 0x02, 0x66, 0x01, 0x30, 0x74,
10+
0x65, 0x73, 0x74, 0x73, 0x2f, 0x66, 0x75, 0x6e,
11+
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x6f,
12+
0x75, 0x72, 0x63, 0x65, 0x2e, 0x6a, 0x73, 0x01,
13+
0x0c, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x01,
14+
0x14, 0x75, 0x73, 0x65, 0x20, 0x73, 0x74, 0x72,
15+
0x69, 0x63, 0x74, 0x01, 0x34, 0x66, 0x75, 0x6e,
16+
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x28,
17+
0x29, 0x20, 0x7b, 0x20, 0x72, 0x65, 0x74, 0x75,
18+
0x72, 0x6e, 0x20, 0x34, 0x32, 0x20, 0x7d, 0x0c,
19+
0x00, 0xfa, 0x01, 0xa2, 0x01, 0x00, 0x06, 0x00,
20+
0x03, 0x00, 0x01, 0xa0, 0x01, 0x06, 0xa4, 0x01,
21+
0x00, 0x00, 0x00, 0xb8, 0x03, 0x02, 0x00, 0x30,
22+
0xba, 0x03, 0x04, 0x00, 0x70, 0xb8, 0x03, 0x04,
23+
0x03, 0x70, 0x10, 0x00, 0x01, 0x00, 0xe4, 0x01,
24+
0x00, 0x01, 0x00, 0x0c, 0x43, 0xfa, 0x01, 0xba,
25+
0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x03,
26+
0x00, 0xbc, 0x2a, 0x28, 0xbc, 0x03, 0x03, 0x01,
27+
0x04, 0x02, 0x1e, 0x0c, 0x0e, 0x1a, 0x66, 0x75,
28+
0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66,
29+
0x28, 0x29, 0x20, 0x7b, 0x20, 0x72, 0x65, 0x74,
30+
0x75, 0x72, 0x6e, 0x20, 0x34, 0x32, 0x20, 0x7d,
31+
0x0c, 0x03, 0xc2, 0x05, 0x08, 0xc2, 0x04, 0x3f,
32+
0xdf, 0x00, 0x00, 0x00, 0x80, 0x3f, 0xdd, 0x00,
33+
0x00, 0x00, 0x40, 0x3e, 0xdf, 0x00, 0x00, 0x00,
34+
0x80, 0xbf, 0x00, 0x40, 0xdd, 0x00, 0x00, 0x00,
35+
0x00, 0x04, 0xe0, 0x00, 0x00, 0x00, 0xc9, 0x04,
36+
0xe1, 0x00, 0x00, 0x00, 0x3a, 0xdf, 0x00, 0x00,
37+
0x00, 0x61, 0x01, 0x00, 0x38, 0xdd, 0x00, 0x00,
38+
0x00, 0x42, 0x38, 0x00, 0x00, 0x00, 0x24, 0x00,
39+
0x00, 0xca, 0x06, 0xc9, 0x62, 0x01, 0x00, 0x38,
40+
0xdf, 0x00, 0x00, 0x00, 0xaf, 0xea, 0x0b, 0x38,
41+
0x94, 0x00, 0x00, 0x00, 0x62, 0x01, 0x00, 0xef,
42+
0x2f, 0x61, 0x03, 0x00, 0x61, 0x02, 0x00, 0x38,
43+
0x3b, 0x00, 0x00, 0x00, 0x38, 0xdf, 0x00, 0x00,
44+
0x00, 0x04, 0xdd, 0x00, 0x00, 0x00, 0x9d, 0x31,
45+
0x01, 0x00, 0x04, 0x00, 0xcb, 0x62, 0x02, 0x00,
46+
0x42, 0x38, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00,
47+
0xcc, 0x06, 0xc9, 0x62, 0x03, 0x00, 0x38, 0xdf,
48+
0x00, 0x00, 0x00, 0xaf, 0xea, 0x0b, 0x38, 0x94,
49+
0x00, 0x00, 0x00, 0x62, 0x03, 0x00, 0xef, 0x2f,
50+
0x68, 0x03, 0x00, 0x68, 0x02, 0x00, 0xc5, 0x28,
51+
0xbc, 0x03, 0x01, 0x01, 0x28, 0x60, 0x01, 0x49,
52+
0x02, 0x21, 0x1a, 0x1b, 0x04, 0x1e, 0x1d, 0x12,
53+
0x26, 0x49, 0x1d, 0x0c, 0x06, 0x11, 0x18, 0x2a,
54+
0x1c, 0x37, 0x41, 0x21, 0x1c, 0x34, 0x18, 0x1b,
55+
0x04, 0x26, 0x11, 0x3f, 0x1d, 0x0c, 0x06, 0x11,
56+
0x18, 0x2a, 0x1c, 0x53, 0x41, 0x00,
5657
};
5758

5859
static JSContext *JS_NewCustomContext(JSRuntime *rt)

quickjs-ng/quickjs/gen/hello.c

+14-14
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22

33
#include "quickjs-libc.h"
44

5-
const uint32_t qjsc_hello_size = 89;
5+
const uint32_t qjsc_hello_size = 93;
66

7-
const uint8_t qjsc_hello[89] = {
8-
0x0e, 0x04, 0x0e, 0x63, 0x6f, 0x6e, 0x73, 0x6f,
9-
0x6c, 0x65, 0x06, 0x6c, 0x6f, 0x67, 0x16, 0x48,
10-
0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x57, 0x6f, 0x72,
11-
0x6c, 0x64, 0x22, 0x65, 0x78, 0x61, 0x6d, 0x70,
12-
0x6c, 0x65, 0x73, 0x2f, 0x68, 0x65, 0x6c, 0x6c,
13-
0x6f, 0x2e, 0x6a, 0x73, 0x0c, 0x00, 0xfa, 0x00,
14-
0xa2, 0x01, 0x00, 0x01, 0x00, 0x03, 0x00, 0x00,
15-
0x14, 0x01, 0xa4, 0x01, 0x00, 0x00, 0x00, 0x38,
16-
0xdc, 0x00, 0x00, 0x00, 0x42, 0xdd, 0x00, 0x00,
17-
0x00, 0x04, 0xde, 0x00, 0x00, 0x00, 0x24, 0x01,
18-
0x00, 0xcc, 0x28, 0xbe, 0x03, 0x01, 0x01, 0x00,
19-
0x00,
7+
const uint8_t qjsc_hello[93] = {
8+
0x10, 0x04, 0x01, 0x0e, 0x63, 0x6f, 0x6e, 0x73,
9+
0x6f, 0x6c, 0x65, 0x01, 0x06, 0x6c, 0x6f, 0x67,
10+
0x01, 0x16, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20,
11+
0x57, 0x6f, 0x72, 0x6c, 0x64, 0x01, 0x22, 0x65,
12+
0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f,
13+
0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x6a, 0x73,
14+
0x0c, 0x00, 0xfa, 0x00, 0xa2, 0x01, 0x00, 0x01,
15+
0x00, 0x03, 0x00, 0x00, 0x14, 0x01, 0xa4, 0x01,
16+
0x00, 0x00, 0x00, 0x38, 0xdc, 0x00, 0x00, 0x00,
17+
0x42, 0xdd, 0x00, 0x00, 0x00, 0x04, 0xde, 0x00,
18+
0x00, 0x00, 0x24, 0x01, 0x00, 0xcd, 0x28, 0xbe,
19+
0x03, 0x01, 0x01, 0x00, 0x00,
2020
};
2121

2222
static JSContext *JS_NewCustomContext(JSRuntime *rt)

quickjs-ng/quickjs/gen/hello_module.c

+65-63
Original file line numberDiff line numberDiff line change
@@ -2,76 +2,78 @@
22

33
#include "quickjs-libc.h"
44

5-
const uint32_t qjsc_fib_module_size = 311;
5+
const uint32_t qjsc_fib_module_size = 314;
66

7-
const uint8_t qjsc_fib_module[311] = {
8-
0x0e, 0x03, 0x2c, 0x65, 0x78, 0x61, 0x6d, 0x70,
9-
0x6c, 0x65, 0x73, 0x2f, 0x66, 0x69, 0x62, 0x5f,
10-
0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x6a,
11-
0x73, 0x06, 0x66, 0x69, 0x62, 0x02, 0x6e, 0x0d,
12-
0xb8, 0x03, 0x00, 0x01, 0x00, 0x00, 0xba, 0x03,
13-
0x00, 0x00, 0x00, 0x0c, 0x20, 0xfa, 0x01, 0xa2,
14-
0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x09,
15-
0x00, 0xba, 0x03, 0x00, 0x01, 0x0c, 0x43, 0xfa,
16-
0x01, 0xba, 0x03, 0x01, 0x00, 0x01, 0x04, 0x01,
17-
0x00, 0x1a, 0x01, 0xbc, 0x03, 0x00, 0x01, 0x00,
18-
0xba, 0x03, 0x00, 0x00, 0xd0, 0xb3, 0xa7, 0xe9,
19-
0x03, 0xb3, 0x28, 0xd0, 0xb4, 0xac, 0xe9, 0x03,
20-
0xb4, 0x28, 0xdc, 0xd0, 0xb4, 0x9e, 0xee, 0xdc,
21-
0xd0, 0xb5, 0x9e, 0xee, 0x9d, 0x28, 0xb8, 0x03,
22-
0x02, 0x08, 0x20, 0x04, 0x00, 0x07, 0x06, 0x07,
23-
0x06, 0x12, 0x09, 0x08, 0x07, 0x07, 0x10, 0x07,
24-
0x06, 0x07, 0x06, 0x12, 0x13, 0x08, 0x07, 0x08,
25-
0x16, 0x0c, 0x0c, 0x07, 0x04, 0x0c, 0x0a, 0x0c,
26-
0x0c, 0x07, 0x04, 0x8d, 0x01, 0x66, 0x75, 0x6e,
27-
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x69,
28-
0x62, 0x28, 0x6e, 0x29, 0x0a, 0x7b, 0x0a, 0x20,
29-
0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x6e,
30-
0x20, 0x3c, 0x3d, 0x20, 0x30, 0x29, 0x0a, 0x20,
31-
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72,
32-
0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x30, 0x3b,
33-
0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73,
34-
0x65, 0x20, 0x69, 0x66, 0x20, 0x28, 0x6e, 0x20,
35-
0x3d, 0x3d, 0x20, 0x31, 0x29, 0x0a, 0x20, 0x20,
36-
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65,
37-
0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x3b, 0x0a,
38-
0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65,
7+
const uint8_t qjsc_fib_module[314] = {
8+
0x10, 0x03, 0x01, 0x2c, 0x65, 0x78, 0x61, 0x6d,
9+
0x70, 0x6c, 0x65, 0x73, 0x2f, 0x66, 0x69, 0x62,
10+
0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e,
11+
0x6a, 0x73, 0x01, 0x06, 0x66, 0x69, 0x62, 0x01,
12+
0x02, 0x6e, 0x0d, 0xb8, 0x03, 0x00, 0x01, 0x00,
13+
0x00, 0xba, 0x03, 0x00, 0x00, 0x00, 0x0c, 0x20,
14+
0xfa, 0x01, 0xa2, 0x01, 0x00, 0x00, 0x00, 0x01,
15+
0x01, 0x01, 0x09, 0x00, 0xba, 0x03, 0x00, 0x01,
16+
0x0c, 0x43, 0xfa, 0x01, 0xba, 0x03, 0x01, 0x00,
17+
0x01, 0x04, 0x01, 0x00, 0x1a, 0x01, 0xbc, 0x03,
18+
0x00, 0x01, 0x00, 0xba, 0x03, 0x00, 0x00, 0xd1,
19+
0xb4, 0xa7, 0xea, 0x03, 0xb4, 0x28, 0xd1, 0xb5,
20+
0xac, 0xea, 0x03, 0xb5, 0x28, 0xdd, 0xd1, 0xb5,
21+
0x9e, 0xef, 0xdd, 0xd1, 0xb6, 0x9e, 0xef, 0x9d,
22+
0x28, 0xb8, 0x03, 0x02, 0x08, 0x20, 0x04, 0x00,
23+
0x07, 0x06, 0x07, 0x06, 0x12, 0x09, 0x08, 0x07,
24+
0x07, 0x10, 0x07, 0x06, 0x07, 0x06, 0x12, 0x13,
25+
0x08, 0x07, 0x08, 0x16, 0x0c, 0x0c, 0x07, 0x04,
26+
0x0c, 0x0a, 0x0c, 0x0c, 0x07, 0x04, 0x8d, 0x01,
27+
0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
28+
0x20, 0x66, 0x69, 0x62, 0x28, 0x6e, 0x29, 0x0a,
29+
0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66,
30+
0x20, 0x28, 0x6e, 0x20, 0x3c, 0x3d, 0x20, 0x30,
31+
0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
32+
0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
33+
0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
34+
0x65, 0x6c, 0x73, 0x65, 0x20, 0x69, 0x66, 0x20,
35+
0x28, 0x6e, 0x20, 0x3d, 0x3d, 0x20, 0x31, 0x29,
3936
0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
4037
0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20,
38+
0x31, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65,
39+
0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20,
40+
0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75,
41+
0x72, 0x6e, 0x20, 0x66, 0x69, 0x62, 0x28, 0x6e,
42+
0x20, 0x2d, 0x20, 0x31, 0x29, 0x20, 0x2b, 0x20,
4143
0x66, 0x69, 0x62, 0x28, 0x6e, 0x20, 0x2d, 0x20,
42-
0x31, 0x29, 0x20, 0x2b, 0x20, 0x66, 0x69, 0x62,
43-
0x28, 0x6e, 0x20, 0x2d, 0x20, 0x32, 0x29, 0x3b,
44-
0x0a, 0x7d, 0x08, 0xe9, 0x05, 0xbe, 0x00, 0xe0,
45-
0x29, 0x06, 0x2e, 0xb8, 0x03, 0x01, 0x01, 0x06,
46-
0x01, 0x01, 0x00, 0x07, 0x14, 0x02, 0x00,
44+
0x32, 0x29, 0x3b, 0x0a, 0x7d, 0x08, 0xea, 0x05,
45+
0xbf, 0x00, 0xe1, 0x29, 0x06, 0x2e, 0xb8, 0x03,
46+
0x01, 0x01, 0x06, 0x01, 0x01, 0x00, 0x07, 0x14,
47+
0x02, 0x00,
4748
};
4849

49-
const uint32_t qjsc_hello_module_size = 178;
50+
const uint32_t qjsc_hello_module_size = 185;
5051

51-
const uint8_t qjsc_hello_module[178] = {
52-
0x0e, 0x07, 0x30, 0x65, 0x78, 0x61, 0x6d, 0x70,
53-
0x6c, 0x65, 0x73, 0x2f, 0x68, 0x65, 0x6c, 0x6c,
54-
0x6f, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
55-
0x2e, 0x6a, 0x73, 0x1e, 0x2e, 0x2f, 0x66, 0x69,
56-
0x62, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
57-
0x2e, 0x6a, 0x73, 0x06, 0x66, 0x69, 0x62, 0x0e,
58-
0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x06,
59-
0x6c, 0x6f, 0x67, 0x16, 0x48, 0x65, 0x6c, 0x6c,
60-
0x6f, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x10,
61-
0x66, 0x69, 0x62, 0x28, 0x31, 0x30, 0x29, 0x3d,
62-
0x0d, 0xb8, 0x03, 0x01, 0xba, 0x03, 0x00, 0x00,
63-
0x01, 0x00, 0xbc, 0x03, 0x00, 0x00, 0x0c, 0x20,
64-
0xfa, 0x01, 0xa2, 0x01, 0x00, 0x00, 0x00, 0x05,
65-
0x01, 0x00, 0x32, 0x00, 0xbc, 0x03, 0x00, 0x0c,
66-
0x08, 0xe9, 0x02, 0x29, 0x38, 0xdf, 0x00, 0x00,
67-
0x00, 0x42, 0xe0, 0x00, 0x00, 0x00, 0x04, 0xe1,
68-
0x00, 0x00, 0x00, 0x24, 0x01, 0x00, 0x0e, 0x38,
69-
0xdf, 0x00, 0x00, 0x00, 0x42, 0xe0, 0x00, 0x00,
70-
0x00, 0x04, 0xe2, 0x00, 0x00, 0x00, 0x65, 0x00,
71-
0x00, 0xbb, 0x0a, 0xee, 0x24, 0x02, 0x00, 0x0e,
72-
0x06, 0x2e, 0xb8, 0x03, 0x01, 0x01, 0x0a, 0x01,
73-
0x01, 0x00, 0x04, 0x0a, 0x02, 0x62, 0x00, 0x4d,
74-
0x30, 0x00,
52+
const uint8_t qjsc_hello_module[185] = {
53+
0x10, 0x07, 0x01, 0x30, 0x65, 0x78, 0x61, 0x6d,
54+
0x70, 0x6c, 0x65, 0x73, 0x2f, 0x68, 0x65, 0x6c,
55+
0x6c, 0x6f, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c,
56+
0x65, 0x2e, 0x6a, 0x73, 0x01, 0x1e, 0x2e, 0x2f,
57+
0x66, 0x69, 0x62, 0x5f, 0x6d, 0x6f, 0x64, 0x75,
58+
0x6c, 0x65, 0x2e, 0x6a, 0x73, 0x01, 0x06, 0x66,
59+
0x69, 0x62, 0x01, 0x0e, 0x63, 0x6f, 0x6e, 0x73,
60+
0x6f, 0x6c, 0x65, 0x01, 0x06, 0x6c, 0x6f, 0x67,
61+
0x01, 0x16, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20,
62+
0x57, 0x6f, 0x72, 0x6c, 0x64, 0x01, 0x10, 0x66,
63+
0x69, 0x62, 0x28, 0x31, 0x30, 0x29, 0x3d, 0x0d,
64+
0xb8, 0x03, 0x01, 0xba, 0x03, 0x00, 0x00, 0x01,
65+
0x00, 0xbc, 0x03, 0x00, 0x00, 0x0c, 0x20, 0xfa,
66+
0x01, 0xa2, 0x01, 0x00, 0x00, 0x00, 0x05, 0x01,
67+
0x00, 0x32, 0x00, 0xbc, 0x03, 0x00, 0x0c, 0x08,
68+
0xea, 0x02, 0x29, 0x38, 0xdf, 0x00, 0x00, 0x00,
69+
0x42, 0xe0, 0x00, 0x00, 0x00, 0x04, 0xe1, 0x00,
70+
0x00, 0x00, 0x24, 0x01, 0x00, 0x0e, 0x38, 0xdf,
71+
0x00, 0x00, 0x00, 0x42, 0xe0, 0x00, 0x00, 0x00,
72+
0x04, 0xe2, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00,
73+
0xbc, 0x0a, 0xef, 0x24, 0x02, 0x00, 0x0e, 0x06,
74+
0x2e, 0xb8, 0x03, 0x01, 0x01, 0x0a, 0x01, 0x01,
75+
0x00, 0x04, 0x0a, 0x02, 0x62, 0x00, 0x4d, 0x30,
76+
0x00,
7577
};
7678

7779
static JSContext *JS_NewCustomContext(JSRuntime *rt)

0 commit comments

Comments
 (0)