emnapi 0.36.1 → 0.36.3
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.
package/dist/library_napi.js
CHANGED
|
@@ -474,9 +474,9 @@ function napi_throw_error(env, code, msg) {
|
|
|
474
474
|
return envObject_5.setLastError(1 /* napi_status.napi_invalid_arg */);
|
|
475
475
|
{{{ from64("code") }}};
|
|
476
476
|
{{{ from64("msg") }}};
|
|
477
|
-
var error_1 = new Error(UTF8ToString(msg));
|
|
477
|
+
var error_1 = new Error(emnapiString.UTF8ToString(msg, -1));
|
|
478
478
|
if (code) {
|
|
479
|
-
error_1.code = UTF8ToString(code);
|
|
479
|
+
error_1.code = emnapiString.UTF8ToString(code, -1);
|
|
480
480
|
}
|
|
481
481
|
envObject_5.tryCatch.setError(error_1);
|
|
482
482
|
return envObject_5.clearLastError();
|
|
@@ -499,9 +499,9 @@ function napi_throw_type_error(env, code, msg) {
|
|
|
499
499
|
return envObject_6.setLastError(1 /* napi_status.napi_invalid_arg */);
|
|
500
500
|
{{{ from64("code") }}};
|
|
501
501
|
{{{ from64("msg") }}};
|
|
502
|
-
var error_2 = new TypeError(UTF8ToString(msg));
|
|
502
|
+
var error_2 = new TypeError(emnapiString.UTF8ToString(msg, -1));
|
|
503
503
|
if (code) {
|
|
504
|
-
error_2.code = UTF8ToString(code);
|
|
504
|
+
error_2.code = emnapiString.UTF8ToString(code, -1);
|
|
505
505
|
}
|
|
506
506
|
envObject_6.tryCatch.setError(error_2);
|
|
507
507
|
return envObject_6.clearLastError();
|
|
@@ -524,9 +524,9 @@ function napi_throw_range_error(env, code, msg) {
|
|
|
524
524
|
return envObject_7.setLastError(1 /* napi_status.napi_invalid_arg */);
|
|
525
525
|
{{{ from64("code") }}};
|
|
526
526
|
{{{ from64("msg") }}};
|
|
527
|
-
var error_3 = new RangeError(UTF8ToString(msg));
|
|
527
|
+
var error_3 = new RangeError(emnapiString.UTF8ToString(msg, -1));
|
|
528
528
|
if (code) {
|
|
529
|
-
error_3.code = UTF8ToString(code);
|
|
529
|
+
error_3.code = emnapiString.UTF8ToString(code, -1);
|
|
530
530
|
}
|
|
531
531
|
envObject_7.tryCatch.setError(error_3);
|
|
532
532
|
return envObject_7.clearLastError();
|
|
@@ -549,9 +549,9 @@ function node_api_throw_syntax_error(env, code, msg) {
|
|
|
549
549
|
return envObject_8.setLastError(1 /* napi_status.napi_invalid_arg */);
|
|
550
550
|
{{{ from64("code") }}};
|
|
551
551
|
{{{ from64("msg") }}};
|
|
552
|
-
var error_4 = new SyntaxError(UTF8ToString(msg));
|
|
552
|
+
var error_4 = new SyntaxError(emnapiString.UTF8ToString(msg, -1));
|
|
553
553
|
if (code) {
|
|
554
|
-
error_4.code = UTF8ToString(code);
|
|
554
|
+
error_4.code = emnapiString.UTF8ToString(code, -1);
|
|
555
555
|
}
|
|
556
556
|
envObject_8.tryCatch.setError(error_4);
|
|
557
557
|
return envObject_8.clearLastError();
|
|
@@ -703,9 +703,9 @@ function napi_fatal_error(location, location_len, message, message_len) {
|
|
|
703
703
|
{{{ from64('message') }}};
|
|
704
704
|
{{{ from64('message_len') }}};
|
|
705
705
|
abort('FATAL ERROR: ' +
|
|
706
|
-
|
|
706
|
+
emnapiString.UTF8ToString(location, location_len) +
|
|
707
707
|
' ' +
|
|
708
|
-
|
|
708
|
+
emnapiString.UTF8ToString(message, message_len));
|
|
709
709
|
}
|
|
710
710
|
// @ts-expect-error
|
|
711
711
|
function napi_fatal_exception(env, err) {
|
|
@@ -733,16 +733,16 @@ function napi_fatal_exception(env, err) {
|
|
|
733
733
|
emnapiImplementInternal('_emnapi_get_last_error_info', 'vpppp', __emnapi_get_last_error_info);
|
|
734
734
|
emnapiImplement('napi_get_and_clear_last_exception', 'ipp', napi_get_and_clear_last_exception);
|
|
735
735
|
emnapiImplement('napi_throw', 'ipp', napi_throw);
|
|
736
|
-
emnapiImplement('napi_throw_error', 'ippp', napi_throw_error);
|
|
737
|
-
emnapiImplement('napi_throw_type_error', 'ippp', napi_throw_type_error);
|
|
738
|
-
emnapiImplement('napi_throw_range_error', 'ippp', napi_throw_range_error);
|
|
739
|
-
emnapiImplement('node_api_throw_syntax_error', 'ippp', node_api_throw_syntax_error);
|
|
740
|
-
emnapiImplement('napi_create_error', 'ipppp', napi_create_error);
|
|
741
|
-
emnapiImplement('napi_create_type_error', 'ipppp', napi_create_type_error);
|
|
742
|
-
emnapiImplement('napi_create_range_error', 'ipppp', napi_create_range_error);
|
|
743
|
-
emnapiImplement('node_api_create_syntax_error', 'ipppp', node_api_create_syntax_error);
|
|
736
|
+
emnapiImplement('napi_throw_error', 'ippp', napi_throw_error, ['$emnapiString']);
|
|
737
|
+
emnapiImplement('napi_throw_type_error', 'ippp', napi_throw_type_error, ['$emnapiString']);
|
|
738
|
+
emnapiImplement('napi_throw_range_error', 'ippp', napi_throw_range_error, ['$emnapiString']);
|
|
739
|
+
emnapiImplement('node_api_throw_syntax_error', 'ippp', node_api_throw_syntax_error, ['$emnapiString']);
|
|
740
|
+
emnapiImplement('napi_create_error', 'ipppp', napi_create_error, ['$emnapiString']);
|
|
741
|
+
emnapiImplement('napi_create_type_error', 'ipppp', napi_create_type_error, ['$emnapiString']);
|
|
742
|
+
emnapiImplement('napi_create_range_error', 'ipppp', napi_create_range_error, ['$emnapiString']);
|
|
743
|
+
emnapiImplement('node_api_create_syntax_error', 'ipppp', node_api_create_syntax_error, ['$emnapiString']);
|
|
744
744
|
emnapiImplement('napi_is_exception_pending', 'ipp', napi_is_exception_pending);
|
|
745
|
-
emnapiImplement('napi_fatal_error', 'vpppp', napi_fatal_error, ['$
|
|
745
|
+
emnapiImplement('napi_fatal_error', 'vpppp', napi_fatal_error, ['$emnapiString']);
|
|
746
746
|
emnapiImplement('napi_fatal_exception', 'ipp', napi_fatal_exception);
|
|
747
747
|
// @ts-expect-error
|
|
748
748
|
function napi_create_function(env, utf8name, length, cb, data, result) {
|
|
@@ -946,7 +946,7 @@ emnapiImplement('napi_get_new_target', 'ippp', napi_get_new_target);
|
|
|
946
946
|
/* eslint-disable @typescript-eslint/no-implied-eval */
|
|
947
947
|
function emnapiCreateFunction(envObject, utf8name, length, cb, data) {
|
|
948
948
|
{{{ from64('utf8name') }}};
|
|
949
|
-
var functionName = (!utf8name || !length) ? '' : (
|
|
949
|
+
var functionName = (!utf8name || !length) ? '' : (emnapiString.UTF8ToString(utf8name, length));
|
|
950
950
|
var f;
|
|
951
951
|
var makeFunction = function () { return function () {
|
|
952
952
|
'use strict';
|
|
@@ -1137,7 +1137,7 @@ function emnapiUnwrap(env, js_object, result, action) {
|
|
|
1137
1137
|
return envObject_14.setLastError(10 /* napi_status.napi_pending_exception */);
|
|
1138
1138
|
}
|
|
1139
1139
|
}
|
|
1140
|
-
emnapiImplementHelper('$emnapiCreateFunction', undefined, emnapiCreateFunction, ['$
|
|
1140
|
+
emnapiImplementHelper('$emnapiCreateFunction', undefined, emnapiCreateFunction, ['$emnapiString']);
|
|
1141
1141
|
emnapiImplementHelper('$emnapiDefineProperty', undefined, emnapiDefineProperty, ['$emnapiCreateFunction']);
|
|
1142
1142
|
emnapiImplementHelper('$emnapiGetHandle', undefined, emnapiGetHandle);
|
|
1143
1143
|
emnapiImplementHelper('$emnapiWrap', undefined, emnapiWrap, ['$emnapiGetHandle']);
|
|
@@ -2070,7 +2070,7 @@ function napi_set_named_property(env, object, cname, value) {
|
|
|
2070
2070
|
return envObject_25.setLastError(1 /* napi_status.napi_invalid_arg */);
|
|
2071
2071
|
}
|
|
2072
2072
|
{{{ from64("cname") }}};
|
|
2073
|
-
emnapiCtx.handleStore.get(object).value[UTF8ToString(cname)] = emnapiCtx.handleStore.get(value).value;
|
|
2073
|
+
emnapiCtx.handleStore.get(object).value[emnapiString.UTF8ToString(cname, -1)] = emnapiCtx.handleStore.get(value).value;
|
|
2074
2074
|
return 0 /* napi_status.napi_ok */;
|
|
2075
2075
|
}
|
|
2076
2076
|
catch (err_26) {
|
|
@@ -2109,7 +2109,7 @@ function napi_has_named_property(env, object, utf8name, result) {
|
|
|
2109
2109
|
}
|
|
2110
2110
|
{{{ from64("utf8name") }}};
|
|
2111
2111
|
{{{ from64("result") }}};
|
|
2112
|
-
r = UTF8ToString(utf8name) in v_4;
|
|
2112
|
+
r = emnapiString.UTF8ToString(utf8name, -1) in v_4;
|
|
2113
2113
|
{{{ makeSetValue("result", 0, "r ? 1 : 0", "i8") }}};
|
|
2114
2114
|
return envObject_26.getReturnStatus();
|
|
2115
2115
|
}
|
|
@@ -2150,7 +2150,7 @@ function napi_get_named_property(env, object, utf8name, result) {
|
|
|
2150
2150
|
{{{ from64("utf8name") }}};
|
|
2151
2151
|
{{{ from64("result") }}};
|
|
2152
2152
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2153
|
-
value = envObject_27.ensureHandleId(v_5[UTF8ToString(utf8name)]);
|
|
2153
|
+
value = envObject_27.ensureHandleId(v_5[emnapiString.UTF8ToString(utf8name, -1)]);
|
|
2154
2154
|
{{{ makeSetValue("result", 0, "value", "*") }}};
|
|
2155
2155
|
return envObject_27.getReturnStatus();
|
|
2156
2156
|
}
|
|
@@ -2336,7 +2336,7 @@ function napi_define_properties(env, object, property_count, properties
|
|
|
2336
2336
|
{{{ from64("attributes") }}};
|
|
2337
2337
|
var data_2 = {{{ makeGetValue("propPtr", POINTER_SIZE * 7, "*") }}};
|
|
2338
2338
|
if (utf8Name_1) {
|
|
2339
|
-
propertyName_1 = UTF8ToString(utf8Name_1);
|
|
2339
|
+
propertyName_1 = emnapiString.UTF8ToString(utf8Name_1, -1);
|
|
2340
2340
|
}
|
|
2341
2341
|
else {
|
|
2342
2342
|
if (!name_2) {
|
|
@@ -2411,14 +2411,14 @@ emnapiImplement('napi_has_property', 'ipppp', napi_has_property);
|
|
|
2411
2411
|
emnapiImplement('napi_get_property', 'ipppp', napi_get_property);
|
|
2412
2412
|
emnapiImplement('napi_delete_property', 'ipppp', napi_delete_property);
|
|
2413
2413
|
emnapiImplement('napi_has_own_property', 'ipppp', napi_has_own_property);
|
|
2414
|
-
emnapiImplement('napi_set_named_property', 'ipppp', napi_set_named_property);
|
|
2415
|
-
emnapiImplement('napi_has_named_property', 'ipppp', napi_has_named_property);
|
|
2416
|
-
emnapiImplement('napi_get_named_property', 'ipppp', napi_get_named_property);
|
|
2414
|
+
emnapiImplement('napi_set_named_property', 'ipppp', napi_set_named_property, ['$emnapiString']);
|
|
2415
|
+
emnapiImplement('napi_has_named_property', 'ipppp', napi_has_named_property, ['$emnapiString']);
|
|
2416
|
+
emnapiImplement('napi_get_named_property', 'ipppp', napi_get_named_property, ['$emnapiString']);
|
|
2417
2417
|
emnapiImplement('napi_set_element', 'ippip', napi_set_element);
|
|
2418
2418
|
emnapiImplement('napi_has_element', 'ippip', napi_has_element);
|
|
2419
2419
|
emnapiImplement('napi_get_element', 'ippip', napi_get_element);
|
|
2420
2420
|
emnapiImplement('napi_delete_element', 'ippip', napi_delete_element);
|
|
2421
|
-
emnapiImplement('napi_define_properties', 'ipppp', napi_define_properties, ['$emnapiDefineProperty']);
|
|
2421
|
+
emnapiImplement('napi_define_properties', 'ipppp', napi_define_properties, ['$emnapiDefineProperty', '$emnapiString']);
|
|
2422
2422
|
emnapiImplement('napi_object_freeze', 'ipp', napi_object_freeze);
|
|
2423
2423
|
emnapiImplement('napi_object_seal', 'ipp', napi_object_seal);
|
|
2424
2424
|
/* eslint-disable @typescript-eslint/indent */
|
|
@@ -2462,6 +2462,225 @@ function napi_run_script(env, script, result) {
|
|
|
2462
2462
|
}
|
|
2463
2463
|
emnapiImplement('napi_run_script', 'ippp', napi_run_script, ['napi_set_last_error']);
|
|
2464
2464
|
/* eslint-disable @typescript-eslint/indent */
|
|
2465
|
+
var emnapiString = {
|
|
2466
|
+
utf8Decoder: undefined,
|
|
2467
|
+
utf16Decoder: undefined,
|
|
2468
|
+
init: function () {
|
|
2469
|
+
#if !TEXTDECODER || TEXTDECODER == 1
|
|
2470
|
+
var fallbackDecoder = {
|
|
2471
|
+
decode: function (input) {
|
|
2472
|
+
var isArrayBuffer = input instanceof ArrayBuffer;
|
|
2473
|
+
var isView = ArrayBuffer.isView(input);
|
|
2474
|
+
if (!isArrayBuffer && !isView) {
|
|
2475
|
+
throw new TypeError('The "input" argument must be an instance of ArrayBuffer or ArrayBufferView');
|
|
2476
|
+
}
|
|
2477
|
+
var bytes = isArrayBuffer ? new Uint8Array(input) : new Uint8Array(input.buffer, input.byteOffset, input.byteLength);
|
|
2478
|
+
var inputIndex = 0;
|
|
2479
|
+
var pendingSize = Math.min(256 * 256, bytes.length + 1);
|
|
2480
|
+
var pending = new Uint16Array(pendingSize);
|
|
2481
|
+
var chunks = [];
|
|
2482
|
+
var pendingIndex = 0;
|
|
2483
|
+
for (;;) {
|
|
2484
|
+
var more = inputIndex < bytes.length;
|
|
2485
|
+
if (!more || (pendingIndex >= pendingSize - 1)) {
|
|
2486
|
+
var subarray = pending.subarray(0, pendingIndex);
|
|
2487
|
+
var arraylike = subarray;
|
|
2488
|
+
chunks.push(String.fromCharCode.apply(null, arraylike));
|
|
2489
|
+
if (!more) {
|
|
2490
|
+
return chunks.join('');
|
|
2491
|
+
}
|
|
2492
|
+
bytes = bytes.subarray(inputIndex);
|
|
2493
|
+
inputIndex = 0;
|
|
2494
|
+
pendingIndex = 0;
|
|
2495
|
+
}
|
|
2496
|
+
var byte1 = bytes[inputIndex++];
|
|
2497
|
+
if ((byte1 & 0x80) === 0) {
|
|
2498
|
+
pending[pendingIndex++] = byte1;
|
|
2499
|
+
}
|
|
2500
|
+
else if ((byte1 & 0xe0) === 0xc0) {
|
|
2501
|
+
var byte2 = bytes[inputIndex++] & 0x3f;
|
|
2502
|
+
pending[pendingIndex++] = ((byte1 & 0x1f) << 6) | byte2;
|
|
2503
|
+
}
|
|
2504
|
+
else if ((byte1 & 0xf0) === 0xe0) {
|
|
2505
|
+
var byte2 = bytes[inputIndex++] & 0x3f;
|
|
2506
|
+
var byte3 = bytes[inputIndex++] & 0x3f;
|
|
2507
|
+
pending[pendingIndex++] = ((byte1 & 0x1f) << 12) | (byte2 << 6) | byte3;
|
|
2508
|
+
}
|
|
2509
|
+
else if ((byte1 & 0xf8) === 0xf0) {
|
|
2510
|
+
var byte2 = bytes[inputIndex++] & 0x3f;
|
|
2511
|
+
var byte3 = bytes[inputIndex++] & 0x3f;
|
|
2512
|
+
var byte4 = bytes[inputIndex++] & 0x3f;
|
|
2513
|
+
var codepoint = ((byte1 & 0x07) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4;
|
|
2514
|
+
if (codepoint > 0xffff) {
|
|
2515
|
+
codepoint -= 0x10000;
|
|
2516
|
+
pending[pendingIndex++] = (codepoint >>> 10) & 0x3ff | 0xd800;
|
|
2517
|
+
codepoint = 0xdc00 | codepoint & 0x3ff;
|
|
2518
|
+
}
|
|
2519
|
+
pending[pendingIndex++] = codepoint;
|
|
2520
|
+
}
|
|
2521
|
+
else {
|
|
2522
|
+
}
|
|
2523
|
+
}
|
|
2524
|
+
}
|
|
2525
|
+
};
|
|
2526
|
+
#endif
|
|
2527
|
+
var utf8Decoder;
|
|
2528
|
+
#if !TEXTDECODER
|
|
2529
|
+
utf8Decoder = fallbackDecoder;
|
|
2530
|
+
#elif TEXTDECODER == 1
|
|
2531
|
+
utf8Decoder = typeof TextDecoder === 'function' ? new TextDecoder() : fallbackDecoder;
|
|
2532
|
+
#elif TEXTDECODER == 2
|
|
2533
|
+
utf8Decoder = new TextDecoder();
|
|
2534
|
+
#endif
|
|
2535
|
+
emnapiString.utf8Decoder = utf8Decoder;
|
|
2536
|
+
#if !TEXTDECODER || TEXTDECODER == 1
|
|
2537
|
+
var fallbackDecoder2 = {
|
|
2538
|
+
decode: function (input) {
|
|
2539
|
+
var isArrayBuffer = input instanceof ArrayBuffer;
|
|
2540
|
+
var isView = ArrayBuffer.isView(input);
|
|
2541
|
+
if (!isArrayBuffer && !isView) {
|
|
2542
|
+
throw new TypeError('The "input" argument must be an instance of ArrayBuffer or ArrayBufferView');
|
|
2543
|
+
}
|
|
2544
|
+
var bytes = isArrayBuffer ? new Uint16Array(input) : new Uint16Array(input.buffer, input.byteOffset, input.byteLength / 2);
|
|
2545
|
+
var wcharArray = Array(bytes.length);
|
|
2546
|
+
for (var i = 0; i < bytes.length; ++i) {
|
|
2547
|
+
wcharArray[i] = String.fromCharCode(bytes[i]);
|
|
2548
|
+
}
|
|
2549
|
+
return wcharArray.join('');
|
|
2550
|
+
}
|
|
2551
|
+
};
|
|
2552
|
+
#endif
|
|
2553
|
+
var utf16Decoder;
|
|
2554
|
+
#if !TEXTDECODER
|
|
2555
|
+
utf16Decoder = fallbackDecoder2;
|
|
2556
|
+
#elif TEXTDECODER == 1
|
|
2557
|
+
utf16Decoder = typeof TextDecoder === 'function' ? new TextDecoder('utf-16le') : fallbackDecoder2;
|
|
2558
|
+
#elif TEXTDECODER == 2
|
|
2559
|
+
utf16Decoder = new TextDecoder('utf-16le');
|
|
2560
|
+
#endif
|
|
2561
|
+
emnapiString.utf16Decoder = utf16Decoder;
|
|
2562
|
+
},
|
|
2563
|
+
lengthBytesUTF8: function (str) {
|
|
2564
|
+
var c;
|
|
2565
|
+
var len = 0;
|
|
2566
|
+
for (var i = 0; i < str.length; ++i) {
|
|
2567
|
+
c = str.charCodeAt(i);
|
|
2568
|
+
if (c <= 0x7F) {
|
|
2569
|
+
len++;
|
|
2570
|
+
}
|
|
2571
|
+
else if (c <= 0x7FF) {
|
|
2572
|
+
len += 2;
|
|
2573
|
+
}
|
|
2574
|
+
else if (c >= 0xD800 && c <= 0xDFFF) {
|
|
2575
|
+
len += 4;
|
|
2576
|
+
++i;
|
|
2577
|
+
}
|
|
2578
|
+
else {
|
|
2579
|
+
len += 3;
|
|
2580
|
+
}
|
|
2581
|
+
}
|
|
2582
|
+
return len;
|
|
2583
|
+
},
|
|
2584
|
+
UTF8ToString: function (ptr, length) {
|
|
2585
|
+
ptr >>>= 0;
|
|
2586
|
+
if (!ptr || !length)
|
|
2587
|
+
return '';
|
|
2588
|
+
var HEAPU8 = new Uint8Array(wasmMemory.buffer);
|
|
2589
|
+
var end = ptr;
|
|
2590
|
+
if (length === -1) {
|
|
2591
|
+
for (; HEAPU8[end];)
|
|
2592
|
+
++end;
|
|
2593
|
+
}
|
|
2594
|
+
else {
|
|
2595
|
+
end = ptr + (length >>> 0);
|
|
2596
|
+
}
|
|
2597
|
+
return emnapiString.utf8Decoder.decode({{{ getUnsharedTextDecoderView('HEAPU8', 'ptr', 'end') }}});
|
|
2598
|
+
},
|
|
2599
|
+
stringToUTF8: function (str, outPtr, maxBytesToWrite) {
|
|
2600
|
+
var HEAPU8 = new Uint8Array(wasmMemory.buffer);
|
|
2601
|
+
var outIdx = outPtr;
|
|
2602
|
+
outIdx >>>= 0;
|
|
2603
|
+
if (!(maxBytesToWrite > 0)) {
|
|
2604
|
+
return 0;
|
|
2605
|
+
}
|
|
2606
|
+
var startIdx = outIdx;
|
|
2607
|
+
var endIdx = outIdx + maxBytesToWrite - 1;
|
|
2608
|
+
for (var i = 0; i < str.length; ++i) {
|
|
2609
|
+
var u = str.charCodeAt(i);
|
|
2610
|
+
if (u >= 0xD800 && u <= 0xDFFF) {
|
|
2611
|
+
var u1 = str.charCodeAt(++i);
|
|
2612
|
+
u = 0x10000 + ((u & 0x3FF) << 10) | (u1 & 0x3FF);
|
|
2613
|
+
}
|
|
2614
|
+
if (u <= 0x7F) {
|
|
2615
|
+
if (outIdx >= endIdx)
|
|
2616
|
+
break;
|
|
2617
|
+
HEAPU8[outIdx++] = u;
|
|
2618
|
+
}
|
|
2619
|
+
else if (u <= 0x7FF) {
|
|
2620
|
+
if (outIdx + 1 >= endIdx)
|
|
2621
|
+
break;
|
|
2622
|
+
HEAPU8[outIdx++] = 0xC0 | (u >> 6);
|
|
2623
|
+
HEAPU8[outIdx++] = 0x80 | (u & 63);
|
|
2624
|
+
}
|
|
2625
|
+
else if (u <= 0xFFFF) {
|
|
2626
|
+
if (outIdx + 2 >= endIdx)
|
|
2627
|
+
break;
|
|
2628
|
+
HEAPU8[outIdx++] = 0xE0 | (u >> 12);
|
|
2629
|
+
HEAPU8[outIdx++] = 0x80 | ((u >> 6) & 63);
|
|
2630
|
+
HEAPU8[outIdx++] = 0x80 | (u & 63);
|
|
2631
|
+
}
|
|
2632
|
+
else {
|
|
2633
|
+
if (outIdx + 3 >= endIdx)
|
|
2634
|
+
break;
|
|
2635
|
+
HEAPU8[outIdx++] = 0xF0 | (u >> 18);
|
|
2636
|
+
HEAPU8[outIdx++] = 0x80 | ((u >> 12) & 63);
|
|
2637
|
+
HEAPU8[outIdx++] = 0x80 | ((u >> 6) & 63);
|
|
2638
|
+
HEAPU8[outIdx++] = 0x80 | (u & 63);
|
|
2639
|
+
}
|
|
2640
|
+
}
|
|
2641
|
+
HEAPU8[outIdx] = 0;
|
|
2642
|
+
return outIdx - startIdx;
|
|
2643
|
+
},
|
|
2644
|
+
UTF16ToString: function (ptr, length) {
|
|
2645
|
+
ptr >>>= 0;
|
|
2646
|
+
if (!ptr || !length)
|
|
2647
|
+
return '';
|
|
2648
|
+
var end = ptr;
|
|
2649
|
+
if (length === -1) {
|
|
2650
|
+
var idx = end >> 1;
|
|
2651
|
+
var HEAPU16 = new Uint16Array(wasmMemory.buffer);
|
|
2652
|
+
while (HEAPU16[idx])
|
|
2653
|
+
++idx;
|
|
2654
|
+
end = idx << 1;
|
|
2655
|
+
}
|
|
2656
|
+
else {
|
|
2657
|
+
end = ptr + (length >>> 0) * 2;
|
|
2658
|
+
}
|
|
2659
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2660
|
+
var HEAPU8 = new Uint8Array(wasmMemory.buffer);
|
|
2661
|
+
return emnapiString.utf16Decoder.decode({{{ getUnsharedTextDecoderView('HEAPU8', 'ptr', 'end') }}});
|
|
2662
|
+
},
|
|
2663
|
+
stringToUTF16: function (str, outPtr, maxBytesToWrite) {
|
|
2664
|
+
if (maxBytesToWrite === undefined) {
|
|
2665
|
+
maxBytesToWrite = 0x7FFFFFFF;
|
|
2666
|
+
}
|
|
2667
|
+
if (maxBytesToWrite < 2)
|
|
2668
|
+
return 0;
|
|
2669
|
+
maxBytesToWrite -= 2;
|
|
2670
|
+
var startPtr = outPtr;
|
|
2671
|
+
var numCharsToWrite = (maxBytesToWrite < str.length * 2) ? (maxBytesToWrite / 2) : str.length;
|
|
2672
|
+
for (var i = 0; i < numCharsToWrite; ++i) {
|
|
2673
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2674
|
+
var codeUnit = str.charCodeAt(i);
|
|
2675
|
+
{{{ makeSetValue('outPtr', 0, 'codeUnit', 'i16') }}};
|
|
2676
|
+
outPtr += 2;
|
|
2677
|
+
}
|
|
2678
|
+
{{{ makeSetValue('outPtr', 0, '0', 'i16') }}};
|
|
2679
|
+
return outPtr - startPtr;
|
|
2680
|
+
}
|
|
2681
|
+
};
|
|
2682
|
+
emnapiDefineVar('$emnapiString', emnapiString, [], 'emnapiString.init();');
|
|
2683
|
+
/* eslint-disable @typescript-eslint/indent */
|
|
2465
2684
|
var emnapiTSFN = {
|
|
2466
2685
|
offset: {
|
|
2467
2686
|
/* napi_ref */ resource: 0,
|
|
@@ -3816,7 +4035,7 @@ function napi_define_class(env, utf8name, length, constructor, callback_data, pr
|
|
|
3816
4035
|
{{{ from64("attributes") }}};
|
|
3817
4036
|
var data_3 = {{{ makeGetValue("propPtr", POINTER_SIZE * 7, "*") }}};
|
|
3818
4037
|
if (utf8Name_2) {
|
|
3819
|
-
propertyName_2 = UTF8ToString(utf8Name_2);
|
|
4038
|
+
propertyName_2 = emnapiString.UTF8ToString(utf8Name_2, -1);
|
|
3820
4039
|
}
|
|
3821
4040
|
else {
|
|
3822
4041
|
if (!name_3) {
|
|
@@ -4002,7 +4221,7 @@ function _napi_add_finalizer(env, js_object, finalize_data, finalize_cb, finaliz
|
|
|
4002
4221
|
}
|
|
4003
4222
|
return envObject.clearLastError();
|
|
4004
4223
|
}
|
|
4005
|
-
emnapiImplement('napi_define_class', 'ipppppppp', napi_define_class, ['$emnapiCreateFunction', '$emnapiDefineProperty']);
|
|
4224
|
+
emnapiImplement('napi_define_class', 'ipppppppp', napi_define_class, ['$emnapiCreateFunction', '$emnapiDefineProperty', '$emnapiString']);
|
|
4006
4225
|
emnapiImplement('napi_wrap', 'ipppppp', napi_wrap, ['$emnapiWrap']);
|
|
4007
4226
|
emnapiImplement('napi_unwrap', 'ippp', napi_unwrap, ['$emnapiUnwrap']);
|
|
4008
4227
|
emnapiImplement('napi_remove_wrap', 'ippp', napi_remove_wrap, ['$emnapiUnwrap']);
|
|
@@ -4531,12 +4750,12 @@ function napi_get_value_string_utf8(env, value, buf, buf_size, result) {
|
|
|
4531
4750
|
if (!result)
|
|
4532
4751
|
return envObject.setLastError(1 /* napi_status.napi_invalid_arg */);
|
|
4533
4752
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4534
|
-
var strLength = lengthBytesUTF8(handle.value);
|
|
4753
|
+
var strLength = emnapiString.lengthBytesUTF8(handle.value);
|
|
4535
4754
|
{{{ makeSetValue('result', 0, 'strLength', SIZE_TYPE) }}};
|
|
4536
4755
|
}
|
|
4537
4756
|
else if (buf_size !== 0) {
|
|
4538
4757
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4539
|
-
var copied = stringToUTF8(handle.value, buf, buf_size);
|
|
4758
|
+
var copied = emnapiString.stringToUTF8(handle.value, buf, buf_size);
|
|
4540
4759
|
if (result) {
|
|
4541
4760
|
{{{ makeSetValue('result', 0, 'copied', SIZE_TYPE) }}};
|
|
4542
4761
|
}
|
|
@@ -4567,7 +4786,7 @@ function napi_get_value_string_utf16(env, value, buf, buf_size, result) {
|
|
|
4567
4786
|
}
|
|
4568
4787
|
else if (buf_size !== 0) {
|
|
4569
4788
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4570
|
-
var copied = stringToUTF16(handle.value, buf, buf_size * 2);
|
|
4789
|
+
var copied = emnapiString.stringToUTF16(handle.value, buf, buf_size * 2);
|
|
4571
4790
|
if (result) {
|
|
4572
4791
|
{{{ makeSetValue('result', 0, 'copied / 2', SIZE_TYPE) }}};
|
|
4573
4792
|
}
|
|
@@ -4609,12 +4828,8 @@ emnapiImplement('napi_get_value_external', 'ippp', napi_get_value_external);
|
|
|
4609
4828
|
emnapiImplement('napi_get_value_int32', 'ippp', napi_get_value_int32);
|
|
4610
4829
|
emnapiImplement('napi_get_value_int64', 'ippp', napi_get_value_int64);
|
|
4611
4830
|
emnapiImplement('napi_get_value_string_latin1', 'ippppp', napi_get_value_string_latin1);
|
|
4612
|
-
emnapiImplement('napi_get_value_string_utf8', 'ippppp', napi_get_value_string_utf8);
|
|
4613
|
-
|
|
4614
|
-
emnapiImplement('napi_get_value_string_utf16', 'ippppp', napi_get_value_string_utf16, ['$stringToUTF16']);
|
|
4615
|
-
#else
|
|
4616
|
-
emnapiImplement('napi_get_value_string_utf16', 'ippppp', napi_get_value_string_utf16);
|
|
4617
|
-
#endif
|
|
4831
|
+
emnapiImplement('napi_get_value_string_utf8', 'ippppp', napi_get_value_string_utf8, ['$emnapiString']);
|
|
4832
|
+
emnapiImplement('napi_get_value_string_utf16', 'ippppp', napi_get_value_string_utf16, ['$emnapiString']);
|
|
4618
4833
|
emnapiImplement('napi_get_value_uint32', 'ippp', napi_get_value_uint32);
|
|
4619
4834
|
/* eslint-disable @typescript-eslint/indent */
|
|
4620
4835
|
function napi_create_int32(env, value, result) {
|
|
@@ -4737,7 +4952,7 @@ function napi_create_string_utf16(env, str, length, result) {
|
|
|
4737
4952
|
if (!(autoLength || (sizelength <= 2147483647))) {
|
|
4738
4953
|
return envObject.setLastError(1 /* napi_status.napi_invalid_arg */);
|
|
4739
4954
|
}
|
|
4740
|
-
var utf16String =
|
|
4955
|
+
var utf16String = emnapiString.UTF16ToString(str, length);
|
|
4741
4956
|
{{{ from64('result') }}};
|
|
4742
4957
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4743
4958
|
var value = emnapiCtx.addToCurrentScope(utf16String).id;
|
|
@@ -4761,7 +4976,7 @@ function napi_create_string_utf8(env, str, length, result) {
|
|
|
4761
4976
|
if (!(autoLength || (sizelength <= 2147483647))) {
|
|
4762
4977
|
return envObject.setLastError(1 /* napi_status.napi_invalid_arg */);
|
|
4763
4978
|
}
|
|
4764
|
-
var utf8String =
|
|
4979
|
+
var utf8String = emnapiString.UTF8ToString(str, length);
|
|
4765
4980
|
{{{ from64('result') }}};
|
|
4766
4981
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4767
4982
|
var value = emnapiCtx.addToCurrentScope(utf8String).id;
|
|
@@ -4873,8 +5088,8 @@ emnapiImplement('napi_create_bigint_int64', 'ipjp', napi_create_bigint_int64);
|
|
|
4873
5088
|
emnapiImplement('napi_create_bigint_uint64', 'ipjp', napi_create_bigint_uint64);
|
|
4874
5089
|
emnapiImplement('napi_create_bigint_words', 'ipippp', napi_create_bigint_words);
|
|
4875
5090
|
emnapiImplement('napi_create_string_latin1', 'ipppp', napi_create_string_latin1);
|
|
4876
|
-
emnapiImplement('napi_create_string_utf16', 'ipppp', napi_create_string_utf16, ['$
|
|
4877
|
-
emnapiImplement('napi_create_string_utf8', 'ipppp', napi_create_string_utf8, ['$
|
|
5091
|
+
emnapiImplement('napi_create_string_utf16', 'ipppp', napi_create_string_utf16, ['$emnapiString']);
|
|
5092
|
+
emnapiImplement('napi_create_string_utf8', 'ipppp', napi_create_string_utf8, ['$emnapiString']);
|
|
4878
5093
|
function napi_create_array(env, result) {
|
|
4879
5094
|
if (env == 0)
|
|
4880
5095
|
return 1 /* napi_status.napi_invalid_arg */;
|
|
@@ -5362,7 +5577,7 @@ function node_api_symbol_for(env, utf8description, length, result) {
|
|
|
5362
5577
|
if (!(autoLength || (sizelength <= 2147483647))) {
|
|
5363
5578
|
return envObject.setLastError(1 /* napi_status.napi_invalid_arg */);
|
|
5364
5579
|
}
|
|
5365
|
-
var descriptionString =
|
|
5580
|
+
var descriptionString = emnapiString.UTF8ToString(utf8description, length);
|
|
5366
5581
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5367
5582
|
var value = emnapiCtx.addToCurrentScope(Symbol.for(descriptionString)).id;
|
|
5368
5583
|
{{{ makeSetValue('result', 0, 'value', '*') }}};
|
|
@@ -5382,7 +5597,7 @@ emnapiImplement('napi_create_object', 'ipp', napi_create_object);
|
|
|
5382
5597
|
emnapiImplement('napi_create_symbol', 'ippp', napi_create_symbol);
|
|
5383
5598
|
emnapiImplement('napi_create_typedarray', 'ipipppp', napi_create_typedarray, ['$emnapiExternalMemory']);
|
|
5384
5599
|
emnapiImplement('napi_create_dataview', 'ippppp', napi_create_dataview, ['$emnapiExternalMemory']);
|
|
5385
|
-
emnapiImplement('node_api_symbol_for', 'ipppp', node_api_symbol_for, ['$
|
|
5600
|
+
emnapiImplement('node_api_symbol_for', 'ipppp', node_api_symbol_for, ['$emnapiString']);
|
|
5386
5601
|
function napi_get_boolean(env, value, result) {
|
|
5387
5602
|
if (env == 0)
|
|
5388
5603
|
return 1 /* napi_status.napi_invalid_arg */;
|
|
@@ -5623,7 +5838,7 @@ function emnapi_get_module_property(env, utf8name, result) {
|
|
|
5623
5838
|
{{{ from64("utf8name") }}};
|
|
5624
5839
|
{{{ from64("result") }}};
|
|
5625
5840
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5626
|
-
value = envObject_60.ensureHandleId(Module[UTF8ToString(utf8name)]);
|
|
5841
|
+
value = envObject_60.ensureHandleId(Module[emnapiString.UTF8ToString(utf8name, -1)]);
|
|
5627
5842
|
{{{ makeSetValue("result", 0, "value", "*") }}};
|
|
5628
5843
|
return envObject_60.getReturnStatus();
|
|
5629
5844
|
}
|
|
@@ -5633,7 +5848,7 @@ function emnapi_get_module_property(env, utf8name, result) {
|
|
|
5633
5848
|
}
|
|
5634
5849
|
}
|
|
5635
5850
|
emnapiImplement2('emnapi_get_module_object', 'ipp', emnapi_get_module_object);
|
|
5636
|
-
emnapiImplement2('emnapi_get_module_property', 'ippp', emnapi_get_module_property);
|
|
5851
|
+
emnapiImplement2('emnapi_get_module_property', 'ippp', emnapi_get_module_property, ['$emnapiString']);
|
|
5637
5852
|
emnapiDefineVar('$emnapiCtx', undefined);
|
|
5638
5853
|
emnapiDefineVar('$emnapiNodeBinding', undefined);
|
|
5639
5854
|
emnapiDefineVar('$emnapiModule', {
|
|
@@ -5703,139 +5918,11 @@ function __emnapi_async_work_pool_size() {
|
|
|
5703
5918
|
emnapiImplementInternal('_emnapi_async_work_pool_size', 'i', __emnapi_async_work_pool_size, ['$emnapiAsyncWorkPoolSize']);
|
|
5704
5919
|
function __emnapi_get_filename(buf, len) {
|
|
5705
5920
|
if (!buf) {
|
|
5706
|
-
return lengthBytesUTF8(emnapiModule.filename);
|
|
5921
|
+
return emnapiString.lengthBytesUTF8(emnapiModule.filename);
|
|
5707
5922
|
}
|
|
5708
|
-
return stringToUTF8(emnapiModule.filename, buf, len);
|
|
5923
|
+
return emnapiString.stringToUTF8(emnapiModule.filename, buf, len);
|
|
5709
5924
|
}
|
|
5710
|
-
emnapiImplementInternal('_emnapi_get_filename', 'ipi', __emnapi_get_filename);
|
|
5711
|
-
mergeInto(LibraryManager.library, {
|
|
5712
|
-
$emnapiUtf8Decoder__postset: 'emnapiUtf8Decoder();',
|
|
5713
|
-
$emnapiUtf8Decoder: function () {
|
|
5714
|
-
#if !TEXTDECODER || TEXTDECODER == 1
|
|
5715
|
-
var fallbackDecoder = {
|
|
5716
|
-
decode: function (input) {
|
|
5717
|
-
var isArrayBuffer = input instanceof ArrayBuffer;
|
|
5718
|
-
var isView = ArrayBuffer.isView(input);
|
|
5719
|
-
if (!isArrayBuffer && !isView) {
|
|
5720
|
-
throw new TypeError('The "input" argument must be an instance of ArrayBuffer or ArrayBufferView');
|
|
5721
|
-
}
|
|
5722
|
-
var bytes = isArrayBuffer ? new Uint8Array(input) : new Uint8Array(input.buffer, input.byteOffset, input.byteLength);
|
|
5723
|
-
var inputIndex = 0;
|
|
5724
|
-
var pendingSize = Math.min(256 * 256, bytes.length + 1);
|
|
5725
|
-
var pending = new Uint16Array(pendingSize);
|
|
5726
|
-
var chunks = [];
|
|
5727
|
-
var pendingIndex = 0;
|
|
5728
|
-
for (;;) {
|
|
5729
|
-
var more = inputIndex < bytes.length;
|
|
5730
|
-
if (!more || (pendingIndex >= pendingSize - 1)) {
|
|
5731
|
-
var subarray = pending.subarray(0, pendingIndex);
|
|
5732
|
-
var arraylike = subarray;
|
|
5733
|
-
chunks.push(String.fromCharCode.apply(null, arraylike));
|
|
5734
|
-
if (!more) {
|
|
5735
|
-
return chunks.join('');
|
|
5736
|
-
}
|
|
5737
|
-
bytes = bytes.subarray(inputIndex);
|
|
5738
|
-
inputIndex = 0;
|
|
5739
|
-
pendingIndex = 0;
|
|
5740
|
-
}
|
|
5741
|
-
var byte1 = bytes[inputIndex++];
|
|
5742
|
-
if ((byte1 & 0x80) === 0) {
|
|
5743
|
-
pending[pendingIndex++] = byte1;
|
|
5744
|
-
}
|
|
5745
|
-
else if ((byte1 & 0xe0) === 0xc0) {
|
|
5746
|
-
var byte2 = bytes[inputIndex++] & 0x3f;
|
|
5747
|
-
pending[pendingIndex++] = ((byte1 & 0x1f) << 6) | byte2;
|
|
5748
|
-
}
|
|
5749
|
-
else if ((byte1 & 0xf0) === 0xe0) {
|
|
5750
|
-
var byte2 = bytes[inputIndex++] & 0x3f;
|
|
5751
|
-
var byte3 = bytes[inputIndex++] & 0x3f;
|
|
5752
|
-
pending[pendingIndex++] = ((byte1 & 0x1f) << 12) | (byte2 << 6) | byte3;
|
|
5753
|
-
}
|
|
5754
|
-
else if ((byte1 & 0xf8) === 0xf0) {
|
|
5755
|
-
var byte2 = bytes[inputIndex++] & 0x3f;
|
|
5756
|
-
var byte3 = bytes[inputIndex++] & 0x3f;
|
|
5757
|
-
var byte4 = bytes[inputIndex++] & 0x3f;
|
|
5758
|
-
var codepoint = ((byte1 & 0x07) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4;
|
|
5759
|
-
if (codepoint > 0xffff) {
|
|
5760
|
-
codepoint -= 0x10000;
|
|
5761
|
-
pending[pendingIndex++] = (codepoint >>> 10) & 0x3ff | 0xd800;
|
|
5762
|
-
codepoint = 0xdc00 | codepoint & 0x3ff;
|
|
5763
|
-
}
|
|
5764
|
-
pending[pendingIndex++] = codepoint;
|
|
5765
|
-
}
|
|
5766
|
-
else {
|
|
5767
|
-
}
|
|
5768
|
-
}
|
|
5769
|
-
}
|
|
5770
|
-
};
|
|
5771
|
-
#endif
|
|
5772
|
-
var tmp; // typescript bug
|
|
5773
|
-
#if !TEXTDECODER
|
|
5774
|
-
tmp = fallbackDecoder;
|
|
5775
|
-
#elif TEXTDECODER == 1
|
|
5776
|
-
tmp = typeof TextDecoder === 'function' ? new TextDecoder() : fallbackDecoder;
|
|
5777
|
-
#elif TEXTDECODER == 2
|
|
5778
|
-
tmp = new TextDecoder();
|
|
5779
|
-
#endif
|
|
5780
|
-
emnapiUtf8Decoder = tmp;
|
|
5781
|
-
},
|
|
5782
|
-
$emnapiUtf8ToString__deps: ['$emnapiUtf8Decoder'],
|
|
5783
|
-
$emnapiUtf8ToString: function (ptr, length) {
|
|
5784
|
-
// eslint-disable-next-line eqeqeq
|
|
5785
|
-
if (length == -1) {
|
|
5786
|
-
return UTF8ToString(ptr);
|
|
5787
|
-
}
|
|
5788
|
-
length = length >>> 0;
|
|
5789
|
-
if (!length)
|
|
5790
|
-
return '';
|
|
5791
|
-
return emnapiUtf8Decoder.decode({{{ getUnsharedTextDecoderView('HEAPU8', 'ptr', 'ptr + length') }}});
|
|
5792
|
-
},
|
|
5793
|
-
$emnapiUtf16leDecoder__postset: 'emnapiUtf16leDecoder();',
|
|
5794
|
-
$emnapiUtf16leDecoder: function () {
|
|
5795
|
-
#if !TEXTDECODER || TEXTDECODER == 1
|
|
5796
|
-
var fallbackDecoder = {
|
|
5797
|
-
decode: function (input) {
|
|
5798
|
-
var isArrayBuffer = input instanceof ArrayBuffer;
|
|
5799
|
-
var isView = ArrayBuffer.isView(input);
|
|
5800
|
-
if (!isArrayBuffer && !isView) {
|
|
5801
|
-
throw new TypeError('The "input" argument must be an instance of ArrayBuffer or ArrayBufferView');
|
|
5802
|
-
}
|
|
5803
|
-
var bytes = isArrayBuffer ? new Uint16Array(input) : new Uint16Array(input.buffer, input.byteOffset, input.byteLength / 2);
|
|
5804
|
-
var wcharArray = Array(bytes.length);
|
|
5805
|
-
for (var i = 0; i < bytes.length; ++i) {
|
|
5806
|
-
wcharArray[i] = String.fromCharCode(bytes[i]);
|
|
5807
|
-
}
|
|
5808
|
-
return wcharArray.join('');
|
|
5809
|
-
}
|
|
5810
|
-
};
|
|
5811
|
-
#endif
|
|
5812
|
-
var tmp; // typescript bug
|
|
5813
|
-
#if !TEXTDECODER
|
|
5814
|
-
tmp = fallbackDecoder;
|
|
5815
|
-
#elif TEXTDECODER == 1
|
|
5816
|
-
tmp = typeof TextDecoder === 'function' ? new TextDecoder('utf-16le') : fallbackDecoder;
|
|
5817
|
-
#elif TEXTDECODER == 2
|
|
5818
|
-
tmp = new TextDecoder('utf-16le');
|
|
5819
|
-
#endif
|
|
5820
|
-
emnapiUtf16leDecoder = tmp;
|
|
5821
|
-
},
|
|
5822
|
-
$emnapiUtf16ToString__deps: [
|
|
5823
|
-
#if typeof LEGACY_RUNTIME !== 'undefined' && !LEGACY_RUNTIME
|
|
5824
|
-
'$UTF16ToString',
|
|
5825
|
-
#endif
|
|
5826
|
-
'$emnapiUtf16leDecoder'
|
|
5827
|
-
],
|
|
5828
|
-
$emnapiUtf16ToString: function (ptr, length) {
|
|
5829
|
-
// eslint-disable-next-line eqeqeq
|
|
5830
|
-
if (length == -1) {
|
|
5831
|
-
return UTF16ToString(ptr);
|
|
5832
|
-
}
|
|
5833
|
-
length = length >>> 0;
|
|
5834
|
-
if (!length)
|
|
5835
|
-
return '';
|
|
5836
|
-
return emnapiUtf16leDecoder.decode({{{ getUnsharedTextDecoderView('HEAPU8', 'ptr', 'ptr + length * 2') }}});
|
|
5837
|
-
}
|
|
5838
|
-
});
|
|
5925
|
+
emnapiImplementInternal('_emnapi_get_filename', 'ipi', __emnapi_get_filename, ['$emnapiString']);
|
|
5839
5926
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
5840
5927
|
function emnapiImplement(name, sig, compilerTimeFunction, deps) {
|
|
5841
5928
|
var _a;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|