2018-02-04 03:22:01 +01:00
|
|
|
// Matrix Construct
|
|
|
|
//
|
|
|
|
// Copyright (C) Matrix Construct Developers, Authors & Contributors
|
|
|
|
// Copyright (C) 2016-2018 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. The
|
|
|
|
// full license for this software is available in the LICENSE file.
|
2016-10-11 06:28:16 +02:00
|
|
|
|
|
|
|
/* 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
|
2016-11-29 16:23:38 +01:00
|
|
|
#ifdef RB_ENABLE_JS
|
|
|
|
#define HAVE_IRCD_JS_JS_H
|
2016-10-11 06:28:16 +02:00
|
|
|
|
2016-11-25 03:36:45 +01:00
|
|
|
// 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
|
2017-08-23 23:25:22 +02:00
|
|
|
#define DEBUG
|
2016-11-25 03:36:45 +01:00
|
|
|
#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.
|
2016-11-29 16:23:38 +01:00
|
|
|
#include <RB_INC_JSAPI_H
|
|
|
|
#include <RB_INC_JSFRIENDAPI_H
|
|
|
|
#include <RB_INC_JS_CONVERSIONS_H
|
2016-10-11 06:28:16 +02:00
|
|
|
|
2016-10-27 10:50:47 +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.
|
2017-08-23 23:04:45 +02:00
|
|
|
//struct JSAtom;
|
|
|
|
//namespace js { struct InterpreterFrame; }
|
2016-10-27 10:50:47 +02:00
|
|
|
|
2016-10-11 06:28:16 +02:00
|
|
|
namespace ircd {
|
|
|
|
namespace js {
|
|
|
|
|
2016-11-28 04:05:40 +01:00
|
|
|
// 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-14 02:24:50 +02:00
|
|
|
|
2016-10-11 06:28:16 +02:00
|
|
|
} // namespace js
|
|
|
|
} // namespace ircd
|
2016-10-12 09:04:26 +02:00
|
|
|
|
2016-11-28 04:02:23 +01:00
|
|
|
#include "version.h"
|
2016-11-13 02:36:03 +01:00
|
|
|
#include "type.h"
|
2017-08-23 23:25:22 +02:00
|
|
|
#include "debug.h"
|
2016-11-13 02:36:03 +01:00
|
|
|
#include "tracing.h"
|
2016-10-22 05:32:45 +02:00
|
|
|
#include "timer.h"
|
2016-10-12 09:04:26 +02:00
|
|
|
#include "context.h"
|
2016-11-14 00:08:03 +01:00
|
|
|
#include "priv.h"
|
2016-10-16 03:44:51 +02:00
|
|
|
#include "compartment.h"
|
2016-11-13 02:36:03 +01:00
|
|
|
#include "root.h"
|
2016-10-17 21:16:30 +02:00
|
|
|
#include "error.h"
|
2016-10-26 10:28:17 +02:00
|
|
|
#include "native.h"
|
2016-10-19 02:17:29 +02:00
|
|
|
#include "value.h"
|
2016-10-14 06:51:43 +02:00
|
|
|
#include "string.h"
|
2016-11-25 03:20:34 +01:00
|
|
|
#include "json.h"
|
2016-10-19 02:17:29 +02:00
|
|
|
#include "id.h"
|
|
|
|
#include "object.h"
|
2016-10-24 07:44:41 +02:00
|
|
|
#include "has.h"
|
2016-10-18 03:44:36 +02:00
|
|
|
#include "get.h"
|
2016-10-24 07:44:41 +02:00
|
|
|
#include "set.h"
|
|
|
|
#include "del.h"
|
2016-10-31 20:29:37 +01:00
|
|
|
#include "vector.h"
|
2017-08-23 23:25:22 +02:00
|
|
|
#include "for_each.h"
|
2016-10-31 20:29:37 +01:00
|
|
|
#include "script.h"
|
2017-08-23 23:25:22 +02:00
|
|
|
#include "module.h"
|
|
|
|
#include "args.h"
|
2016-10-31 20:29:37 +01:00
|
|
|
#include "function.h"
|
|
|
|
#include "function_literal.h"
|
2017-08-23 23:25:22 +02:00
|
|
|
#include "function_native.h"
|
2016-10-19 02:17:29 +02:00
|
|
|
#include "call.h"
|
|
|
|
#include "for_each.h"
|
2016-10-15 07:44:42 +02:00
|
|
|
#include "trap.h"
|
2016-10-26 19:36:57 +02:00
|
|
|
#include "trap_function.h"
|
2016-11-25 04:27:47 +01:00
|
|
|
#include "trap_property.h"
|
2016-11-13 02:47:10 +01:00
|
|
|
#include "ctor.h"
|
2016-10-29 14:25:59 +02:00
|
|
|
#include "global.h"
|
|
|
|
#include "task.h"
|
2016-11-29 16:23:38 +01:00
|
|
|
|
|
|
|
#endif // defined(RB_ENABLE_JS)
|