Commit 7353401c authored by André Bargull's avatar André Bargull
Browse files

Bug 1686692 - Part 43: Remove non-GC pointer support from LPointer. r=jandem

Depends on D101916

Differential Revision: https://phabricator.services.mozilla.com/D101917
parent ce9be6ad
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -3830,11 +3830,7 @@ void CodeGenerator::visitInteger64(LInteger64* lir) {
}

void CodeGenerator::visitPointer(LPointer* lir) {
  if (lir->kind() == LPointer::GC_THING) {
  masm.movePtr(ImmGCPtr(lir->gcptr()), ToRegister(lir->output()));
  } else {
    masm.movePtr(ImmPtr(lir->ptr()), ToRegister(lir->output()));
  }
}

void CodeGenerator::visitNurseryObject(LNurseryObject* lir) {
+3 −20
Original line number Diff line number Diff line
@@ -159,32 +159,15 @@ class LInteger64 : public LInstructionHelper<INT64_PIECES, 0, 0> {

// Constant pointer.
class LPointer : public LInstructionHelper<1, 0, 0> {
 public:
  enum Kind { GC_THING, NON_GC_THING };

 private:
  void* ptr_;
  Kind kind_;
  gc::Cell* ptr_;

 public:
  LIR_HEADER(Pointer)

  explicit LPointer(gc::Cell* ptr)
      : LInstructionHelper(classOpcode), ptr_(ptr), kind_(GC_THING) {}

  LPointer(void* ptr, Kind kind)
      : LInstructionHelper(classOpcode), ptr_(ptr), kind_(kind) {}
      : LInstructionHelper(classOpcode), ptr_(ptr) {}

  void* ptr() const { return ptr_; }
  Kind kind() const { return kind_; }
  const char* extraName() const {
    return kind_ == GC_THING ? "GC_THING" : "NON_GC_THING";
  }

  gc::Cell* gcptr() const {
    MOZ_ASSERT(kind() == GC_THING);
    return (gc::Cell*)ptr_;
  }
  gc::Cell* gcptr() const { return ptr_; }
};

// Constant double.