0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-30 17:34:04 +01:00
construct/include/ircd/js/js.h

103 lines
3.5 KiB
C
Raw Normal View History

2016-10-11 06:28:16 +02:00
/*
* Copyright (C) 2016 Charybdis Development Team
* Copyright (C) 2016 Jason Volk <jason@zemos.net>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice is present in all copies.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/* This header exposes the SpiderMonkey engine API to all ye who include it.
* It also anchors all of our own developed headers and utils which use and extend their API.
*
* This header is included after the 'stdinc header' <ircd/js.h>. That header creates the
* namespace ircd::js, and does not include any 3rd party symbols. <ircd/js.h> is included
* automatically in stdinc.h.
*
* This header should be included if you intend to get dirty with the JS engine subsystem
* which requires jsapi support and can't be satisfied by the stdinc header.
*/
#pragma once
#define HAVE_IRCD_JS_JS_H
// SpiderMonkey makes use of the `DEBUG` define in headers which must match what the bottom
// end was also compiled with. We tie that define to RB_DEBUG controlled by --enable-debug.
// From a completely clean build, configuring IRCd with --enable-debug should compile SpiderMonkey
// in debug as well.
#ifdef RB_DEBUG
#define DEBUG
#endif
2016-10-11 06:28:16 +02:00
// SpiderMonkey headers require an include basis e.g. -I/usr/include/mozjs-XX as their
// include directives are written as "jsxxx.h" or "mozilla/xxx.h" etc. Our includes are all
// <ircd/xxx.h> and shouldn't have any conflict issues.
#include <jsapi.h>
#include <jsfriendapi.h>
#include <js/Conversions.h>
2016-10-11 06:28:16 +02:00
// Some forward declarations for jsapi items not declared in the above includes,
// but visible to definition files making use of additional jsapi interfaces.
struct JSAtom;
namespace js { struct InterpreterFrame; }
2016-10-11 06:28:16 +02:00
namespace ircd {
namespace js {
// The ostream operator is explicitly brought from ircd:: to compete for efficient overloading,
// and prevent any unnecessary implicit conversions here.
using ircd::operator<<;
2016-10-11 06:28:16 +02:00
} // namespace js
} // namespace ircd
#include "version.h"
#include "type.h"
#include "tracing.h"
#include "runtime.h"
#include "timer.h"
#include "context.h"
#include "priv.h"
#include "compartment.h"
#include "debug.h"
#include "root.h"
2016-10-17 21:16:30 +02:00
#include "error.h"
#include "native.h"
#include "value.h"
#include "string.h"
2016-11-25 03:20:34 +01:00
#include "json.h"
#include "id.h"
#include "object.h"
#include "has.h"
#include "get.h"
#include "set.h"
#include "del.h"
#include "vector.h"
#include "script.h"
#include "function.h"
#include "function_literal.h"
#include "call.h"
#include "for_each.h"
2016-10-25 07:11:15 +02:00
#include "args.h"
#include "trap.h"
#include "trap_function.h"
#include "trap_property.h"
#include "ctor.h"
2016-10-28 08:00:18 +02:00
#include "generator.h"
2016-10-29 14:25:59 +02:00
#include "global.h"
#include "contract.h"
#include "star.h"
2016-10-29 14:25:59 +02:00
#include "task.h"