Skip to content

Commit 97e6ef9

Browse files
authored
Simplify Array.fromAsync lazy loading (#982)
Store it as classic JS instead of an ES module that we need to pull apart first. Added benefit is that it shrinks the serialized representation by 5%.
1 parent 4362b73 commit 97e6ef9

File tree

4 files changed

+101
-112
lines changed

4 files changed

+101
-112
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ codegen: $(QJSC)
8080
$(QJSC) -e -o gen/hello.c examples/hello.js
8181
$(QJSC) -e -o gen/hello_module.c -m examples/hello_module.js
8282
$(QJSC) -e -o gen/test_fib.c -M examples/fib.so,fib -m examples/test_fib.js
83-
$(QJSC) -m -ss -o gen/builtin-array-fromasync.h builtin-array-fromasync.js
83+
$(QJSC) -C -ss -o gen/builtin-array-fromasync.h builtin-array-fromasync.js
8484

8585
debug:
8686
BUILD_TYPE=Debug $(MAKE)

builtin-array-fromasync.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
export function go(Array, TypeError, asyncIterator, defineProperty, iterator) {
1+
;(function(Array, TypeError, asyncIterator, defineProperty, iterator) {
2+
"use strict" // result.length=i should throw if .length is not writable
23
return async function fromAsync(arrayLike, mapFn=undefined, thisArg=undefined) {
34
if (mapFn !== undefined && typeof mapFn !== "function") throw new TypeError("not a function")
45
let result, i = 0, isConstructor = typeof this === "function"
@@ -32,4 +33,4 @@ export function go(Array, TypeError, asyncIterator, defineProperty, iterator) {
3233
result.length = i
3334
return result
3435
}
35-
}
36+
})

gen/builtin-array-fromasync.h

Lines changed: 92 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,10 @@
22

33
#include <inttypes.h>
44

5-
const uint32_t qjsc_builtin_array_fromasync_size = 875;
5+
const uint32_t qjsc_builtin_array_fromasync_size = 826;
66

7-
const uint8_t qjsc_builtin_array_fromasync[875] = {
8-
0x13, 0x0f, 0x01, 0x34, 0x62, 0x75, 0x69, 0x6c,
9-
0x74, 0x69, 0x6e, 0x2d, 0x61, 0x72, 0x72, 0x61,
10-
0x79, 0x2d, 0x66, 0x72, 0x6f, 0x6d, 0x61, 0x73,
11-
0x79, 0x6e, 0x63, 0x2e, 0x6a, 0x73, 0x01, 0x04,
12-
0x67, 0x6f, 0x01, 0x1a, 0x61, 0x73, 0x79, 0x6e,
7+
const uint8_t qjsc_builtin_array_fromasync[826] = {
8+
0x13, 0x0d, 0x01, 0x1a, 0x61, 0x73, 0x79, 0x6e,
139
0x63, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f,
1410
0x72, 0x01, 0x10, 0x69, 0x74, 0x65, 0x72, 0x61,
1511
0x74, 0x6f, 0x72, 0x01, 0x12, 0x61, 0x72, 0x72,
@@ -24,96 +20,94 @@ const uint8_t qjsc_builtin_array_fromasync[875] = {
2420
0x69, 0x74, 0x65, 0x72, 0x01, 0x1c, 0x6e, 0x6f,
2521
0x74, 0x20, 0x61, 0x20, 0x66, 0x75, 0x6e, 0x63,
2622
0x74, 0x69, 0x6f, 0x6e, 0x01, 0x08, 0x63, 0x61,
27-
0x6c, 0x6c, 0x0d, 0xc2, 0x03, 0x00, 0x01, 0x00,
28-
0x00, 0xc4, 0x03, 0x00, 0x00, 0x00, 0x0c, 0x20,
29-
0x02, 0x01, 0xa2, 0x01, 0x00, 0x00, 0x00, 0x01,
30-
0x01, 0x01, 0x09, 0x00, 0xc4, 0x03, 0x00, 0x01,
31-
0x0c, 0x43, 0x02, 0x01, 0xc4, 0x03, 0x05, 0x00,
32-
0x05, 0x01, 0x00, 0x01, 0x03, 0x05, 0xaa, 0x02,
33-
0x00, 0x01, 0x40, 0x9e, 0x03, 0x00, 0x01, 0x40,
34-
0xc6, 0x03, 0x00, 0x01, 0x40, 0xcc, 0x01, 0x00,
35-
0x01, 0x40, 0xc8, 0x03, 0x00, 0x01, 0x40, 0x0c,
36-
0x60, 0x02, 0x01, 0xf8, 0x01, 0x03, 0x0e, 0x01,
37-
0x06, 0x05, 0x00, 0x86, 0x04, 0x11, 0xca, 0x03,
38-
0x00, 0x01, 0x00, 0xcc, 0x03, 0x00, 0x01, 0x00,
39-
0xce, 0x03, 0x00, 0x01, 0x00, 0xca, 0x03, 0x01,
40-
0xff, 0xff, 0xff, 0xff, 0x0f, 0x20, 0xcc, 0x03,
41-
0x01, 0x01, 0x20, 0xce, 0x03, 0x01, 0x02, 0x20,
42-
0xd0, 0x03, 0x02, 0x00, 0x20, 0xd2, 0x03, 0x02,
43-
0x04, 0x20, 0xd4, 0x03, 0x02, 0x05, 0x20, 0xd6,
44-
0x03, 0x02, 0x06, 0x20, 0xd8, 0x03, 0x02, 0x07,
45-
0x20, 0x64, 0x06, 0x08, 0x20, 0x82, 0x01, 0x07,
46-
0x09, 0x20, 0xda, 0x03, 0x0a, 0x08, 0x30, 0x82,
47-
0x01, 0x0d, 0x0b, 0x20, 0xd4, 0x01, 0x0d, 0x0c,
48-
0x20, 0x10, 0x00, 0x01, 0x00, 0x9e, 0x03, 0x01,
49-
0x03, 0xc6, 0x03, 0x02, 0x03, 0xc8, 0x03, 0x04,
50-
0x03, 0xaa, 0x02, 0x00, 0x03, 0xcc, 0x01, 0x03,
51-
0x03, 0x08, 0xc3, 0x0d, 0x62, 0x02, 0x00, 0x62,
52-
0x01, 0x00, 0x62, 0x00, 0x00, 0xd2, 0xca, 0xd3,
53-
0x11, 0xf3, 0xeb, 0x08, 0x0e, 0x39, 0x46, 0x00,
54-
0x00, 0x00, 0xdb, 0xcb, 0xd4, 0x11, 0xf3, 0xeb,
55-
0x08, 0x0e, 0x39, 0x46, 0x00, 0x00, 0x00, 0xdc,
56-
0xcc, 0x62, 0x07, 0x00, 0x62, 0x06, 0x00, 0x62,
57-
0x05, 0x00, 0x62, 0x04, 0x00, 0x62, 0x03, 0x00,
58-
0xd3, 0x39, 0x46, 0x00, 0x00, 0x00, 0xb0, 0xeb,
59-
0x16, 0xd3, 0x98, 0x04, 0x1b, 0x00, 0x00, 0x00,
60-
0xb0, 0xeb, 0x0c, 0xde, 0x11, 0x04, 0xee, 0x00,
61-
0x00, 0x00, 0x21, 0x01, 0x00, 0x30, 0x06, 0xcd,
62-
0xb5, 0xc3, 0x04, 0xc2, 0x0d, 0xf6, 0xc3, 0x05,
63-
0x09, 0xc3, 0x06, 0xd2, 0xdf, 0x48, 0xc3, 0x07,
64-
0x63, 0x07, 0x00, 0x07, 0xad, 0xeb, 0x0f, 0x0a,
65-
0x11, 0x64, 0x06, 0x00, 0x0e, 0xd2, 0xe0, 0x48,
66-
0x11, 0x64, 0x07, 0x00, 0x0e, 0x63, 0x07, 0x00,
67-
0x07, 0xad, 0x6a, 0xa6, 0x00, 0x00, 0x00, 0x62,
68-
0x08, 0x00, 0x06, 0x11, 0xf3, 0xec, 0x0c, 0x71,
69-
0x43, 0x32, 0x00, 0x00, 0x00, 0xc3, 0x08, 0x0e,
70-
0xed, 0x05, 0x0e, 0xd2, 0xed, 0xf2, 0x63, 0x08,
71-
0x00, 0x8e, 0x11, 0xec, 0x03, 0x0e, 0xb5, 0x11,
72-
0x64, 0x08, 0x00, 0x0e, 0x63, 0x05, 0x00, 0xeb,
73-
0x0c, 0xc2, 0x0d, 0x11, 0x63, 0x08, 0x00, 0x21,
74-
0x01, 0x00, 0xed, 0x06, 0xe1, 0x63, 0x08, 0x00,
75-
0xf0, 0x11, 0x64, 0x03, 0x00, 0x0e, 0x63, 0x04,
76-
0x00, 0x63, 0x08, 0x00, 0xa7, 0x6a, 0x2a, 0x01,
77-
0x00, 0x00, 0x62, 0x09, 0x00, 0xd2, 0x63, 0x04,
78-
0x00, 0x48, 0xc3, 0x09, 0x63, 0x06, 0x00, 0xeb,
79-
0x0a, 0x63, 0x09, 0x00, 0x8c, 0x11, 0x64, 0x09,
80-
0x00, 0x0e, 0xd3, 0xeb, 0x17, 0xd3, 0x43, 0xef,
81-
0x00, 0x00, 0x00, 0xd4, 0x63, 0x09, 0x00, 0x63,
82-
0x04, 0x00, 0x24, 0x03, 0x00, 0x8c, 0x11, 0x64,
83-
0x09, 0x00, 0x0e, 0x5f, 0x04, 0x00, 0x63, 0x03,
84-
0x00, 0x63, 0x04, 0x00, 0x92, 0x64, 0x04, 0x00,
85-
0x0b, 0x63, 0x09, 0x00, 0x4d, 0x41, 0x00, 0x00,
86-
0x00, 0x0a, 0x4d, 0x3e, 0x00, 0x00, 0x00, 0x0a,
87-
0x4d, 0x3f, 0x00, 0x00, 0x00, 0xf2, 0x0e, 0xed,
88-
0x9e, 0x62, 0x0a, 0x00, 0x63, 0x07, 0x00, 0x43,
89-
0xef, 0x00, 0x00, 0x00, 0xd2, 0x24, 0x01, 0x00,
90-
0xc3, 0x0a, 0x63, 0x05, 0x00, 0xeb, 0x09, 0xc2,
91-
0x0d, 0x11, 0x21, 0x00, 0x00, 0xed, 0x03, 0xe1,
92-
0xef, 0x11, 0x64, 0x03, 0x00, 0x0e, 0x6d, 0x8c,
93-
0x00, 0x00, 0x00, 0x62, 0x0c, 0x00, 0x62, 0x0b,
94-
0x00, 0x06, 0x11, 0xf3, 0xec, 0x13, 0x71, 0x43,
95-
0x41, 0x00, 0x00, 0x00, 0xc3, 0x0b, 0x43, 0x6a,
96-
0x00, 0x00, 0x00, 0xc3, 0x0c, 0x0e, 0xed, 0x10,
97-
0x0e, 0x63, 0x0a, 0x00, 0x43, 0x6b, 0x00, 0x00,
98-
0x00, 0x24, 0x00, 0x00, 0x8c, 0xed, 0xe0, 0x63,
99-
0x0c, 0x00, 0xec, 0x4e, 0x63, 0x06, 0x00, 0xeb,
100-
0x0a, 0x63, 0x0b, 0x00, 0x8c, 0x11, 0x64, 0x0b,
101-
0x00, 0x0e, 0xd3, 0xeb, 0x17, 0xd3, 0x43, 0xef,
102-
0x00, 0x00, 0x00, 0xd4, 0x63, 0x0b, 0x00, 0x63,
103-
0x04, 0x00, 0x24, 0x03, 0x00, 0x8c, 0x11, 0x64,
104-
0x0b, 0x00, 0x0e, 0x5f, 0x04, 0x00, 0x63, 0x03,
105-
0x00, 0x63, 0x04, 0x00, 0x92, 0x64, 0x04, 0x00,
106-
0x0b, 0x63, 0x0b, 0x00, 0x4d, 0x41, 0x00, 0x00,
107-
0x00, 0x0a, 0x4d, 0x3e, 0x00, 0x00, 0x00, 0x0a,
108-
0x4d, 0x3f, 0x00, 0x00, 0x00, 0xf2, 0x0e, 0xed,
109-
0x83, 0x0e, 0x06, 0x6e, 0x0d, 0x00, 0x00, 0x00,
110-
0x0e, 0xed, 0x1e, 0x6e, 0x05, 0x00, 0x00, 0x00,
111-
0x30, 0x63, 0x0a, 0x00, 0x42, 0x06, 0x00, 0x00,
112-
0x00, 0xeb, 0x0d, 0x63, 0x0a, 0x00, 0x43, 0x06,
113-
0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x0e, 0x6f,
114-
0x63, 0x03, 0x00, 0x63, 0x04, 0x00, 0x44, 0x32,
115-
0x00, 0x00, 0x00, 0x63, 0x03, 0x00, 0x2f, 0xc0,
116-
0x00, 0x28, 0x08, 0xeb, 0x05, 0xc0, 0x00, 0xe2,
117-
0x29, 0x06, 0x2f,
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, 0x9e,
28+
0x03, 0x00, 0x01, 0x40, 0xc2, 0x03, 0x00, 0x01,
29+
0x40, 0xcc, 0x01, 0x00, 0x01, 0x40, 0xc4, 0x03,
30+
0x00, 0x01, 0x40, 0x0c, 0x60, 0x02, 0x01, 0xf8,
31+
0x01, 0x03, 0x0e, 0x01, 0x06, 0x05, 0x00, 0x86,
32+
0x04, 0x11, 0xc6, 0x03, 0x00, 0x01, 0x00, 0xc8,
33+
0x03, 0x00, 0x01, 0x00, 0xca, 0x03, 0x00, 0x01,
34+
0x00, 0xc6, 0x03, 0x01, 0xff, 0xff, 0xff, 0xff,
35+
0x0f, 0x20, 0xc8, 0x03, 0x01, 0x01, 0x20, 0xca,
36+
0x03, 0x01, 0x02, 0x20, 0xcc, 0x03, 0x02, 0x00,
37+
0x20, 0xce, 0x03, 0x02, 0x04, 0x20, 0xd0, 0x03,
38+
0x02, 0x05, 0x20, 0xd2, 0x03, 0x02, 0x06, 0x20,
39+
0xd4, 0x03, 0x02, 0x07, 0x20, 0x64, 0x06, 0x08,
40+
0x20, 0x82, 0x01, 0x07, 0x09, 0x20, 0xd6, 0x03,
41+
0x0a, 0x08, 0x30, 0x82, 0x01, 0x0d, 0x0b, 0x20,
42+
0xd4, 0x01, 0x0d, 0x0c, 0x20, 0x10, 0x00, 0x01,
43+
0x00, 0x9e, 0x03, 0x01, 0x03, 0xc2, 0x03, 0x02,
44+
0x03, 0xc4, 0x03, 0x04, 0x03, 0xaa, 0x02, 0x00,
45+
0x03, 0xcc, 0x01, 0x03, 0x03, 0x08, 0xc3, 0x0d,
46+
0x62, 0x02, 0x00, 0x62, 0x01, 0x00, 0x62, 0x00,
47+
0x00, 0xd2, 0xca, 0xd3, 0x11, 0xf3, 0xeb, 0x08,
48+
0x0e, 0x39, 0x46, 0x00, 0x00, 0x00, 0xdb, 0xcb,
49+
0xd4, 0x11, 0xf3, 0xeb, 0x08, 0x0e, 0x39, 0x46,
50+
0x00, 0x00, 0x00, 0xdc, 0xcc, 0x62, 0x07, 0x00,
51+
0x62, 0x06, 0x00, 0x62, 0x05, 0x00, 0x62, 0x04,
52+
0x00, 0x62, 0x03, 0x00, 0xd3, 0x39, 0x46, 0x00,
53+
0x00, 0x00, 0xb0, 0xeb, 0x16, 0xd3, 0x98, 0x04,
54+
0x1b, 0x00, 0x00, 0x00, 0xb0, 0xeb, 0x0c, 0xde,
55+
0x11, 0x04, 0xec, 0x00, 0x00, 0x00, 0x21, 0x01,
56+
0x00, 0x30, 0x06, 0xcd, 0xb5, 0xc3, 0x04, 0xc2,
57+
0x0d, 0xf6, 0xc3, 0x05, 0x09, 0xc3, 0x06, 0xd2,
58+
0xdf, 0x48, 0xc3, 0x07, 0x63, 0x07, 0x00, 0x07,
59+
0xad, 0xeb, 0x0f, 0x0a, 0x11, 0x64, 0x06, 0x00,
60+
0x0e, 0xd2, 0xe0, 0x48, 0x11, 0x64, 0x07, 0x00,
61+
0x0e, 0x63, 0x07, 0x00, 0x07, 0xad, 0x6a, 0xa6,
62+
0x00, 0x00, 0x00, 0x62, 0x08, 0x00, 0x06, 0x11,
63+
0xf3, 0xec, 0x0c, 0x71, 0x43, 0x32, 0x00, 0x00,
64+
0x00, 0xc3, 0x08, 0x0e, 0xed, 0x05, 0x0e, 0xd2,
65+
0xed, 0xf2, 0x63, 0x08, 0x00, 0x8e, 0x11, 0xec,
66+
0x03, 0x0e, 0xb5, 0x11, 0x64, 0x08, 0x00, 0x0e,
67+
0x63, 0x05, 0x00, 0xeb, 0x0c, 0xc2, 0x0d, 0x11,
68+
0x63, 0x08, 0x00, 0x21, 0x01, 0x00, 0xed, 0x06,
69+
0xe1, 0x63, 0x08, 0x00, 0xf0, 0x11, 0x64, 0x03,
70+
0x00, 0x0e, 0x63, 0x04, 0x00, 0x63, 0x08, 0x00,
71+
0xa7, 0x6a, 0x2a, 0x01, 0x00, 0x00, 0x62, 0x09,
72+
0x00, 0xd2, 0x63, 0x04, 0x00, 0x48, 0xc3, 0x09,
73+
0x63, 0x06, 0x00, 0xeb, 0x0a, 0x63, 0x09, 0x00,
74+
0x8c, 0x11, 0x64, 0x09, 0x00, 0x0e, 0xd3, 0xeb,
75+
0x17, 0xd3, 0x43, 0xed, 0x00, 0x00, 0x00, 0xd4,
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, 0xf2, 0x0e, 0xed, 0x9e, 0x62, 0x0a, 0x00,
83+
0x63, 0x07, 0x00, 0x43, 0xed, 0x00, 0x00, 0x00,
84+
0xd2, 0x24, 0x01, 0x00, 0xc3, 0x0a, 0x63, 0x05,
85+
0x00, 0xeb, 0x09, 0xc2, 0x0d, 0x11, 0x21, 0x00,
86+
0x00, 0xed, 0x03, 0xe1, 0xef, 0x11, 0x64, 0x03,
87+
0x00, 0x0e, 0x6d, 0x8c, 0x00, 0x00, 0x00, 0x62,
88+
0x0c, 0x00, 0x62, 0x0b, 0x00, 0x06, 0x11, 0xf3,
89+
0xec, 0x13, 0x71, 0x43, 0x41, 0x00, 0x00, 0x00,
90+
0xc3, 0x0b, 0x43, 0x6a, 0x00, 0x00, 0x00, 0xc3,
91+
0x0c, 0x0e, 0xed, 0x10, 0x0e, 0x63, 0x0a, 0x00,
92+
0x43, 0x6b, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00,
93+
0x8c, 0xed, 0xe0, 0x63, 0x0c, 0x00, 0xec, 0x4e,
94+
0x63, 0x06, 0x00, 0xeb, 0x0a, 0x63, 0x0b, 0x00,
95+
0x8c, 0x11, 0x64, 0x0b, 0x00, 0x0e, 0xd3, 0xeb,
96+
0x17, 0xd3, 0x43, 0xed, 0x00, 0x00, 0x00, 0xd4,
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, 0xf2, 0x0e, 0xed, 0x83, 0x0e, 0x06, 0x6e,
104+
0x0d, 0x00, 0x00, 0x00, 0x0e, 0xed, 0x1e, 0x6e,
105+
0x05, 0x00, 0x00, 0x00, 0x30, 0x63, 0x0a, 0x00,
106+
0x42, 0x06, 0x00, 0x00, 0x00, 0xeb, 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, 0xc0, 0x00, 0x28, 0xc0, 0x00,
111+
0xce, 0x28,
118112
};
119113

quickjs.c

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7409,16 +7409,10 @@ static JSValue js_bytecode_autoinit(JSContext *ctx, JSObject *p, JSAtom atom,
74097409
JS_READ_OBJ_BYTECODE);
74107410
if (JS_IsException(obj))
74117411
return JS_EXCEPTION;
7412-
JSValue mod = JS_EvalFunction(ctx, obj);
7413-
JS_FreeValue(ctx, obj);
7414-
if (JS_IsException(mod))
7412+
JSValue fun = JS_EvalFunction(ctx, obj);
7413+
if (JS_IsException(fun))
74157414
return JS_EXCEPTION;
7416-
assert(JS_IsModule(obj));
7417-
JSModuleDef *m = JS_VALUE_GET_PTR(obj);
7418-
assert(m->export_entries_count == 1);
7419-
JSExportEntry *e = &m->export_entries[0];
7420-
assert(e->export_type == JS_EXPORT_TYPE_LOCAL);
7421-
JSVarRef *v = e->u.local.var_ref;
7415+
assert(JS_IsFunction(ctx, fun));
74227416
JSValue args[] = {
74237417
JS_NewCFunction(ctx, js_array_constructor, "Array", 0),
74247418
JS_NewCFunctionMagic(ctx, js_error_constructor, "TypeError", 1,
@@ -7430,11 +7424,11 @@ static JSValue js_bytecode_autoinit(JSContext *ctx, JSObject *p, JSAtom atom,
74307424
JS_CFUNC_generic_magic, 0),
74317425
JS_AtomToValue(ctx, JS_ATOM_Symbol_iterator),
74327426
};
7433-
JSValue result = JS_Call(ctx, v->value, JS_UNDEFINED,
7427+
JSValue result = JS_Call(ctx, fun, JS_UNDEFINED,
74347428
countof(args), vc(args));
74357429
for (size_t i = 0; i < countof(args); i++)
74367430
JS_FreeValue(ctx, args[i]);
7437-
JS_FreeValue(ctx, mod);
7431+
JS_FreeValue(ctx, fun);
74387432
return result;
74397433
}
74407434
}

0 commit comments

Comments
 (0)