mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 15:28:39 +09:00
Merge remote-tracking branch 'origin/tracking' into custom
This commit is contained in:
commit
c5ab8d0feb
5 changed files with 16 additions and 12 deletions
|
|
@ -63,10 +63,10 @@ using namespace js::jit;
|
|||
* The tempN registers are free to use for computations.
|
||||
*/
|
||||
|
||||
NativeRegExpMacroAssembler::NativeRegExpMacroAssembler(LifoAlloc* alloc, RegExpShared* shared,
|
||||
NativeRegExpMacroAssembler::NativeRegExpMacroAssembler(JSContext* cx, LifoAlloc* alloc, RegExpShared* shared,
|
||||
JSRuntime* rt, Mode mode, int registers_to_save)
|
||||
: RegExpMacroAssembler(*alloc, shared, registers_to_save),
|
||||
runtime(rt), mode_(mode)
|
||||
: RegExpMacroAssembler(cx, *alloc, shared, registers_to_save),
|
||||
cx(cx), runtime(rt), mode_(mode)
|
||||
{
|
||||
// Find physical registers for each compiler register.
|
||||
AllocatableGeneralRegisterSet regs(GeneralRegisterSet::All());
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ class MOZ_STACK_CLASS NativeRegExpMacroAssembler final : public RegExpMacroAssem
|
|||
// Type of input string to generate code for.
|
||||
enum Mode { ASCII = 1, CHAR16 = 2 };
|
||||
|
||||
NativeRegExpMacroAssembler(LifoAlloc* alloc, RegExpShared* shared,
|
||||
NativeRegExpMacroAssembler(JSContext* cx, LifoAlloc* alloc, RegExpShared* shared,
|
||||
JSRuntime* rt, Mode mode, int registers_to_save);
|
||||
|
||||
// Inherited virtual methods.
|
||||
|
|
@ -174,6 +174,7 @@ class MOZ_STACK_CLASS NativeRegExpMacroAssembler final : public RegExpMacroAssem
|
|||
private:
|
||||
jit::MacroAssembler masm;
|
||||
|
||||
JSContext* cx;
|
||||
JSRuntime* runtime;
|
||||
Mode mode_;
|
||||
jit::Label entry_label_;
|
||||
|
|
|
|||
|
|
@ -1350,10 +1350,10 @@ irregexp::CompilePattern(JSContext* cx, HandleRegExpShared shared, RegExpCompile
|
|||
: NativeRegExpMacroAssembler::CHAR16;
|
||||
|
||||
ctx.emplace(cx, (jit::TempAllocator*) nullptr);
|
||||
native_assembler.emplace(&alloc, shared, cx->runtime(), mode, (data->capture_count + 1) * 2);
|
||||
native_assembler.emplace(cx, &alloc, shared, cx->runtime(), mode, (data->capture_count + 1) * 2);
|
||||
assembler = native_assembler.ptr();
|
||||
} else {
|
||||
interpreted_assembler.emplace(&alloc, shared, (data->capture_count + 1) * 2);
|
||||
interpreted_assembler.emplace(cx, &alloc, shared, (data->capture_count + 1) * 2);
|
||||
assembler = interpreted_assembler.ptr();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -96,9 +96,10 @@ irregexp::CaseInsensitiveCompareUCStrings(const char16_t* substring1,
|
|||
const char16_t* substring2,
|
||||
size_t byteLength);
|
||||
|
||||
InterpretedRegExpMacroAssembler::InterpretedRegExpMacroAssembler(LifoAlloc* alloc, RegExpShared* shared,
|
||||
InterpretedRegExpMacroAssembler::InterpretedRegExpMacroAssembler(JSContext* cx, LifoAlloc* alloc,
|
||||
RegExpShared* shared,
|
||||
size_t numSavedRegisters)
|
||||
: RegExpMacroAssembler(*alloc, shared, numSavedRegisters),
|
||||
: RegExpMacroAssembler(cx, *alloc, shared, numSavedRegisters),
|
||||
pc_(0),
|
||||
advance_current_start_(0),
|
||||
advance_current_offset_(0),
|
||||
|
|
|
|||
|
|
@ -40,13 +40,14 @@ namespace irregexp {
|
|||
class MOZ_STACK_CLASS RegExpMacroAssembler
|
||||
{
|
||||
public:
|
||||
RegExpMacroAssembler(LifoAlloc& alloc, RegExpShared* shared, size_t numSavedRegisters)
|
||||
RegExpMacroAssembler(JSContext* cx, LifoAlloc& alloc, RegExpShared* shared,
|
||||
size_t numSavedRegisters)
|
||||
: slow_safe_compiler_(false),
|
||||
global_mode_(NOT_GLOBAL),
|
||||
alloc_(alloc),
|
||||
num_registers_(numSavedRegisters),
|
||||
num_saved_registers_(numSavedRegisters),
|
||||
shared(shared)
|
||||
shared(cx, shared)
|
||||
{}
|
||||
|
||||
enum StackCheckFlag {
|
||||
|
|
@ -214,7 +215,7 @@ class MOZ_STACK_CLASS RegExpMacroAssembler
|
|||
}
|
||||
|
||||
public:
|
||||
RegExpShared* shared;
|
||||
RootedRegExpShared shared;
|
||||
};
|
||||
|
||||
template <typename CharT>
|
||||
|
|
@ -229,7 +230,8 @@ CaseInsensitiveCompareUCStrings(const CharT* substring1, const CharT* substring2
|
|||
class MOZ_STACK_CLASS InterpretedRegExpMacroAssembler final : public RegExpMacroAssembler
|
||||
{
|
||||
public:
|
||||
InterpretedRegExpMacroAssembler(LifoAlloc* alloc, RegExpShared* shared, size_t numSavedRegisters);
|
||||
InterpretedRegExpMacroAssembler(JSContext* cx, LifoAlloc* alloc, RegExpShared* shared,
|
||||
size_t numSavedRegisters);
|
||||
~InterpretedRegExpMacroAssembler();
|
||||
|
||||
// Inherited virtual methods.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue