GCTypeMacros.h (1494B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- 2 * vim: set ts=8 sts=2 et sw=2 tw=80: 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 /* 8 * Higher-order macros enumerating public untagged and tagged GC pointer types. 9 */ 10 11 #ifndef GCTypeMacros_h 12 #define GCTypeMacros_h 13 14 #include "jstypes.h" // JS_PUBLIC_API 15 16 class JS_PUBLIC_API JSAtom; 17 class JS_PUBLIC_API JSFunction; 18 class JS_PUBLIC_API JSObject; 19 class JS_PUBLIC_API JSScript; 20 class JS_PUBLIC_API JSString; 21 22 namespace JS { 23 class JS_PUBLIC_API BigInt; 24 class JS_PUBLIC_API PropertyKey; 25 class JS_PUBLIC_API Symbol; 26 class JS_PUBLIC_API Value; 27 } // namespace JS 28 29 // Expand the given macro D for each public GC pointer. 30 #define JS_FOR_EACH_PUBLIC_GC_POINTER_TYPE(D) \ 31 D(JS::BigInt*) \ 32 D(JS::Symbol*) \ 33 D(JSAtom*) \ 34 D(JSFunction*) \ 35 D(JSLinearString*) \ 36 D(JSObject*) \ 37 D(JSScript*) \ 38 D(JSString*) 39 40 // Expand the given macro D for each public tagged GC pointer type. 41 #define JS_FOR_EACH_PUBLIC_TAGGED_GC_POINTER_TYPE(D) \ 42 D(JS::Value) \ 43 D(JS::PropertyKey) // i.e. jsid 44 45 #endif // GCTypeMacros_h