2013-08-28 06:59:14 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
|
|
* vim: set ts=8 sts=4 et sw=4 tw=99:
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
// This file contains public type declarations that are used *frequently*. If
|
|
|
|
// it doesn't occur at least 10 times in Gecko, it probably shouldn't be in
|
|
|
|
// here.
|
|
|
|
//
|
|
|
|
// It includes only:
|
|
|
|
// - forward declarations of structs and classes;
|
|
|
|
// - typedefs;
|
|
|
|
// - enums (maybe).
|
|
|
|
// It does *not* contain any struct or class definitions.
|
|
|
|
|
|
|
|
#ifndef js_TypeDecls_h
|
|
|
|
#define js_TypeDecls_h
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2013-12-07 03:03:08 +04:00
|
|
|
#include "js-config.h"
|
|
|
|
|
2013-08-28 06:59:14 +04:00
|
|
|
struct JSContext;
|
|
|
|
class JSFunction;
|
|
|
|
class JSObject;
|
|
|
|
class JSScript;
|
|
|
|
class JSString;
|
2014-06-21 22:54:22 +04:00
|
|
|
class JSAddonId;
|
2013-08-28 06:59:14 +04:00
|
|
|
|
|
|
|
struct jsid;
|
|
|
|
|
|
|
|
namespace JS {
|
|
|
|
|
2014-05-31 12:44:32 +04:00
|
|
|
typedef unsigned char Latin1Char;
|
|
|
|
|
2014-06-23 19:55:51 +04:00
|
|
|
class Symbol;
|
2013-08-28 06:59:14 +04:00
|
|
|
class Value;
|
2017-06-29 19:57:46 +03:00
|
|
|
class Realm;
|
2013-08-28 06:59:14 +04:00
|
|
|
template <typename T> class Handle;
|
|
|
|
template <typename T> class MutableHandle;
|
2013-11-05 01:35:08 +04:00
|
|
|
template <typename T> class Rooted;
|
|
|
|
template <typename T> class PersistentRooted;
|
2013-08-28 06:59:14 +04:00
|
|
|
|
|
|
|
typedef Handle<JSFunction*> HandleFunction;
|
|
|
|
typedef Handle<jsid> HandleId;
|
|
|
|
typedef Handle<JSObject*> HandleObject;
|
|
|
|
typedef Handle<JSScript*> HandleScript;
|
|
|
|
typedef Handle<JSString*> HandleString;
|
2014-06-23 19:55:51 +04:00
|
|
|
typedef Handle<JS::Symbol*> HandleSymbol;
|
2013-08-28 06:59:14 +04:00
|
|
|
typedef Handle<Value> HandleValue;
|
|
|
|
|
|
|
|
typedef MutableHandle<JSFunction*> MutableHandleFunction;
|
|
|
|
typedef MutableHandle<jsid> MutableHandleId;
|
|
|
|
typedef MutableHandle<JSObject*> MutableHandleObject;
|
|
|
|
typedef MutableHandle<JSScript*> MutableHandleScript;
|
|
|
|
typedef MutableHandle<JSString*> MutableHandleString;
|
2014-06-23 19:55:51 +04:00
|
|
|
typedef MutableHandle<JS::Symbol*> MutableHandleSymbol;
|
2013-08-28 06:59:14 +04:00
|
|
|
typedef MutableHandle<Value> MutableHandleValue;
|
|
|
|
|
2013-11-05 01:35:08 +04:00
|
|
|
typedef Rooted<JSObject*> RootedObject;
|
|
|
|
typedef Rooted<JSFunction*> RootedFunction;
|
|
|
|
typedef Rooted<JSScript*> RootedScript;
|
|
|
|
typedef Rooted<JSString*> RootedString;
|
2014-06-23 19:55:51 +04:00
|
|
|
typedef Rooted<JS::Symbol*> RootedSymbol;
|
2013-11-05 01:35:08 +04:00
|
|
|
typedef Rooted<jsid> RootedId;
|
|
|
|
typedef Rooted<JS::Value> RootedValue;
|
|
|
|
|
|
|
|
typedef PersistentRooted<JSFunction*> PersistentRootedFunction;
|
|
|
|
typedef PersistentRooted<jsid> PersistentRootedId;
|
|
|
|
typedef PersistentRooted<JSObject*> PersistentRootedObject;
|
|
|
|
typedef PersistentRooted<JSScript*> PersistentRootedScript;
|
|
|
|
typedef PersistentRooted<JSString*> PersistentRootedString;
|
2014-06-23 19:55:51 +04:00
|
|
|
typedef PersistentRooted<JS::Symbol*> PersistentRootedSymbol;
|
2013-11-05 01:35:08 +04:00
|
|
|
typedef PersistentRooted<Value> PersistentRootedValue;
|
|
|
|
|
2013-08-28 06:59:14 +04:00
|
|
|
} // namespace JS
|
|
|
|
|
|
|
|
#endif /* js_TypeDecls_h */
|