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

Bug 1790275 - Part 4: Remove no longer used "strict" flag from OutOfLineStoreElementHole. r=jandem

Depends on D157103

Differential Revision: https://phabricator.services.mozilla.com/D157104
parent c3ff5ca8
Loading
Loading
Loading
Loading
+4 −11
Original line number Diff line number Diff line
@@ -11606,11 +11606,9 @@ void CodeGenerator::visitSpectreMaskIndex(LSpectreMaskIndex* lir) {
class OutOfLineStoreElementHole : public OutOfLineCodeBase<CodeGenerator> {
  LInstruction* ins_;
  Label rejoinStore_;
  bool strict_;
 public:
  explicit OutOfLineStoreElementHole(LInstruction* ins, bool strict)
      : ins_(ins), strict_(strict) {
  explicit OutOfLineStoreElementHole(LInstruction* ins) : ins_(ins) {
    MOZ_ASSERT(ins->isStoreElementHoleV() || ins->isStoreElementHoleT());
  }
@@ -11624,7 +11622,6 @@ class OutOfLineStoreElementHole : public OutOfLineCodeBase<CodeGenerator> {
  }
  LInstruction* ins() const { return ins_; }
  Label* rejoinStore() { return &rejoinStore_; }
  bool strict() const { return strict_; }
};
void CodeGenerator::emitStoreHoleCheck(Register elements,
@@ -11705,8 +11702,7 @@ void CodeGenerator::visitStoreHoleValueElement(LStoreHoleValueElement* lir) {
}
void CodeGenerator::visitStoreElementHoleT(LStoreElementHoleT* lir) {
  OutOfLineStoreElementHole* ool =
      new (alloc()) OutOfLineStoreElementHole(lir, current->mir()->strict());
  auto* ool = new (alloc()) OutOfLineStoreElementHole(lir);
  addOutOfLineCode(ool, lir->mir());
  Register elements = ToRegister(lir->elements());
@@ -11726,8 +11722,7 @@ void CodeGenerator::visitStoreElementHoleT(LStoreElementHoleT* lir) {
}
void CodeGenerator::visitStoreElementHoleV(LStoreElementHoleV* lir) {
  OutOfLineStoreElementHole* ool =
      new (alloc()) OutOfLineStoreElementHole(lir, current->mir()->strict());
  auto* ool = new (alloc()) OutOfLineStoreElementHole(lir);
  addOutOfLineCode(ool, lir->mir());
  Register elements = ToRegister(lir->elements());
@@ -11824,13 +11819,11 @@ void CodeGenerator::visitOutOfLineStoreElementHole(
  saveLive(ins);
  pushArg(Imm32(ool->strict()));
  pushArg(value.ref());
  pushArg(index);
  pushArg(object);
  using Fn = bool (*)(JSContext*, Handle<NativeObject*>, int32_t, HandleValue,
                      bool strict);
  using Fn = bool (*)(JSContext*, Handle<NativeObject*>, int32_t, HandleValue);
  callVM<Fn, jit::SetDenseElement>(ins);
  restoreLive(ins);
+0 −2
Original line number Diff line number Diff line
@@ -556,8 +556,6 @@ class MBasicBlock : public TempObject, public InlineListNode<MBasicBlock> {
  void setLoopDepth(uint32_t loopDepth) { loopDepth_ = loopDepth; }
  uint32_t loopDepth() const { return loopDepth_; }

  bool strict() const { return info_.script()->strict(); }

  void dumpStack(GenericPrinter& out);
  void dumpStack();

+1 −1
Original line number Diff line number Diff line
@@ -1294,7 +1294,7 @@ JSString* StringReplace(JSContext* cx, HandleString string,
}

bool SetDenseElement(JSContext* cx, Handle<NativeObject*> obj, int32_t index,
                     HandleValue value, bool strict) {
                     HandleValue value) {
  // This function is called from Ion code for StoreElementHole's OOL path.
  // In this case we know the object is native, extensible, and has no indexed
  // properties.
+1 −2
Original line number Diff line number Diff line
@@ -502,8 +502,7 @@ JSString* StringReplace(JSContext* cx, HandleString string,
                        HandleString pattern, HandleString repl);

[[nodiscard]] bool SetDenseElement(JSContext* cx, Handle<NativeObject*> obj,
                                   int32_t index, HandleValue value,
                                   bool strict);
                                   int32_t index, HandleValue value);

void AssertValidBigIntPtr(JSContext* cx, JS::BigInt* bi);
void AssertValidObjectPtr(JSContext* cx, JSObject* obj);