Mercurial
annotate third_party/luajit/src/lj_char.c @ 206:240337164a80
[Seobeo] SSL should be used for large file as well lol.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Sun, 15 Feb 2026 11:41:53 -0800 |
| parents | 94705b5986b3 |
| children |
| rev | line source |
|---|---|
|
178
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
1 /* |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
2 ** Character types. |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
3 ** Donated to the public domain. |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
4 ** |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
5 ** This is intended to replace the problematic libc single-byte NLS functions. |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
6 ** These just don't make sense anymore with UTF-8 locales becoming the norm |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
7 ** on POSIX systems. It never worked too well on Windows systems since hardly |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
8 ** anyone bothered to call setlocale(). |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
9 ** |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
10 ** This table is hardcoded for ASCII. Identifiers include the characters |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
11 ** 128-255, too. This allows for the use of all non-ASCII chars as identifiers |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
12 ** in the lexer. This is a broad definition, but works well in practice |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
13 ** for both UTF-8 locales and most single-byte locales (such as ISO-8859-*). |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
14 ** |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
15 ** If you really need proper character types for UTF-8 strings, please use |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
16 ** an add-on library such as slnunicode: http://luaforge.net/projects/sln/ |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
17 */ |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
18 |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
19 #define lj_char_c |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
20 #define LUA_CORE |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
21 |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
22 #include "lj_char.h" |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
23 |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
24 LJ_DATADEF const uint8_t lj_char_bits[257] = { |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
25 0, |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
26 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 1, 1, |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
27 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
28 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
29 152,152,152,152,152,152,152,152,152,152, 4, 4, 4, 4, 4, 4, |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
30 4,176,176,176,176,176,176,160,160,160,160,160,160,160,160,160, |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
31 160,160,160,160,160,160,160,160,160,160,160, 4, 4, 4, 4,132, |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
32 4,208,208,208,208,208,208,192,192,192,192,192,192,192,192,192, |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
33 192,192,192,192,192,192,192,192,192,192,192, 4, 4, 4, 4, 1, |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
34 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
35 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
36 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
37 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
38 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
39 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
40 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
41 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128 |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
42 }; |
|
94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
43 |