@mentra/crust 3.3.0-dev.656 → 3.3.0-dev.659

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.
Files changed (56) hide show
  1. package/README.md +7 -0
  2. package/android/build.gradle +15 -40
  3. package/android/src/main/java/com/mentra/crust/jsc/JSCRuntime.kt +13 -4
  4. package/android/src/test/java/com/mentra/crust/jsc/QuickJsLifecycleTest.kt +87 -0
  5. package/package.json +2 -2
  6. package/plugin/build/index.d.ts +2 -0
  7. package/plugin/build/index.js +2 -0
  8. package/plugin/build/withAndroid.js +39 -0
  9. package/android/quickjs-consumer-rules.pro +0 -6
  10. package/android/scripts/test-quickjs-lifecycle.py +0 -45
  11. package/android/src/main/cpp/quickjs/CMakeLists.txt +0 -20
  12. package/android/src/main/cpp/quickjs/LICENSE.quickjs-kt.txt +0 -201
  13. package/android/src/main/cpp/quickjs/README.md +0 -30
  14. package/android/src/main/cpp/quickjs/c-vector/LICENSE +0 -21
  15. package/android/src/main/cpp/quickjs/c-vector/cvector.h +0 -479
  16. package/android/src/main/cpp/quickjs/common/quickjs_version.c +0 -9
  17. package/android/src/main/cpp/quickjs/common/quickjs_version.h +0 -9
  18. package/android/src/main/cpp/quickjs/engine/LICENSE +0 -22
  19. package/android/src/main/cpp/quickjs/engine/VERSION +0 -1
  20. package/android/src/main/cpp/quickjs/engine/cutils.c +0 -631
  21. package/android/src/main/cpp/quickjs/engine/cutils.h +0 -347
  22. package/android/src/main/cpp/quickjs/engine/libbf.c +0 -8475
  23. package/android/src/main/cpp/quickjs/engine/libbf.h +0 -535
  24. package/android/src/main/cpp/quickjs/engine/libregexp-opcode.h +0 -57
  25. package/android/src/main/cpp/quickjs/engine/libregexp.c +0 -2501
  26. package/android/src/main/cpp/quickjs/engine/libregexp.h +0 -55
  27. package/android/src/main/cpp/quickjs/engine/libunicode-table.h +0 -4557
  28. package/android/src/main/cpp/quickjs/engine/libunicode.c +0 -1910
  29. package/android/src/main/cpp/quickjs/engine/libunicode.h +0 -182
  30. package/android/src/main/cpp/quickjs/engine/list.h +0 -99
  31. package/android/src/main/cpp/quickjs/engine/quickjs-atom.h +0 -273
  32. package/android/src/main/cpp/quickjs/engine/quickjs-opcode.h +0 -372
  33. package/android/src/main/cpp/quickjs/engine/quickjs.c +0 -55978
  34. package/android/src/main/cpp/quickjs/engine/quickjs.h +0 -1087
  35. package/android/src/main/cpp/quickjs/jni/binding_bridge.c +0 -488
  36. package/android/src/main/cpp/quickjs/jni/binding_bridge.h +0 -32
  37. package/android/src/main/cpp/quickjs/jni/exception_util.c +0 -64
  38. package/android/src/main/cpp/quickjs/jni/exception_util.h +0 -21
  39. package/android/src/main/cpp/quickjs/jni/jni_globals.c +0 -59
  40. package/android/src/main/cpp/quickjs/jni/jni_globals.h +0 -12
  41. package/android/src/main/cpp/quickjs/jni/jni_globals_generated.c +0 -855
  42. package/android/src/main/cpp/quickjs/jni/jni_globals_generated.h +0 -171
  43. package/android/src/main/cpp/quickjs/jni/js_value_util.c +0 -213
  44. package/android/src/main/cpp/quickjs/jni/js_value_util.h +0 -71
  45. package/android/src/main/cpp/quickjs/jni/log_util.h +0 -15
  46. package/android/src/main/cpp/quickjs/jni/mapping/jni_types_util.c +0 -27
  47. package/android/src/main/cpp/quickjs/jni/mapping/jni_types_util.h +0 -15
  48. package/android/src/main/cpp/quickjs/jni/mapping/jobject_to_js_value.c +0 -620
  49. package/android/src/main/cpp/quickjs/jni/mapping/jobject_to_js_value.h +0 -13
  50. package/android/src/main/cpp/quickjs/jni/mapping/js_value_to_jobject.c +0 -421
  51. package/android/src/main/cpp/quickjs/jni/mapping/js_value_to_jobject.h +0 -12
  52. package/android/src/main/cpp/quickjs/jni/promise_rejection_handler.c +0 -20
  53. package/android/src/main/cpp/quickjs/jni/promise_rejection_handler.h +0 -10
  54. package/android/src/main/cpp/quickjs/jni/quickjs_jni.c +0 -735
  55. package/android/src/main/cpp/quickjs/jni/quickjs_jni.h +0 -40
  56. package/android/src/testNative/QuickJsLifecycleTest.kt +0 -56
@@ -1,855 +0,0 @@
1
- /// Generated source file
2
- #include "jni_globals_generated.h"
3
-
4
- // Cached classes
5
- static jclass _cls_ubyte_array = NULL;
6
- static jclass _cls_short = NULL;
7
- static jclass _cls_byte = NULL;
8
- static jclass _cls_integer = NULL;
9
- static jclass _cls_long = NULL;
10
- static jclass _cls_float = NULL;
11
- static jclass _cls_double = NULL;
12
- static jclass _cls_boolean = NULL;
13
- static jclass _cls_string = NULL;
14
- static jclass _cls_object = NULL;
15
- static jclass _cls_system = NULL;
16
- static jclass _cls_class = NULL;
17
- static jclass _cls_throwable = NULL;
18
- static jclass _cls_set = NULL;
19
- static jclass _cls_iterator = NULL;
20
- static jclass _cls_list = NULL;
21
- static jclass _cls_array_list = NULL;
22
- static jclass _cls_map = NULL;
23
- static jclass _cls_map_entry = NULL;
24
- static jclass _cls_hash_set = NULL;
25
- static jclass _cls_linked_hash_map = NULL;
26
- static jclass _cls_linked_hash_set = NULL;
27
- static jclass _cls_quick_js_exception = NULL;
28
- static jclass _cls_quick_js = NULL;
29
- static jclass _cls_memory_usage = NULL;
30
- static jclass _cls_js_property = NULL;
31
- static jclass _cls_js_function = NULL;
32
- static jclass _cls_js_object = NULL;
33
-
34
- // Cached methods
35
- static jmethodID _method_ubyte_array_init = NULL;
36
- static jmethodID _method_short_short_value = NULL;
37
- static jmethodID _method_byte_byte_value = NULL;
38
- static jmethodID _method_integer_value_of = NULL;
39
- static jmethodID _method_integer_int_value = NULL;
40
- static jmethodID _method_long_value_of = NULL;
41
- static jmethodID _method_long_long_value = NULL;
42
- static jmethodID _method_float_float_value = NULL;
43
- static jmethodID _method_double_value_of = NULL;
44
- static jmethodID _method_double_double_value = NULL;
45
- static jmethodID _method_boolean_value_of = NULL;
46
- static jmethodID _method_boolean_boolean_value = NULL;
47
- static jmethodID _method_object_to_string = NULL;
48
- static jmethodID _method_system_identity_hash_code = NULL;
49
- static jmethodID _method_class_get_name = NULL;
50
- static jmethodID _method_class_is_array = NULL;
51
- static jmethodID _method_throwable_get_message = NULL;
52
- static jmethodID _method_throwable_get_stack_trace = NULL;
53
- static jmethodID _method_set_iterator = NULL;
54
- static jmethodID _method_set_add = NULL;
55
- static jmethodID _method_set_contains = NULL;
56
- static jmethodID _method_set_is_empty = NULL;
57
- static jmethodID _method_iterator_has_next = NULL;
58
- static jmethodID _method_iterator_next = NULL;
59
- static jmethodID _method_list_size = NULL;
60
- static jmethodID _method_list_get = NULL;
61
- static jmethodID _method_list_add = NULL;
62
- static jmethodID _method_array_list_init = NULL;
63
- static jmethodID _method_array_list_init_with_capacity = NULL;
64
- static jmethodID _method_map_entry_set = NULL;
65
- static jmethodID _method_map_entry_get_key = NULL;
66
- static jmethodID _method_map_entry_get_value = NULL;
67
- static jmethodID _method_hash_set_init = NULL;
68
- static jmethodID _method_linked_hash_map_init = NULL;
69
- static jmethodID _method_linked_hash_map_put = NULL;
70
- static jmethodID _method_linked_hash_set_init = NULL;
71
- static jmethodID _method_linked_hash_set_add = NULL;
72
- static jmethodID _method_quick_js_exception_init = NULL;
73
- static jmethodID _method_quick_js_on_call_getter = NULL;
74
- static jmethodID _method_quick_js_on_call_setter = NULL;
75
- static jmethodID _method_quick_js_on_call_function = NULL;
76
- static jmethodID _method_quick_js_set_eval_exception = NULL;
77
- static jmethodID _method_quick_js_set_unhandled_promise_rejection = NULL;
78
- static jmethodID _method_memory_usage_init = NULL;
79
- static jmethodID _method_js_object_init = NULL;
80
-
81
- // Cached fields
82
- static jfieldID _field_ubyte_array_storage = NULL;
83
- static jfieldID _field_double_na_n = NULL;
84
- static jfieldID _field_js_property_name = NULL;
85
- static jfieldID _field_js_property_configurable = NULL;
86
- static jfieldID _field_js_property_writable = NULL;
87
- static jfieldID _field_js_property_enumerable = NULL;
88
- static jfieldID _field_js_function_name = NULL;
89
- static jfieldID _field_js_function_is_async = NULL;
90
-
91
- jclass cls_ubyte_array(JNIEnv *env) {
92
- if (_cls_ubyte_array == NULL) {
93
- jclass cls = (*env)->FindClass(env, "kotlin/UByteArray");
94
- _cls_ubyte_array = (*env)->NewGlobalRef(env, cls);
95
- }
96
- return _cls_ubyte_array;
97
- }
98
-
99
- jclass cls_short(JNIEnv *env) {
100
- if (_cls_short == NULL) {
101
- jclass cls = (*env)->FindClass(env, "java/lang/Short");
102
- _cls_short = (*env)->NewGlobalRef(env, cls);
103
- }
104
- return _cls_short;
105
- }
106
-
107
- jclass cls_byte(JNIEnv *env) {
108
- if (_cls_byte == NULL) {
109
- jclass cls = (*env)->FindClass(env, "java/lang/Byte");
110
- _cls_byte = (*env)->NewGlobalRef(env, cls);
111
- }
112
- return _cls_byte;
113
- }
114
-
115
- jclass cls_integer(JNIEnv *env) {
116
- if (_cls_integer == NULL) {
117
- jclass cls = (*env)->FindClass(env, "java/lang/Integer");
118
- _cls_integer = (*env)->NewGlobalRef(env, cls);
119
- }
120
- return _cls_integer;
121
- }
122
-
123
- jclass cls_long(JNIEnv *env) {
124
- if (_cls_long == NULL) {
125
- jclass cls = (*env)->FindClass(env, "java/lang/Long");
126
- _cls_long = (*env)->NewGlobalRef(env, cls);
127
- }
128
- return _cls_long;
129
- }
130
-
131
- jclass cls_float(JNIEnv *env) {
132
- if (_cls_float == NULL) {
133
- jclass cls = (*env)->FindClass(env, "java/lang/Float");
134
- _cls_float = (*env)->NewGlobalRef(env, cls);
135
- }
136
- return _cls_float;
137
- }
138
-
139
- jclass cls_double(JNIEnv *env) {
140
- if (_cls_double == NULL) {
141
- jclass cls = (*env)->FindClass(env, "java/lang/Double");
142
- _cls_double = (*env)->NewGlobalRef(env, cls);
143
- }
144
- return _cls_double;
145
- }
146
-
147
- jclass cls_boolean(JNIEnv *env) {
148
- if (_cls_boolean == NULL) {
149
- jclass cls = (*env)->FindClass(env, "java/lang/Boolean");
150
- _cls_boolean = (*env)->NewGlobalRef(env, cls);
151
- }
152
- return _cls_boolean;
153
- }
154
-
155
- jclass cls_string(JNIEnv *env) {
156
- if (_cls_string == NULL) {
157
- jclass cls = (*env)->FindClass(env, "java/lang/String");
158
- _cls_string = (*env)->NewGlobalRef(env, cls);
159
- }
160
- return _cls_string;
161
- }
162
-
163
- jclass cls_object(JNIEnv *env) {
164
- if (_cls_object == NULL) {
165
- jclass cls = (*env)->FindClass(env, "java/lang/Object");
166
- _cls_object = (*env)->NewGlobalRef(env, cls);
167
- }
168
- return _cls_object;
169
- }
170
-
171
- jclass cls_system(JNIEnv *env) {
172
- if (_cls_system == NULL) {
173
- jclass cls = (*env)->FindClass(env, "java/lang/System");
174
- _cls_system = (*env)->NewGlobalRef(env, cls);
175
- }
176
- return _cls_system;
177
- }
178
-
179
- jclass cls_class(JNIEnv *env) {
180
- if (_cls_class == NULL) {
181
- jclass cls = (*env)->FindClass(env, "java/lang/Class");
182
- _cls_class = (*env)->NewGlobalRef(env, cls);
183
- }
184
- return _cls_class;
185
- }
186
-
187
- jclass cls_throwable(JNIEnv *env) {
188
- if (_cls_throwable == NULL) {
189
- jclass cls = (*env)->FindClass(env, "java/lang/Throwable");
190
- _cls_throwable = (*env)->NewGlobalRef(env, cls);
191
- }
192
- return _cls_throwable;
193
- }
194
-
195
- jclass cls_set(JNIEnv *env) {
196
- if (_cls_set == NULL) {
197
- jclass cls = (*env)->FindClass(env, "java/util/Set");
198
- _cls_set = (*env)->NewGlobalRef(env, cls);
199
- }
200
- return _cls_set;
201
- }
202
-
203
- jclass cls_iterator(JNIEnv *env) {
204
- if (_cls_iterator == NULL) {
205
- jclass cls = (*env)->FindClass(env, "java/util/Iterator");
206
- _cls_iterator = (*env)->NewGlobalRef(env, cls);
207
- }
208
- return _cls_iterator;
209
- }
210
-
211
- jclass cls_list(JNIEnv *env) {
212
- if (_cls_list == NULL) {
213
- jclass cls = (*env)->FindClass(env, "java/util/List");
214
- _cls_list = (*env)->NewGlobalRef(env, cls);
215
- }
216
- return _cls_list;
217
- }
218
-
219
- jclass cls_array_list(JNIEnv *env) {
220
- if (_cls_array_list == NULL) {
221
- jclass cls = (*env)->FindClass(env, "java/util/ArrayList");
222
- _cls_array_list = (*env)->NewGlobalRef(env, cls);
223
- }
224
- return _cls_array_list;
225
- }
226
-
227
- jclass cls_map(JNIEnv *env) {
228
- if (_cls_map == NULL) {
229
- jclass cls = (*env)->FindClass(env, "java/util/Map");
230
- _cls_map = (*env)->NewGlobalRef(env, cls);
231
- }
232
- return _cls_map;
233
- }
234
-
235
- jclass cls_map_entry(JNIEnv *env) {
236
- if (_cls_map_entry == NULL) {
237
- jclass cls = (*env)->FindClass(env, "java/util/Map$Entry");
238
- _cls_map_entry = (*env)->NewGlobalRef(env, cls);
239
- }
240
- return _cls_map_entry;
241
- }
242
-
243
- jclass cls_hash_set(JNIEnv *env) {
244
- if (_cls_hash_set == NULL) {
245
- jclass cls = (*env)->FindClass(env, "java/util/HashSet");
246
- _cls_hash_set = (*env)->NewGlobalRef(env, cls);
247
- }
248
- return _cls_hash_set;
249
- }
250
-
251
- jclass cls_linked_hash_map(JNIEnv *env) {
252
- if (_cls_linked_hash_map == NULL) {
253
- jclass cls = (*env)->FindClass(env, "java/util/LinkedHashMap");
254
- _cls_linked_hash_map = (*env)->NewGlobalRef(env, cls);
255
- }
256
- return _cls_linked_hash_map;
257
- }
258
-
259
- jclass cls_linked_hash_set(JNIEnv *env) {
260
- if (_cls_linked_hash_set == NULL) {
261
- jclass cls = (*env)->FindClass(env, "java/util/LinkedHashSet");
262
- _cls_linked_hash_set = (*env)->NewGlobalRef(env, cls);
263
- }
264
- return _cls_linked_hash_set;
265
- }
266
-
267
- jclass cls_quick_js_exception(JNIEnv *env) {
268
- if (_cls_quick_js_exception == NULL) {
269
- jclass cls = (*env)->FindClass(env, "com/dokar/quickjs/QuickJsException");
270
- _cls_quick_js_exception = (*env)->NewGlobalRef(env, cls);
271
- }
272
- return _cls_quick_js_exception;
273
- }
274
-
275
- jclass cls_quick_js(JNIEnv *env) {
276
- if (_cls_quick_js == NULL) {
277
- jclass cls = (*env)->FindClass(env, "com/dokar/quickjs/QuickJs");
278
- _cls_quick_js = (*env)->NewGlobalRef(env, cls);
279
- }
280
- return _cls_quick_js;
281
- }
282
-
283
- jclass cls_memory_usage(JNIEnv *env) {
284
- if (_cls_memory_usage == NULL) {
285
- jclass cls = (*env)->FindClass(env, "com/dokar/quickjs/MemoryUsage");
286
- _cls_memory_usage = (*env)->NewGlobalRef(env, cls);
287
- }
288
- return _cls_memory_usage;
289
- }
290
-
291
- jclass cls_js_property(JNIEnv *env) {
292
- if (_cls_js_property == NULL) {
293
- jclass cls = (*env)->FindClass(env, "com/dokar/quickjs/binding/JsProperty");
294
- _cls_js_property = (*env)->NewGlobalRef(env, cls);
295
- }
296
- return _cls_js_property;
297
- }
298
-
299
- jclass cls_js_function(JNIEnv *env) {
300
- if (_cls_js_function == NULL) {
301
- jclass cls = (*env)->FindClass(env, "com/dokar/quickjs/binding/JsFunction");
302
- _cls_js_function = (*env)->NewGlobalRef(env, cls);
303
- }
304
- return _cls_js_function;
305
- }
306
-
307
- jclass cls_js_object(JNIEnv *env) {
308
- if (_cls_js_object == NULL) {
309
- jclass cls = (*env)->FindClass(env, "com/dokar/quickjs/binding/JsObject");
310
- _cls_js_object = (*env)->NewGlobalRef(env, cls);
311
- }
312
- return _cls_js_object;
313
- }
314
-
315
- jmethodID method_ubyte_array_init(JNIEnv *env) {
316
- if (_method_ubyte_array_init == NULL) {
317
- _method_ubyte_array_init = (*env)->GetMethodID(env, cls_ubyte_array(env), "<init>", "([B)V");
318
- }
319
- return _method_ubyte_array_init;
320
- }
321
-
322
- jmethodID method_short_short_value(JNIEnv *env) {
323
- if (_method_short_short_value == NULL) {
324
- _method_short_short_value = (*env)->GetMethodID(env, cls_short(env), "shortValue", "()S");
325
- }
326
- return _method_short_short_value;
327
- }
328
-
329
- jmethodID method_byte_byte_value(JNIEnv *env) {
330
- if (_method_byte_byte_value == NULL) {
331
- _method_byte_byte_value = (*env)->GetMethodID(env, cls_byte(env), "byteValue", "()B");
332
- }
333
- return _method_byte_byte_value;
334
- }
335
-
336
- jmethodID method_integer_value_of(JNIEnv *env) {
337
- if (_method_integer_value_of == NULL) {
338
- _method_integer_value_of = (*env)->GetStaticMethodID(env, cls_integer(env), "valueOf", "(I)Ljava/lang/Integer;");
339
- }
340
- return _method_integer_value_of;
341
- }
342
-
343
- jmethodID method_integer_int_value(JNIEnv *env) {
344
- if (_method_integer_int_value == NULL) {
345
- _method_integer_int_value = (*env)->GetMethodID(env, cls_integer(env), "intValue", "()I");
346
- }
347
- return _method_integer_int_value;
348
- }
349
-
350
- jmethodID method_long_value_of(JNIEnv *env) {
351
- if (_method_long_value_of == NULL) {
352
- _method_long_value_of = (*env)->GetStaticMethodID(env, cls_long(env), "valueOf", "(J)Ljava/lang/Long;");
353
- }
354
- return _method_long_value_of;
355
- }
356
-
357
- jmethodID method_long_long_value(JNIEnv *env) {
358
- if (_method_long_long_value == NULL) {
359
- _method_long_long_value = (*env)->GetMethodID(env, cls_long(env), "longValue", "()J");
360
- }
361
- return _method_long_long_value;
362
- }
363
-
364
- jmethodID method_float_float_value(JNIEnv *env) {
365
- if (_method_float_float_value == NULL) {
366
- _method_float_float_value = (*env)->GetMethodID(env, cls_float(env), "floatValue", "()F");
367
- }
368
- return _method_float_float_value;
369
- }
370
-
371
- jmethodID method_double_value_of(JNIEnv *env) {
372
- if (_method_double_value_of == NULL) {
373
- _method_double_value_of = (*env)->GetStaticMethodID(env, cls_double(env), "valueOf", "(D)Ljava/lang/Double;");
374
- }
375
- return _method_double_value_of;
376
- }
377
-
378
- jmethodID method_double_double_value(JNIEnv *env) {
379
- if (_method_double_double_value == NULL) {
380
- _method_double_double_value = (*env)->GetMethodID(env, cls_double(env), "doubleValue", "()D");
381
- }
382
- return _method_double_double_value;
383
- }
384
-
385
- jmethodID method_boolean_value_of(JNIEnv *env) {
386
- if (_method_boolean_value_of == NULL) {
387
- _method_boolean_value_of = (*env)->GetStaticMethodID(env, cls_boolean(env), "valueOf", "(Z)Ljava/lang/Boolean;");
388
- }
389
- return _method_boolean_value_of;
390
- }
391
-
392
- jmethodID method_boolean_boolean_value(JNIEnv *env) {
393
- if (_method_boolean_boolean_value == NULL) {
394
- _method_boolean_boolean_value = (*env)->GetMethodID(env, cls_boolean(env), "booleanValue", "()Z");
395
- }
396
- return _method_boolean_boolean_value;
397
- }
398
-
399
- jmethodID method_object_to_string(JNIEnv *env) {
400
- if (_method_object_to_string == NULL) {
401
- _method_object_to_string = (*env)->GetMethodID(env, cls_object(env), "toString", "()Ljava/lang/String;");
402
- }
403
- return _method_object_to_string;
404
- }
405
-
406
- jmethodID method_system_identity_hash_code(JNIEnv *env) {
407
- if (_method_system_identity_hash_code == NULL) {
408
- _method_system_identity_hash_code = (*env)->GetStaticMethodID(env, cls_system(env), "identityHashCode", "(Ljava/lang/Object;)I");
409
- }
410
- return _method_system_identity_hash_code;
411
- }
412
-
413
- jmethodID method_class_get_name(JNIEnv *env) {
414
- if (_method_class_get_name == NULL) {
415
- _method_class_get_name = (*env)->GetMethodID(env, cls_class(env), "getName", "()Ljava/lang/String;");
416
- }
417
- return _method_class_get_name;
418
- }
419
-
420
- jmethodID method_class_is_array(JNIEnv *env) {
421
- if (_method_class_is_array == NULL) {
422
- _method_class_is_array = (*env)->GetMethodID(env, cls_class(env), "isArray", "()Z");
423
- }
424
- return _method_class_is_array;
425
- }
426
-
427
- jmethodID method_throwable_get_message(JNIEnv *env) {
428
- if (_method_throwable_get_message == NULL) {
429
- _method_throwable_get_message = (*env)->GetMethodID(env, cls_throwable(env), "getMessage", "()Ljava/lang/String;");
430
- }
431
- return _method_throwable_get_message;
432
- }
433
-
434
- jmethodID method_throwable_get_stack_trace(JNIEnv *env) {
435
- if (_method_throwable_get_stack_trace == NULL) {
436
- _method_throwable_get_stack_trace = (*env)->GetMethodID(env, cls_throwable(env), "getStackTrace", "()[Ljava/lang/StackTraceElement;");
437
- }
438
- return _method_throwable_get_stack_trace;
439
- }
440
-
441
- jmethodID method_set_iterator(JNIEnv *env) {
442
- if (_method_set_iterator == NULL) {
443
- _method_set_iterator = (*env)->GetMethodID(env, cls_set(env), "iterator", "()Ljava/util/Iterator;");
444
- }
445
- return _method_set_iterator;
446
- }
447
-
448
- jmethodID method_set_add(JNIEnv *env) {
449
- if (_method_set_add == NULL) {
450
- _method_set_add = (*env)->GetMethodID(env, cls_set(env), "add", "(Ljava/lang/Object;)Z");
451
- }
452
- return _method_set_add;
453
- }
454
-
455
- jmethodID method_set_contains(JNIEnv *env) {
456
- if (_method_set_contains == NULL) {
457
- _method_set_contains = (*env)->GetMethodID(env, cls_set(env), "contains", "(Ljava/lang/Object;)Z");
458
- }
459
- return _method_set_contains;
460
- }
461
-
462
- jmethodID method_set_is_empty(JNIEnv *env) {
463
- if (_method_set_is_empty == NULL) {
464
- _method_set_is_empty = (*env)->GetMethodID(env, cls_set(env), "isEmpty", "()Z");
465
- }
466
- return _method_set_is_empty;
467
- }
468
-
469
- jmethodID method_iterator_has_next(JNIEnv *env) {
470
- if (_method_iterator_has_next == NULL) {
471
- _method_iterator_has_next = (*env)->GetMethodID(env, cls_iterator(env), "hasNext", "()Z");
472
- }
473
- return _method_iterator_has_next;
474
- }
475
-
476
- jmethodID method_iterator_next(JNIEnv *env) {
477
- if (_method_iterator_next == NULL) {
478
- _method_iterator_next = (*env)->GetMethodID(env, cls_iterator(env), "next", "()Ljava/lang/Object;");
479
- }
480
- return _method_iterator_next;
481
- }
482
-
483
- jmethodID method_list_size(JNIEnv *env) {
484
- if (_method_list_size == NULL) {
485
- _method_list_size = (*env)->GetMethodID(env, cls_list(env), "size", "()I");
486
- }
487
- return _method_list_size;
488
- }
489
-
490
- jmethodID method_list_get(JNIEnv *env) {
491
- if (_method_list_get == NULL) {
492
- _method_list_get = (*env)->GetMethodID(env, cls_list(env), "get", "(I)Ljava/lang/Object;");
493
- }
494
- return _method_list_get;
495
- }
496
-
497
- jmethodID method_list_add(JNIEnv *env) {
498
- if (_method_list_add == NULL) {
499
- _method_list_add = (*env)->GetMethodID(env, cls_list(env), "add", "(Ljava/lang/Object;)Z");
500
- }
501
- return _method_list_add;
502
- }
503
-
504
- jmethodID method_array_list_init(JNIEnv *env) {
505
- if (_method_array_list_init == NULL) {
506
- _method_array_list_init = (*env)->GetMethodID(env, cls_array_list(env), "<init>", "()V");
507
- }
508
- return _method_array_list_init;
509
- }
510
-
511
- jmethodID method_array_list_init_with_capacity(JNIEnv *env) {
512
- if (_method_array_list_init_with_capacity == NULL) {
513
- _method_array_list_init_with_capacity = (*env)->GetMethodID(env, cls_array_list(env), "<init>", "(I)V");
514
- }
515
- return _method_array_list_init_with_capacity;
516
- }
517
-
518
- jmethodID method_map_entry_set(JNIEnv *env) {
519
- if (_method_map_entry_set == NULL) {
520
- _method_map_entry_set = (*env)->GetMethodID(env, cls_map(env), "entrySet", "()Ljava/util/Set;");
521
- }
522
- return _method_map_entry_set;
523
- }
524
-
525
- jmethodID method_map_entry_get_key(JNIEnv *env) {
526
- if (_method_map_entry_get_key == NULL) {
527
- _method_map_entry_get_key = (*env)->GetMethodID(env, cls_map_entry(env), "getKey", "()Ljava/lang/Object;");
528
- }
529
- return _method_map_entry_get_key;
530
- }
531
-
532
- jmethodID method_map_entry_get_value(JNIEnv *env) {
533
- if (_method_map_entry_get_value == NULL) {
534
- _method_map_entry_get_value = (*env)->GetMethodID(env, cls_map_entry(env), "getValue", "()Ljava/lang/Object;");
535
- }
536
- return _method_map_entry_get_value;
537
- }
538
-
539
- jmethodID method_hash_set_init(JNIEnv *env) {
540
- if (_method_hash_set_init == NULL) {
541
- _method_hash_set_init = (*env)->GetMethodID(env, cls_hash_set(env), "<init>", "()V");
542
- }
543
- return _method_hash_set_init;
544
- }
545
-
546
- jmethodID method_linked_hash_map_init(JNIEnv *env) {
547
- if (_method_linked_hash_map_init == NULL) {
548
- _method_linked_hash_map_init = (*env)->GetMethodID(env, cls_linked_hash_map(env), "<init>", "()V");
549
- }
550
- return _method_linked_hash_map_init;
551
- }
552
-
553
- jmethodID method_linked_hash_map_put(JNIEnv *env) {
554
- if (_method_linked_hash_map_put == NULL) {
555
- _method_linked_hash_map_put = (*env)->GetMethodID(env, cls_linked_hash_map(env), "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;");
556
- }
557
- return _method_linked_hash_map_put;
558
- }
559
-
560
- jmethodID method_linked_hash_set_init(JNIEnv *env) {
561
- if (_method_linked_hash_set_init == NULL) {
562
- _method_linked_hash_set_init = (*env)->GetMethodID(env, cls_linked_hash_set(env), "<init>", "()V");
563
- }
564
- return _method_linked_hash_set_init;
565
- }
566
-
567
- jmethodID method_linked_hash_set_add(JNIEnv *env) {
568
- if (_method_linked_hash_set_add == NULL) {
569
- _method_linked_hash_set_add = (*env)->GetMethodID(env, cls_linked_hash_set(env), "add", "(Ljava/lang/Object;)Z");
570
- }
571
- return _method_linked_hash_set_add;
572
- }
573
-
574
- jmethodID method_quick_js_exception_init(JNIEnv *env) {
575
- if (_method_quick_js_exception_init == NULL) {
576
- _method_quick_js_exception_init = (*env)->GetMethodID(env, cls_quick_js_exception(env), "<init>", "(Ljava/lang/String;)V");
577
- }
578
- return _method_quick_js_exception_init;
579
- }
580
-
581
- jmethodID method_quick_js_on_call_getter(JNIEnv *env) {
582
- if (_method_quick_js_on_call_getter == NULL) {
583
- _method_quick_js_on_call_getter = (*env)->GetMethodID(env, cls_quick_js(env), "onCallGetter", "(JLjava/lang/String;)Ljava/lang/Object;");
584
- }
585
- return _method_quick_js_on_call_getter;
586
- }
587
-
588
- jmethodID method_quick_js_on_call_setter(JNIEnv *env) {
589
- if (_method_quick_js_on_call_setter == NULL) {
590
- _method_quick_js_on_call_setter = (*env)->GetMethodID(env, cls_quick_js(env), "onCallSetter", "(JLjava/lang/String;Ljava/lang/Object;)V");
591
- }
592
- return _method_quick_js_on_call_setter;
593
- }
594
-
595
- jmethodID method_quick_js_on_call_function(JNIEnv *env) {
596
- if (_method_quick_js_on_call_function == NULL) {
597
- _method_quick_js_on_call_function = (*env)->GetMethodID(env, cls_quick_js(env), "onCallFunction", "(JLjava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;");
598
- }
599
- return _method_quick_js_on_call_function;
600
- }
601
-
602
- jmethodID method_quick_js_set_eval_exception(JNIEnv *env) {
603
- if (_method_quick_js_set_eval_exception == NULL) {
604
- _method_quick_js_set_eval_exception = (*env)->GetMethodID(env, cls_quick_js(env), "setEvalException", "(Ljava/lang/Throwable;)V");
605
- }
606
- return _method_quick_js_set_eval_exception;
607
- }
608
-
609
- jmethodID method_quick_js_set_unhandled_promise_rejection(JNIEnv *env) {
610
- if (_method_quick_js_set_unhandled_promise_rejection == NULL) {
611
- _method_quick_js_set_unhandled_promise_rejection = (*env)->GetMethodID(env, cls_quick_js(env), "setUnhandledPromiseRejection", "(Ljava/lang/Object;)V");
612
- }
613
- return _method_quick_js_set_unhandled_promise_rejection;
614
- }
615
-
616
- jmethodID method_memory_usage_init(JNIEnv *env) {
617
- if (_method_memory_usage_init == NULL) {
618
- _method_memory_usage_init = (*env)->GetMethodID(env, cls_memory_usage(env), "<init>", "(JJJJJJJJJJJJJJJJJJJJJJJJJJ)V");
619
- }
620
- return _method_memory_usage_init;
621
- }
622
-
623
- jmethodID method_js_object_init(JNIEnv *env) {
624
- if (_method_js_object_init == NULL) {
625
- _method_js_object_init = (*env)->GetMethodID(env, cls_js_object(env), "<init>", "(Ljava/util/Map;)V");
626
- }
627
- return _method_js_object_init;
628
- }
629
-
630
- jfieldID field_ubyte_array_storage(JNIEnv *env) {
631
- if (_field_ubyte_array_storage == NULL) {
632
- _field_ubyte_array_storage = (*env)->GetFieldID(env, cls_ubyte_array(env), "storage", "[B");
633
- }
634
- return _field_ubyte_array_storage;
635
- }
636
-
637
- jfieldID field_double_na_n(JNIEnv *env) {
638
- if (_field_double_na_n == NULL) {
639
- _field_double_na_n = (*env)->GetStaticFieldID(env, cls_double(env), "NaN", "D");
640
- }
641
- return _field_double_na_n;
642
- }
643
-
644
- jfieldID field_js_property_name(JNIEnv *env) {
645
- if (_field_js_property_name == NULL) {
646
- _field_js_property_name = (*env)->GetFieldID(env, cls_js_property(env), "name", "Ljava/lang/String;");
647
- }
648
- return _field_js_property_name;
649
- }
650
-
651
- jfieldID field_js_property_configurable(JNIEnv *env) {
652
- if (_field_js_property_configurable == NULL) {
653
- _field_js_property_configurable = (*env)->GetFieldID(env, cls_js_property(env), "configurable", "Z");
654
- }
655
- return _field_js_property_configurable;
656
- }
657
-
658
- jfieldID field_js_property_writable(JNIEnv *env) {
659
- if (_field_js_property_writable == NULL) {
660
- _field_js_property_writable = (*env)->GetFieldID(env, cls_js_property(env), "writable", "Z");
661
- }
662
- return _field_js_property_writable;
663
- }
664
-
665
- jfieldID field_js_property_enumerable(JNIEnv *env) {
666
- if (_field_js_property_enumerable == NULL) {
667
- _field_js_property_enumerable = (*env)->GetFieldID(env, cls_js_property(env), "enumerable", "Z");
668
- }
669
- return _field_js_property_enumerable;
670
- }
671
-
672
- jfieldID field_js_function_name(JNIEnv *env) {
673
- if (_field_js_function_name == NULL) {
674
- _field_js_function_name = (*env)->GetFieldID(env, cls_js_function(env), "name", "Ljava/lang/String;");
675
- }
676
- return _field_js_function_name;
677
- }
678
-
679
- jfieldID field_js_function_is_async(JNIEnv *env) {
680
- if (_field_js_function_is_async == NULL) {
681
- _field_js_function_is_async = (*env)->GetFieldID(env, cls_js_function(env), "isAsync", "Z");
682
- }
683
- return _field_js_function_is_async;
684
- }
685
-
686
- void clear_jni_refs_cache(JNIEnv *env) {
687
- if (_cls_ubyte_array != NULL) {
688
- (*env)->DeleteGlobalRef(env, _cls_ubyte_array);
689
- }
690
- if (_cls_short != NULL) {
691
- (*env)->DeleteGlobalRef(env, _cls_short);
692
- }
693
- if (_cls_byte != NULL) {
694
- (*env)->DeleteGlobalRef(env, _cls_byte);
695
- }
696
- if (_cls_integer != NULL) {
697
- (*env)->DeleteGlobalRef(env, _cls_integer);
698
- }
699
- if (_cls_long != NULL) {
700
- (*env)->DeleteGlobalRef(env, _cls_long);
701
- }
702
- if (_cls_float != NULL) {
703
- (*env)->DeleteGlobalRef(env, _cls_float);
704
- }
705
- if (_cls_double != NULL) {
706
- (*env)->DeleteGlobalRef(env, _cls_double);
707
- }
708
- if (_cls_boolean != NULL) {
709
- (*env)->DeleteGlobalRef(env, _cls_boolean);
710
- }
711
- if (_cls_string != NULL) {
712
- (*env)->DeleteGlobalRef(env, _cls_string);
713
- }
714
- if (_cls_object != NULL) {
715
- (*env)->DeleteGlobalRef(env, _cls_object);
716
- }
717
- if (_cls_system != NULL) {
718
- (*env)->DeleteGlobalRef(env, _cls_system);
719
- }
720
- if (_cls_class != NULL) {
721
- (*env)->DeleteGlobalRef(env, _cls_class);
722
- }
723
- if (_cls_throwable != NULL) {
724
- (*env)->DeleteGlobalRef(env, _cls_throwable);
725
- }
726
- if (_cls_set != NULL) {
727
- (*env)->DeleteGlobalRef(env, _cls_set);
728
- }
729
- if (_cls_iterator != NULL) {
730
- (*env)->DeleteGlobalRef(env, _cls_iterator);
731
- }
732
- if (_cls_list != NULL) {
733
- (*env)->DeleteGlobalRef(env, _cls_list);
734
- }
735
- if (_cls_array_list != NULL) {
736
- (*env)->DeleteGlobalRef(env, _cls_array_list);
737
- }
738
- if (_cls_map != NULL) {
739
- (*env)->DeleteGlobalRef(env, _cls_map);
740
- }
741
- if (_cls_map_entry != NULL) {
742
- (*env)->DeleteGlobalRef(env, _cls_map_entry);
743
- }
744
- if (_cls_hash_set != NULL) {
745
- (*env)->DeleteGlobalRef(env, _cls_hash_set);
746
- }
747
- if (_cls_linked_hash_map != NULL) {
748
- (*env)->DeleteGlobalRef(env, _cls_linked_hash_map);
749
- }
750
- if (_cls_linked_hash_set != NULL) {
751
- (*env)->DeleteGlobalRef(env, _cls_linked_hash_set);
752
- }
753
- if (_cls_quick_js_exception != NULL) {
754
- (*env)->DeleteGlobalRef(env, _cls_quick_js_exception);
755
- }
756
- if (_cls_quick_js != NULL) {
757
- (*env)->DeleteGlobalRef(env, _cls_quick_js);
758
- }
759
- if (_cls_memory_usage != NULL) {
760
- (*env)->DeleteGlobalRef(env, _cls_memory_usage);
761
- }
762
- if (_cls_js_property != NULL) {
763
- (*env)->DeleteGlobalRef(env, _cls_js_property);
764
- }
765
- if (_cls_js_function != NULL) {
766
- (*env)->DeleteGlobalRef(env, _cls_js_function);
767
- }
768
- if (_cls_js_object != NULL) {
769
- (*env)->DeleteGlobalRef(env, _cls_js_object);
770
- }
771
-
772
- _cls_ubyte_array = NULL;
773
- _cls_short = NULL;
774
- _cls_byte = NULL;
775
- _cls_integer = NULL;
776
- _cls_long = NULL;
777
- _cls_float = NULL;
778
- _cls_double = NULL;
779
- _cls_boolean = NULL;
780
- _cls_string = NULL;
781
- _cls_object = NULL;
782
- _cls_system = NULL;
783
- _cls_class = NULL;
784
- _cls_throwable = NULL;
785
- _cls_set = NULL;
786
- _cls_iterator = NULL;
787
- _cls_list = NULL;
788
- _cls_array_list = NULL;
789
- _cls_map = NULL;
790
- _cls_map_entry = NULL;
791
- _cls_hash_set = NULL;
792
- _cls_linked_hash_map = NULL;
793
- _cls_linked_hash_set = NULL;
794
- _cls_quick_js_exception = NULL;
795
- _cls_quick_js = NULL;
796
- _cls_memory_usage = NULL;
797
- _cls_js_property = NULL;
798
- _cls_js_function = NULL;
799
- _cls_js_object = NULL;
800
-
801
- _method_ubyte_array_init = NULL;
802
- _method_short_short_value = NULL;
803
- _method_byte_byte_value = NULL;
804
- _method_integer_value_of = NULL;
805
- _method_integer_int_value = NULL;
806
- _method_long_value_of = NULL;
807
- _method_long_long_value = NULL;
808
- _method_float_float_value = NULL;
809
- _method_double_value_of = NULL;
810
- _method_double_double_value = NULL;
811
- _method_boolean_value_of = NULL;
812
- _method_boolean_boolean_value = NULL;
813
- _method_object_to_string = NULL;
814
- _method_system_identity_hash_code = NULL;
815
- _method_class_get_name = NULL;
816
- _method_class_is_array = NULL;
817
- _method_throwable_get_message = NULL;
818
- _method_throwable_get_stack_trace = NULL;
819
- _method_set_iterator = NULL;
820
- _method_set_add = NULL;
821
- _method_set_contains = NULL;
822
- _method_set_is_empty = NULL;
823
- _method_iterator_has_next = NULL;
824
- _method_iterator_next = NULL;
825
- _method_list_size = NULL;
826
- _method_list_get = NULL;
827
- _method_list_add = NULL;
828
- _method_array_list_init = NULL;
829
- _method_array_list_init_with_capacity = NULL;
830
- _method_map_entry_set = NULL;
831
- _method_map_entry_get_key = NULL;
832
- _method_map_entry_get_value = NULL;
833
- _method_hash_set_init = NULL;
834
- _method_linked_hash_map_init = NULL;
835
- _method_linked_hash_map_put = NULL;
836
- _method_linked_hash_set_init = NULL;
837
- _method_linked_hash_set_add = NULL;
838
- _method_quick_js_exception_init = NULL;
839
- _method_quick_js_on_call_getter = NULL;
840
- _method_quick_js_on_call_setter = NULL;
841
- _method_quick_js_on_call_function = NULL;
842
- _method_quick_js_set_eval_exception = NULL;
843
- _method_quick_js_set_unhandled_promise_rejection = NULL;
844
- _method_memory_usage_init = NULL;
845
- _method_js_object_init = NULL;
846
-
847
- _field_ubyte_array_storage = NULL;
848
- _field_double_na_n = NULL;
849
- _field_js_property_name = NULL;
850
- _field_js_property_configurable = NULL;
851
- _field_js_property_writable = NULL;
852
- _field_js_property_enumerable = NULL;
853
- _field_js_function_name = NULL;
854
- _field_js_function_is_async = NULL;
855
- }