tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit b11b2f1fcfa43f186caa2c9b220b2c8bef87f3da
parent 5f1b3180ba66aec48a76b4ab9241cad67afd31fa
Author: Jan de Mooij <jdemooij@mozilla.com>
Date:   Fri, 12 Dec 2025 10:35:54 +0000

Bug 2005479 part 4 - Use generate_lir: true for more MIR instructions. r=iain

These instructions had different operand names for the LIR. Use the MIR names
instead.

Differential Revision: https://phabricator.services.mozilla.com/D275982

Diffstat:
Mjs/src/jit/CodeGenerator.cpp | 14+++++++-------
Mjs/src/jit/LIROps.yaml | 34----------------------------------
Mjs/src/jit/MIROps.yaml | 17+++++++++++++++++
3 files changed, 24 insertions(+), 41 deletions(-)

diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp @@ -5211,7 +5211,7 @@ void CodeGenerator::visitGuardStringToDouble(LGuardStringToDouble* lir) { } void CodeGenerator::visitGuardNoDenseElements(LGuardNoDenseElements* guard) { - Register obj = ToRegister(guard->input()); + Register obj = ToRegister(guard->object()); Register temp = ToRegister(guard->temp0()); // Load obj->elements. @@ -5488,7 +5488,7 @@ void CodeGenerator::visitGuardValue(LGuardValue* lir) { } void CodeGenerator::visitGuardNullOrUndefined(LGuardNullOrUndefined* lir) { - ValueOperand input = ToValue(lir->input()); + ValueOperand input = ToValue(lir->value()); ScratchTagScope tag(masm, input); masm.splitTagForTest(input, tag); @@ -5504,7 +5504,7 @@ void CodeGenerator::visitGuardNullOrUndefined(LGuardNullOrUndefined* lir) { } void CodeGenerator::visitGuardIsNotObject(LGuardIsNotObject* lir) { - ValueOperand input = ToValue(lir->input()); + ValueOperand input = ToValue(lir->value()); Label bail; masm.branchTestObject(Assembler::Equal, input, &bail); @@ -20359,7 +20359,7 @@ void CodeGenerator::visitLoadDOMExpandoValueIgnoreGeneration( void CodeGenerator::visitGuardDOMExpandoMissingOrGuardShape( LGuardDOMExpandoMissingOrGuardShape* ins) { Register temp = ToRegister(ins->temp0()); - ValueOperand input = ToValue(ins->input()); + ValueOperand input = ToValue(ins->expando()); Label done; masm.branchTestUndefined(Assembler::Equal, input, &done); @@ -21627,7 +21627,7 @@ void CodeGenerator::visitCheckIsObj(LCheckIsObj* ins) { } void CodeGenerator::visitCheckObjCoercible(LCheckObjCoercible* ins) { - ValueOperand checkValue = ToValue(ins->value()); + ValueOperand checkValue = ToValue(ins->checkValue()); using Fn = bool (*)(JSContext*, HandleValue); OutOfLineCode* ool = oolCallVM<Fn, ThrowObjectCoercible>( @@ -21656,7 +21656,7 @@ void CodeGenerator::visitCheckClassHeritage(LCheckClassHeritage* ins) { } void CodeGenerator::visitCheckThis(LCheckThis* ins) { - ValueOperand thisValue = ToValue(ins->value()); + ValueOperand thisValue = ToValue(ins->thisValue()); using Fn = bool (*)(JSContext*); OutOfLineCode* ool = @@ -21759,7 +21759,7 @@ void CodeGenerator::visitMaybeExtractAwaitValue(LMaybeExtractAwaitValue* lir) { } void CodeGenerator::visitDebugCheckSelfHosted(LDebugCheckSelfHosted* ins) { - ValueOperand checkValue = ToValue(ins->value()); + ValueOperand checkValue = ToValue(ins->checkValue()); pushArg(checkValue); using Fn = bool (*)(JSContext*, HandleValue); callVM<Fn, js::Debug_CheckSelfHosted>(ins); diff --git a/js/src/jit/LIROps.yaml b/js/src/jit/LIROps.yaml @@ -545,12 +545,6 @@ proxy: WordSized mir_op: true -- name: GuardDOMExpandoMissingOrGuardShape - operands: - input: BoxedValue - num_temps: 1 - mir_op: true - - name: ApplyArgsGeneric gen_boilerplate: false @@ -2973,11 +2967,6 @@ call_instruction: true mir_op: true -- name: GuardNoDenseElements - operands: - input: WordSized - num_temps: 1 - - name: InCache result_type: WordSized operands: @@ -3559,16 +3548,6 @@ num_temps: 1 mir_op: true -- name: GuardNullOrUndefined - operands: - input: BoxedValue - mir_op: true - -- name: GuardIsNotObject - operands: - input: BoxedValue - mir_op: true - - name: GuardFunctionFlags operands: function: WordSized @@ -3591,14 +3570,6 @@ num_temps: 1 call_instruction: true -- name: CheckObjCoercible - operands: - value: BoxedValue - -- name: CheckThis - operands: - value: BoxedValue - - name: Generator result_type: WordSized operands: @@ -3616,11 +3587,6 @@ call_instruction: true mir_op: true -- name: DebugCheckSelfHosted - operands: - value: BoxedValue - call_instruction: true - - name: ObjectStaticProto result_type: WordSized operands: diff --git a/js/src/jit/MIROps.yaml b/js/src/jit/MIROps.yaml @@ -2607,6 +2607,8 @@ congruent_to: if_operands_equal folds_to: custom alias_set: none + generate_lir: true + lir_result_type: none - name: GuardIsNotObject operands: @@ -2617,6 +2619,8 @@ congruent_to: if_operands_equal folds_to: custom alias_set: none + generate_lir: true + lir_result_type: none - name: GuardFunctionFlags gen_boilerplate: false @@ -2753,6 +2757,9 @@ guard: true movable: true alias_set: custom + generate_lir: true + lir_result_type: none + lir_temps: 1 - name: GuardTagNotEqual gen_boilerplate: false @@ -2994,6 +3001,9 @@ movable: true congruent_to: custom alias_set: custom + generate_lir: true + lir_result_type: none + lir_temps: 1 # Read length field of a JSString*. - name: StringLength @@ -3291,6 +3301,8 @@ guard: true folds_to: custom alias_set: custom + generate_lir: true + lir_result_type: none - name: AsyncResolve operands: @@ -3397,6 +3409,8 @@ folds_to: custom # Throws on null or undefined. alias_set: custom + generate_lir: true + lir_result_type: none - name: CheckClassHeritage operands: @@ -3412,6 +3426,9 @@ checkValue: Value result_type: Value guard: true + possibly_calls: true + generate_lir: true + lir_result_type: none - name: IsPackedArray operands: