updated to unicode 16.0.0 (bnoordhuis) - updated test262

This commit is contained in:
Fabrice Bellard 2025-03-25 19:08:19 +01:00
parent 29630bcea6
commit b31bb20666
7 changed files with 1869 additions and 1636 deletions

5
TODO
View File

@ -62,5 +62,6 @@ Optimization ideas:
Test262o: 0/11262 errors, 463 excluded
Test262o commit: 7da91bceb9ce7613f87db47ddd1292a2dda58b42 (es5-tests branch)
Result: 8/76947 errors, 1497 excluded, 8117 skipped
Test262 commit: 6cbb6da9473c56d95358d8e679c5a6d2b4574efb
Result: 169/76838 errors, 3112 excluded, 7010 skipped
Test262 commit: 56e77d6325067a545ea7e8ff5be5d9284334e33c

File diff suppressed because it is too large Load Diff

View File

@ -61,7 +61,6 @@ Array.fromAsync=skip
Array.prototype.at
Array.prototype.flat
Array.prototype.flatMap
Array.prototype.flatten
Array.prototype.includes
Array.prototype.values
ArrayBuffer
@ -70,9 +69,11 @@ arrow-function
async-functions
async-iteration
Atomics
Atomics.pause=skip
Atomics.waitAsync=skip
BigInt
caller
canonical-tz=skip
change-array-by-copy
class
class-fields-private
@ -83,7 +84,6 @@ class-static-block
class-static-fields-private
class-static-fields-public
class-static-methods-private
cleanupSome=skip
coalesce-expression
computed-property-names
const
@ -103,11 +103,12 @@ destructuring-assignment
destructuring-binding
dynamic-import
error-cause
Error.isError=skip
explicit-resource-management=skip
exponentiation
export-star-as-namespace-from-module
FinalizationGroup=skip
FinalizationRegistry.prototype.cleanupSome=skip
FinalizationRegistry=skip
Float16Array=skip
Float32Array
Float64Array
for-in-order
@ -118,12 +119,31 @@ hashbang
host-gc-required=skip
import-assertions=skip
import-attributes=skip
import-defer=skip
import.meta
Int16Array
Int32Array
Int8Array
Intl-enumeration=skip
intl-normative-optional=skip
Intl.DateTimeFormat-datetimestyle=skip
Intl.DateTimeFormat-dayPeriod=skip
Intl.DateTimeFormat-extend-timezonename=skip
Intl.DateTimeFormat-formatRange=skip
Intl.DateTimeFormat-fractionalSecondDigits=skip
Intl.DisplayNames-v2=skip
Intl.DisplayNames=skip
Intl.DurationFormat=skip
Intl.ListFormat=skip
Intl.Locale-info=skip
Intl.Locale=skip
Intl.NumberFormat-unified=skip
Intl.NumberFormat-v3=skip
Intl.RelativeTimeFormat=skip
Intl.Segmenter=skip
IsHTMLDDA
iterator-helpers=skip
iterator-sequencing=skip
json-modules=skip
json-parse-with-source=skip
json-superset
@ -131,6 +151,7 @@ legacy-regexp=skip
let
logical-assignment-operators
Map
Math.sumPrecise=skip
new.target
numeric-separator-literal
object-rest
@ -141,6 +162,7 @@ Object.is
optional-catch-binding
optional-chaining
Promise
promise-try=skip
promise-with-resolvers
Promise.allSettled
Promise.any
@ -155,15 +177,19 @@ regexp-dotall
regexp-duplicate-named-groups=skip
regexp-lookbehind
regexp-match-indices
regexp-modifiers=skip
regexp-named-groups
regexp-unicode-property-escapes
regexp-v-flag=skip
RegExp.escape=skip
resizable-arraybuffer=skip
rest-parameters
Set
set-methods=skip
ShadowRealm=skip
SharedArrayBuffer
source-phase-imports-module-source=skip
source-phase-imports=skip
string-trimming
String.fromCodePoint
String.prototype.at
@ -202,6 +228,7 @@ u180e
Uint16Array
Uint32Array
Uint8Array
uint8array-base64=skip
Uint8ClampedArray
WeakMap
WeakRef=skip
@ -223,5 +250,8 @@ test262/test/built-ins/ThrowTypeError/unique-per-realm-function-proto.js
#test262/test/built-ins/RegExp/CharacterClassEscapes/
#test262/test/built-ins/RegExp/property-escapes/
# frequently broken, sometimes contain engine-dependent tests
test262/test/staging/
[tests]
# list test files or use config.testdir

View File

@ -22,7 +22,7 @@ index 9828b15..4a5919d 100644
/**
diff --git a/harness/regExpUtils.js b/harness/regExpUtils.js
index b55f3c6..396bad4 100644
index b397be0..c197ddc 100644
--- a/harness/regExpUtils.js
+++ b/harness/regExpUtils.js
@@ -6,27 +6,30 @@ description: |
@ -51,21 +51,20 @@ index b55f3c6..396bad4 100644
const loneCodePoints = args.loneCodePoints;
const ranges = args.ranges;
- const CHUNK_SIZE = 10000;
- let result = Reflect.apply(String.fromCodePoint, null, loneCodePoints);
let result = String.fromCodePoint.apply(null, loneCodePoints);
- for (let i = 0; i < ranges.length; i++) {
- const range = ranges[i];
- const start = range[0];
- const end = range[1];
- const codePoints = [];
- let range = ranges[i];
- let start = range[0];
- let end = range[1];
- let codePoints = [];
- for (let length = 0, codePoint = start; codePoint <= end; codePoint++) {
- codePoints[length++] = codePoint;
- if (length === CHUNK_SIZE) {
- result += Reflect.apply(String.fromCodePoint, null, codePoints);
- result += String.fromCodePoint.apply(null, codePoints);
- codePoints.length = length = 0;
- }
- }
- result += Reflect.apply(String.fromCodePoint, null, codePoints);
+ let result = String.fromCodePoint.apply(null, loneCodePoints);
- result += String.fromCodePoint.apply(null, codePoints);
+ for (const [start, end] of ranges) {
+ result += codePointRange(start, end + 1);
}

View File

@ -1,7 +1,7 @@
#!/bin/sh
set -e
url="ftp://ftp.unicode.org/Public/15.0.0/ucd"
url="ftp://ftp.unicode.org/Public/16.0.0/ucd"
emoji_url="${url}/emoji/emoji-data.txt"
files="CaseFolding.txt DerivedNormalizationProps.txt PropList.txt \

View File

@ -625,7 +625,7 @@ void parse_derived_core_properties(const char *filename)
p++;
p += strspn(p, " \t");
q = buf;
while (*p != '\0' && *p != ' ' && *p != '#' && *p != '\t') {
while (*p != '\0' && *p != ' ' && *p != '#' && *p != '\t' && *p != ';') {
if ((q - buf) < sizeof(buf) - 1)
*q++ = *p;
p++;
@ -1117,6 +1117,24 @@ void find_run_type(TableEntry *te, CCInfo *tab, int code)
te->ext_data[1] = ci->u_data[1];
te->ext_data[2] = ci->u_data[2];
te->ext_len = 3;
} else if (ci->u_len == 2 && ci->l_len == 0 && ci->f_len == 1) {
// U+FB05 LATIN SMALL LIGATURE LONG S T
assert(code == 0xFB05);
te->len = 1;
te->type = RUN_TYPE_UF_EXT2;
te->ext_data[0] = ci->u_data[0];
te->ext_data[1] = ci->u_data[1];
te->ext_len = 2;
} else if (ci->u_len == 3 && ci->l_len == 0 && ci->f_len == 1) {
// U+1FD3 GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA or
// U+1FE3 GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA
assert(code == 0x1FD3 || code == 0x1FE3);
te->len = 1;
te->type = RUN_TYPE_UF_EXT3;
te->ext_data[0] = ci->u_data[0];
te->ext_data[1] = ci->u_data[1];
te->ext_data[2] = ci->u_data[2];
te->ext_len = 3;
} else {
printf("unsupported encoding case:\n");
dump_cc_info(ci, code);

View File

@ -82,6 +82,7 @@ DEF(Egyptian_Hieroglyphs, "Egyp")
DEF(Elbasan, "Elba")
DEF(Elymaic, "Elym")
DEF(Ethiopic, "Ethi")
DEF(Garay, "Gara")
DEF(Georgian, "Geor")
DEF(Glagolitic, "Glag")
DEF(Gothic, "Goth")
@ -90,6 +91,7 @@ DEF(Greek, "Grek")
DEF(Gujarati, "Gujr")
DEF(Gunjala_Gondi, "Gong")
DEF(Gurmukhi, "Guru")
DEF(Gurung_Khema, "Gukh")
DEF(Han, "Hani")
DEF(Hangul, "Hang")
DEF(Hanifi_Rohingya, "Rohg")
@ -112,6 +114,7 @@ DEF(Khmer, "Khmr")
DEF(Khojki, "Khoj")
DEF(Khitan_Small_Script, "Kits")
DEF(Khudawadi, "Sind")
DEF(Kirat_Rai, "Krai")
DEF(Lao, "Laoo")
DEF(Latin, "Latn")
DEF(Lepcha, "Lepc")
@ -149,6 +152,7 @@ DEF(Nushu, "Nshu")
DEF(Nyiakeng_Puachue_Hmong, "Hmnp")
DEF(Ogham, "Ogam")
DEF(Ol_Chiki, "Olck")
DEF(Ol_Onal, "Onao")
DEF(Old_Hungarian, "Hung")
DEF(Old_Italic, "Ital")
DEF(Old_North_Arabian, "Narb")
@ -180,6 +184,7 @@ DEF(Sogdian, "Sogd")
DEF(Sora_Sompeng, "Sora")
DEF(Soyombo, "Soyo")
DEF(Sundanese, "Sund")
DEF(Sunuwar, "Sunu")
DEF(Syloti_Nagri, "Sylo")
DEF(Syriac, "Syrc")
DEF(Tagalog, "Tglg")
@ -197,7 +202,9 @@ DEF(Tibetan, "Tibt")
DEF(Tifinagh, "Tfng")
DEF(Tirhuta, "Tirh")
DEF(Tangsa, "Tnsa")
DEF(Todhri, "Todr")
DEF(Toto, "Toto")
DEF(Tulu_Tigalari, "Tutg")
DEF(Ugaritic, "Ugar")
DEF(Vai, "Vaii")
DEF(Vithkuqi, "Vith")
@ -236,11 +243,13 @@ DEF(Deprecated, "Dep")
DEF(Diacritic, "Dia")
DEF(Extender, "Ext")
DEF(Hex_Digit, "Hex")
DEF(IDS_Unary_Operator, "IDSU")
DEF(IDS_Binary_Operator, "IDSB")
DEF(IDS_Trinary_Operator, "IDST")
DEF(Ideographic, "Ideo")
DEF(Join_Control, "Join_C")
DEF(Logical_Order_Exception, "LOE")
DEF(Modifier_Combining_Mark, "MCM")
DEF(Noncharacter_Code_Point, "NChar")
DEF(Pattern_Syntax, "Pat_Syn")
DEF(Pattern_White_Space, "Pat_WS")
@ -279,6 +288,9 @@ DEF(Changes_When_Uppercased, "CWU")
DEF(Grapheme_Base, "Gr_Base")
DEF(Grapheme_Extend, "Gr_Ext")
DEF(ID_Continue, "IDC")
DEF(ID_Compat_Math_Start, "")
DEF(ID_Compat_Math_Continue, "")
DEF(InCB, "")
DEF(Lowercase, "Lower")
DEF(Math, "")
DEF(Uppercase, "Upper")