From df750355760a13f65604074309e9f3d2c45b8caa Mon Sep 17 00:00:00 2001 From: Terrence Cole Date: Thu, 15 Mar 2012 11:14:14 -0700 Subject: [PATCH] Bug 736168 - Remove MarkablePtr; r=billm Now that the marking indirection work is complete, this is no longer used and should be removed. --HG-- extra : rebase_source : e8116e9680c5a2005d0f9e6aea774b292cdca59c --- js/src/gc/Barrier.h | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/js/src/gc/Barrier.h b/js/src/gc/Barrier.h index 4c8b34fdf86..5872449c838 100644 --- a/js/src/gc/Barrier.h +++ b/js/src/gc/Barrier.h @@ -152,25 +152,6 @@ struct JSXML; namespace js { -/* - * Ideally, we would like to make the argument to functions like MarkShape be a - * HeapPtr. That would ensure that we don't forget to - * barrier any fields that we mark through. However, that would prohibit us from - * passing in a derived class like HeapPtr. - * - * To overcome the problem, we make the argument to MarkShape be a - * MarkablePtr. And we allow conversions from HeapPtr - * to MarkablePtr as long as T can be converted to U. - */ -template -class MarkablePtr -{ - public: - T *value; - - explicit MarkablePtr(T *value) : value(value) {} -}; - template class HeapPtr { @@ -232,13 +213,6 @@ class HeapPtr operator T*() const { return value; } - /* - * This coerces to MarkablePtr as long as T can coerce to U. See the - * comment for MarkablePtr above. - */ - template - operator MarkablePtr() const { return MarkablePtr(value); } - private: void pre() { T::writeBarrierPre(value); } void post() { T::writeBarrierPost(value, (void *)&value); } @@ -507,9 +481,6 @@ class ReadBarriered void set(T *v) { value = v; } operator bool() { return !!value; } - - template - operator MarkablePtr() const { return MarkablePtr(value); } }; class ReadBarrieredValue