Skip to content

Commit ff5a06f

Browse files
refactor: move quickjs into sourcecode and fix bug
1 parent aae568e commit ff5a06f

22 files changed

+73739
-95
lines changed

dependencies/quickjs-ng.lua

Lines changed: 0 additions & 71 deletions
This file was deleted.

src/shell/entry.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ void main() {
182182
init_render_global();
183183
ShowWindow(GetConsoleWindow(), SW_SHOW);
184184
std::thread([]() {
185-
script_ctx.is_js_ready.wait(true);
185+
script_ctx.is_js_ready.wait(false);
186+
std::println("Is js ready: {}", script_ctx.is_js_ready.load());
186187
script_ctx.js->enqueueJob([]() {
187188
script_ctx.js->eval("globalThis.showConfigPage()", "asan.js");
188189
});
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
/* File generated automatically by the QuickJS-ng compiler. */
2+
3+
#include <inttypes.h>
4+
5+
const uint32_t qjsc_builtin_array_fromasync_size = 826;
6+
7+
const uint8_t qjsc_builtin_array_fromasync[826] = {
8+
0x15, 0x0d, 0x01, 0x1a, 0x61, 0x73, 0x79, 0x6e,
9+
0x63, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f,
10+
0x72, 0x01, 0x10, 0x69, 0x74, 0x65, 0x72, 0x61,
11+
0x74, 0x6f, 0x72, 0x01, 0x12, 0x61, 0x72, 0x72,
12+
0x61, 0x79, 0x4c, 0x69, 0x6b, 0x65, 0x01, 0x0a,
13+
0x6d, 0x61, 0x70, 0x46, 0x6e, 0x01, 0x0e, 0x74,
14+
0x68, 0x69, 0x73, 0x41, 0x72, 0x67, 0x01, 0x0c,
15+
0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x01, 0x02,
16+
0x69, 0x01, 0x1a, 0x69, 0x73, 0x43, 0x6f, 0x6e,
17+
0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x6f, 0x72,
18+
0x01, 0x08, 0x73, 0x79, 0x6e, 0x63, 0x01, 0x0c,
19+
0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x01, 0x08,
20+
0x69, 0x74, 0x65, 0x72, 0x01, 0x1c, 0x6e, 0x6f,
21+
0x74, 0x20, 0x61, 0x20, 0x66, 0x75, 0x6e, 0x63,
22+
0x74, 0x69, 0x6f, 0x6e, 0x01, 0x08, 0x63, 0x61,
23+
0x6c, 0x6c, 0x0c, 0x00, 0x02, 0x00, 0xa2, 0x01,
24+
0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x04, 0x01,
25+
0xa4, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x43, 0x02,
26+
0x01, 0x00, 0x05, 0x00, 0x05, 0x01, 0x00, 0x01,
27+
0x03, 0x05, 0xaa, 0x02, 0x00, 0x01, 0x40, 0xa0,
28+
0x03, 0x00, 0x01, 0x40, 0xc6, 0x03, 0x00, 0x01,
29+
0x40, 0xcc, 0x01, 0x00, 0x01, 0x40, 0xc8, 0x03,
30+
0x00, 0x01, 0x40, 0x0c, 0x60, 0x02, 0x01, 0xf8,
31+
0x01, 0x03, 0x0e, 0x01, 0x06, 0x05, 0x00, 0x86,
32+
0x04, 0x11, 0xca, 0x03, 0x00, 0x01, 0x00, 0xcc,
33+
0x03, 0x00, 0x01, 0x00, 0xce, 0x03, 0x00, 0x01,
34+
0x00, 0xca, 0x03, 0x01, 0xff, 0xff, 0xff, 0xff,
35+
0x0f, 0x20, 0xcc, 0x03, 0x01, 0x01, 0x20, 0xce,
36+
0x03, 0x01, 0x02, 0x20, 0xd0, 0x03, 0x02, 0x00,
37+
0x20, 0xd2, 0x03, 0x02, 0x04, 0x20, 0xd4, 0x03,
38+
0x02, 0x05, 0x20, 0xd6, 0x03, 0x02, 0x06, 0x20,
39+
0xd8, 0x03, 0x02, 0x07, 0x20, 0x64, 0x06, 0x08,
40+
0x20, 0x82, 0x01, 0x07, 0x09, 0x20, 0xda, 0x03,
41+
0x0a, 0x08, 0x30, 0x82, 0x01, 0x0d, 0x0b, 0x20,
42+
0xd4, 0x01, 0x0d, 0x0c, 0x20, 0x10, 0x00, 0x01,
43+
0x00, 0xa0, 0x03, 0x01, 0x03, 0xc6, 0x03, 0x02,
44+
0x03, 0xc8, 0x03, 0x04, 0x03, 0xaa, 0x02, 0x00,
45+
0x03, 0xcc, 0x01, 0x03, 0x03, 0x08, 0xc4, 0x0d,
46+
0x62, 0x02, 0x00, 0x62, 0x01, 0x00, 0x62, 0x00,
47+
0x00, 0xd3, 0xcb, 0xd4, 0x11, 0xf4, 0xec, 0x08,
48+
0x0e, 0x39, 0x46, 0x00, 0x00, 0x00, 0xdc, 0xcc,
49+
0xd5, 0x11, 0xf4, 0xec, 0x08, 0x0e, 0x39, 0x46,
50+
0x00, 0x00, 0x00, 0xdd, 0xcd, 0x62, 0x07, 0x00,
51+
0x62, 0x06, 0x00, 0x62, 0x05, 0x00, 0x62, 0x04,
52+
0x00, 0x62, 0x03, 0x00, 0xd4, 0x39, 0x46, 0x00,
53+
0x00, 0x00, 0xb0, 0xec, 0x16, 0xd4, 0x98, 0x04,
54+
0x1b, 0x00, 0x00, 0x00, 0xb0, 0xec, 0x0c, 0xdf,
55+
0x11, 0x04, 0xee, 0x00, 0x00, 0x00, 0x21, 0x01,
56+
0x00, 0x30, 0x06, 0xce, 0xb6, 0xc4, 0x04, 0xc3,
57+
0x0d, 0xf7, 0xc4, 0x05, 0x09, 0xc4, 0x06, 0xd3,
58+
0xe0, 0x48, 0xc4, 0x07, 0x63, 0x07, 0x00, 0x07,
59+
0xad, 0xec, 0x0f, 0x0a, 0x11, 0x64, 0x06, 0x00,
60+
0x0e, 0xd3, 0xe1, 0x48, 0x11, 0x64, 0x07, 0x00,
61+
0x0e, 0x63, 0x07, 0x00, 0x07, 0xad, 0x6a, 0xa6,
62+
0x00, 0x00, 0x00, 0x62, 0x08, 0x00, 0x06, 0x11,
63+
0xf4, 0xed, 0x0c, 0x71, 0x43, 0x32, 0x00, 0x00,
64+
0x00, 0xc4, 0x08, 0x0e, 0xee, 0x05, 0x0e, 0xd3,
65+
0xee, 0xf2, 0x63, 0x08, 0x00, 0x8e, 0x11, 0xed,
66+
0x03, 0x0e, 0xb6, 0x11, 0x64, 0x08, 0x00, 0x0e,
67+
0x63, 0x05, 0x00, 0xec, 0x0c, 0xc3, 0x0d, 0x11,
68+
0x63, 0x08, 0x00, 0x21, 0x01, 0x00, 0xee, 0x06,
69+
0xe2, 0x63, 0x08, 0x00, 0xf1, 0x11, 0x64, 0x03,
70+
0x00, 0x0e, 0x63, 0x04, 0x00, 0x63, 0x08, 0x00,
71+
0xa7, 0x6a, 0x2a, 0x01, 0x00, 0x00, 0x62, 0x09,
72+
0x00, 0xd3, 0x63, 0x04, 0x00, 0x48, 0xc4, 0x09,
73+
0x63, 0x06, 0x00, 0xec, 0x0a, 0x63, 0x09, 0x00,
74+
0x8c, 0x11, 0x64, 0x09, 0x00, 0x0e, 0xd4, 0xec,
75+
0x17, 0xd4, 0x43, 0xef, 0x00, 0x00, 0x00, 0xd5,
76+
0x63, 0x09, 0x00, 0x63, 0x04, 0x00, 0x24, 0x03,
77+
0x00, 0x8c, 0x11, 0x64, 0x09, 0x00, 0x0e, 0x5f,
78+
0x04, 0x00, 0x63, 0x03, 0x00, 0x63, 0x04, 0x00,
79+
0x92, 0x64, 0x04, 0x00, 0x0b, 0x63, 0x09, 0x00,
80+
0x4d, 0x41, 0x00, 0x00, 0x00, 0x0a, 0x4d, 0x3e,
81+
0x00, 0x00, 0x00, 0x0a, 0x4d, 0x3f, 0x00, 0x00,
82+
0x00, 0xf3, 0x0e, 0xee, 0x9e, 0x62, 0x0a, 0x00,
83+
0x63, 0x07, 0x00, 0x43, 0xef, 0x00, 0x00, 0x00,
84+
0xd3, 0x24, 0x01, 0x00, 0xc4, 0x0a, 0x63, 0x05,
85+
0x00, 0xec, 0x09, 0xc3, 0x0d, 0x11, 0x21, 0x00,
86+
0x00, 0xee, 0x03, 0xe2, 0xf0, 0x11, 0x64, 0x03,
87+
0x00, 0x0e, 0x6d, 0x8c, 0x00, 0x00, 0x00, 0x62,
88+
0x0c, 0x00, 0x62, 0x0b, 0x00, 0x06, 0x11, 0xf4,
89+
0xed, 0x13, 0x71, 0x43, 0x41, 0x00, 0x00, 0x00,
90+
0xc4, 0x0b, 0x43, 0x6a, 0x00, 0x00, 0x00, 0xc4,
91+
0x0c, 0x0e, 0xee, 0x10, 0x0e, 0x63, 0x0a, 0x00,
92+
0x43, 0x6b, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00,
93+
0x8c, 0xee, 0xe0, 0x63, 0x0c, 0x00, 0xed, 0x4e,
94+
0x63, 0x06, 0x00, 0xec, 0x0a, 0x63, 0x0b, 0x00,
95+
0x8c, 0x11, 0x64, 0x0b, 0x00, 0x0e, 0xd4, 0xec,
96+
0x17, 0xd4, 0x43, 0xef, 0x00, 0x00, 0x00, 0xd5,
97+
0x63, 0x0b, 0x00, 0x63, 0x04, 0x00, 0x24, 0x03,
98+
0x00, 0x8c, 0x11, 0x64, 0x0b, 0x00, 0x0e, 0x5f,
99+
0x04, 0x00, 0x63, 0x03, 0x00, 0x63, 0x04, 0x00,
100+
0x92, 0x64, 0x04, 0x00, 0x0b, 0x63, 0x0b, 0x00,
101+
0x4d, 0x41, 0x00, 0x00, 0x00, 0x0a, 0x4d, 0x3e,
102+
0x00, 0x00, 0x00, 0x0a, 0x4d, 0x3f, 0x00, 0x00,
103+
0x00, 0xf3, 0x0e, 0xee, 0x83, 0x0e, 0x06, 0x6e,
104+
0x0d, 0x00, 0x00, 0x00, 0x0e, 0xee, 0x1e, 0x6e,
105+
0x05, 0x00, 0x00, 0x00, 0x30, 0x63, 0x0a, 0x00,
106+
0x42, 0x06, 0x00, 0x00, 0x00, 0xec, 0x0d, 0x63,
107+
0x0a, 0x00, 0x43, 0x06, 0x00, 0x00, 0x00, 0x24,
108+
0x00, 0x00, 0x0e, 0x6f, 0x63, 0x03, 0x00, 0x63,
109+
0x04, 0x00, 0x44, 0x32, 0x00, 0x00, 0x00, 0x63,
110+
0x03, 0x00, 0x2f, 0xc1, 0x00, 0x28, 0xc1, 0x00,
111+
0xcf, 0x28,
112+
};
113+

0 commit comments

Comments
 (0)