mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
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
This commit is contained in:
parent
e9db92523e
commit
f0d6b86912
@ -152,25 +152,6 @@ struct JSXML;
|
||||
|
||||
namespace js {
|
||||
|
||||
/*
|
||||
* Ideally, we would like to make the argument to functions like MarkShape be a
|
||||
* HeapPtr<const js::Shape>. 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<js::EmptyShape>.
|
||||
*
|
||||
* To overcome the problem, we make the argument to MarkShape be a
|
||||
* MarkablePtr<const js::Shape>. And we allow conversions from HeapPtr<T>
|
||||
* to MarkablePtr<U> as long as T can be converted to U.
|
||||
*/
|
||||
template<class T>
|
||||
class MarkablePtr
|
||||
{
|
||||
public:
|
||||
T *value;
|
||||
|
||||
explicit MarkablePtr(T *value) : value(value) {}
|
||||
};
|
||||
|
||||
template<class T, typename Unioned = uintptr_t>
|
||||
class HeapPtr
|
||||
{
|
||||
@ -232,13 +213,6 @@ class HeapPtr
|
||||
|
||||
operator T*() const { return value; }
|
||||
|
||||
/*
|
||||
* This coerces to MarkablePtr<U> as long as T can coerce to U. See the
|
||||
* comment for MarkablePtr above.
|
||||
*/
|
||||
template<class U>
|
||||
operator MarkablePtr<U>() const { return MarkablePtr<U>(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<class U>
|
||||
operator MarkablePtr<U>() const { return MarkablePtr<U>(value); }
|
||||
};
|
||||
|
||||
class ReadBarrieredValue
|
||||
|
Loading…
Reference in New Issue
Block a user