Skip to content

Commit

Permalink
update quickjs-ng to 0.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
andrieshiemstra committed Oct 11, 2024
1 parent fa02b86 commit a631e74
Show file tree
Hide file tree
Showing 18 changed files with 3,341 additions and 3,052 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
edition = "2018"
name = "hirofa-quickjs-sys"
description = "QuickJS, QuickJS-NG Javascript Engine FFI bindings"
version = "0.6.0"
version = "0.6.1"
readme = "README.md"
repository = "https://github.com/HiRoFa/quickjs-sys"
license = "MIT"
Expand Down
8 changes: 7 additions & 1 deletion quickjs-ng/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ pub const JS_DEF_OBJECT: u32 = 8;
pub const JS_DEF_ALIAS: u32 = 9;
pub const QJS_VERSION_MAJOR: u32 = 0;
pub const QJS_VERSION_MINOR: u32 = 6;
pub const QJS_VERSION_PATCH: u32 = 0;
pub const QJS_VERSION_PATCH: u32 = 1;
pub const QJS_VERSION_SUFFIX: &[u8; 1] = b"\0";
pub type __gnuc_va_list = __builtin_va_list;
pub type __u_char = ::std::os::raw::c_uchar;
Expand Down Expand Up @@ -3022,6 +3022,12 @@ extern "C" {
extern "C" {
pub static mut signgam: ::std::os::raw::c_int;
}
//pub const FP_NAN: _bindgen_ty_1 = 0;
//pub const FP_INFINITE: _bindgen_ty_1 = 1;
//pub const FP_ZERO: _bindgen_ty_1 = 2;
//pub const FP_SUBNORMAL: _bindgen_ty_1 = 3;
//pub const FP_NORMAL: _bindgen_ty_1 = 4;
pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JSRuntime {
Expand Down
4 changes: 4 additions & 0 deletions quickjs-ng/quickjs/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Don't show changes in generated files when doing git diff

gen/** -diff

34 changes: 34 additions & 0 deletions quickjs-ng/quickjs/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -484,3 +484,37 @@ jobs:
run: |
cmake --build build --config Release --target qjs
ls -lh build
mimalloc-linux:
runs-on: ubuntu-24.04
env:
BUILD_CLI_WITH_MIMALLOC: ON
MIMALLOC_SHOW_STATS: 1
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
sudo apt update && sudo apt -y install libmimalloc-dev
- name: build
run: |
make
- name: test
run: |
make test
mimalloc-macos:
runs-on: macos-latest
env:
BUILD_CLI_WITH_STATIC_MIMALLOC: ON
MIMALLOC_SHOW_STATS: 1
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
brew install mimalloc
- name: build
run: |
make
- name: test
run: |
make test
11 changes: 8 additions & 3 deletions quickjs-ng/quickjs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ endif()
xoption(BUILD_EXAMPLES "Build examples" OFF)
xoption(BUILD_STATIC_QJS_EXE "Build a static qjs executable" OFF)
xoption(BUILD_CLI_WITH_MIMALLOC "Build the qjs executable with mimalloc" OFF)
xoption(BUILD_CLI_WITH_STATIC_MIMALLOC "Build the qjs executable with mimalloc (statically linked)" OFF)
xoption(CONFIG_ASAN "Enable AddressSanitizer (ASan)" OFF)
xoption(CONFIG_MSAN "Enable MemorySanitizer (MSan)" OFF)
xoption(CONFIG_UBSAN "Enable UndefinedBehaviorSanitizer (UBSan)" OFF)
Expand Down Expand Up @@ -255,10 +256,14 @@ endif()
if(NOT WIN32)
set_target_properties(qjs_exe PROPERTIES ENABLE_EXPORTS TRUE)
endif()
if(BUILD_CLI_WITH_MIMALLOC)
if(BUILD_CLI_WITH_MIMALLOC OR BUILD_CLI_WITH_STATIC_MIMALLOC)
find_package(mimalloc REQUIRED)
target_compile_definitions(qjs_exe PRIVATE QJS_USE_MIMALLOC)
target_link_libraries(qjs_exe mimalloc-static)
# Upstream mimalloc doesn't provide a way to know if both libraries are supported.
if(BUILD_CLI_WITH_STATIC_MIMALLOC)
target_link_libraries(qjs_exe mimalloc-static)
else()
target_link_libraries(qjs_exe mimalloc)
endif()
endif()

# Test262 runner
Expand Down
2 changes: 1 addition & 1 deletion quickjs-ng/quickjs/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
quickjs-ng-0.6.0
quickjs-ng-0.6.1
101 changes: 51 additions & 50 deletions quickjs-ng/quickjs/gen/function_source.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,58 @@

#include "quickjs-libc.h"

const uint32_t qjsc_function_source_size = 384;
const uint32_t qjsc_function_source_size = 390;

const uint8_t qjsc_function_source[384] = {
0x0e, 0x06, 0x0c, 0x61, 0x63, 0x74, 0x75, 0x61,
0x6c, 0x02, 0x66, 0x30, 0x74, 0x65, 0x73, 0x74,
0x73, 0x2f, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x2e, 0x6a, 0x73, 0x0c, 0x65, 0x78, 0x70,
0x65, 0x63, 0x74, 0x14, 0x75, 0x73, 0x65, 0x20,
0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x34, 0x66,
0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20,
0x66, 0x28, 0x29, 0x20, 0x7b, 0x20, 0x72, 0x65,
0x74, 0x75, 0x72, 0x6e, 0x20, 0x34, 0x32, 0x20,
0x7d, 0x0c, 0x00, 0xfa, 0x01, 0xa2, 0x01, 0x00,
0x06, 0x00, 0x03, 0x00, 0x01, 0xa0, 0x01, 0x06,
0xa4, 0x01, 0x00, 0x00, 0x00, 0xb8, 0x03, 0x02,
0x00, 0x30, 0xba, 0x03, 0x04, 0x00, 0x70, 0xb8,
0x03, 0x04, 0x03, 0x70, 0x10, 0x00, 0x01, 0x00,
0xe4, 0x01, 0x00, 0x01, 0x00, 0x0c, 0x43, 0xfa,
0x01, 0xba, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0x03, 0x00, 0xbb, 0x2a, 0x28, 0xbc, 0x03,
0x03, 0x01, 0x04, 0x02, 0x1e, 0x0c, 0x0e, 0x1a,
0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x20, 0x66, 0x28, 0x29, 0x20, 0x7b, 0x20, 0x72,
0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x34, 0x32,
0x20, 0x7d, 0x0c, 0x03, 0xc1, 0x05, 0x08, 0xc1,
0x04, 0x3f, 0xdf, 0x00, 0x00, 0x00, 0x80, 0x3f,
0xdd, 0x00, 0x00, 0x00, 0x40, 0x3e, 0xdf, 0x00,
0x00, 0x00, 0x80, 0xbe, 0x00, 0x40, 0xdd, 0x00,
0x00, 0x00, 0x00, 0x04, 0xe0, 0x00, 0x00, 0x00,
0xc8, 0x04, 0xe1, 0x00, 0x00, 0x00, 0x3a, 0xdf,
0x00, 0x00, 0x00, 0x61, 0x01, 0x00, 0x38, 0xdd,
0x00, 0x00, 0x00, 0x42, 0x38, 0x00, 0x00, 0x00,
0x24, 0x00, 0x00, 0xc9, 0x06, 0xc8, 0x62, 0x01,
0x00, 0x38, 0xdf, 0x00, 0x00, 0x00, 0xaf, 0xe9,
0x0b, 0x38, 0x94, 0x00, 0x00, 0x00, 0x62, 0x01,
0x00, 0xee, 0x2f, 0x61, 0x03, 0x00, 0x61, 0x02,
0x00, 0x38, 0x3b, 0x00, 0x00, 0x00, 0x38, 0xdf,
0x00, 0x00, 0x00, 0x04, 0xdd, 0x00, 0x00, 0x00,
0x9d, 0x31, 0x01, 0x00, 0x04, 0x00, 0xca, 0x62,
0x02, 0x00, 0x42, 0x38, 0x00, 0x00, 0x00, 0x24,
0x00, 0x00, 0xcb, 0x06, 0xc8, 0x62, 0x03, 0x00,
0x38, 0xdf, 0x00, 0x00, 0x00, 0xaf, 0xe9, 0x0b,
0x38, 0x94, 0x00, 0x00, 0x00, 0x62, 0x03, 0x00,
0xee, 0x2f, 0x68, 0x03, 0x00, 0x68, 0x02, 0x00,
0xc4, 0x28, 0xbc, 0x03, 0x01, 0x01, 0x28, 0x60,
0x01, 0x49, 0x02, 0x21, 0x1a, 0x1b, 0x04, 0x1e,
0x1d, 0x12, 0x26, 0x49, 0x1d, 0x0c, 0x06, 0x11,
0x18, 0x2a, 0x1c, 0x37, 0x41, 0x21, 0x1c, 0x34,
0x18, 0x1b, 0x04, 0x26, 0x11, 0x3f, 0x1d, 0x0c,
0x06, 0x11, 0x18, 0x2a, 0x1c, 0x53, 0x41, 0x00,
const uint8_t qjsc_function_source[390] = {
0x10, 0x06, 0x01, 0x0c, 0x61, 0x63, 0x74, 0x75,
0x61, 0x6c, 0x01, 0x02, 0x66, 0x01, 0x30, 0x74,
0x65, 0x73, 0x74, 0x73, 0x2f, 0x66, 0x75, 0x6e,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x6f,
0x75, 0x72, 0x63, 0x65, 0x2e, 0x6a, 0x73, 0x01,
0x0c, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x01,
0x14, 0x75, 0x73, 0x65, 0x20, 0x73, 0x74, 0x72,
0x69, 0x63, 0x74, 0x01, 0x34, 0x66, 0x75, 0x6e,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x28,
0x29, 0x20, 0x7b, 0x20, 0x72, 0x65, 0x74, 0x75,
0x72, 0x6e, 0x20, 0x34, 0x32, 0x20, 0x7d, 0x0c,
0x00, 0xfa, 0x01, 0xa2, 0x01, 0x00, 0x06, 0x00,
0x03, 0x00, 0x01, 0xa0, 0x01, 0x06, 0xa4, 0x01,
0x00, 0x00, 0x00, 0xb8, 0x03, 0x02, 0x00, 0x30,
0xba, 0x03, 0x04, 0x00, 0x70, 0xb8, 0x03, 0x04,
0x03, 0x70, 0x10, 0x00, 0x01, 0x00, 0xe4, 0x01,
0x00, 0x01, 0x00, 0x0c, 0x43, 0xfa, 0x01, 0xba,
0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x03,
0x00, 0xbc, 0x2a, 0x28, 0xbc, 0x03, 0x03, 0x01,
0x04, 0x02, 0x1e, 0x0c, 0x0e, 0x1a, 0x66, 0x75,
0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66,
0x28, 0x29, 0x20, 0x7b, 0x20, 0x72, 0x65, 0x74,
0x75, 0x72, 0x6e, 0x20, 0x34, 0x32, 0x20, 0x7d,
0x0c, 0x03, 0xc2, 0x05, 0x08, 0xc2, 0x04, 0x3f,
0xdf, 0x00, 0x00, 0x00, 0x80, 0x3f, 0xdd, 0x00,
0x00, 0x00, 0x40, 0x3e, 0xdf, 0x00, 0x00, 0x00,
0x80, 0xbf, 0x00, 0x40, 0xdd, 0x00, 0x00, 0x00,
0x00, 0x04, 0xe0, 0x00, 0x00, 0x00, 0xc9, 0x04,
0xe1, 0x00, 0x00, 0x00, 0x3a, 0xdf, 0x00, 0x00,
0x00, 0x61, 0x01, 0x00, 0x38, 0xdd, 0x00, 0x00,
0x00, 0x42, 0x38, 0x00, 0x00, 0x00, 0x24, 0x00,
0x00, 0xca, 0x06, 0xc9, 0x62, 0x01, 0x00, 0x38,
0xdf, 0x00, 0x00, 0x00, 0xaf, 0xea, 0x0b, 0x38,
0x94, 0x00, 0x00, 0x00, 0x62, 0x01, 0x00, 0xef,
0x2f, 0x61, 0x03, 0x00, 0x61, 0x02, 0x00, 0x38,
0x3b, 0x00, 0x00, 0x00, 0x38, 0xdf, 0x00, 0x00,
0x00, 0x04, 0xdd, 0x00, 0x00, 0x00, 0x9d, 0x31,
0x01, 0x00, 0x04, 0x00, 0xcb, 0x62, 0x02, 0x00,
0x42, 0x38, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00,
0xcc, 0x06, 0xc9, 0x62, 0x03, 0x00, 0x38, 0xdf,
0x00, 0x00, 0x00, 0xaf, 0xea, 0x0b, 0x38, 0x94,
0x00, 0x00, 0x00, 0x62, 0x03, 0x00, 0xef, 0x2f,
0x68, 0x03, 0x00, 0x68, 0x02, 0x00, 0xc5, 0x28,
0xbc, 0x03, 0x01, 0x01, 0x28, 0x60, 0x01, 0x49,
0x02, 0x21, 0x1a, 0x1b, 0x04, 0x1e, 0x1d, 0x12,
0x26, 0x49, 0x1d, 0x0c, 0x06, 0x11, 0x18, 0x2a,
0x1c, 0x37, 0x41, 0x21, 0x1c, 0x34, 0x18, 0x1b,
0x04, 0x26, 0x11, 0x3f, 0x1d, 0x0c, 0x06, 0x11,
0x18, 0x2a, 0x1c, 0x53, 0x41, 0x00,
};

static JSContext *JS_NewCustomContext(JSRuntime *rt)
Expand Down
28 changes: 14 additions & 14 deletions quickjs-ng/quickjs/gen/hello.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

#include "quickjs-libc.h"

const uint32_t qjsc_hello_size = 89;
const uint32_t qjsc_hello_size = 93;

const uint8_t qjsc_hello[89] = {
0x0e, 0x04, 0x0e, 0x63, 0x6f, 0x6e, 0x73, 0x6f,
0x6c, 0x65, 0x06, 0x6c, 0x6f, 0x67, 0x16, 0x48,
0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x57, 0x6f, 0x72,
0x6c, 0x64, 0x22, 0x65, 0x78, 0x61, 0x6d, 0x70,
0x6c, 0x65, 0x73, 0x2f, 0x68, 0x65, 0x6c, 0x6c,
0x6f, 0x2e, 0x6a, 0x73, 0x0c, 0x00, 0xfa, 0x00,
0xa2, 0x01, 0x00, 0x01, 0x00, 0x03, 0x00, 0x00,
0x14, 0x01, 0xa4, 0x01, 0x00, 0x00, 0x00, 0x38,
0xdc, 0x00, 0x00, 0x00, 0x42, 0xdd, 0x00, 0x00,
0x00, 0x04, 0xde, 0x00, 0x00, 0x00, 0x24, 0x01,
0x00, 0xcc, 0x28, 0xbe, 0x03, 0x01, 0x01, 0x00,
0x00,
const uint8_t qjsc_hello[93] = {
0x10, 0x04, 0x01, 0x0e, 0x63, 0x6f, 0x6e, 0x73,
0x6f, 0x6c, 0x65, 0x01, 0x06, 0x6c, 0x6f, 0x67,
0x01, 0x16, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20,
0x57, 0x6f, 0x72, 0x6c, 0x64, 0x01, 0x22, 0x65,
0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f,
0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x6a, 0x73,
0x0c, 0x00, 0xfa, 0x00, 0xa2, 0x01, 0x00, 0x01,
0x00, 0x03, 0x00, 0x00, 0x14, 0x01, 0xa4, 0x01,
0x00, 0x00, 0x00, 0x38, 0xdc, 0x00, 0x00, 0x00,
0x42, 0xdd, 0x00, 0x00, 0x00, 0x04, 0xde, 0x00,
0x00, 0x00, 0x24, 0x01, 0x00, 0xcd, 0x28, 0xbe,
0x03, 0x01, 0x01, 0x00, 0x00,
};

static JSContext *JS_NewCustomContext(JSRuntime *rt)
Expand Down
128 changes: 65 additions & 63 deletions quickjs-ng/quickjs/gen/hello_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,76 +2,78 @@

#include "quickjs-libc.h"

const uint32_t qjsc_fib_module_size = 311;
const uint32_t qjsc_fib_module_size = 314;

const uint8_t qjsc_fib_module[311] = {
0x0e, 0x03, 0x2c, 0x65, 0x78, 0x61, 0x6d, 0x70,
0x6c, 0x65, 0x73, 0x2f, 0x66, 0x69, 0x62, 0x5f,
0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x6a,
0x73, 0x06, 0x66, 0x69, 0x62, 0x02, 0x6e, 0x0d,
0xb8, 0x03, 0x00, 0x01, 0x00, 0x00, 0xba, 0x03,
0x00, 0x00, 0x00, 0x0c, 0x20, 0xfa, 0x01, 0xa2,
0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x09,
0x00, 0xba, 0x03, 0x00, 0x01, 0x0c, 0x43, 0xfa,
0x01, 0xba, 0x03, 0x01, 0x00, 0x01, 0x04, 0x01,
0x00, 0x1a, 0x01, 0xbc, 0x03, 0x00, 0x01, 0x00,
0xba, 0x03, 0x00, 0x00, 0xd0, 0xb3, 0xa7, 0xe9,
0x03, 0xb3, 0x28, 0xd0, 0xb4, 0xac, 0xe9, 0x03,
0xb4, 0x28, 0xdc, 0xd0, 0xb4, 0x9e, 0xee, 0xdc,
0xd0, 0xb5, 0x9e, 0xee, 0x9d, 0x28, 0xb8, 0x03,
0x02, 0x08, 0x20, 0x04, 0x00, 0x07, 0x06, 0x07,
0x06, 0x12, 0x09, 0x08, 0x07, 0x07, 0x10, 0x07,
0x06, 0x07, 0x06, 0x12, 0x13, 0x08, 0x07, 0x08,
0x16, 0x0c, 0x0c, 0x07, 0x04, 0x0c, 0x0a, 0x0c,
0x0c, 0x07, 0x04, 0x8d, 0x01, 0x66, 0x75, 0x6e,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x69,
0x62, 0x28, 0x6e, 0x29, 0x0a, 0x7b, 0x0a, 0x20,
0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x6e,
0x20, 0x3c, 0x3d, 0x20, 0x30, 0x29, 0x0a, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72,
0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x30, 0x3b,
0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73,
0x65, 0x20, 0x69, 0x66, 0x20, 0x28, 0x6e, 0x20,
0x3d, 0x3d, 0x20, 0x31, 0x29, 0x0a, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65,
0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x3b, 0x0a,
0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65,
const uint8_t qjsc_fib_module[314] = {
0x10, 0x03, 0x01, 0x2c, 0x65, 0x78, 0x61, 0x6d,
0x70, 0x6c, 0x65, 0x73, 0x2f, 0x66, 0x69, 0x62,
0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e,
0x6a, 0x73, 0x01, 0x06, 0x66, 0x69, 0x62, 0x01,
0x02, 0x6e, 0x0d, 0xb8, 0x03, 0x00, 0x01, 0x00,
0x00, 0xba, 0x03, 0x00, 0x00, 0x00, 0x0c, 0x20,
0xfa, 0x01, 0xa2, 0x01, 0x00, 0x00, 0x00, 0x01,
0x01, 0x01, 0x09, 0x00, 0xba, 0x03, 0x00, 0x01,
0x0c, 0x43, 0xfa, 0x01, 0xba, 0x03, 0x01, 0x00,
0x01, 0x04, 0x01, 0x00, 0x1a, 0x01, 0xbc, 0x03,
0x00, 0x01, 0x00, 0xba, 0x03, 0x00, 0x00, 0xd1,
0xb4, 0xa7, 0xea, 0x03, 0xb4, 0x28, 0xd1, 0xb5,
0xac, 0xea, 0x03, 0xb5, 0x28, 0xdd, 0xd1, 0xb5,
0x9e, 0xef, 0xdd, 0xd1, 0xb6, 0x9e, 0xef, 0x9d,
0x28, 0xb8, 0x03, 0x02, 0x08, 0x20, 0x04, 0x00,
0x07, 0x06, 0x07, 0x06, 0x12, 0x09, 0x08, 0x07,
0x07, 0x10, 0x07, 0x06, 0x07, 0x06, 0x12, 0x13,
0x08, 0x07, 0x08, 0x16, 0x0c, 0x0c, 0x07, 0x04,
0x0c, 0x0a, 0x0c, 0x0c, 0x07, 0x04, 0x8d, 0x01,
0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x20, 0x66, 0x69, 0x62, 0x28, 0x6e, 0x29, 0x0a,
0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66,
0x20, 0x28, 0x6e, 0x20, 0x3c, 0x3d, 0x20, 0x30,
0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
0x65, 0x6c, 0x73, 0x65, 0x20, 0x69, 0x66, 0x20,
0x28, 0x6e, 0x20, 0x3d, 0x3d, 0x20, 0x31, 0x29,
0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20,
0x31, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65,
0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75,
0x72, 0x6e, 0x20, 0x66, 0x69, 0x62, 0x28, 0x6e,
0x20, 0x2d, 0x20, 0x31, 0x29, 0x20, 0x2b, 0x20,
0x66, 0x69, 0x62, 0x28, 0x6e, 0x20, 0x2d, 0x20,
0x31, 0x29, 0x20, 0x2b, 0x20, 0x66, 0x69, 0x62,
0x28, 0x6e, 0x20, 0x2d, 0x20, 0x32, 0x29, 0x3b,
0x0a, 0x7d, 0x08, 0xe9, 0x05, 0xbe, 0x00, 0xe0,
0x29, 0x06, 0x2e, 0xb8, 0x03, 0x01, 0x01, 0x06,
0x01, 0x01, 0x00, 0x07, 0x14, 0x02, 0x00,
0x32, 0x29, 0x3b, 0x0a, 0x7d, 0x08, 0xea, 0x05,
0xbf, 0x00, 0xe1, 0x29, 0x06, 0x2e, 0xb8, 0x03,
0x01, 0x01, 0x06, 0x01, 0x01, 0x00, 0x07, 0x14,
0x02, 0x00,
};

const uint32_t qjsc_hello_module_size = 178;
const uint32_t qjsc_hello_module_size = 185;

const uint8_t qjsc_hello_module[178] = {
0x0e, 0x07, 0x30, 0x65, 0x78, 0x61, 0x6d, 0x70,
0x6c, 0x65, 0x73, 0x2f, 0x68, 0x65, 0x6c, 0x6c,
0x6f, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
0x2e, 0x6a, 0x73, 0x1e, 0x2e, 0x2f, 0x66, 0x69,
0x62, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
0x2e, 0x6a, 0x73, 0x06, 0x66, 0x69, 0x62, 0x0e,
0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x06,
0x6c, 0x6f, 0x67, 0x16, 0x48, 0x65, 0x6c, 0x6c,
0x6f, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x10,
0x66, 0x69, 0x62, 0x28, 0x31, 0x30, 0x29, 0x3d,
0x0d, 0xb8, 0x03, 0x01, 0xba, 0x03, 0x00, 0x00,
0x01, 0x00, 0xbc, 0x03, 0x00, 0x00, 0x0c, 0x20,
0xfa, 0x01, 0xa2, 0x01, 0x00, 0x00, 0x00, 0x05,
0x01, 0x00, 0x32, 0x00, 0xbc, 0x03, 0x00, 0x0c,
0x08, 0xe9, 0x02, 0x29, 0x38, 0xdf, 0x00, 0x00,
0x00, 0x42, 0xe0, 0x00, 0x00, 0x00, 0x04, 0xe1,
0x00, 0x00, 0x00, 0x24, 0x01, 0x00, 0x0e, 0x38,
0xdf, 0x00, 0x00, 0x00, 0x42, 0xe0, 0x00, 0x00,
0x00, 0x04, 0xe2, 0x00, 0x00, 0x00, 0x65, 0x00,
0x00, 0xbb, 0x0a, 0xee, 0x24, 0x02, 0x00, 0x0e,
0x06, 0x2e, 0xb8, 0x03, 0x01, 0x01, 0x0a, 0x01,
0x01, 0x00, 0x04, 0x0a, 0x02, 0x62, 0x00, 0x4d,
0x30, 0x00,
const uint8_t qjsc_hello_module[185] = {
0x10, 0x07, 0x01, 0x30, 0x65, 0x78, 0x61, 0x6d,
0x70, 0x6c, 0x65, 0x73, 0x2f, 0x68, 0x65, 0x6c,
0x6c, 0x6f, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c,
0x65, 0x2e, 0x6a, 0x73, 0x01, 0x1e, 0x2e, 0x2f,
0x66, 0x69, 0x62, 0x5f, 0x6d, 0x6f, 0x64, 0x75,
0x6c, 0x65, 0x2e, 0x6a, 0x73, 0x01, 0x06, 0x66,
0x69, 0x62, 0x01, 0x0e, 0x63, 0x6f, 0x6e, 0x73,
0x6f, 0x6c, 0x65, 0x01, 0x06, 0x6c, 0x6f, 0x67,
0x01, 0x16, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20,
0x57, 0x6f, 0x72, 0x6c, 0x64, 0x01, 0x10, 0x66,
0x69, 0x62, 0x28, 0x31, 0x30, 0x29, 0x3d, 0x0d,
0xb8, 0x03, 0x01, 0xba, 0x03, 0x00, 0x00, 0x01,
0x00, 0xbc, 0x03, 0x00, 0x00, 0x0c, 0x20, 0xfa,
0x01, 0xa2, 0x01, 0x00, 0x00, 0x00, 0x05, 0x01,
0x00, 0x32, 0x00, 0xbc, 0x03, 0x00, 0x0c, 0x08,
0xea, 0x02, 0x29, 0x38, 0xdf, 0x00, 0x00, 0x00,
0x42, 0xe0, 0x00, 0x00, 0x00, 0x04, 0xe1, 0x00,
0x00, 0x00, 0x24, 0x01, 0x00, 0x0e, 0x38, 0xdf,
0x00, 0x00, 0x00, 0x42, 0xe0, 0x00, 0x00, 0x00,
0x04, 0xe2, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00,
0xbc, 0x0a, 0xef, 0x24, 0x02, 0x00, 0x0e, 0x06,
0x2e, 0xb8, 0x03, 0x01, 0x01, 0x0a, 0x01, 0x01,
0x00, 0x04, 0x0a, 0x02, 0x62, 0x00, 0x4d, 0x30,
0x00,
};

static JSContext *JS_NewCustomContext(JSRuntime *rt)
Expand Down
Loading

0 comments on commit a631e74

Please sign in to comment.