Commit cfc8bcdb authored by André Bargull's avatar André Bargull
Browse files

Bug 1686692 - Part 15: Remove LCompareVM. r=jandem

Depends on D101884

Differential Revision: https://phabricator.services.mozilla.com/D101885
parent d1ad0024
Loading
Loading
Loading
Loading
+0 −44
Original line number Diff line number Diff line
@@ -9623,50 +9623,6 @@ void CodeGenerator::visitCompareBigIntString(LCompareBigIntString* lir) {
  }
}
void CodeGenerator::visitCompareVM(LCompareVM* lir) {
  pushArg(ToValue(lir, LCompareVM::RhsInput));
  pushArg(ToValue(lir, LCompareVM::LhsInput));
  using Fn =
      bool (*)(JSContext*, MutableHandleValue, MutableHandleValue, bool*);
  switch (lir->mir()->jsop()) {
    case JSOp::Eq:
      callVM<Fn, jit::LooselyEqual<EqualityKind::Equal>>(lir);
      break;
    case JSOp::Ne:
      callVM<Fn, jit::LooselyEqual<EqualityKind::NotEqual>>(lir);
      break;
    case JSOp::StrictEq:
      callVM<Fn, jit::StrictlyEqual<EqualityKind::Equal>>(lir);
      break;
    case JSOp::StrictNe:
      callVM<Fn, jit::StrictlyEqual<EqualityKind::NotEqual>>(lir);
      break;
    case JSOp::Lt:
      callVM<Fn, js::LessThan>(lir);
      break;
    case JSOp::Le:
      callVM<Fn, js::LessThanOrEqual>(lir);
      break;
    case JSOp::Gt:
      callVM<Fn, js::GreaterThan>(lir);
      break;
    case JSOp::Ge:
      callVM<Fn, js::GreaterThanOrEqual>(lir);
      break;
    default:
      MOZ_CRASH("Unexpected compare op");
  }
}
void CodeGenerator::visitIsNullOrLikeUndefinedV(LIsNullOrLikeUndefinedV* lir) {
  JSOp op = lir->mir()->jsop();
  MCompare::CompareType compareType = lir->mir()->compareType();
+0 −8
Original line number Diff line number Diff line
@@ -132,8 +132,6 @@ namespace jit {
  _(GetSparseElementHelper, js::GetSparseElementHelper)                        \
  _(GlobalDeclInstantiationFromIon, js::jit::GlobalDeclInstantiationFromIon)   \
  _(GlobalOrEvalDeclInstantiation, js::GlobalOrEvalDeclInstantiation)          \
  _(GreaterThan, js::GreaterThan)                                              \
  _(GreaterThanOrEqual, js::GreaterThanOrEqual)                                \
  _(HandleDebugTrap, js::jit::HandleDebugTrap)                                 \
  _(ImplicitThisOperation, js::ImplicitThisOperation)                          \
  _(ImportMetaOperation, js::ImportMetaOperation)                              \
@@ -172,11 +170,7 @@ namespace jit {
  _(Lambda, js::Lambda)                                                        \
  _(LambdaArrow, js::LambdaArrow)                                              \
  _(LeaveWith, js::jit::LeaveWith)                                             \
  _(LessThan, js::LessThan)                                                    \
  _(LessThanOrEqual, js::LessThanOrEqual)                                      \
  _(LexicalEnvironmentObjectCreate, js::LexicalEnvironmentObject::create)      \
  _(LooselyEqual, js::jit::LooselyEqual<js::jit::EqualityKind::Equal>)         \
  _(LooselyNotEqual, js::jit::LooselyEqual<js::jit::EqualityKind::NotEqual>)   \
  _(MakeDefaultConstructor, js::MakeDefaultConstructor)                        \
  _(MutatePrototype, js::jit::MutatePrototype)                                 \
  _(NamedLambdaObjectCreateTemplateObject,                                     \
@@ -226,8 +220,6 @@ namespace jit {
  _(SetObjectElementWithReceiver, js::SetObjectElementWithReceiver)            \
  _(SetPropertySuper, js::SetPropertySuper)                                    \
  _(StartDynamicModuleImport, js::StartDynamicModuleImport)                    \
  _(StrictlyEqual, js::jit::StrictlyEqual<js::jit::EqualityKind::Equal>)       \
  _(StrictlyNotEqual, js::jit::StrictlyEqual<js::jit::EqualityKind::NotEqual>) \
  _(StringBigIntGreaterThanOrEqual,                                            \
    js::jit::StringBigIntCompare<js::jit::ComparisonKind::GreaterThanOrEqual>) \
  _(StringBigIntLessThan,                                                      \
+0 −16
Original line number Diff line number Diff line
@@ -1772,22 +1772,6 @@ class LCompareBigIntString : public LCallInstructionHelper<1, 2, 0> {
  MCompare* mir() { return mir_->toCompare(); }
};

class LCompareVM : public LCallInstructionHelper<1, 2 * BOX_PIECES, 0> {
 public:
  LIR_HEADER(CompareVM)

  static const size_t LhsInput = 0;
  static const size_t RhsInput = BOX_PIECES;

  LCompareVM(const LBoxAllocation& lhs, const LBoxAllocation& rhs)
      : LCallInstructionHelper(classOpcode) {
    setBoxOperand(LhsInput, lhs);
    setBoxOperand(RhsInput, rhs);
  }

  MCompare* mir() const { return mir_->toCompare(); }
};

class LBitAndAndBranch : public LControlInstructionHelper<2, 2, 0> {
  Assembler::Condition cond_;