JS optimisations pt.1

This commit is contained in:
wuggy 2026-09-18 13:11:49 -07:00
commit 6cc90c7009
31 changed files with 867 additions and 107 deletions

View file

@ -8,7 +8,6 @@
#include "jsatom.h"
#include "mozilla/PodOperations.h"
#include "mozilla/RangedPtr.h"
#include "jscntxt.h"
@ -177,14 +176,14 @@ AtomHasher::match(const AtomStateEntry& entry, const Lookup& lookup)
if (key->hasLatin1Chars()) {
const Latin1Char* keyChars = key->latin1Chars(lookup.nogc);
if (lookup.isLatin1)
return mozilla::PodEqual(keyChars, lookup.latin1Chars, lookup.length);
return EqualChars(keyChars, lookup.latin1Chars, lookup.length);
return EqualChars(keyChars, lookup.twoByteChars, lookup.length);
}
const char16_t* keyChars = key->twoByteChars(lookup.nogc);
if (lookup.isLatin1)
return EqualChars(lookup.latin1Chars, keyChars, lookup.length);
return mozilla::PodEqual(keyChars, lookup.twoByteChars, lookup.length);
return EqualChars(keyChars, lookup.twoByteChars, lookup.length);
}
inline Handle<PropertyName*>