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/. */
7 #ifndef frontend_ParseMaps_inl_h
8 #define frontend_ParseMaps_inl_h
10 #include "frontend/ParseMaps.h"
12 #include "jscntxtinlines.h"
19 AtomThingMapPtr
<Map
>::ensureMap(ExclusiveContext
*cx
)
24 AutoLockForExclusiveAccess
lock(cx
);
25 map_
= cx
->parseMapPool().acquire
<Map
>();
31 AtomThingMapPtr
<Map
>::releaseMap(ExclusiveContext
*cx
)
36 AutoLockForExclusiveAccess
lock(cx
);
37 cx
->parseMapPool().release(map_
);
41 template <typename ParseHandler
>
43 AtomDecls
<ParseHandler
>::init()
45 AutoLockForExclusiveAccess
lock(cx
);
46 map
= cx
->parseMapPool().acquire
<AtomDefnListMap
>();
50 template <typename ParseHandler
>
52 AtomDecls
<ParseHandler
>::~AtomDecls()
55 AutoLockForExclusiveAccess
lock(cx
);
56 cx
->parseMapPool().release(map
);
60 } /* namespace frontend */
63 #endif /* frontend_ParseMaps_inl_h */