warpo 3.1.3 → 3.2.1
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/assemblyscript/std/README.md +5 -0
- package/assemblyscript/std/assembly/array.ts +542 -0
- package/assemblyscript/std/assembly/arraybuffer.ts +72 -0
- package/assemblyscript/std/assembly/builtins.ts +2312 -0
- package/assemblyscript/std/assembly/compat.ts +2 -0
- package/assemblyscript/std/assembly/dataview.ts +144 -0
- package/assemblyscript/std/assembly/date.ts +383 -0
- package/assemblyscript/std/assembly/diagnostics.ts +11 -0
- package/assemblyscript/std/assembly/error.ts +39 -0
- package/assemblyscript/std/assembly/function.ts +44 -0
- package/assemblyscript/std/assembly/iterator.ts +24 -0
- package/assemblyscript/std/assembly/map.ts +304 -0
- package/assemblyscript/std/assembly/math.ts +3401 -0
- package/assemblyscript/std/assembly/memory.ts +110 -0
- package/assemblyscript/std/assembly/number.ts +388 -0
- package/assemblyscript/std/assembly/object.ts +30 -0
- package/assemblyscript/std/assembly/polyfills.ts +24 -0
- package/assemblyscript/std/assembly/process.ts +7 -0
- package/assemblyscript/std/assembly/promise.ts +172 -0
- package/assemblyscript/std/assembly/reference.ts +48 -0
- package/assemblyscript/std/assembly/regexp.ts +16 -0
- package/assemblyscript/std/assembly/rt/common.ts +79 -0
- package/assemblyscript/std/assembly/rt/index-incremental.ts +4 -0
- package/assemblyscript/std/assembly/rt/index-radical.ts +4 -0
- package/assemblyscript/std/assembly/rt/index.d.ts +37 -0
- package/assemblyscript/std/assembly/rt/itcms.ts +415 -0
- package/assemblyscript/std/assembly/rt/tcms.ts +276 -0
- package/assemblyscript/std/assembly/rt/tlsf.ts +564 -0
- package/assemblyscript/std/assembly/rt.ts +71 -0
- package/assemblyscript/std/assembly/set.ts +261 -0
- package/assemblyscript/std/assembly/shared/feature.ts +69 -0
- package/assemblyscript/std/assembly/shared/host.ts +12 -0
- package/assemblyscript/std/assembly/shared/runtime.ts +9 -0
- package/assemblyscript/std/assembly/shared/target.ts +9 -0
- package/assemblyscript/std/assembly/shared/tsconfig.json +9 -0
- package/assemblyscript/std/assembly/shared/typeinfo.ts +72 -0
- package/assemblyscript/std/assembly/staticarray.ts +446 -0
- package/assemblyscript/std/assembly/string.ts +892 -0
- package/assemblyscript/std/assembly/symbol.ts +61 -0
- package/assemblyscript/std/assembly/table.ts +15 -0
- package/assemblyscript/std/assembly/tsconfig.json +4 -0
- package/assemblyscript/std/assembly/tuple.ts +36 -0
- package/assemblyscript/std/assembly/typedarray.ts +2000 -0
- package/assemblyscript/std/assembly/uri.ts +17 -0
- package/assemblyscript/std/assembly/util/bytes.ts +90 -0
- package/assemblyscript/std/assembly/util/casemap.ts +264 -0
- package/assemblyscript/std/assembly/util/error.ts +54 -0
- package/assemblyscript/std/assembly/util/hash.ts +117 -0
- package/assemblyscript/std/assembly/util/math.ts +1922 -0
- package/assemblyscript/std/assembly/util/memory.ts +309 -0
- package/assemblyscript/std/assembly/util/number.ts +884 -0
- package/assemblyscript/std/assembly/util/sort.ts +282 -0
- package/assemblyscript/std/assembly/util/string.ts +1075 -0
- package/assemblyscript/std/assembly/util/uri.ts +251 -0
- package/assemblyscript/std/assembly/vector.ts +3 -0
- package/dist/common/leb128.d.ts +5 -0
- package/dist/common/leb128.js +17 -0
- package/dist/common/leb128.js.map +1 -0
- package/dist/debug_server/debugSession.d.ts +31 -1
- package/dist/debug_server/debugSession.js +477 -99
- package/dist/debug_server/debugSession.js.map +1 -1
- package/dist/debug_server/debugTrace.d.ts +2 -0
- package/dist/debug_server/debugTrace.js +38 -0
- package/dist/debug_server/debugTrace.js.map +1 -0
- package/dist/debug_server/debugger.d.ts +5 -1
- package/dist/debug_server/debuggerWasmModule.d.ts +9 -0
- package/dist/debug_server/debuggerWasmModule.js +182 -4
- package/dist/debug_server/debuggerWasmModule.js.map +1 -1
- package/dist/debug_server/nodeDebugger.d.ts +12 -1
- package/dist/debug_server/nodeDebugger.js +74 -28
- package/dist/debug_server/nodeDebugger.js.map +1 -1
- package/dist/debug_server/tests/debugSession.test.js +556 -22
- package/dist/debug_server/tests/debugSession.test.js.map +1 -1
- package/dist/debug_server/tests/testModule/debugger_breakpoint_validation.d.ts +1 -0
- package/dist/debug_server/tests/testModule/debugger_breakpoint_validation.js +12 -0
- package/dist/debug_server/tests/testModule/debugger_breakpoint_validation.js.map +1 -0
- package/dist/debug_server/tests/testModule/debugger_closure_stepping.d.ts +1 -0
- package/dist/debug_server/tests/testModule/debugger_closure_stepping.js +12 -0
- package/dist/debug_server/tests/testModule/debugger_closure_stepping.js.map +1 -0
- package/dist/debug_server/tests/testModule/debugger_function_closure.d.ts +1 -0
- package/dist/debug_server/tests/testModule/debugger_function_closure.js +24 -0
- package/dist/debug_server/tests/testModule/debugger_function_closure.js.map +1 -0
- package/dist/debug_server/tests/testModule/debugger_import.case.d.ts +1 -0
- package/dist/debug_server/tests/testModule/debugger_import.case.js +9 -0
- package/dist/debug_server/tests/testModule/debugger_import.case.js.map +1 -0
- package/dist/debug_server/tests/testModule/debugger_import.d.ts +1 -0
- package/dist/debug_server/tests/testModule/debugger_import.js +6 -0
- package/dist/debug_server/tests/testModule/debugger_import.js.map +1 -0
- package/dist/debug_server/tests/testModule/debugger_pause.d.ts +1 -0
- package/dist/debug_server/tests/testModule/debugger_pause.js +9 -0
- package/dist/debug_server/tests/testModule/debugger_pause.js.map +1 -0
- package/dist/debug_server/tests/testModule/debugger_std_array.d.ts +1 -0
- package/dist/debug_server/tests/testModule/debugger_std_array.js +6 -0
- package/dist/debug_server/tests/testModule/debugger_std_array.js.map +1 -0
- package/dist/debug_server/tests/testModule/debugger_stepping.d.ts +3 -0
- package/dist/debug_server/tests/testModule/debugger_stepping.js +28 -0
- package/dist/debug_server/tests/testModule/debugger_stepping.js.map +1 -0
- package/dist/debug_server/tests/testModule/debugger_string_stepping.d.ts +1 -0
- package/dist/debug_server/tests/testModule/debugger_string_stepping.js +9 -0
- package/dist/debug_server/tests/testModule/debugger_string_stepping.js.map +1 -0
- package/dist/debug_server/tests/testModule/debugger_typed_array.d.ts +1 -0
- package/dist/debug_server/tests/testModule/debugger_typed_array.js +52 -0
- package/dist/debug_server/tests/testModule/debugger_typed_array.js.map +1 -0
- package/dist/debug_server/tests/testModule/debugger_utf8_const_str.d.ts +1 -0
- package/dist/debug_server/tests/testModule/debugger_utf8_const_str.js +10 -0
- package/dist/debug_server/tests/testModule/debugger_utf8_const_str.js.map +1 -0
- package/dist/dwarf/dwarfParser.js +6 -13
- package/dist/dwarf/dwarfParser.js.map +1 -1
- package/dist/dwarf/functionDebugInfo.d.ts +3 -0
- package/dist/dwarf/functionDebugInfo.js +24 -0
- package/dist/dwarf/functionDebugInfo.js.map +1 -1
- package/package.json +7 -7
- package/warpo_extension/std/tsconfig.json +4 -0
- package/warpo_extension/std/warpo/ffi.ts +16 -0
- package/warpo_extension/std/warpo/test/comparison.ts +122 -0
- package/warpo_extension/std/warpo/test/env.ts +33 -0
- package/warpo_extension/std/warpo/test/expect.ts +101 -0
- package/warpo_extension/std/warpo/test/formatPrint.ts +99 -0
- package/warpo_extension/std/warpo/test/implement.ts +41 -0
- package/warpo_extension/std/warpo/test/index.d.ts +0 -0
- package/warpo_extension/std/warpo/test/index.ts +39 -0
- package/warpo_extension/std/warpo/test/mockInstrument.ts +26 -0
- package/warpo_extension/std/warpo/utf8/const_str.ts +17 -0
- package/warpo_extension/std/wasi_snapshot_preview1/LICENSE +202 -0
- package/warpo_extension/std/wasi_snapshot_preview1/README.md +1 -0
- package/warpo_extension/std/wasi_snapshot_preview1/bindings/wasi_snapshot_preview1.ts +1731 -0
- package/warpo_extension/std/wasi_snapshot_preview1/wasi_console.ts +96 -0
- package/warpo_extension/std/wasi_snapshot_preview1/wasi_crypto.ts +8 -0
- package/warpo_extension/std/wasi_snapshot_preview1/wasi_date.ts +13 -0
- package/warpo_extension/std/wasi_snapshot_preview1/wasi_internal.ts +119 -0
- package/warpo_extension/std/wasi_snapshot_preview1/wasi_performance.ts +11 -0
- package/warpo_extension/std/wasi_snapshot_preview1/wasi_process.ts +191 -0
|
@@ -0,0 +1,1075 @@
|
|
|
1
|
+
import { itoa32, utoa32, itoa64, utoa64, dtoa, itoa_buffered, dtoa_buffered, MAX_DOUBLE_LENGTH } from "./number";
|
|
2
|
+
|
|
3
|
+
import { ipow32 } from "../math";
|
|
4
|
+
|
|
5
|
+
// All tables are stored as two staged lookup tables (static tries)
|
|
6
|
+
// because the full range of Unicode symbols can't be efficiently
|
|
7
|
+
// represented as-is in memory (see Unicode spec ch 5, p.196):
|
|
8
|
+
// https://www.unicode.org/versions/Unicode12.0.0/ch05.pdf
|
|
9
|
+
// Tables have been generated using these forked musl tools:
|
|
10
|
+
// https://github.com/MaxGraey/musl-chartable-tools/tree/case-ignorable
|
|
11
|
+
|
|
12
|
+
// Lookup table to check if a character is alphanumeric or not
|
|
13
|
+
// See: https://git.musl-libc.org/cgit/musl/tree/src/ctype/alpha.h
|
|
14
|
+
// size: 3904 bytes
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
@inline @lazy const ALPHA_TABLE = memory.data<u8>([
|
|
17
|
+
18, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 17, 34, 35, 36, 17, 37, 38, 39, 40, 41, 42, 43,
|
|
18
|
+
44, 17, 45, 46, 47, 16, 16, 48, 16, 16, 16, 16, 16, 16, 16, 49, 50, 51, 16, 52, 53, 16, 16, 17, 17, 17, 17, 17, 17,
|
|
19
|
+
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 54, 17, 17, 17, 17, 17, 17, 17, 17, 17,
|
|
20
|
+
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
|
|
21
|
+
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
|
|
22
|
+
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 55, 17, 17, 17, 17, 56, 17, 57, 58, 59, 60, 61, 62, 17, 17,
|
|
23
|
+
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
|
|
24
|
+
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 63, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
|
|
25
|
+
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 64, 65, 17, 66, 67, 68, 69, 70, 71, 72, 73,
|
|
26
|
+
74, 17, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 16, 95, 96, 97, 98, 17, 17,
|
|
27
|
+
17, 99, 100, 101, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 102, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
|
|
28
|
+
16, 16, 16, 16, 16, 17, 17, 103, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
|
|
29
|
+
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 104, 105, 16, 16, 106, 107, 17, 17, 17, 17, 17, 17, 17, 17,
|
|
30
|
+
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 108, 17, 17, 17, 17, 109, 110, 16, 16, 16, 16, 16, 16, 16,
|
|
31
|
+
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 111,
|
|
32
|
+
112, 16, 16, 16, 16, 16, 16, 16, 16, 16, 113, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
|
|
33
|
+
16, 16, 16, 16, 16, 114, 115, 116, 117, 16, 16, 16, 16, 16, 16, 16, 16, 118, 119, 120, 16, 16, 16, 16, 16, 121, 122,
|
|
34
|
+
16, 16, 16, 16, 123, 16, 16, 124, 16, 16, 16, 16, 16, 16, 16, 16, 16, 125, 16, 16, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
35
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
36
|
+
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0,
|
|
37
|
+
0, 0, 0, 0, 0, 254, 255, 255, 7, 254, 255, 255, 7, 0, 0, 0, 0, 0, 4, 32, 4, 255, 255, 127, 255, 255, 255, 127, 255,
|
|
38
|
+
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
39
|
+
255, 195, 255, 3, 0, 31, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 223, 188, 64, 215, 255, 255, 251, 255,
|
|
40
|
+
255, 255, 255, 255, 255, 255, 255, 255, 191, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
41
|
+
255, 255, 255, 3, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
42
|
+
255, 254, 255, 255, 255, 127, 2, 255, 255, 255, 255, 255, 1, 0, 0, 0, 0, 255, 191, 182, 0, 255, 255, 255, 135, 7, 0,
|
|
43
|
+
0, 0, 255, 7, 255, 255, 255, 255, 255, 255, 255, 254, 255, 195, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
44
|
+
255, 239, 31, 254, 225, 255, 159, 0, 0, 255, 255, 255, 255, 255, 255, 0, 224, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
45
|
+
255, 255, 255, 255, 3, 0, 255, 255, 255, 255, 255, 7, 48, 4, 255, 255, 255, 252, 255, 31, 0, 0, 255, 255, 255, 1, 255,
|
|
46
|
+
7, 0, 0, 0, 0, 0, 0, 255, 255, 223, 255, 255, 0, 240, 255, 248, 3, 255, 255, 255, 255, 255, 255, 255, 255, 255, 239,
|
|
47
|
+
255, 223, 225, 255, 207, 255, 254, 255, 239, 159, 249, 255, 255, 253, 197, 227, 159, 89, 128, 176, 207, 255, 3, 16,
|
|
48
|
+
238, 135, 249, 255, 255, 253, 109, 195, 135, 25, 2, 94, 192, 255, 63, 0, 238, 191, 251, 255, 255, 253, 237, 227, 191,
|
|
49
|
+
27, 1, 0, 207, 255, 0, 30, 238, 159, 249, 255, 255, 253, 237, 227, 159, 25, 192, 176, 207, 255, 2, 0, 236, 199, 61,
|
|
50
|
+
214, 24, 199, 255, 195, 199, 29, 129, 0, 192, 255, 0, 0, 239, 223, 253, 255, 255, 253, 255, 227, 223, 29, 96, 7, 207,
|
|
51
|
+
255, 0, 0, 239, 223, 253, 255, 255, 253, 239, 227, 223, 29, 96, 64, 207, 255, 6, 0, 255, 223, 253, 255, 255, 255, 255,
|
|
52
|
+
231, 223, 93, 240, 128, 207, 255, 0, 252, 238, 255, 127, 252, 255, 255, 251, 47, 127, 128, 95, 255, 192, 255, 12, 0,
|
|
53
|
+
254, 255, 255, 255, 255, 127, 255, 7, 63, 32, 255, 3, 0, 0, 0, 0, 214, 247, 255, 255, 175, 255, 255, 59, 95, 32, 255,
|
|
54
|
+
243, 0, 0, 0, 0, 1, 0, 0, 0, 255, 3, 0, 0, 255, 254, 255, 255, 255, 31, 254, 255, 3, 255, 255, 254, 255, 255, 255, 31,
|
|
55
|
+
0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 127, 249, 255, 3, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
56
|
+
63, 255, 255, 255, 255, 191, 32, 255, 255, 255, 255, 255, 247, 255, 255, 255, 255, 255, 255, 255, 255, 255, 61, 127,
|
|
57
|
+
61, 255, 255, 255, 255, 255, 61, 255, 255, 255, 255, 61, 127, 61, 255, 127, 255, 255, 255, 255, 255, 255, 255, 61,
|
|
58
|
+
255, 255, 255, 255, 255, 255, 255, 255, 7, 0, 0, 0, 0, 255, 255, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
59
|
+
255, 63, 63, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
60
|
+
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
61
|
+
255, 159, 255, 255, 254, 255, 255, 7, 255, 255, 255, 255, 255, 255, 255, 255, 255, 199, 255, 1, 255, 223, 15, 0, 255,
|
|
62
|
+
255, 15, 0, 255, 255, 15, 0, 255, 223, 13, 0, 255, 255, 255, 255, 255, 255, 207, 255, 255, 1, 128, 16, 255, 3, 0, 0,
|
|
63
|
+
0, 0, 255, 3, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 1, 255, 255, 255, 255, 255, 7, 255, 255, 255,
|
|
64
|
+
255, 255, 255, 255, 255, 63, 0, 255, 255, 255, 127, 255, 15, 255, 1, 192, 255, 255, 255, 255, 63, 31, 0, 255, 255,
|
|
65
|
+
255, 255, 255, 15, 255, 255, 255, 3, 255, 3, 0, 0, 0, 0, 255, 255, 255, 15, 255, 255, 255, 255, 255, 255, 255, 127,
|
|
66
|
+
254, 255, 31, 0, 255, 3, 255, 3, 128, 0, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 239, 255, 239,
|
|
67
|
+
15, 255, 3, 0, 0, 0, 0, 255, 255, 255, 255, 255, 243, 255, 255, 255, 255, 255, 255, 191, 255, 3, 0, 255, 255, 255,
|
|
68
|
+
255, 255, 255, 127, 0, 255, 227, 255, 255, 255, 255, 255, 63, 255, 1, 255, 255, 255, 255, 255, 231, 0, 0, 0, 0, 0,
|
|
69
|
+
222, 111, 4, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
70
|
+
255, 255, 255, 0, 0, 0, 0, 128, 255, 31, 0, 255, 255, 63, 63, 255, 255, 255, 255, 63, 63, 255, 170, 255, 255, 255, 63,
|
|
71
|
+
255, 255, 255, 255, 255, 255, 223, 95, 220, 31, 207, 15, 255, 31, 220, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
72
|
+
2, 128, 0, 0, 255, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, 252, 47, 62, 80, 189, 255, 243, 224, 67, 0, 0, 255,
|
|
73
|
+
255, 255, 255, 255, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
74
|
+
0, 0, 0, 0, 192, 255, 255, 255, 255, 255, 255, 3, 0, 0, 255, 255, 255, 255, 255, 127, 255, 255, 255, 255, 255, 127,
|
|
75
|
+
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 31, 120, 12, 0, 255, 255, 255, 255,
|
|
76
|
+
191, 32, 255, 255, 255, 255, 255, 255, 255, 128, 0, 0, 255, 255, 127, 0, 127, 127, 127, 127, 127, 127, 127, 127, 255,
|
|
77
|
+
255, 255, 255, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224,
|
|
78
|
+
0, 0, 0, 254, 3, 62, 31, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 127, 224, 254, 255, 255, 255, 255, 255,
|
|
79
|
+
255, 255, 255, 255, 255, 247, 224, 255, 255, 255, 255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
80
|
+
127, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
81
|
+
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255,
|
|
82
|
+
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
83
|
+
255, 31, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 31, 0, 0, 0, 0, 0, 0, 0,
|
|
84
|
+
0, 255, 255, 255, 255, 255, 63, 255, 31, 255, 255, 255, 15, 0, 0, 255, 255, 255, 255, 255, 127, 240, 143, 255, 255,
|
|
85
|
+
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 128, 255, 252, 255, 255, 255, 255, 255, 255,
|
|
86
|
+
255, 255, 255, 255, 255, 255, 249, 255, 255, 255, 255, 255, 255, 252, 7, 0, 0, 0, 0, 224, 255, 191, 255, 255, 255,
|
|
87
|
+
255, 0, 0, 0, 255, 255, 255, 255, 255, 255, 15, 0, 255, 255, 255, 255, 255, 255, 255, 255, 47, 0, 255, 3, 0, 0, 252,
|
|
88
|
+
232, 255, 255, 255, 255, 255, 7, 255, 255, 255, 255, 7, 0, 255, 255, 255, 31, 255, 255, 255, 255, 255, 255, 247, 255,
|
|
89
|
+
0, 128, 255, 3, 255, 255, 255, 127, 255, 255, 255, 255, 255, 255, 127, 0, 255, 63, 255, 3, 255, 255, 127, 252, 255,
|
|
90
|
+
255, 255, 255, 255, 255, 255, 127, 5, 0, 0, 56, 255, 255, 60, 0, 126, 126, 126, 0, 127, 127, 255, 255, 255, 255, 255,
|
|
91
|
+
247, 255, 3, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 7, 255, 3, 255, 255, 255, 255,
|
|
92
|
+
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 15, 0, 255, 255, 127, 248, 255, 255,
|
|
93
|
+
255, 255, 255, 15, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 63, 255, 255, 255, 255, 255, 255,
|
|
94
|
+
255, 255, 255, 255, 255, 255, 255, 3, 0, 0, 0, 0, 127, 0, 248, 224, 255, 253, 127, 95, 219, 255, 255, 255, 255, 255,
|
|
95
|
+
255, 255, 255, 255, 255, 255, 255, 255, 3, 0, 0, 0, 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
96
|
+
63, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 252, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 255, 15, 0, 0, 0,
|
|
97
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 223, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
98
|
+
31, 0, 0, 255, 3, 254, 255, 255, 7, 254, 255, 255, 7, 192, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 127, 252,
|
|
99
|
+
252, 252, 28, 0, 0, 0, 0, 255, 239, 255, 255, 127, 255, 255, 183, 255, 63, 255, 63, 0, 0, 0, 0, 255, 255, 255, 255,
|
|
100
|
+
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 7, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 31, 0,
|
|
101
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 31,
|
|
102
|
+
255, 255, 255, 255, 255, 255, 1, 0, 0, 0, 0, 0, 255, 255, 255, 255, 0, 224, 255, 255, 255, 7, 255, 255, 255, 255, 255,
|
|
103
|
+
7, 255, 255, 255, 63, 255, 255, 255, 255, 15, 255, 62, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
104
|
+
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 63, 255, 3, 255, 255, 255, 255, 15, 255, 255, 255, 255, 15, 255,
|
|
105
|
+
255, 255, 255, 255, 0, 255, 255, 255, 255, 255, 255, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255,
|
|
106
|
+
255, 255, 255, 255, 255, 127, 0, 255, 255, 63, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,
|
|
107
|
+
253, 255, 255, 255, 255, 191, 145, 255, 255, 63, 0, 255, 255, 127, 0, 255, 255, 255, 127, 0, 0, 0, 0, 0, 0, 0, 0, 255,
|
|
108
|
+
255, 55, 0, 255, 255, 63, 0, 255, 255, 255, 3, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 192, 0, 0,
|
|
109
|
+
0, 0, 0, 0, 0, 0, 111, 240, 239, 254, 255, 255, 63, 0, 0, 0, 0, 0, 255, 255, 255, 31, 255, 255, 255, 31, 0, 0, 0, 0,
|
|
110
|
+
255, 254, 255, 255, 31, 0, 0, 0, 255, 255, 255, 255, 255, 255, 63, 0, 255, 255, 63, 0, 255, 255, 7, 0, 255, 255, 3, 0,
|
|
111
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 1, 0, 0, 0, 0, 0, 0, 255, 255, 255,
|
|
112
|
+
255, 255, 255, 7, 0, 255, 255, 255, 255, 255, 255, 7, 0, 255, 255, 255, 255, 255, 0, 255, 3, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
113
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255,
|
|
114
|
+
255, 27, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 31, 128, 0, 255, 255, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
115
|
+
255, 255, 31, 0, 0, 0, 255, 255, 127, 0, 255, 255, 255, 255, 255, 255, 255, 255, 63, 0, 0, 0, 192, 255, 0, 0, 252,
|
|
116
|
+
255, 255, 255, 255, 255, 255, 1, 0, 0, 255, 255, 255, 1, 255, 3, 255, 255, 255, 255, 255, 255, 199, 255, 240, 0, 255,
|
|
117
|
+
255, 255, 255, 71, 0, 255, 255, 255, 255, 255, 255, 255, 255, 30, 192, 255, 23, 0, 0, 0, 0, 255, 255, 251, 255, 255,
|
|
118
|
+
255, 159, 64, 0, 0, 0, 0, 0, 0, 0, 0, 127, 189, 255, 191, 255, 1, 255, 255, 255, 255, 255, 255, 255, 1, 255, 3, 239,
|
|
119
|
+
159, 249, 255, 255, 253, 237, 227, 159, 25, 129, 224, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
120
|
+
255, 255, 255, 255, 255, 255, 255, 255, 187, 7, 255, 131, 3, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 179, 0,
|
|
121
|
+
255, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 63, 127, 0, 0, 0,
|
|
122
|
+
63, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 127, 17, 0, 255, 3, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 63,
|
|
123
|
+
1, 255, 3, 0, 0, 0, 0, 0, 0, 255, 255, 255, 231, 255, 7, 255, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
124
|
+
0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255,
|
|
125
|
+
255, 255, 255, 255, 3, 0, 128, 127, 242, 111, 255, 255, 255, 191, 153, 7, 0, 255, 3, 0, 0, 0, 0, 0, 0, 0, 0, 255, 252,
|
|
126
|
+
255, 255, 255, 255, 255, 252, 26, 0, 0, 0, 255, 255, 255, 255, 255, 255, 231, 127, 0, 0, 255, 255, 255, 255, 255, 255,
|
|
127
|
+
255, 255, 255, 32, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 1, 255, 253, 255, 255, 255, 255, 127, 127, 1, 0,
|
|
128
|
+
255, 3, 0, 0, 252, 255, 255, 255, 252, 255, 255, 254, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 251, 255, 255, 255, 255,
|
|
129
|
+
127, 180, 203, 0, 255, 3, 191, 253, 255, 255, 255, 127, 123, 1, 255, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
130
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
131
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
132
|
+
255, 255, 255, 255, 255, 255, 255, 255, 255, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255,
|
|
133
|
+
255, 255, 255, 255, 255, 255, 127, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
134
|
+
255, 255, 255, 255, 255, 255, 255, 255, 255, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
135
|
+
255, 255, 255, 255, 255, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255,
|
|
136
|
+
255, 255, 255, 255, 255, 255, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255,
|
|
137
|
+
255, 255, 255, 255, 1, 255, 255, 255, 127, 255, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 63, 0, 0, 255,
|
|
138
|
+
255, 255, 255, 255, 255, 0, 0, 15, 0, 255, 3, 248, 255, 255, 224, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
139
|
+
0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255,
|
|
140
|
+
255, 255, 255, 255, 255, 255, 255, 255, 135, 255, 255, 255, 255, 255, 255, 255, 128, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
141
|
+
11, 0, 3, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
142
|
+
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
143
|
+
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 63, 0, 0, 0, 0, 0, 255, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
144
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 127, 0, 0, 0, 0, 0, 0, 7, 0, 240, 0,
|
|
145
|
+
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
146
|
+
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
147
|
+
255, 255, 255, 15, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 7, 255, 31, 255, 1, 255, 67, 0, 0,
|
|
148
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 223, 255, 255, 255, 255, 255, 255,
|
|
149
|
+
255, 255, 223, 100, 222, 255, 235, 239, 255, 255, 255, 255, 255, 255, 255, 191, 231, 223, 223, 255, 255, 255, 123, 95,
|
|
150
|
+
252, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
151
|
+
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 63, 255, 255, 255,
|
|
152
|
+
253, 255, 255, 247, 255, 255, 255, 247, 255, 255, 223, 255, 255, 255, 223, 255, 255, 127, 255, 255, 255, 127, 255,
|
|
153
|
+
255, 255, 253, 255, 255, 255, 253, 255, 255, 247, 207, 255, 255, 255, 255, 255, 255, 127, 255, 255, 249, 219, 7, 0, 0,
|
|
154
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 31, 128, 63, 255, 67,
|
|
155
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
156
|
+
0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 15, 255, 3, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
157
|
+
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 31, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255,
|
|
158
|
+
255, 255, 143, 8, 255, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 239, 255, 255, 255, 150, 254,
|
|
159
|
+
247, 10, 132, 234, 150, 170, 150, 247, 247, 94, 255, 251, 255, 15, 238, 251, 255, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
160
|
+
0, 0, 0, 255, 255, 255, 3, 255, 255, 255, 3, 255, 255, 255, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
161
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 3,
|
|
162
|
+
]);
|
|
163
|
+
|
|
164
|
+
// size: 1568 bytes (compressed to ~1380 bytes after binaryen)
|
|
165
|
+
// @ts-ignore: decorator
|
|
166
|
+
@lazy @inline const CASED = memory.data<u8>([
|
|
167
|
+
18, 19, 20, 21, 22, 23, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 24, 16, 16, 25, 16, 16, 16, 16, 16, 16, 16, 16, 26,
|
|
168
|
+
27, 17, 28, 29, 30, 16, 16, 31, 16, 16, 16, 16, 16, 16, 16, 32, 33, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
|
|
169
|
+
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
|
|
170
|
+
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
|
|
171
|
+
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
|
|
172
|
+
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 34, 35, 16, 16, 16, 36, 16, 16,
|
|
173
|
+
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
|
|
174
|
+
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
|
|
175
|
+
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 37, 16, 16, 16, 38, 16, 16, 16, 16, 39,
|
|
176
|
+
16, 16, 16, 16, 16, 16, 16, 40, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 41, 16, 16, 16, 16, 16, 16, 16, 16, 16,
|
|
177
|
+
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
|
|
178
|
+
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
|
|
179
|
+
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 42, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
|
|
180
|
+
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
|
|
181
|
+
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
|
|
182
|
+
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
|
|
183
|
+
16, 16, 16, 16, 43, 44, 45, 46, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 47, 16, 16, 16,
|
|
184
|
+
16, 16, 16, 16, 48, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
185
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
186
|
+
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
187
|
+
254, 255, 255, 7, 254, 255, 255, 7, 0, 0, 0, 0, 0, 4, 32, 4, 255, 255, 127, 255, 255, 255, 127, 255, 255, 255, 255,
|
|
188
|
+
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 247, 240, 255,
|
|
189
|
+
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
190
|
+
255, 239, 255, 255, 255, 255, 1, 3, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 207, 188, 64,
|
|
191
|
+
215, 255, 255, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 191, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
192
|
+
255, 255, 255, 255, 255, 255, 255, 255, 3, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
193
|
+
255, 255, 255, 255, 255, 255, 254, 255, 255, 255, 127, 0, 255, 255, 255, 255, 255, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
194
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 191, 32, 255, 255, 255, 255,
|
|
195
|
+
255, 231, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
196
|
+
255, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 1, 255, 255, 255, 255, 255, 231, 0, 0, 0, 0, 0, 0,
|
|
197
|
+
0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
198
|
+
255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 63, 63, 255, 255, 255, 255, 63, 63, 255, 170, 255, 255, 255, 63, 255, 255,
|
|
199
|
+
255, 255, 255, 255, 223, 95, 220, 31, 207, 15, 255, 31, 220, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 128, 0,
|
|
200
|
+
0, 255, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, 252, 47, 62, 80, 189, 31, 242, 224, 67, 0, 0, 255, 255, 255, 255,
|
|
201
|
+
24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
202
|
+
192, 255, 255, 255, 255, 255, 255, 3, 0, 0, 255, 255, 255, 255, 255, 127, 255, 255, 255, 255, 255, 127, 255, 255, 255,
|
|
203
|
+
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 31, 120, 12, 0, 255, 255, 255, 255, 191, 32, 0, 0, 0,
|
|
204
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255,
|
|
205
|
+
63, 0, 0, 255, 255, 255, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252, 255, 255, 255, 255, 255, 255, 255,
|
|
206
|
+
255, 255, 255, 255, 255, 120, 255, 255, 255, 255, 255, 255, 252, 7, 0, 0, 0, 0, 96, 7, 0, 0, 0, 0, 0, 0, 255, 255,
|
|
207
|
+
255, 255, 255, 247, 255, 1, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 127, 0, 248, 0,
|
|
208
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254, 255, 255, 7, 254,
|
|
209
|
+
255, 255, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
210
|
+
255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 15, 255, 255, 255, 255, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
211
|
+
0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 7, 0, 255, 255, 255, 255, 255, 255, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
212
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255,
|
|
213
|
+
255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
214
|
+
255, 255, 223, 255, 255, 255, 255, 255, 255, 255, 255, 223, 100, 222, 255, 235, 239, 255, 255, 255, 255, 255, 255,
|
|
215
|
+
255, 191, 231, 223, 223, 255, 255, 255, 123, 95, 252, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
216
|
+
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
217
|
+
255, 255, 255, 255, 255, 255, 63, 255, 255, 255, 253, 255, 255, 247, 255, 255, 255, 247, 255, 255, 223, 255, 255, 255,
|
|
218
|
+
223, 255, 255, 127, 255, 255, 255, 127, 255, 255, 255, 253, 255, 255, 255, 253, 255, 255, 247, 15, 0, 0, 0, 0, 0, 0,
|
|
219
|
+
255, 255, 255, 255, 255, 255, 255, 255, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
220
|
+
0, 0, 0, 0, 255, 255, 255, 3, 255, 255, 255, 3, 255, 255, 255, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
221
|
+
]);
|
|
222
|
+
|
|
223
|
+
// size: 2976 bytes (compressed to ~2050 bytes after binaryen)
|
|
224
|
+
// @ts-ignore: decorator
|
|
225
|
+
@lazy @inline const CASE_IGNORABLE = memory.data<u8>([
|
|
226
|
+
18, 16, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 16, 16, 34, 16, 16, 16, 35, 36, 37, 38, 39, 40,
|
|
227
|
+
41, 16, 42, 43, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 44, 45, 46, 16, 47, 16, 16, 16, 16, 16, 16, 16, 16, 16,
|
|
228
|
+
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
|
|
229
|
+
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
|
|
230
|
+
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
|
|
231
|
+
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 48, 16, 16, 16, 49, 16, 50, 51, 52, 53, 54, 55, 16, 16,
|
|
232
|
+
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
|
|
233
|
+
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
|
|
234
|
+
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 56, 16, 16, 57, 58, 16, 59, 60, 61, 16,
|
|
235
|
+
16, 16, 16, 16, 16, 62, 16, 16, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 16, 77, 78, 79, 16, 16, 16,
|
|
236
|
+
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 80, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
|
|
237
|
+
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
|
|
238
|
+
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 81, 82, 16, 16, 16, 83, 16, 16, 16, 16, 16, 16, 16, 16, 16,
|
|
239
|
+
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
|
|
240
|
+
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
|
|
241
|
+
16, 16, 16, 16, 16, 16, 16, 16, 16, 84, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
|
|
242
|
+
16, 85, 86, 16, 16, 16, 16, 16, 16, 16, 87, 16, 16, 16, 16, 16, 88, 89, 90, 16, 16, 16, 16, 16, 91, 92, 16, 16, 16,
|
|
243
|
+
16, 16, 16, 16, 16, 16, 93, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
244
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
245
|
+
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 128, 64, 0,
|
|
246
|
+
4, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 0, 0, 0, 161, 144, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
247
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
248
|
+
255, 255, 255, 255, 255, 255, 48, 4, 176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
249
|
+
0, 0, 0, 0, 0, 0, 248, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 130, 0, 0, 0, 0,
|
|
250
|
+
0, 0, 254, 255, 255, 255, 255, 191, 182, 0, 0, 0, 0, 0, 16, 0, 63, 0, 255, 23, 0, 0, 0, 0, 1, 248, 255, 255, 0, 0, 1,
|
|
251
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 191, 255, 61, 0, 0, 0, 128, 2, 0, 0, 0, 255, 255, 255, 7, 0, 0, 0, 0, 0, 0, 0,
|
|
252
|
+
0, 0, 0, 192, 255, 1, 0, 0, 0, 0, 0, 0, 248, 63, 36, 0, 0, 192, 255, 255, 63, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0,
|
|
253
|
+
0, 0, 0, 0, 0, 0, 0, 248, 255, 255, 255, 255, 255, 7, 0, 0, 0, 0, 0, 0, 20, 254, 33, 254, 0, 12, 0, 2, 0, 2, 0, 0, 0,
|
|
254
|
+
0, 0, 0, 16, 30, 32, 0, 0, 12, 0, 0, 64, 6, 0, 0, 0, 0, 0, 0, 16, 134, 57, 2, 0, 0, 0, 35, 0, 6, 0, 0, 0, 0, 0, 0, 16,
|
|
255
|
+
190, 33, 0, 0, 12, 0, 0, 252, 2, 0, 0, 0, 0, 0, 0, 144, 30, 32, 96, 0, 12, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 1, 32, 0,
|
|
256
|
+
0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 192, 193, 61, 96, 0, 12, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 144, 64, 48, 0, 0, 12, 0,
|
|
257
|
+
0, 0, 3, 0, 0, 0, 0, 0, 0, 24, 30, 32, 0, 0, 12, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 4, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
258
|
+
0, 0, 242, 7, 192, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 242, 31, 64, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 160,
|
|
259
|
+
2, 0, 0, 0, 0, 0, 0, 254, 127, 223, 224, 255, 254, 255, 255, 255, 31, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224,
|
|
260
|
+
253, 102, 0, 0, 0, 195, 1, 0, 30, 0, 100, 32, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
261
|
+
0, 0, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 12, 0, 0, 0,
|
|
262
|
+
12, 0, 0, 0, 0, 0, 0, 0, 176, 63, 64, 254, 143, 32, 0, 0, 0, 0, 0, 120, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 96,
|
|
263
|
+
0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, 1, 4, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
264
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 9, 0, 0, 0, 0, 0, 0, 64, 127, 229, 31, 248, 159, 0, 0, 0, 0, 128, 0, 255, 255,
|
|
265
|
+
1, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 208, 23, 4, 0, 0, 0, 0, 248, 15, 0, 3, 0, 0, 0, 60, 59, 0, 0, 0, 0, 0, 0,
|
|
266
|
+
64, 163, 3, 0, 0, 0, 0, 0, 0, 240, 207, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 247, 255, 253, 33,
|
|
267
|
+
16, 3, 0, 0, 0, 0, 0, 240, 255, 255, 255, 255, 255, 255, 255, 7, 0, 1, 0, 0, 0, 248, 255, 255, 255, 255, 255, 255,
|
|
268
|
+
255, 255, 255, 255, 255, 251, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160, 3, 224, 0,
|
|
269
|
+
224, 0, 224, 0, 96, 0, 248, 0, 3, 144, 124, 0, 0, 0, 0, 0, 0, 223, 255, 2, 128, 0, 0, 255, 31, 0, 0, 0, 0, 0, 0, 255,
|
|
270
|
+
255, 255, 255, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 3,
|
|
271
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 0, 0,
|
|
272
|
+
0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 60, 62, 8,
|
|
273
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
274
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
275
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 247, 191, 0, 0, 0, 240, 0, 0, 0, 0, 0,
|
|
276
|
+
0, 0, 0, 0, 0, 3, 0, 255, 255, 255, 255, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
277
|
+
0, 3, 68, 8, 0, 0, 96, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 255, 255, 3, 128, 0, 0,
|
|
278
|
+
0, 0, 192, 63, 0, 0, 128, 255, 3, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 200, 51, 0, 128, 0, 0, 96, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
279
|
+
126, 102, 0, 8, 16, 0, 0, 0, 0, 1, 16, 0, 0, 0, 0, 0, 0, 157, 193, 2, 0, 0, 32, 0, 48, 88, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
280
|
+
0, 0, 0, 248, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 33, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
281
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 252, 255, 3, 0, 0, 0, 0, 0, 0, 0, 255, 255, 8, 0, 255, 255, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0,
|
|
282
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 64, 0, 4, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 192, 0,
|
|
283
|
+
0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
284
|
+
0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
|
|
285
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 110, 240, 0, 0, 0, 0, 0, 135,
|
|
286
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 0, 0, 0, 0, 0, 0, 0, 240, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
287
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
288
|
+
24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 255, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
289
|
+
0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 255, 127, 0, 0, 0, 0, 0, 0, 128, 3, 0, 0, 0, 0, 0, 120, 38, 0, 32, 0, 0, 0, 0, 0,
|
|
290
|
+
0, 7, 0, 0, 0, 128, 239, 31, 0, 0, 0, 0, 0, 0, 0, 8, 0, 3, 0, 0, 0, 0, 0, 192, 127, 0, 158, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
291
|
+
0, 0, 128, 211, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 248, 7, 0, 0, 3, 0, 0, 0, 0, 0, 0,
|
|
292
|
+
24, 1, 0, 0, 0, 192, 31, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 92, 0, 0,
|
|
293
|
+
64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 248, 133, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
294
|
+
0, 0, 0, 0, 0, 0, 60, 176, 1, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 248, 167, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
295
|
+
40, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 188, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
296
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 255, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
297
|
+
0, 0, 0, 0, 0, 0, 0, 88, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 12, 1, 0, 0, 0, 254, 7, 0, 0, 0,
|
|
298
|
+
0, 248, 121, 128, 0, 126, 14, 0, 0, 0, 0, 0, 252, 127, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127,
|
|
299
|
+
191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252, 255, 255, 252, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 126, 180,
|
|
300
|
+
191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 163, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
301
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 255, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
302
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
303
|
+
0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 127, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
304
|
+
0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 128, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
305
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
306
|
+
128, 3, 248, 255, 231, 15, 0, 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0,
|
|
307
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 127, 248, 255, 255, 255, 255, 255, 31,
|
|
308
|
+
32, 0, 16, 0, 0, 248, 254, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 255, 255, 249, 219, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
309
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
310
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
311
|
+
0, 240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 0, 0, 0, 0, 0, 0, 0,
|
|
312
|
+
0, 0, 0, 0, 0, 0, 240, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
313
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 248,
|
|
314
|
+
]);
|
|
315
|
+
|
|
316
|
+
// @ts-ignore: decorator
|
|
317
|
+
@lazy @inline const LOWER127 = memory.data<u8>([
|
|
318
|
+
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
|
319
|
+
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
|
|
320
|
+
61, 62, 63, 64, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
|
|
321
|
+
118, 119, 120, 121, 122, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
|
|
322
|
+
111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
|
|
323
|
+
]);
|
|
324
|
+
|
|
325
|
+
// @ts-ignore: decorator
|
|
326
|
+
@lazy @inline const UPPER127 = memory.data<u8>([
|
|
327
|
+
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
|
328
|
+
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
|
|
329
|
+
61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
|
|
330
|
+
90, 91, 92, 93, 94, 95, 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
|
|
331
|
+
87, 88, 89, 90, 123, 124, 125, 126, 127,
|
|
332
|
+
]);
|
|
333
|
+
|
|
334
|
+
// 23 * 8 = 184 bytes
|
|
335
|
+
// @ts-ignore: decorator
|
|
336
|
+
@lazy @inline const POWERS10 = memory.data<f64>([
|
|
337
|
+
1, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, 1e20,
|
|
338
|
+
1e21, 1e22,
|
|
339
|
+
]);
|
|
340
|
+
|
|
341
|
+
// @ts-ignore: decorator
|
|
342
|
+
@inline
|
|
343
|
+
export const enum CharCode {
|
|
344
|
+
PERCENT = 0x25,
|
|
345
|
+
PLUS = 0x2b,
|
|
346
|
+
MINUS = 0x2d,
|
|
347
|
+
DOT = 0x2e,
|
|
348
|
+
_0 = 0x30,
|
|
349
|
+
_1 = 0x31,
|
|
350
|
+
_2 = 0x32,
|
|
351
|
+
_3 = 0x33,
|
|
352
|
+
_4 = 0x34,
|
|
353
|
+
_5 = 0x35,
|
|
354
|
+
_6 = 0x36,
|
|
355
|
+
_7 = 0x37,
|
|
356
|
+
_8 = 0x38,
|
|
357
|
+
_9 = 0x39,
|
|
358
|
+
A = 0x41,
|
|
359
|
+
B = 0x42,
|
|
360
|
+
E = 0x45,
|
|
361
|
+
I = 0x49,
|
|
362
|
+
N = 0x4e,
|
|
363
|
+
O = 0x4f,
|
|
364
|
+
X = 0x58,
|
|
365
|
+
Z = 0x5a,
|
|
366
|
+
a = 0x61,
|
|
367
|
+
b = 0x62,
|
|
368
|
+
e = 0x65,
|
|
369
|
+
n = 0x6e,
|
|
370
|
+
o = 0x6f,
|
|
371
|
+
u = 0x75,
|
|
372
|
+
x = 0x78,
|
|
373
|
+
z = 0x7a,
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
// @ts-ignore: decorator
|
|
377
|
+
@inline
|
|
378
|
+
export function isAscii(c: u32): bool {
|
|
379
|
+
return !(c >> 7);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
// @ts-ignore: decorator
|
|
383
|
+
@inline
|
|
384
|
+
export function isLower8(c: u32): bool {
|
|
385
|
+
return c - CharCode.a < 26;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
// @ts-ignore: decorator
|
|
389
|
+
@inline
|
|
390
|
+
export function isUpper8(c: u32): bool {
|
|
391
|
+
return c - CharCode.A < 26;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
export function isSpace(c: u32): bool {
|
|
395
|
+
if (c < 0x1680) {
|
|
396
|
+
// < <LS> (1)
|
|
397
|
+
// <SP>, <TAB>, <LF>, <VT>, <FF>, <CR> and <NBSP>
|
|
398
|
+
// (c == 0x20 || c == 0xA0) was optimized to (c | 0x80) == 0xA0
|
|
399
|
+
return (c | 0x80) == 0xa0 || c - 0x09 <= 0x0d - 0x09;
|
|
400
|
+
}
|
|
401
|
+
if (c - 0x2000 <= 0x200a - 0x2000) return true;
|
|
402
|
+
switch (c) {
|
|
403
|
+
case 0x1680: // <LS> (1)
|
|
404
|
+
case 0x2028: // <LS> (2)
|
|
405
|
+
case 0x2029: // <PS>
|
|
406
|
+
case 0x202f: // <NNS>
|
|
407
|
+
case 0x205f: // <MMSP>
|
|
408
|
+
case 0x3000: // <IS>
|
|
409
|
+
case 0xfeff:
|
|
410
|
+
return true; // <ZWNBSP>
|
|
411
|
+
}
|
|
412
|
+
return false;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
export function isAlpha(c: u32): bool {
|
|
416
|
+
if (isAscii(c)) return (c | 32) - CharCode.a < 26;
|
|
417
|
+
if (c < 0x20000) {
|
|
418
|
+
// @ts-ignore: cast
|
|
419
|
+
return stagedBinaryLookup(ALPHA_TABLE, c);
|
|
420
|
+
}
|
|
421
|
+
return c < 0x2fffe;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
// @ts-ignore: decorator
|
|
425
|
+
@inline
|
|
426
|
+
export function isCased(c: u32): bool {
|
|
427
|
+
// @ts-ignore: cast
|
|
428
|
+
return c < 0x1f18a && stagedBinaryLookup(CASED, c);
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
// @ts-ignore: decorator
|
|
432
|
+
@inline
|
|
433
|
+
export function isCaseIgnorable(c: u32): bool {
|
|
434
|
+
// @ts-ignore: cast
|
|
435
|
+
return c < 0xe01f0 && stagedBinaryLookup(CASE_IGNORABLE, c);
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
// @ts-ignore: decorator
|
|
439
|
+
@inline
|
|
440
|
+
export function isFinalSigma(buffer: usize, index: isize, len: isize): bool {
|
|
441
|
+
const lookaheadLimit = 30; // max lookahead limit
|
|
442
|
+
let found = false;
|
|
443
|
+
let pos = index;
|
|
444
|
+
let minPos = max(0, pos - lookaheadLimit);
|
|
445
|
+
while (pos > minPos) {
|
|
446
|
+
let c = codePointBefore(buffer, pos);
|
|
447
|
+
if (!isCaseIgnorable(c)) {
|
|
448
|
+
if (isCased(c)) {
|
|
449
|
+
found = true;
|
|
450
|
+
} else {
|
|
451
|
+
return false;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
pos -= isize(c >= 0x10000) + 1;
|
|
455
|
+
}
|
|
456
|
+
if (!found) return false;
|
|
457
|
+
pos = index + 1;
|
|
458
|
+
let maxPos = min(pos + lookaheadLimit, len);
|
|
459
|
+
while (pos < maxPos) {
|
|
460
|
+
let c = <u32>load<u16>(buffer + (pos << 1));
|
|
461
|
+
if (u32((c & 0xfc00) == 0xd800) & u32(pos + 1 != len)) {
|
|
462
|
+
let c1 = <u32>load<u16>(buffer + (pos << 1), 2);
|
|
463
|
+
if ((c1 & 0xfc00) == 0xdc00) {
|
|
464
|
+
c = ((c - 0xd800) << 10) + (c1 - 0xdc00) + 0x10000;
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
if (!isCaseIgnorable(c)) {
|
|
468
|
+
return !isCased(c);
|
|
469
|
+
}
|
|
470
|
+
pos += isize(c >= 0x10000) + 1;
|
|
471
|
+
}
|
|
472
|
+
return true;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
// @ts-ignore: decorator
|
|
476
|
+
@inline
|
|
477
|
+
function codePointBefore(buffer: usize, index: isize): i32 {
|
|
478
|
+
if (index <= 0) return -1;
|
|
479
|
+
let c = <u32>load<u16>(buffer + ((index - 1) << 1));
|
|
480
|
+
if (u32((c & 0xfc00) == 0xdc00) & u32(index - 2 >= 0)) {
|
|
481
|
+
let c1 = <u32>load<u16>(buffer + ((index - 2) << 1));
|
|
482
|
+
if ((c1 & 0xfc00) == 0xd800) {
|
|
483
|
+
return ((c1 & 0x3ff) << 10) + (c & 0x3ff) + 0x10000;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
return (c & 0xf800) == 0xd800 ? 0xfffd : c;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
// Search routine for two-staged lookup tables
|
|
490
|
+
function stagedBinaryLookup(table: usize, c: u32): bool {
|
|
491
|
+
return <bool>((load<u8>(table + ((<u32>load<u8>(table + (c >>> 8))) << 5) + ((c & 255) >> 3)) >>> (c & 7)) & 1);
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
export function compareImpl(str1: string, index1: usize, str2: string, index2: usize, len: usize): i32 {
|
|
495
|
+
let ptr1 = changetype<usize>(str1) + (index1 << 1);
|
|
496
|
+
let ptr2 = changetype<usize>(str2) + (index2 << 1);
|
|
497
|
+
if (ASC_SHRINK_LEVEL < 2) {
|
|
498
|
+
if (len >= 4 && !((ptr1 & 7) | (ptr2 & 7))) {
|
|
499
|
+
do {
|
|
500
|
+
if (load<u64>(ptr1) != load<u64>(ptr2)) break;
|
|
501
|
+
ptr1 += 8;
|
|
502
|
+
ptr2 += 8;
|
|
503
|
+
len -= 4;
|
|
504
|
+
} while (len >= 4);
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
while (len--) {
|
|
508
|
+
let a = <i32>load<u16>(ptr1);
|
|
509
|
+
let b = <i32>load<u16>(ptr2);
|
|
510
|
+
if (a != b) return a - b;
|
|
511
|
+
ptr1 += 2;
|
|
512
|
+
ptr2 += 2;
|
|
513
|
+
}
|
|
514
|
+
return 0;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
// @ts-ignore: decorator
|
|
518
|
+
@inline
|
|
519
|
+
export function toLower8(c: u32): u32 {
|
|
520
|
+
if (ASC_SHRINK_LEVEL > 0) {
|
|
521
|
+
return c | (u32(isUpper8(c)) << 5);
|
|
522
|
+
} else {
|
|
523
|
+
return <u32>load<u8>(LOWER127 + c);
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
// @ts-ignore: decorator
|
|
528
|
+
@inline
|
|
529
|
+
export function toUpper8(c: u32): u32 {
|
|
530
|
+
if (ASC_SHRINK_LEVEL > 0) {
|
|
531
|
+
return c & ~(u32(isLower8(c)) << 5);
|
|
532
|
+
} else {
|
|
533
|
+
return <u32>load<u8>(UPPER127 + c);
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
/** Parses a string to an integer (usually), using the specified radix. */
|
|
538
|
+
export function strtol<T>(str: string, radix: i32 = 0): T {
|
|
539
|
+
let len = str.length;
|
|
540
|
+
if (!len) {
|
|
541
|
+
if (isFloat<T>()) {
|
|
542
|
+
// @ts-ignore: cast
|
|
543
|
+
return <T>NaN;
|
|
544
|
+
} else {
|
|
545
|
+
// @ts-ignore: cast
|
|
546
|
+
return <T>0;
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
let ptr = changetype<usize>(str); /* + HEAD -> offset */
|
|
551
|
+
let code = <u32>load<u16>(ptr);
|
|
552
|
+
|
|
553
|
+
// trim white spaces
|
|
554
|
+
while (isSpace(code)) {
|
|
555
|
+
code = <u32>load<u16>((ptr += 2));
|
|
556
|
+
--len;
|
|
557
|
+
}
|
|
558
|
+
// determine sign
|
|
559
|
+
// @ts-ignore
|
|
560
|
+
let sign: T = 1;
|
|
561
|
+
if (code == CharCode.MINUS || code == CharCode.PLUS) {
|
|
562
|
+
if (!--len) {
|
|
563
|
+
if (isFloat<T>()) {
|
|
564
|
+
// @ts-ignore: cast
|
|
565
|
+
return <T>NaN;
|
|
566
|
+
} else {
|
|
567
|
+
// @ts-ignore: cast
|
|
568
|
+
return <T>0;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
if (code == CharCode.MINUS) {
|
|
572
|
+
// @ts-ignore: type
|
|
573
|
+
sign = -1;
|
|
574
|
+
}
|
|
575
|
+
code = <u32>load<u16>((ptr += 2));
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
// See https://tc39.es/ecma262/#sec-parseint-string-radix
|
|
579
|
+
if (radix) {
|
|
580
|
+
if (radix < 2 || radix > 36) {
|
|
581
|
+
if (isFloat<T>()) {
|
|
582
|
+
// @ts-ignore: cast
|
|
583
|
+
return <T>NaN;
|
|
584
|
+
} else {
|
|
585
|
+
// @ts-ignore: cast
|
|
586
|
+
return <T>0;
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
// handle case as parseInt("0xFF", 16) by spec
|
|
590
|
+
if (radix == 16) {
|
|
591
|
+
if (len > 2 && code == CharCode._0 && ((<u32>load<u16>(ptr, 2)) | 32) == CharCode.x) {
|
|
592
|
+
ptr += 4;
|
|
593
|
+
len -= 2;
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
} else {
|
|
597
|
+
// determine radix by literal prefix
|
|
598
|
+
if (code == CharCode._0 && len > 2) {
|
|
599
|
+
switch ((<u32>load<u16>(ptr, 2)) | 32) {
|
|
600
|
+
case CharCode.b: {
|
|
601
|
+
ptr += 4;
|
|
602
|
+
len -= 2;
|
|
603
|
+
radix = 2;
|
|
604
|
+
break;
|
|
605
|
+
}
|
|
606
|
+
case CharCode.o: {
|
|
607
|
+
ptr += 4;
|
|
608
|
+
len -= 2;
|
|
609
|
+
radix = 8;
|
|
610
|
+
break;
|
|
611
|
+
}
|
|
612
|
+
case CharCode.x: {
|
|
613
|
+
ptr += 4;
|
|
614
|
+
len -= 2;
|
|
615
|
+
radix = 16;
|
|
616
|
+
break;
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
if (!radix) radix = 10;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
// calculate value
|
|
624
|
+
// @ts-ignore: type
|
|
625
|
+
let num: T = 0;
|
|
626
|
+
let initial = len - 1;
|
|
627
|
+
while (len--) {
|
|
628
|
+
code = <u32>load<u16>(ptr);
|
|
629
|
+
if (code - CharCode._0 < 10) {
|
|
630
|
+
code -= CharCode._0;
|
|
631
|
+
} else if (code - CharCode.A <= <u32>(CharCode.Z - CharCode.A)) {
|
|
632
|
+
code -= CharCode.A - 10;
|
|
633
|
+
} else if (code - CharCode.a <= <u32>(CharCode.z - CharCode.a)) {
|
|
634
|
+
code -= CharCode.a - 10;
|
|
635
|
+
}
|
|
636
|
+
if (code >= <u32>radix) {
|
|
637
|
+
if (initial == len) {
|
|
638
|
+
if (isFloat<T>()) {
|
|
639
|
+
// @ts-ignore: cast
|
|
640
|
+
return <T>NaN;
|
|
641
|
+
} else {
|
|
642
|
+
// @ts-ignore: cast
|
|
643
|
+
return <T>0;
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
break;
|
|
647
|
+
}
|
|
648
|
+
// @ts-ignore: type
|
|
649
|
+
num = num * radix + code;
|
|
650
|
+
ptr += 2;
|
|
651
|
+
}
|
|
652
|
+
// @ts-ignore: type
|
|
653
|
+
return sign * num;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
export function strtod(str: string): f64 {
|
|
657
|
+
let len = str.length;
|
|
658
|
+
if (!len) return NaN;
|
|
659
|
+
|
|
660
|
+
let ptr = changetype<usize>(str);
|
|
661
|
+
let code = <u32>load<u16>(ptr);
|
|
662
|
+
|
|
663
|
+
let sign = 1.0;
|
|
664
|
+
// skip white spaces
|
|
665
|
+
while (len && isSpace(code)) {
|
|
666
|
+
code = <u32>load<u16>((ptr += 2));
|
|
667
|
+
--len;
|
|
668
|
+
}
|
|
669
|
+
if (!len) return NaN;
|
|
670
|
+
|
|
671
|
+
// try parse '-' or '+'
|
|
672
|
+
if (code == CharCode.MINUS) {
|
|
673
|
+
if (!--len) return NaN;
|
|
674
|
+
code = <u32>load<u16>((ptr += 2));
|
|
675
|
+
sign = -1;
|
|
676
|
+
} else if (code == CharCode.PLUS) {
|
|
677
|
+
if (!--len) return NaN;
|
|
678
|
+
code = <u32>load<u16>((ptr += 2));
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
// try parse Infinity
|
|
682
|
+
if (len >= 8 && code == CharCode.I) {
|
|
683
|
+
if (
|
|
684
|
+
load<u64>(ptr, 0) == 0x690066006e0049 && // ifnI
|
|
685
|
+
load<u64>(ptr, 8) == 0x7900740069006e // ytin
|
|
686
|
+
) {
|
|
687
|
+
return Infinity * sign;
|
|
688
|
+
}
|
|
689
|
+
return NaN;
|
|
690
|
+
}
|
|
691
|
+
// validate next symbol
|
|
692
|
+
if (code != CharCode.DOT && <u32>(code - CharCode._0) >= 10) {
|
|
693
|
+
return NaN;
|
|
694
|
+
}
|
|
695
|
+
let savedPtr = ptr;
|
|
696
|
+
// skip zeros
|
|
697
|
+
while (code == CharCode._0) {
|
|
698
|
+
code = <u32>load<u16>((ptr += 2));
|
|
699
|
+
--len;
|
|
700
|
+
}
|
|
701
|
+
if (len <= 0) return 0.0 * sign;
|
|
702
|
+
const capacity = 19; // int(64 * 0.3010)
|
|
703
|
+
let pointed = false;
|
|
704
|
+
let consumed = 0;
|
|
705
|
+
let position = 0;
|
|
706
|
+
let x: u64 = 0;
|
|
707
|
+
if (code == CharCode.DOT) {
|
|
708
|
+
let noDigits = !(savedPtr - ptr);
|
|
709
|
+
ptr += 2;
|
|
710
|
+
--len;
|
|
711
|
+
if (!len && noDigits) return NaN;
|
|
712
|
+
for (pointed = true; (code = <u32>load<u16>(ptr)) == CharCode._0; --position, ptr += 2) --len;
|
|
713
|
+
if (len <= 0) return 0.0 * sign;
|
|
714
|
+
if (!position && noDigits && code - CharCode._0 >= 10) return NaN;
|
|
715
|
+
}
|
|
716
|
+
for (let digit = code - CharCode._0; digit < 10 || (code == CharCode.DOT && !pointed); digit = code - CharCode._0) {
|
|
717
|
+
if (digit < 10) {
|
|
718
|
+
x = consumed < capacity ? 10 * x + digit : x | u64(!!digit);
|
|
719
|
+
++consumed;
|
|
720
|
+
} else {
|
|
721
|
+
position = consumed;
|
|
722
|
+
pointed = true;
|
|
723
|
+
}
|
|
724
|
+
if (!--len) break;
|
|
725
|
+
code = <u32>load<u16>((ptr += 2));
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
if (!pointed) position = consumed;
|
|
729
|
+
return copysign<f64>(scientific(x, position - min(capacity, consumed) + parseExp(ptr, len)), sign);
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
export function strtob(str: string): bool {
|
|
733
|
+
let size: usize = str.length << 1;
|
|
734
|
+
let offset: usize = 0;
|
|
735
|
+
if (size > 8) {
|
|
736
|
+
// try trim end whitespaces first
|
|
737
|
+
while (size && isSpace(load<u16>(changetype<usize>(str) + size - 2))) size -= 2;
|
|
738
|
+
if (size > 8) {
|
|
739
|
+
// trim start whitespaces
|
|
740
|
+
while (offset < size && isSpace(load<u16>(changetype<usize>(str) + offset))) offset += 2;
|
|
741
|
+
size -= offset;
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
if (size != 8) return false;
|
|
745
|
+
// "true" represents as \00\e\00\u\00\e\00\t (00 65 00 75 00 72 00 74)
|
|
746
|
+
return load<u64>(changetype<usize>(str) + offset) == 0x0065_0075_0072_0074;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
export function joinBooleanArray(dataStart: usize, length: i32, separator: string): string {
|
|
750
|
+
let lastIndex = length - 1;
|
|
751
|
+
if (lastIndex < 0) return "";
|
|
752
|
+
if (!lastIndex) return select("true", "false", load<bool>(dataStart));
|
|
753
|
+
|
|
754
|
+
let sepLen = separator.length;
|
|
755
|
+
let valueLen = 5; // max possible length of element len("false")
|
|
756
|
+
let estLen = (valueLen + sepLen) * lastIndex + valueLen;
|
|
757
|
+
let result = changetype<string>(__new(estLen << 1, idof<string>()));
|
|
758
|
+
let offset = 0;
|
|
759
|
+
let value: bool;
|
|
760
|
+
for (let i = 0; i < lastIndex; ++i) {
|
|
761
|
+
value = load<bool>(dataStart + i);
|
|
762
|
+
valueLen = 4 + i32(!value);
|
|
763
|
+
memory.copy(
|
|
764
|
+
changetype<usize>(result) + ((<usize>offset) << 1),
|
|
765
|
+
changetype<usize>(select("true", "false", value)),
|
|
766
|
+
(<usize>valueLen) << 1
|
|
767
|
+
);
|
|
768
|
+
offset += valueLen;
|
|
769
|
+
if (sepLen) {
|
|
770
|
+
memory.copy(
|
|
771
|
+
changetype<usize>(result) + ((<usize>offset) << 1),
|
|
772
|
+
changetype<usize>(separator),
|
|
773
|
+
(<usize>sepLen) << 1
|
|
774
|
+
);
|
|
775
|
+
offset += sepLen;
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
value = load<bool>(dataStart + <usize>lastIndex);
|
|
779
|
+
valueLen = 4 + i32(!value);
|
|
780
|
+
memory.copy(
|
|
781
|
+
changetype<usize>(result) + ((<usize>offset) << 1),
|
|
782
|
+
changetype<usize>(select("true", "false", value)),
|
|
783
|
+
valueLen << 1
|
|
784
|
+
);
|
|
785
|
+
offset += valueLen;
|
|
786
|
+
|
|
787
|
+
if (estLen > offset) return result.substring(0, offset);
|
|
788
|
+
return result;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
export function joinIntegerArray<T>(dataStart: usize, length: i32, separator: string): string {
|
|
792
|
+
let lastIndex = length - 1;
|
|
793
|
+
if (lastIndex < 0) return "";
|
|
794
|
+
if (!lastIndex) {
|
|
795
|
+
let value = load<T>(dataStart);
|
|
796
|
+
if (isSigned<T>()) {
|
|
797
|
+
if (sizeof<T>() <= 4) {
|
|
798
|
+
// @ts-ignore: type
|
|
799
|
+
return changetype<string>(itoa32(<i32>value, 10));
|
|
800
|
+
} else {
|
|
801
|
+
// @ts-ignore: type
|
|
802
|
+
return changetype<string>(itoa64(<i32>value, 10));
|
|
803
|
+
}
|
|
804
|
+
} else {
|
|
805
|
+
if (sizeof<T>() <= 4) {
|
|
806
|
+
// @ts-ignore: type
|
|
807
|
+
return changetype<string>(utoa32(<u32>value, 10));
|
|
808
|
+
} else {
|
|
809
|
+
// @ts-ignore: type
|
|
810
|
+
return changetype<string>(utoa64(<u64>value, 10));
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
let sepLen = separator.length;
|
|
816
|
+
const valueLen = (sizeof<T>() <= 4 ? 10 : 20) + i32(isSigned<T>());
|
|
817
|
+
let estLen = (valueLen + sepLen) * lastIndex + valueLen;
|
|
818
|
+
let result = changetype<string>(__new(estLen << 1, idof<string>()));
|
|
819
|
+
let offset = 0;
|
|
820
|
+
let value: T;
|
|
821
|
+
for (let i = 0; i < lastIndex; ++i) {
|
|
822
|
+
value = load<T>(dataStart + ((<usize>i) << alignof<T>()));
|
|
823
|
+
// @ts-ignore: type
|
|
824
|
+
offset += itoa_buffered<T>(changetype<usize>(result) + ((<usize>offset) << 1), value);
|
|
825
|
+
if (sepLen) {
|
|
826
|
+
memory.copy(
|
|
827
|
+
changetype<usize>(result) + ((<usize>offset) << 1),
|
|
828
|
+
changetype<usize>(separator),
|
|
829
|
+
(<usize>sepLen) << 1
|
|
830
|
+
);
|
|
831
|
+
offset += sepLen;
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
value = load<T>(dataStart + ((<usize>lastIndex) << alignof<T>()));
|
|
835
|
+
// @ts-ignore: type
|
|
836
|
+
offset += itoa_buffered<T>(changetype<usize>(result) + ((<usize>offset) << 1), value);
|
|
837
|
+
if (estLen > offset) return result.substring(0, offset);
|
|
838
|
+
return result;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
export function joinFloatArray<T>(dataStart: usize, length: i32, separator: string): string {
|
|
842
|
+
let lastIndex = length - 1;
|
|
843
|
+
if (lastIndex < 0) return "";
|
|
844
|
+
if (!lastIndex) {
|
|
845
|
+
return changetype<string>(
|
|
846
|
+
dtoa(
|
|
847
|
+
// @ts-ignore: type
|
|
848
|
+
load<T>(dataStart)
|
|
849
|
+
)
|
|
850
|
+
);
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
const valueLen = MAX_DOUBLE_LENGTH;
|
|
854
|
+
let sepLen = separator.length;
|
|
855
|
+
let estLen = (valueLen + sepLen) * lastIndex + valueLen;
|
|
856
|
+
let result = changetype<string>(__new(estLen << 1, idof<string>()));
|
|
857
|
+
let offset = 0;
|
|
858
|
+
let value: T;
|
|
859
|
+
for (let i = 0; i < lastIndex; ++i) {
|
|
860
|
+
value = load<T>(dataStart + ((<usize>i) << alignof<T>()));
|
|
861
|
+
// @ts-ignore: type
|
|
862
|
+
offset += dtoa_buffered(changetype<usize>(result) + ((<usize>offset) << 1), value);
|
|
863
|
+
if (sepLen) {
|
|
864
|
+
memory.copy(
|
|
865
|
+
changetype<usize>(result) + ((<usize>offset) << 1),
|
|
866
|
+
changetype<usize>(separator),
|
|
867
|
+
(<usize>sepLen) << 1
|
|
868
|
+
);
|
|
869
|
+
offset += sepLen;
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
value = load<T>(dataStart + ((<usize>lastIndex) << alignof<T>()));
|
|
873
|
+
// @ts-ignore: type
|
|
874
|
+
offset += dtoa_buffered(changetype<usize>(result) + ((<usize>offset) << 1), value);
|
|
875
|
+
if (estLen > offset) return result.substring(0, offset);
|
|
876
|
+
return result;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
export function joinStringArray(dataStart: usize, length: i32, separator: string): string {
|
|
880
|
+
let lastIndex = length - 1;
|
|
881
|
+
if (lastIndex < 0) return "";
|
|
882
|
+
if (!lastIndex) {
|
|
883
|
+
// @ts-ignore: type
|
|
884
|
+
return load<string>(dataStart) || "";
|
|
885
|
+
}
|
|
886
|
+
let estLen = 0;
|
|
887
|
+
let value: string;
|
|
888
|
+
for (let i = 0; i < length; ++i) {
|
|
889
|
+
value = load<string>(dataStart + ((<usize>i) << alignof<string>()));
|
|
890
|
+
if (changetype<usize>(value) != 0) estLen += value.length;
|
|
891
|
+
}
|
|
892
|
+
let offset = 0;
|
|
893
|
+
let sepLen = separator.length;
|
|
894
|
+
let result = changetype<string>(__new((estLen + sepLen * lastIndex) << 1, idof<string>()));
|
|
895
|
+
for (let i = 0; i < lastIndex; ++i) {
|
|
896
|
+
value = load<string>(dataStart + ((<usize>i) << alignof<string>()));
|
|
897
|
+
if (changetype<usize>(value) != 0) {
|
|
898
|
+
let valueLen = value.length;
|
|
899
|
+
memory.copy(changetype<usize>(result) + ((<usize>offset) << 1), changetype<usize>(value), (<usize>valueLen) << 1);
|
|
900
|
+
offset += valueLen;
|
|
901
|
+
}
|
|
902
|
+
if (sepLen) {
|
|
903
|
+
memory.copy(
|
|
904
|
+
changetype<usize>(result) + ((<usize>offset) << 1),
|
|
905
|
+
changetype<usize>(separator),
|
|
906
|
+
(<usize>sepLen) << 1
|
|
907
|
+
);
|
|
908
|
+
offset += sepLen;
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
value = load<string>(dataStart + ((<usize>lastIndex) << alignof<string>()));
|
|
912
|
+
if (changetype<usize>(value) != 0) {
|
|
913
|
+
memory.copy(
|
|
914
|
+
changetype<usize>(result) + ((<usize>offset) << 1),
|
|
915
|
+
changetype<usize>(value),
|
|
916
|
+
(<usize>value.length) << 1
|
|
917
|
+
);
|
|
918
|
+
}
|
|
919
|
+
return result;
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
export function joinReferenceArray<T>(dataStart: usize, length: i32, separator: string): string {
|
|
923
|
+
let lastIndex = length - 1;
|
|
924
|
+
if (lastIndex < 0) return "";
|
|
925
|
+
let value: T;
|
|
926
|
+
if (!lastIndex) {
|
|
927
|
+
value = load<T>(dataStart);
|
|
928
|
+
// @ts-ignore: type
|
|
929
|
+
return value != null ? value.toString() : "";
|
|
930
|
+
}
|
|
931
|
+
let result = "";
|
|
932
|
+
let sepLen = separator.length;
|
|
933
|
+
for (let i = 0; i < lastIndex; ++i) {
|
|
934
|
+
value = load<T>(dataStart + ((<usize>i) << alignof<T>()));
|
|
935
|
+
// @ts-ignore: type
|
|
936
|
+
if (value != null) result += value.toString();
|
|
937
|
+
if (sepLen) result += separator;
|
|
938
|
+
}
|
|
939
|
+
value = load<T>(dataStart + ((<usize>lastIndex) << alignof<T>()));
|
|
940
|
+
// @ts-ignore: type
|
|
941
|
+
if (value != null) result += value.toString();
|
|
942
|
+
return result;
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
// @ts-ignore: decorator
|
|
946
|
+
@inline
|
|
947
|
+
function scientific(significand: u64, exp: i32): f64 {
|
|
948
|
+
if (!significand || exp < -342) return 0;
|
|
949
|
+
if (exp > 308) return Infinity;
|
|
950
|
+
// Try use fast path
|
|
951
|
+
// Use fast path for string-to-double conversion if possible
|
|
952
|
+
// see http://www.exploringbinary.com/fast-path-decimal-to-floating-point-conversion
|
|
953
|
+
// Simple integer
|
|
954
|
+
let significandf = <f64>significand;
|
|
955
|
+
if (!exp) return significandf;
|
|
956
|
+
if (exp > 22 && exp <= 22 + 15) {
|
|
957
|
+
significandf *= pow10(exp - 22);
|
|
958
|
+
exp = 22;
|
|
959
|
+
}
|
|
960
|
+
if (significand <= 9007199254740991 && abs(exp) <= 22) {
|
|
961
|
+
if (exp > 0) return significandf * pow10(exp);
|
|
962
|
+
return significandf / pow10(-exp);
|
|
963
|
+
} else if (exp < 0) {
|
|
964
|
+
return scaledown(significand, exp);
|
|
965
|
+
} else {
|
|
966
|
+
return scaleup(significand, exp);
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
// Adopted from metallic lib:
|
|
971
|
+
// https://github.com/jdh8/metallic/blob/master/src/stdlib/parse/scientific.h
|
|
972
|
+
// @ts-ignore: decorator
|
|
973
|
+
@inline
|
|
974
|
+
function scaledown(significand: u64, exp: i32): f64 {
|
|
975
|
+
const denom: u64 = 6103515625; // 1e14 * 0x1p-14
|
|
976
|
+
const scale = reinterpret<f64>(0x3f06849b86a12b9b); // 1e-14 * 0x1p32
|
|
977
|
+
|
|
978
|
+
let shift = clz(significand);
|
|
979
|
+
significand <<= shift;
|
|
980
|
+
shift = exp - shift;
|
|
981
|
+
|
|
982
|
+
for (; exp <= -14; exp += 14) {
|
|
983
|
+
let q = significand / denom;
|
|
984
|
+
let r = significand % denom;
|
|
985
|
+
let s = clz(q);
|
|
986
|
+
significand = (q << s) + <u64>nearest(scale * <f64>(r << (s - 18)));
|
|
987
|
+
shift -= s;
|
|
988
|
+
}
|
|
989
|
+
let b = <u64>ipow32(5, -exp);
|
|
990
|
+
let q = significand / b;
|
|
991
|
+
let r = significand % b;
|
|
992
|
+
let s = clz(q);
|
|
993
|
+
significand = (q << s) + <u64>(reinterpret<f64>(reinterpret<u64>(<f64>r) + (s << 52)) / <f64>b);
|
|
994
|
+
shift -= s;
|
|
995
|
+
|
|
996
|
+
return NativeMath.scalbn(<f64>significand, <i32>shift);
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
// Adopted from metallic lib:
|
|
1000
|
+
// https://github.com/jdh8/metallic/blob/master/src/stdlib/parse/scientific.h
|
|
1001
|
+
// @ts-ignore: decorator
|
|
1002
|
+
@inline
|
|
1003
|
+
function scaleup(significand: u64, exp: i32): f64 {
|
|
1004
|
+
const coeff: u32 = 1220703125; // 1e13 * 0x1p-13;
|
|
1005
|
+
let shift = ctz(significand);
|
|
1006
|
+
significand >>= shift;
|
|
1007
|
+
shift += exp;
|
|
1008
|
+
|
|
1009
|
+
__fixmulShift = shift;
|
|
1010
|
+
for (; exp >= 13; exp -= 13) {
|
|
1011
|
+
significand = fixmul(significand, coeff);
|
|
1012
|
+
}
|
|
1013
|
+
significand = fixmul(significand, <u32>ipow32(5, exp));
|
|
1014
|
+
shift = __fixmulShift;
|
|
1015
|
+
return NativeMath.scalbn(<f64>significand, <i32>shift);
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
// Adopted from metallic lib:
|
|
1019
|
+
// https://github.com/jdh8/metallic/blob/master/src/stdlib/parse/scientific.h
|
|
1020
|
+
// @ts-ignore: decorator
|
|
1021
|
+
@inline
|
|
1022
|
+
function parseExp(ptr: usize, len: i32): i32 {
|
|
1023
|
+
let sign = 1,
|
|
1024
|
+
magnitude = 0;
|
|
1025
|
+
let code = <u32>load<u16>(ptr);
|
|
1026
|
+
// check code is 'e' or 'E'
|
|
1027
|
+
if ((code | 32) != CharCode.e) return 0;
|
|
1028
|
+
|
|
1029
|
+
if (!--len) return 0;
|
|
1030
|
+
code = <u32>load<u16>((ptr += 2));
|
|
1031
|
+
if (code == CharCode.MINUS) {
|
|
1032
|
+
if (!--len) return 0;
|
|
1033
|
+
code = <u32>load<u16>((ptr += 2));
|
|
1034
|
+
sign = -1;
|
|
1035
|
+
} else if (code == CharCode.PLUS) {
|
|
1036
|
+
if (!--len) return 0;
|
|
1037
|
+
code = <u32>load<u16>((ptr += 2));
|
|
1038
|
+
}
|
|
1039
|
+
// skip zeros
|
|
1040
|
+
while (code == CharCode._0) {
|
|
1041
|
+
if (!--len) return 0;
|
|
1042
|
+
code = <u32>load<u16>((ptr += 2));
|
|
1043
|
+
}
|
|
1044
|
+
for (let digit: u32 = code - CharCode._0; len && digit < 10; digit = code - CharCode._0) {
|
|
1045
|
+
if (magnitude >= 3200) return sign * 3200;
|
|
1046
|
+
magnitude = 10 * magnitude + digit;
|
|
1047
|
+
code = <u32>load<u16>((ptr += 2));
|
|
1048
|
+
--len;
|
|
1049
|
+
}
|
|
1050
|
+
return sign * magnitude;
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
// @ts-ignore: decorator
|
|
1054
|
+
@lazy let __fixmulShift: u64 = 0;
|
|
1055
|
+
|
|
1056
|
+
// Adopted from metallic lib:
|
|
1057
|
+
// https://github.com/jdh8/metallic/blob/master/src/stdlib/parse/scientific.h
|
|
1058
|
+
// @ts-ignore: decorator
|
|
1059
|
+
@inline
|
|
1060
|
+
function fixmul(a: u64, b: u32): u64 {
|
|
1061
|
+
let low = (a & 0xffffffff) * b;
|
|
1062
|
+
let high = (a >> 32) * b + (low >> 32);
|
|
1063
|
+
let overflow = <u32>(high >> 32);
|
|
1064
|
+
let space = clz(overflow);
|
|
1065
|
+
let revspace: u64 = 32 - space;
|
|
1066
|
+
__fixmulShift += revspace;
|
|
1067
|
+
return ((high << space) | ((low & 0xffffffff) >> revspace)) + (((low << space) >> 31) & 1);
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
// @ts-ignore: decorator
|
|
1071
|
+
@inline
|
|
1072
|
+
function pow10(n: i32): f64 {
|
|
1073
|
+
// argument `n` should bounds in [0, 22] range
|
|
1074
|
+
return load<f64>(POWERS10 + (n << alignof<f64>()));
|
|
1075
|
+
}
|