avancement planning

This commit is contained in:
2026-05-26 11:58:39 +02:00
parent 619a2b240a
commit 150b97cd2e
4892 changed files with 99214 additions and 429382 deletions
+3 -1
View File
@@ -459,7 +459,9 @@ export class Tokenizer {
: cp === $.NULL
? TokenType.NULL_CHARACTER
: TokenType.CHARACTER;
this._appendCharToCurrentCharacterToken(type, String.fromCodePoint(cp));
// OPTIMIZATION: Use String.fromCharCode for BMP characters (< 0x10000) which is faster
// than String.fromCodePoint. Characters outside BMP are rare in HTML.
this._appendCharToCurrentCharacterToken(type, cp < 65536 ? String.fromCharCode(cp) : String.fromCodePoint(cp));
}
//NOTE: used when we emit characters explicitly.
//This is always for non-whitespace and non-null characters, which allows us to avoid additional checks.