mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-28 11:27:32 +09:00
JS optimisations pt.1
This commit is contained in:
parent
c27a24f779
commit
6cc90c7009
31 changed files with 867 additions and 107 deletions
|
|
@ -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*>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue