quickjs 0.9.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/quickjsrb/quickjs/cutils.c +2 -0
- data/ext/quickjsrb/quickjs/cutils.h +56 -0
- data/ext/quickjsrb/quickjs/dtoa.c +5 -11
- data/ext/quickjsrb/quickjs/libregexp-opcode.h +11 -1
- data/ext/quickjsrb/quickjs/libregexp.c +883 -132
- data/ext/quickjsrb/quickjs/libregexp.h +1 -0
- data/ext/quickjsrb/quickjs/libunicode-table.h +2211 -1619
- data/ext/quickjsrb/quickjs/libunicode.c +224 -11
- data/ext/quickjsrb/quickjs/libunicode.h +9 -5
- data/ext/quickjsrb/quickjs/qjs.c +48 -9
- data/ext/quickjsrb/quickjs/qjsc.c +216 -73
- data/ext/quickjsrb/quickjs/quickjs-atom.h +14 -0
- data/ext/quickjsrb/quickjs/quickjs-libc.c +460 -174
- data/ext/quickjsrb/quickjs/quickjs-libc.h +7 -1
- data/ext/quickjsrb/quickjs/quickjs-opcode.h +5 -4
- data/ext/quickjsrb/quickjs/quickjs.c +4503 -1614
- data/ext/quickjsrb/quickjs/quickjs.h +82 -15
- data/ext/quickjsrb/quickjs/run-test262.c +119 -33
- data/ext/quickjsrb/quickjs/unicode_gen.c +560 -6
- data/ext/quickjsrb/quickjs/unicode_gen_def.h +27 -0
- data/ext/quickjsrb/quickjsrb.c +1 -1
- data/lib/quickjs/version.rb +1 -1
- metadata +2 -2
@@ -44,10 +44,16 @@ void js_std_dump_error(JSContext *ctx);
|
|
44
44
|
uint8_t *js_load_file(JSContext *ctx, size_t *pbuf_len, const char *filename);
|
45
45
|
int js_module_set_import_meta(JSContext *ctx, JSValueConst func_val,
|
46
46
|
JS_BOOL use_realpath, JS_BOOL is_main);
|
47
|
+
int js_module_test_json(JSContext *ctx, JSValueConst attributes);
|
48
|
+
int js_module_check_attributes(JSContext *ctx, void *opaque, JSValueConst attributes);
|
47
49
|
JSModuleDef *js_module_loader(JSContext *ctx,
|
48
|
-
const char *module_name, void *opaque
|
50
|
+
const char *module_name, void *opaque,
|
51
|
+
JSValueConst attributes);
|
49
52
|
void js_std_eval_binary(JSContext *ctx, const uint8_t *buf, size_t buf_len,
|
50
53
|
int flags);
|
54
|
+
void js_std_eval_binary_json_module(JSContext *ctx,
|
55
|
+
const uint8_t *buf, size_t buf_len,
|
56
|
+
const char *module_name);
|
51
57
|
void js_std_promise_rejection_tracker(JSContext *ctx, JSValueConst promise,
|
52
58
|
JSValueConst reason,
|
53
59
|
JS_BOOL is_handled, void *opaque);
|
@@ -110,6 +110,7 @@ DEF( return, 1, 1, 0, none)
|
|
110
110
|
DEF( return_undef, 1, 0, 0, none)
|
111
111
|
DEF(check_ctor_return, 1, 1, 2, none)
|
112
112
|
DEF( check_ctor, 1, 0, 0, none)
|
113
|
+
DEF( init_ctor, 1, 0, 1, none)
|
113
114
|
DEF( check_brand, 1, 2, 2, none) /* this_obj func -> this_obj func */
|
114
115
|
DEF( add_brand, 1, 2, 0, none) /* this_obj home_obj -> */
|
115
116
|
DEF( return_async, 1, 1, 0, none)
|
@@ -120,7 +121,7 @@ DEF( apply_eval, 3, 2, 1, u16) /* func array -> ret_eval */
|
|
120
121
|
DEF( regexp, 1, 2, 1, none) /* create a RegExp object from the pattern and a
|
121
122
|
bytecode string */
|
122
123
|
DEF( get_super, 1, 1, 1, none)
|
123
|
-
DEF( import, 1,
|
124
|
+
DEF( import, 1, 2, 1, none) /* dynamic module import */
|
124
125
|
|
125
126
|
DEF( check_var, 5, 0, 1, atom) /* check if a variable exists */
|
126
127
|
DEF( get_var_undef, 5, 0, 1, atom) /* push undefined if the variable does not exist */
|
@@ -143,6 +144,7 @@ DEF( put_private_field, 1, 3, 0, none) /* obj value prop -> */
|
|
143
144
|
DEF(define_private_field, 1, 3, 1, none) /* obj prop value -> obj */
|
144
145
|
DEF( get_array_el, 1, 2, 1, none)
|
145
146
|
DEF( get_array_el2, 1, 2, 2, none) /* obj prop -> obj value */
|
147
|
+
DEF( get_array_el3, 1, 2, 3, none) /* obj prop -> obj prop1 value */
|
146
148
|
DEF( put_array_el, 1, 3, 0, none)
|
147
149
|
DEF(get_super_value, 1, 3, 1, none) /* this obj prop -> value */
|
148
150
|
DEF(put_super_value, 1, 4, 0, none) /* this obj prop value -> */
|
@@ -188,14 +190,12 @@ DEF( nip_catch, 1, 2, 1, none) /* catch ... a -> a */
|
|
188
190
|
DEF( to_object, 1, 1, 1, none)
|
189
191
|
//DEF( to_string, 1, 1, 1, none)
|
190
192
|
DEF( to_propkey, 1, 1, 1, none)
|
191
|
-
DEF( to_propkey2, 1, 2, 2, none)
|
192
193
|
|
193
194
|
DEF( with_get_var, 10, 1, 0, atom_label_u8) /* must be in the same order as scope_xxx */
|
194
195
|
DEF( with_put_var, 10, 2, 1, atom_label_u8) /* must be in the same order as scope_xxx */
|
195
196
|
DEF(with_delete_var, 10, 1, 0, atom_label_u8) /* must be in the same order as scope_xxx */
|
196
197
|
DEF( with_make_ref, 10, 1, 0, atom_label_u8) /* must be in the same order as scope_xxx */
|
197
198
|
DEF( with_get_ref, 10, 1, 0, atom_label_u8) /* must be in the same order as scope_xxx */
|
198
|
-
DEF(with_get_ref_undef, 10, 1, 0, atom_label_u8)
|
199
199
|
|
200
200
|
DEF( make_loc_ref, 7, 0, 2, atom_u16)
|
201
201
|
DEF( make_arg_ref, 7, 0, 2, atom_u16)
|
@@ -207,8 +207,9 @@ DEF( for_of_start, 1, 1, 3, none)
|
|
207
207
|
DEF(for_await_of_start, 1, 1, 3, none)
|
208
208
|
DEF( for_in_next, 1, 1, 3, none)
|
209
209
|
DEF( for_of_next, 2, 3, 5, u8)
|
210
|
+
DEF(for_await_of_next, 1, 3, 4, none) /* iter next catch_offset -> iter next catch_offset obj */
|
210
211
|
DEF(iterator_check_object, 1, 1, 1, none)
|
211
|
-
DEF(iterator_get_value_done, 1,
|
212
|
+
DEF(iterator_get_value_done, 1, 2, 3, none) /* catch_offset obj -> catch_offset value done */
|
212
213
|
DEF( iterator_close, 1, 3, 0, none)
|
213
214
|
DEF( iterator_next, 1, 4, 4, none)
|
214
215
|
DEF( iterator_call, 2, 4, 5, u8)
|