Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 : * vim: set ts=8 sts=4 et sw=4 tw=99:
3 : * This Source Code Form is subject to the terms of the Mozilla Public
4 : * License, v. 2.0. If a copy of the MPL was not distributed with this
5 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 :
7 : #include "vm/TaggedProto.h"
8 :
9 : #include "jsfun.h"
10 : #include "jsobj.h"
11 :
12 : #include "gc/Barrier.h"
13 : #include "gc/Zone.h"
14 :
15 : #include "vm/Caches-inl.h"
16 :
17 : namespace js {
18 :
19 : /* static */ void
20 53583 : InternalBarrierMethods<TaggedProto>::preBarrier(TaggedProto& proto)
21 : {
22 53583 : InternalBarrierMethods<JSObject*>::preBarrier(proto.toObjectOrNull());
23 53583 : }
24 :
25 : /* static */ void
26 124068 : InternalBarrierMethods<TaggedProto>::postBarrier(TaggedProto* vp, TaggedProto prev,
27 : TaggedProto next)
28 : {
29 124068 : JSObject* prevObj = prev.isObject() ? prev.toObject() : nullptr;
30 124069 : JSObject* nextObj = next.isObject() ? next.toObject() : nullptr;
31 : InternalBarrierMethods<JSObject*>::postBarrier(reinterpret_cast<JSObject**>(vp), prevObj,
32 124069 : nextObj);
33 124067 : }
34 :
35 : /* static */ void
36 0 : InternalBarrierMethods<TaggedProto>::readBarrier(const TaggedProto& proto)
37 : {
38 0 : InternalBarrierMethods<JSObject*>::readBarrier(proto.toObjectOrNull());
39 0 : }
40 :
41 : } // namespace js
|