Skip to content

Commit

Permalink
Foxhound: remove unnecessary bailout for StringTrim operations
Browse files Browse the repository at this point in the history
  • Loading branch information
tmbrbr committed Jun 20, 2024
1 parent ab9e2ba commit d61fe3f
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions js/src/jit/CodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13056,12 +13056,6 @@ void CodeGenerator::visitStringTrimStartIndex(LStringTrimStartIndex* lir) {
Register string = ToRegister(lir->string());
Register output = ToRegister(lir->output());

// TaintFox: if we detect a tainted string argument we bail out to the interpreter.
bailoutCmpPtr(Assembler::NotEqual,
Address(string, JSString::offsetOfTaint()),
ImmPtr(nullptr),
lir->snapshot());

auto volatileRegs = liveVolatileRegs(lir);
volatileRegs.takeUnchecked(output);

Expand All @@ -13081,12 +13075,6 @@ void CodeGenerator::visitStringTrimEndIndex(LStringTrimEndIndex* lir) {
Register start = ToRegister(lir->start());
Register output = ToRegister(lir->output());

// TaintFox: if we detect a tainted string argument we bail out to the interpreter.
bailoutCmpPtr(Assembler::NotEqual,
Address(string, JSString::offsetOfTaint()),
ImmPtr(nullptr),
lir->snapshot());

auto volatileRegs = liveVolatileRegs(lir);
volatileRegs.takeUnchecked(output);

Expand Down

0 comments on commit d61fe3f

Please sign in to comment.