Find file
Fetching contributors…
Cannot retrieve contributors at this time
1288 lines (750 sloc) 47.2 KB
/* automatically generated by rust-bindgen */
import libc::*;
type JSIntn = c_int;
type JSUintn = c_uint;
type JSBool = JSIntn;
type JSPackedBool = uint8_t;
type intN = JSIntn;
type uintN = JSUintn;
type jsid = ptrdiff_t;
type jsint = int32_t;
type jsuint = uint32_t;
type jsdouble = c_double;
type jsrefcount = int32_t;
type jschar = uint16_t;
type enum_JSVersion = c_int;
const JSVERSION_1_0: i32 = 100_i32;
const JSVERSION_1_1: i32 = 110_i32;
const JSVERSION_1_2: i32 = 120_i32;
const JSVERSION_1_3: i32 = 130_i32;
const JSVERSION_1_4: i32 = 140_i32;
const JSVERSION_ECMA_3: i32 = 148_i32;
const JSVERSION_1_5: i32 = 150_i32;
const JSVERSION_1_6: i32 = 160_i32;
const JSVERSION_1_7: i32 = 170_i32;
const JSVERSION_1_8: i32 = 180_i32;
const JSVERSION_ECMA_5: i32 = 185_i32;
const JSVERSION_DEFAULT: i32 = 0_i32;
const JSVERSION_UNKNOWN: i32 = -1_i32;
const JSVERSION_LATEST: i32 = 185_i32;
type JSVersion = enum_JSVersion;
type enum_JSType = c_uint;
const JSTYPE_VOID: u32 = 0_u32;
const JSTYPE_OBJECT: u32 = 1_u32;
const JSTYPE_FUNCTION: u32 = 2_u32;
const JSTYPE_STRING: u32 = 3_u32;
const JSTYPE_NUMBER: u32 = 4_u32;
const JSTYPE_BOOLEAN: u32 = 5_u32;
const JSTYPE_NULL: u32 = 6_u32;
const JSTYPE_XML: u32 = 7_u32;
const JSTYPE_LIMIT: u32 = 8_u32;
type JSType = enum_JSType;
type enum_JSProtoKey = c_uint;
const JSProto_Null: u32 = 0_u32;
const JSProto_Object: u32 = 1_u32;
const JSProto_Function: u32 = 2_u32;
const JSProto_Array: u32 = 3_u32;
const JSProto_Boolean: u32 = 4_u32;
const JSProto_JSON: u32 = 5_u32;
const JSProto_Date: u32 = 6_u32;
const JSProto_Math: u32 = 7_u32;
const JSProto_Number: u32 = 8_u32;
const JSProto_String: u32 = 9_u32;
const JSProto_RegExp: u32 = 10_u32;
const JSProto_XML: u32 = 11_u32;
const JSProto_Namespace: u32 = 12_u32;
const JSProto_QName: u32 = 13_u32;
const JSProto_Error: u32 = 14_u32;
const JSProto_InternalError: u32 = 15_u32;
const JSProto_EvalError: u32 = 16_u32;
const JSProto_RangeError: u32 = 17_u32;
const JSProto_ReferenceError: u32 = 18_u32;
const JSProto_SyntaxError: u32 = 19_u32;
const JSProto_TypeError: u32 = 20_u32;
const JSProto_URIError: u32 = 21_u32;
const JSProto_Iterator: u32 = 22_u32;
const JSProto_StopIteration: u32 = 23_u32;
const JSProto_ArrayBuffer: u32 = 24_u32;
const JSProto_Int8Array: u32 = 25_u32;
const JSProto_Uint8Array: u32 = 26_u32;
const JSProto_Int16Array: u32 = 27_u32;
const JSProto_Uint16Array: u32 = 28_u32;
const JSProto_Int32Array: u32 = 29_u32;
const JSProto_Uint32Array: u32 = 30_u32;
const JSProto_Float32Array: u32 = 31_u32;
const JSProto_Float64Array: u32 = 32_u32;
const JSProto_Uint8ClampedArray: u32 = 33_u32;
const JSProto_Proxy: u32 = 34_u32;
const JSProto_AnyName: u32 = 35_u32;
const JSProto_WeakMap: u32 = 36_u32;
const JSProto_Map: u32 = 37_u32;
const JSProto_Set: u32 = 38_u32;
const JSProto_LIMIT: u32 = 39_u32;
type JSProtoKey = enum_JSProtoKey;
type enum_JSAccessMode = c_uint;
const JSACC_PROTO: u32 = 0_u32;
const JSACC_PARENT: u32 = 1_u32;
const JSACC_WATCH: u32 = 3_u32;
const JSACC_READ: u32 = 4_u32;
const JSACC_WRITE: u32 = 8_u32;
const JSACC_LIMIT: u32 = 9_u32;
type JSAccessMode = enum_JSAccessMode;
type enum_JSIterateOp = c_uint;
const JSENUMERATE_INIT: u32 = 0_u32;
const JSENUMERATE_INIT_ALL: u32 = 1_u32;
const JSENUMERATE_NEXT: u32 = 2_u32;
const JSENUMERATE_DESTROY: u32 = 3_u32;
type JSIterateOp = enum_JSIterateOp;
type JSGCTraceKind = c_uint;
const JSTRACE_OBJECT: u32 = 0_u32;
const JSTRACE_STRING: u32 = 1_u32;
const JSTRACE_SCRIPT: u32 = 2_u32;
const JSTRACE_XML: u32 = 3_u32;
const JSTRACE_SHAPE: u32 = 4_u32;
const JSTRACE_BASE_SHAPE: u32 = 5_u32;
const JSTRACE_TYPE_OBJECT: u32 = 6_u32;
const JSTRACE_LAST: u32 = 6_u32;
type JSClass = struct_JSClass;
type struct_JSCompartment = c_void;
type JSCompartment = struct_JSCompartment;
type JSConstDoubleSpec = struct_JSConstDoubleSpec;
type struct_JSContext = c_void;
type JSContext = struct_JSContext;
type struct_JSCrossCompartmentCall = c_void;
type JSCrossCompartmentCall = struct_JSCrossCompartmentCall;
type JSErrorReport = struct_JSErrorReport;
type struct_JSExceptionState = c_void;
type JSExceptionState = struct_JSExceptionState;
type struct_JSFunction = c_void;
type JSFunction = struct_JSFunction;
type JSFunctionSpec = struct_JSFunctionSpec;
type struct_JSIdArray = c_void;
type JSIdArray = struct_JSIdArray;
type JSLocaleCallbacks = struct_JSLocaleCallbacks;
type struct_JSObject = c_void;
type JSObject = struct_JSObject;
type struct_JSObjectMap = c_void;
type JSObjectMap = struct_JSObjectMap;
type JSPrincipals = struct_JSPrincipals;
type JSPropertyDescriptor = struct_JSPropertyDescriptor;
type struct_JSPropertyName = c_void;
type JSPropertyName = struct_JSPropertyName;
type JSPropertySpec = struct_JSPropertySpec;
type struct_JSRuntime = c_void;
type JSRuntime = struct_JSRuntime;
type JSSecurityCallbacks = struct_JSSecurityCallbacks;
type struct_JSStackFrame = c_void;
type JSStackFrame = struct_JSStackFrame;
type struct_JSScript = c_void;
type JSScript = struct_JSScript;
type JSStructuredCloneCallbacks = struct_JSStructuredCloneCallbacks;
type struct_JSStructuredCloneReader = c_void;
type JSStructuredCloneReader = struct_JSStructuredCloneReader;
type struct_JSStructuredCloneWriter = c_void;
type JSStructuredCloneWriter = struct_JSStructuredCloneWriter;
type JSTracer = struct_JSTracer;
type struct_JSXDRState = c_void;
type JSXDRState = struct_JSXDRState;
type struct_JSFlatString = c_void;
type JSFlatString = struct_JSFlatString;
type struct_JSString = c_void;
type JSString = struct_JSString;
type JSCallOnceType = JSBool;
type JSInitCallback = *u8;
type JSMallocSizeOfFun = *u8;
type jsbitmap = size_t;
type JSValueType = uint8_t;
type JSValueTag = uint32_t;
type JSValueShiftedTag = uint64_t;
type enum_JSWhyMagic = c_uint;
const JS_ARRAY_HOLE: u32 = 0_u32;
const JS_ARGS_HOLE: u32 = 1_u32;
const JS_NATIVE_ENUMERATE: u32 = 2_u32;
const JS_NO_ITER_VALUE: u32 = 3_u32;
const JS_GENERATOR_CLOSING: u32 = 4_u32;
const JS_NO_CONSTANT: u32 = 5_u32;
const JS_THIS_POISON: u32 = 6_u32;
const JS_ARG_POISON: u32 = 7_u32;
const JS_SERIALIZE_NO_NODE: u32 = 8_u32;
const JS_LAZY_ARGUMENTS: u32 = 9_u32;
const JS_IS_CONSTRUCTING: u32 = 10_u32;
const JS_GENERIC_MAGIC: u32 = 11_u32;
type JSWhyMagic = enum_JSWhyMagic;
type union_jsval_layout = u64; // NDM--hand edited
type jsval_layout = union_jsval_layout;
type moz_static_assert0 = c_int;
type jsval = union_jsval_layout;
type moz_static_assert1 = c_int;
type JSPropertyOp = *u8;
type JSStrictPropertyOp = *u8;
type JSNewEnumerateOp = *u8;
type JSEnumerateOp = *u8;
type JSResolveOp = *u8;
type JSNewResolveOp = *u8;
type JSConvertOp = *u8;
type JSTypeOfOp = *u8;
type JSFinalizeOp = *u8;
type JSStringFinalizeOp = *u8;
type JSCheckAccessOp = *u8;
type JSXDRObjectOp = *u8;
type JSHasInstanceOp = *u8;
type JSTraceOp = *u8;
type JSTraceNamePrinter = *u8;
type JSEqualityOp = *u8;
type JSNative = *u8;
type enum_JSContextOp = c_uint;
const JSCONTEXT_NEW: u32 = 0_u32;
const JSCONTEXT_DESTROY: u32 = 1_u32;
type JSContextOp = enum_JSContextOp;
type JSContextCallback = *u8;
type enum_JSGCStatus = c_uint;
const JSGC_BEGIN: u32 = 0_u32;
const JSGC_END: u32 = 1_u32;
const JSGC_MARK_END: u32 = 2_u32;
const JSGC_FINALIZE_END: u32 = 3_u32;
type JSGCStatus = enum_JSGCStatus;
type JSGCCallback = *u8;
type JSTraceDataOp = *u8;
type JSOperationCallback = *u8;
type JSErrorReporter = *u8;
type enum_JSExnType = c_int;
const JSEXN_NONE: i32 = -1_i32;
const JSEXN_ERR: i32 = 0_i32;
const JSEXN_INTERNALERR: i32 = 1_i32;
const JSEXN_EVALERR: i32 = 2_i32;
const JSEXN_RANGEERR: i32 = 3_i32;
const JSEXN_REFERENCEERR: i32 = 4_i32;
const JSEXN_SYNTAXERR: i32 = 5_i32;
const JSEXN_TYPEERR: i32 = 6_i32;
const JSEXN_URIERR: i32 = 7_i32;
const JSEXN_LIMIT: i32 = 8_i32;
type JSExnType = enum_JSExnType;
type struct_JSErrorFormatString = {
format: *c_char,
argCount: uint16_t,
exnType: int16_t,
};
type JSErrorFormatString = struct_JSErrorFormatString;
type JSErrorCallback = *u8;
type JSLocaleToUpperCase = *u8;
type JSLocaleToLowerCase = *u8;
type JSLocaleCompare = *u8;
type JSLocaleToUnicode = *u8;
type JSPrincipalsTranscoder = *u8;
type JSObjectPrincipalsFinder = *u8;
type JSCSPEvalChecker = *u8;
type JSWrapObjectCallback = *u8;
type JSPreWrapCallback = *u8;
type JSCompartmentOp = c_uint;
const JSCOMPARTMENT_DESTROY: u32 = 0_u32;
type JSCompartmentCallback = *u8;
type ReadStructuredCloneOp = *u8;
type WriteStructuredCloneOp = *u8;
type StructuredCloneErrorOp = *u8;
/* FIXME: global variable JSVAL_NULL */
/* FIXME: global variable JSVAL_ZERO */
/* FIXME: global variable JSVAL_ONE */
/* FIXME: global variable JSVAL_FALSE */
/* FIXME: global variable JSVAL_TRUE */
/* FIXME: global variable JSVAL_VOID */
type JSEnumerateDiagnosticMemoryCallback = *u8;
type enum_JSGCRootType = c_uint;
const JS_GC_ROOT_VALUE_PTR: u32 = 0_u32;
const JS_GC_ROOT_GCTHING_PTR: u32 = 1_u32;
type JSGCRootType = enum_JSGCRootType;
type JSGCRootMapFun = *u8;
type JSTraceCallback = *u8;
type struct_JSTracer = {
runtime: *JSRuntime,
context: *JSContext,
callback: JSTraceCallback,
debugPrinter: JSTraceNamePrinter,
debugPrintArg: *c_void,
debugPrintIndex: size_t,
eagerlyTraceWeakMaps: JSBool,
};
type enum_JSGCParamKey = c_uint;
const JSGC_MAX_BYTES: u32 = 0_u32;
const JSGC_MAX_MALLOC_BYTES: u32 = 1_u32;
const JSGC_BYTES: u32 = 3_u32;
const JSGC_NUMBER: u32 = 4_u32;
const JSGC_MAX_CODE_CACHE_BYTES: u32 = 5_u32;
const JSGC_MODE: u32 = 6_u32;
const JSGC_UNUSED_CHUNKS: u32 = 7_u32;
const JSGC_TOTAL_CHUNKS: u32 = 8_u32;
type JSGCParamKey = enum_JSGCParamKey;
type enum_JSGCMode = c_uint;
const JSGC_MODE_GLOBAL: u32 = 0_u32;
const JSGC_MODE_COMPARTMENT: u32 = 1_u32;
type JSGCMode = enum_JSGCMode;
type JSClassInternal = *u8;
type struct_JSClass = {
name: *c_char,
flags: uint32_t,
addProperty: JSPropertyOp,
delProperty: JSPropertyOp,
getProperty: JSPropertyOp,
setProperty: JSStrictPropertyOp,
enumerate: JSEnumerateOp,
resolve: JSResolveOp,
convert: JSConvertOp,
finalize: JSFinalizeOp,
reserved0: JSClassInternal,
checkAccess: JSCheckAccessOp,
call: JSNative,
construct: JSNative,
xdrObject: JSXDRObjectOp,
hasInstance: JSHasInstanceOp,
trace: JSTraceOp,
reserved1: JSClassInternal,
reserved: (*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void,*c_void),
};
type struct_JSConstDoubleSpec = {
dval: jsdouble,
name: *c_char,
flags: uint8_t,
spare: (uint8_t,uint8_t,uint8_t),
};
type struct_JSPropertySpec = {
name: *c_char,
tinyid: int8_t,
flags: uint8_t,
getter: JSPropertyOp,
setter: JSStrictPropertyOp,
};
type struct_JSFunctionSpec = {
name: *c_char,
call: JSNative,
nargs: uint16_t,
flags: uint16_t,
};
type struct_JSPropertyDescriptor = {
obj: *JSObject,
attrs: uintN,
getter: JSPropertyOp,
setter: JSStrictPropertyOp,
value: jsval,
shortid: uintN,
};
type struct_JSPrincipals = {
codebase: *c_char,
refcount: jsrefcount,
destroy: *u8,
subsume: *u8,
};
type struct_JSSecurityCallbacks = {
checkObjectAccess: JSCheckAccessOp,
principalsTranscoder: JSPrincipalsTranscoder,
findObjectPrincipals: JSObjectPrincipalsFinder,
contentSecurityPolicyAllows: JSCSPEvalChecker,
};
type enum_JSExecPart = c_uint;
const JSEXEC_PROLOG: u32 = 0_u32;
const JSEXEC_MAIN: u32 = 1_u32;
type JSExecPart = enum_JSExecPart;
type JSONWriteCallback = *u8;
type struct_JSStructuredCloneCallbacks = {
read: ReadStructuredCloneOp,
write: WriteStructuredCloneOp,
reportError: StructuredCloneErrorOp,
};
type struct_JSLocaleCallbacks = {
localeToUpperCase: JSLocaleToUpperCase,
localeToLowerCase: JSLocaleToLowerCase,
localeCompare: JSLocaleCompare,
localeToUnicode: JSLocaleToUnicode,
localeGetErrorMessage: JSErrorCallback,
};
type struct_JSErrorReport = {
filename: *c_char,
originPrincipals: *JSPrincipals,
lineno: uintN,
linebuf: *c_char,
tokenptr: *c_char,
uclinebuf: *jschar,
uctokenptr: *jschar,
flags: uintN,
errorNumber: uintN,
ucmessage: *jschar,
messageArgs: **jschar,
};
type struct_unnamed1 = {
payload: union_unnamed2,
};
type union_unnamed2 = c_void /* FIXME: union type */;
#[nolink]
native mod bindgen {
fn JS_StringHasBeenInterned(++arg0: *JSContext, ++arg1: *JSString) -> JSBool;
fn JS_CallOnce(++arg0: *JSCallOnceType, ++arg1: JSInitCallback) -> JSBool;
fn JS_Now() -> int64_t;
fn JS_GetNaNValue(++arg0: *JSContext) -> jsval;
fn JS_GetNegativeInfinityValue(++arg0: *JSContext) -> jsval;
fn JS_GetPositiveInfinityValue(++arg0: *JSContext) -> jsval;
fn JS_GetEmptyStringValue(++arg0: *JSContext) -> jsval;
fn JS_GetEmptyString(++arg0: *JSRuntime) -> *JSString;
fn JS_ConvertArguments(++arg0: *JSContext, ++arg1: uintN, ++arg2: *jsval, ++arg3: *c_char/* FIXME: variadic arguments */) -> JSBool;
fn JS_ConvertValue(++arg0: *JSContext, ++arg1: jsval, ++arg2: JSType, ++arg3: *jsval) -> JSBool;
fn JS_ValueToObject(++arg0: *JSContext, ++arg1: jsval, ++arg2: **JSObject) -> JSBool;
fn JS_ValueToFunction(++arg0: *JSContext, ++arg1: jsval) -> *JSFunction;
fn JS_ValueToConstructor(++arg0: *JSContext, ++arg1: jsval) -> *JSFunction;
fn JS_ValueToString(++arg0: *JSContext, ++arg1: jsval) -> *JSString;
fn JS_ValueToSource(++arg0: *JSContext, ++arg1: jsval) -> *JSString;
fn JS_ValueToNumber(++arg0: *JSContext, ++arg1: jsval, ++arg2: *jsdouble) -> JSBool;
fn JS_DoubleIsInt32(++arg0: jsdouble, ++arg1: *jsint) -> JSBool;
fn JS_DoubleToInt32(++arg0: jsdouble) -> int32_t;
fn JS_DoubleToUint32(++arg0: jsdouble) -> uint32_t;
fn JS_ValueToECMAInt32(++arg0: *JSContext, ++arg1: jsval, ++arg2: *int32_t) -> JSBool;
fn JS_ValueToECMAUint32(++arg0: *JSContext, ++arg1: jsval, ++arg2: *uint32_t) -> JSBool;
fn JS_ValueToInt32(++arg0: *JSContext, ++arg1: jsval, ++arg2: *int32_t) -> JSBool;
fn JS_ValueToUint16(++arg0: *JSContext, ++arg1: jsval, ++arg2: *uint16_t) -> JSBool;
fn JS_ValueToBoolean(++arg0: *JSContext, ++arg1: jsval, ++arg2: *JSBool) -> JSBool;
fn JS_TypeOfValue(++arg0: *JSContext, ++arg1: jsval) -> JSType;
fn JS_GetTypeName(++arg0: *JSContext, ++arg1: JSType) -> *c_char;
fn JS_StrictlyEqual(++arg0: *JSContext, ++arg1: jsval, ++arg2: jsval, ++arg3: *JSBool) -> JSBool;
fn JS_LooselyEqual(++arg0: *JSContext, ++arg1: jsval, ++arg2: jsval, ++arg3: *JSBool) -> JSBool;
fn JS_SameValue(++arg0: *JSContext, ++arg1: jsval, ++arg2: jsval, ++arg3: *JSBool) -> JSBool;
fn JS_IsBuiltinEvalFunction(++arg0: *JSFunction) -> JSBool;
fn JS_IsBuiltinFunctionConstructor(++arg0: *JSFunction) -> JSBool;
fn JS_Init(++arg0: uint32_t) -> *JSRuntime;
fn JS_Finish(++arg0: *JSRuntime);
fn JS_ShutDown();
fn JS_GetRuntimePrivate(++arg0: *JSRuntime) -> *c_void;
fn JS_GetRuntime(++arg0: *JSContext) -> *JSRuntime;
fn JS_SetRuntimePrivate(++arg0: *JSRuntime, ++arg1: *c_void);
fn JS_BeginRequest(++arg0: *JSContext);
fn JS_EndRequest(++arg0: *JSContext);
fn JS_YieldRequest(++arg0: *JSContext);
fn JS_SuspendRequest(++arg0: *JSContext) -> jsrefcount;
fn JS_ResumeRequest(++arg0: *JSContext, ++arg1: jsrefcount);
fn JS_IsInRequest(++arg0: *JSRuntime) -> JSBool;
fn JS_IsInSuspendedRequest(++arg0: *JSRuntime) -> JSBool;
fn JS_SetContextCallback(++arg0: *JSRuntime, ++arg1: JSContextCallback) -> JSContextCallback;
fn JS_NewContext(++arg0: *JSRuntime, ++arg1: size_t) -> *JSContext;
fn JS_DestroyContext(++arg0: *JSContext);
fn JS_DestroyContextNoGC(++arg0: *JSContext);
fn JS_GetContextPrivate(++arg0: *JSContext) -> *c_void;
fn JS_SetContextPrivate(++arg0: *JSContext, ++arg1: *c_void);
fn JS_GetSecondContextPrivate(++arg0: *JSContext) -> *c_void;
fn JS_SetSecondContextPrivate(++arg0: *JSContext, ++arg1: *c_void);
fn JS_ContextIterator(++arg0: *JSRuntime, ++arg1: **JSContext) -> *JSContext;
fn JS_GetVersion(++arg0: *JSContext) -> JSVersion;
fn JS_SetVersion(++arg0: *JSContext, ++arg1: JSVersion) -> JSVersion;
fn JS_VersionToString(++arg0: JSVersion) -> *c_char;
fn JS_StringToVersion(++arg0: *c_char) -> JSVersion;
fn JS_GetOptions(++arg0: *JSContext) -> uint32_t;
fn JS_SetOptions(++arg0: *JSContext, ++arg1: uint32_t) -> uint32_t;
fn JS_ToggleOptions(++arg0: *JSContext, ++arg1: uint32_t) -> uint32_t;
fn JS_GetImplementationVersion() -> *c_char;
fn JS_SetWrapObjectCallbacks(++arg0: *JSRuntime, ++arg1: JSWrapObjectCallback, ++arg2: JSPreWrapCallback) -> JSWrapObjectCallback;
fn JS_EnterCrossCompartmentCall(++arg0: *JSContext, ++arg1: *JSObject) -> *JSCrossCompartmentCall;
fn JS_LeaveCrossCompartmentCall(++arg0: *JSCrossCompartmentCall);
fn JS_SetCompartmentPrivate(++arg0: *JSContext, ++arg1: *JSCompartment, ++arg2: *c_void) -> *c_void;
fn JS_WrapObject(++arg0: *JSContext, ++arg1: **JSObject) -> JSBool;
fn JS_WrapValue(++arg0: *JSContext, ++arg1: *jsval) -> JSBool;
fn JS_TransplantObject(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSObject) -> *JSObject;
fn js_TransplantObjectWithWrapper(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSObject, ++arg3: *JSObject, ++arg4: *JSObject) -> *JSObject;
fn JS_GetGlobalObject(++arg0: *JSContext) -> *JSObject;
fn JS_SetGlobalObject(++arg0: *JSContext, ++arg1: *JSObject);
fn JS_InitStandardClasses(++arg0: *JSContext, ++arg1: *JSObject) -> JSBool;
fn JS_ResolveStandardClass(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: *JSBool) -> JSBool;
fn JS_EnumerateStandardClasses(++arg0: *JSContext, ++arg1: *JSObject) -> JSBool;
fn JS_EnumerateResolvedStandardClasses(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSIdArray) -> *JSIdArray;
fn JS_GetClassObject(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: JSProtoKey, ++arg3: **JSObject) -> JSBool;
fn JS_GetGlobalForObject(++arg0: *JSContext, ++arg1: *JSObject) -> *JSObject;
fn JS_GetGlobalForScopeChain(++arg0: *JSContext) -> *JSObject;
fn JS_InitReflect(++arg0: *JSContext, ++arg1: *JSObject) -> *JSObject;
fn JS_EnumerateDiagnosticMemoryRegions(++arg0: JSEnumerateDiagnosticMemoryCallback);
fn JS_ComputeThis(++arg0: *JSContext, ++arg1: *jsval) -> jsval;
fn JS_malloc(++arg0: *JSContext, ++arg1: size_t) -> *c_void;
fn JS_realloc(++arg0: *JSContext, ++arg1: *c_void, ++arg2: size_t) -> *c_void;
fn JS_free(++arg0: *JSContext, ++arg1: *c_void);
fn JS_updateMallocCounter(++arg0: *JSContext, ++arg1: size_t);
fn JS_strdup(++arg0: *JSContext, ++arg1: *c_char) -> *c_char;
fn JS_NewNumberValue(++arg0: *JSContext, ++arg1: jsdouble, ++arg2: *jsval) -> JSBool;
fn JS_AddValueRoot(++arg0: *JSContext, ++arg1: *jsval) -> JSBool;
fn JS_AddStringRoot(++arg0: *JSContext, ++arg1: **JSString) -> JSBool;
fn JS_AddObjectRoot(++arg0: *JSContext, ++arg1: **JSObject) -> JSBool;
fn JS_AddGCThingRoot(++arg0: *JSContext, ++arg1: **c_void) -> JSBool;
fn JS_AddNamedValueRoot(++arg0: *JSContext, ++arg1: *jsval, ++arg2: *c_char) -> JSBool;
fn JS_AddNamedStringRoot(++arg0: *JSContext, ++arg1: **JSString, ++arg2: *c_char) -> JSBool;
fn JS_AddNamedObjectRoot(++arg0: *JSContext, ++arg1: **JSObject, ++arg2: *c_char) -> JSBool;
fn JS_AddNamedScriptRoot(++arg0: *JSContext, ++arg1: **JSScript, ++arg2: *c_char) -> JSBool;
fn JS_AddNamedGCThingRoot(++arg0: *JSContext, ++arg1: **c_void, ++arg2: *c_char) -> JSBool;
fn JS_RemoveValueRoot(++arg0: *JSContext, ++arg1: *jsval) -> JSBool;
fn JS_RemoveStringRoot(++arg0: *JSContext, ++arg1: **JSString) -> JSBool;
fn JS_RemoveObjectRoot(++arg0: *JSContext, ++arg1: **JSObject) -> JSBool;
fn JS_RemoveScriptRoot(++arg0: *JSContext, ++arg1: **JSScript) -> JSBool;
fn JS_RemoveGCThingRoot(++arg0: *JSContext, ++arg1: **c_void) -> JSBool;
fn js_AddRootRT(++arg0: *JSRuntime, ++arg1: *jsval, ++arg2: *c_char) -> JSBool;
fn js_AddGCThingRootRT(++arg0: *JSRuntime, ++arg1: **c_void, ++arg2: *c_char) -> JSBool;
fn js_RemoveRoot(++arg0: *JSRuntime, ++arg1: *c_void) -> JSBool;
fn JS_AnchorPtr(++arg0: *c_void);
fn JS_MapGCRoots(++arg0: *JSRuntime, ++arg1: JSGCRootMapFun, ++arg2: *c_void) -> uint32_t;
fn JS_LockGCThing(++arg0: *JSContext, ++arg1: *c_void) -> JSBool;
fn JS_LockGCThingRT(++arg0: *JSRuntime, ++arg1: *c_void) -> JSBool;
fn JS_UnlockGCThing(++arg0: *JSContext, ++arg1: *c_void) -> JSBool;
fn JS_UnlockGCThingRT(++arg0: *JSRuntime, ++arg1: *c_void) -> JSBool;
fn JS_SetExtraGCRootsTracer(++arg0: *JSRuntime, ++arg1: JSTraceDataOp, ++arg2: *c_void);
fn JS_CallTracer(++arg0: *JSTracer, ++arg1: *c_void, ++arg2: JSGCTraceKind);
fn JS_TracerInit(++arg0: *JSTracer, ++arg1: *JSContext, ++arg2: JSTraceCallback);
fn JS_TraceChildren(++arg0: *JSTracer, ++arg1: *c_void, ++arg2: JSGCTraceKind);
fn JS_TraceRuntime(++arg0: *JSTracer);
fn JS_GC(++arg0: *JSContext);
fn JS_MaybeGC(++arg0: *JSContext);
fn JS_SetGCCallback(++arg0: *JSContext, ++arg1: JSGCCallback) -> JSGCCallback;
fn JS_IsGCMarkingTracer(++arg0: *JSTracer) -> JSBool;
fn JS_IsAboutToBeFinalized(++arg0: *JSContext, ++arg1: *c_void) -> JSBool;
fn JS_SetGCParameter(++arg0: *JSRuntime, ++arg1: JSGCParamKey, ++arg2: uint32_t);
fn JS_GetGCParameter(++arg0: *JSRuntime, ++arg1: JSGCParamKey) -> uint32_t;
fn JS_SetGCParameterForThread(++arg0: *JSContext, ++arg1: JSGCParamKey, ++arg2: uint32_t);
fn JS_GetGCParameterForThread(++arg0: *JSContext, ++arg1: JSGCParamKey) -> uint32_t;
fn JS_NewExternalString(++arg0: *JSContext, ++arg1: *jschar, ++arg2: size_t, ++arg3: intN) -> *JSString;
fn JS_IsExternalString(++arg0: *JSContext, ++arg1: *JSString) -> JSBool;
fn JS_SetNativeStackQuota(++arg0: *JSContext, ++arg1: size_t);
fn JS_IdArrayLength(++arg0: *JSContext, ++arg1: *JSIdArray) -> jsint;
fn JS_IdArrayGet(++arg0: *JSContext, ++arg1: *JSIdArray, ++arg2: jsint) -> jsid;
fn JS_DestroyIdArray(++arg0: *JSContext, ++arg1: *JSIdArray);
fn JS_ValueToId(++arg0: *JSContext, ++arg1: jsval, ++arg2: *jsid) -> JSBool;
fn JS_IdToValue(++arg0: *JSContext, ++arg1: jsid, ++arg2: *jsval) -> JSBool;
fn JS_DefaultValue(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: JSType, ++arg3: *jsval) -> JSBool;
fn JS_PropertyStub(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: *jsval) -> JSBool;
fn JS_StrictPropertyStub(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: JSBool, ++arg4: *jsval) -> JSBool;
fn JS_EnumerateStub(++arg0: *JSContext, ++arg1: *JSObject) -> JSBool;
fn JS_ResolveStub(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid) -> JSBool;
fn JS_ConvertStub(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: JSType, ++arg3: *jsval) -> JSBool;
fn JS_InitClass(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSObject, ++arg3: *JSClass, ++arg4: JSNative, ++arg5: uintN, ++arg6: *JSPropertySpec, ++arg7: *JSFunctionSpec, ++arg8: *JSPropertySpec, ++arg9: *JSFunctionSpec) -> *JSObject;
fn JS_GetClass(++arg0: *JSObject) -> *JSClass;
fn JS_InstanceOf(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSClass, ++arg3: *jsval) -> JSBool;
fn JS_HasInstance(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsval, ++arg3: *JSBool) -> JSBool;
fn JS_GetPrivate(++arg0: *JSContext, ++arg1: *JSObject) -> *c_void;
fn JS_SetPrivate(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_void) -> JSBool;
fn JS_GetInstancePrivate(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSClass, ++arg3: *jsval) -> *c_void;
fn JS_GetPrototype(++arg0: *JSContext, ++arg1: *JSObject) -> *JSObject;
fn JS_SetPrototype(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSObject) -> JSBool;
fn JS_GetParent(++arg0: *JSContext, ++arg1: *JSObject) -> *JSObject;
fn JS_SetParent(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSObject) -> JSBool;
fn JS_GetConstructor(++arg0: *JSContext, ++arg1: *JSObject) -> *JSObject;
fn JS_GetObjectId(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jsid) -> JSBool;
fn JS_NewGlobalObject(++arg0: *JSContext, ++arg1: *JSClass) -> *JSObject;
fn JS_NewCompartmentAndGlobalObject(++arg0: *JSContext, ++arg1: *JSClass, ++arg2: *JSPrincipals) -> *JSObject;
fn JS_NewObject(++arg0: *JSContext, ++arg1: *JSClass, ++arg2: *JSObject, ++arg3: *JSObject) -> *JSObject;
fn JS_IsExtensible(++arg0: *JSObject) -> JSBool;
fn JS_IsNative(++arg0: *JSObject) -> JSBool;
fn JS_NewObjectWithGivenProto(++arg0: *JSContext, ++arg1: *JSClass, ++arg2: *JSObject, ++arg3: *JSObject) -> *JSObject;
fn JS_DeepFreezeObject(++arg0: *JSContext, ++arg1: *JSObject) -> JSBool;
fn JS_FreezeObject(++arg0: *JSContext, ++arg1: *JSObject) -> JSBool;
fn JS_ConstructObject(++arg0: *JSContext, ++arg1: *JSClass, ++arg2: *JSObject) -> *JSObject;
fn JS_ConstructObjectWithArguments(++arg0: *JSContext, ++arg1: *JSClass, ++arg2: *JSObject, ++arg3: uintN, ++arg4: *jsval) -> *JSObject;
fn JS_New(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: uintN, ++arg3: *jsval) -> *JSObject;
fn JS_DefineObject(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: *JSClass, ++arg4: *JSObject, ++arg5: uintN) -> *JSObject;
fn JS_DefineConstDoubles(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSConstDoubleSpec) -> JSBool;
fn JS_DefineProperties(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSPropertySpec) -> JSBool;
fn JS_DefineProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: jsval, ++arg4: JSPropertyOp, ++arg5: JSStrictPropertyOp, ++arg6: uintN) -> JSBool;
fn JS_DefinePropertyById(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: jsval, ++arg4: JSPropertyOp, ++arg5: JSStrictPropertyOp, ++arg6: uintN) -> JSBool;
fn JS_DefineOwnProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: jsval, ++arg4: *JSBool) -> JSBool;
fn JS_GetPropertyAttributes(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: *uintN, ++arg4: *JSBool) -> JSBool;
fn JS_GetPropertyAttrsGetterAndSetter(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: *uintN, ++arg4: *JSBool, ++arg5: *JSPropertyOp, ++arg6: *JSStrictPropertyOp) -> JSBool;
fn JS_GetPropertyAttrsGetterAndSetterById(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: *uintN, ++arg4: *JSBool, ++arg5: *JSPropertyOp, ++arg6: *JSStrictPropertyOp) -> JSBool;
fn JS_SetPropertyAttributes(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: uintN, ++arg4: *JSBool) -> JSBool;
fn JS_DefinePropertyWithTinyId(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: int8_t, ++arg4: jsval, ++arg5: JSPropertyOp, ++arg6: JSStrictPropertyOp, ++arg7: uintN) -> JSBool;
fn JS_AlreadyHasOwnProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: *JSBool) -> JSBool;
fn JS_AlreadyHasOwnPropertyById(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: *JSBool) -> JSBool;
fn JS_HasProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: *JSBool) -> JSBool;
fn JS_HasPropertyById(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: *JSBool) -> JSBool;
fn JS_LookupProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: *jsval) -> JSBool;
fn JS_LookupPropertyById(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: *jsval) -> JSBool;
fn JS_LookupPropertyWithFlags(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: uintN, ++arg4: *jsval) -> JSBool;
fn JS_LookupPropertyWithFlagsById(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: uintN, ++arg4: **JSObject, ++arg5: *jsval) -> JSBool;
fn JS_GetPropertyDescriptorById(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: uintN, ++arg4: *JSPropertyDescriptor) -> JSBool;
fn JS_GetOwnPropertyDescriptor(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: *jsval) -> JSBool;
fn JS_GetProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: *jsval) -> JSBool;
fn JS_GetPropertyDefault(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: jsval, ++arg4: *jsval) -> JSBool;
fn JS_GetPropertyById(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: *jsval) -> JSBool;
fn JS_GetPropertyByIdDefault(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: jsval, ++arg4: *jsval) -> JSBool;
fn JS_ForwardGetPropertyTo(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: *JSObject, ++arg4: *jsval) -> JSBool;
fn JS_GetMethodById(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: **JSObject, ++arg4: *jsval) -> JSBool;
fn JS_GetMethod(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: **JSObject, ++arg4: *jsval) -> JSBool;
fn JS_SetProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: *jsval) -> JSBool;
fn JS_SetPropertyById(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: *jsval) -> JSBool;
fn JS_DeleteProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char) -> JSBool;
fn JS_DeleteProperty2(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: *jsval) -> JSBool;
fn JS_DeletePropertyById(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid) -> JSBool;
fn JS_DeletePropertyById2(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: *jsval) -> JSBool;
fn JS_DefineUCProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jschar, ++arg3: size_t, ++arg4: jsval, ++arg5: JSPropertyOp, ++arg6: JSStrictPropertyOp, ++arg7: uintN) -> JSBool;
fn JS_GetUCPropertyAttributes(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jschar, ++arg3: size_t, ++arg4: *uintN, ++arg5: *JSBool) -> JSBool;
fn JS_GetUCPropertyAttrsGetterAndSetter(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jschar, ++arg3: size_t, ++arg4: *uintN, ++arg5: *JSBool, ++arg6: *JSPropertyOp, ++arg7: *JSStrictPropertyOp) -> JSBool;
fn JS_SetUCPropertyAttributes(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jschar, ++arg3: size_t, ++arg4: uintN, ++arg5: *JSBool) -> JSBool;
fn JS_DefineUCPropertyWithTinyId(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jschar, ++arg3: size_t, ++arg4: int8_t, ++arg5: jsval, ++arg6: JSPropertyOp, ++arg7: JSStrictPropertyOp, ++arg8: uintN) -> JSBool;
fn JS_AlreadyHasOwnUCProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jschar, ++arg3: size_t, ++arg4: *JSBool) -> JSBool;
fn JS_HasUCProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jschar, ++arg3: size_t, ++arg4: *JSBool) -> JSBool;
fn JS_LookupUCProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jschar, ++arg3: size_t, ++arg4: *jsval) -> JSBool;
fn JS_GetUCProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jschar, ++arg3: size_t, ++arg4: *jsval) -> JSBool;
fn JS_SetUCProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jschar, ++arg3: size_t, ++arg4: *jsval) -> JSBool;
fn JS_DeleteUCProperty2(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jschar, ++arg3: size_t, ++arg4: *jsval) -> JSBool;
fn JS_NewArrayObject(++arg0: *JSContext, ++arg1: jsint, ++arg2: *jsval) -> *JSObject;
fn JS_IsArrayObject(++arg0: *JSContext, ++arg1: *JSObject) -> JSBool;
fn JS_GetArrayLength(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jsuint) -> JSBool;
fn JS_SetArrayLength(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsuint) -> JSBool;
fn JS_DefineElement(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: uint32_t, ++arg3: jsval, ++arg4: JSPropertyOp, ++arg5: JSStrictPropertyOp, ++arg6: uintN) -> JSBool;
fn JS_AlreadyHasOwnElement(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: uint32_t, ++arg3: *JSBool) -> JSBool;
fn JS_HasElement(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: uint32_t, ++arg3: *JSBool) -> JSBool;
fn JS_LookupElement(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: uint32_t, ++arg3: *jsval) -> JSBool;
fn JS_GetElement(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: uint32_t, ++arg3: *jsval) -> JSBool;
fn JS_ForwardGetElementTo(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: uint32_t, ++arg3: *JSObject, ++arg4: *jsval) -> JSBool;
fn JS_GetElementIfPresent(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: uint32_t, ++arg3: *JSObject, ++arg4: *jsval, ++arg5: *JSBool) -> JSBool;
fn JS_SetElement(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: uint32_t, ++arg3: *jsval) -> JSBool;
fn JS_DeleteElement(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: uint32_t) -> JSBool;
fn JS_DeleteElement2(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: uint32_t, ++arg3: *jsval) -> JSBool;
fn JS_ClearScope(++arg0: *JSContext, ++arg1: *JSObject);
fn JS_Enumerate(++arg0: *JSContext, ++arg1: *JSObject) -> *JSIdArray;
fn JS_NewPropertyIterator(++arg0: *JSContext, ++arg1: *JSObject) -> *JSObject;
fn JS_NextProperty(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jsid) -> JSBool;
fn JS_CheckAccess(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: JSAccessMode, ++arg4: *jsval, ++arg5: *uintN) -> JSBool;
fn JS_GetReservedSlot(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: uint32_t, ++arg3: *jsval) -> JSBool;
fn JS_SetReservedSlot(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: uint32_t, ++arg3: jsval) -> JSBool;
fn JS_GetSecurityCallbacks(++arg0: *JSContext) -> *JSSecurityCallbacks;
fn JS_SetTrustedPrincipals(++arg0: *JSRuntime, ++arg1: *JSPrincipals);
fn JS_NewFunction(++arg0: *JSContext, ++arg1: JSNative, ++arg2: uintN, ++arg3: uintN, ++arg4: *JSObject, ++arg5: *c_char) -> *JSFunction;
fn JS_NewFunctionById(++arg0: *JSContext, ++arg1: JSNative, ++arg2: uintN, ++arg3: uintN, ++arg4: *JSObject, ++arg5: jsid) -> *JSFunction;
fn JS_GetFunctionObject(++arg0: *JSFunction) -> *JSObject;
fn JS_GetFunctionId(++arg0: *JSFunction) -> *JSString;
fn JS_GetFunctionFlags(++arg0: *JSFunction) -> uintN;
fn JS_GetFunctionArity(++arg0: *JSFunction) -> uint16_t;
fn JS_ObjectIsFunction(++arg0: *JSContext, ++arg1: *JSObject) -> JSBool;
fn JS_ObjectIsCallable(++arg0: *JSContext, ++arg1: *JSObject) -> JSBool;
fn JS_IsNativeFunction(++arg0: *JSObject, ++arg1: JSNative) -> JSBool;
fn JS_DefineFunctions(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSFunctionSpec) -> JSBool;
fn JS_DefineFunction(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: JSNative, ++arg4: uintN, ++arg5: uintN) -> *JSFunction;
fn JS_DefineUCFunction(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jschar, ++arg3: size_t, ++arg4: JSNative, ++arg5: uintN, ++arg6: uintN) -> *JSFunction;
fn JS_DefineFunctionById(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsid, ++arg3: JSNative, ++arg4: uintN, ++arg5: uintN) -> *JSFunction;
fn JS_CloneFunctionObject(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSObject) -> *JSObject;
fn JS_BufferIsCompilableUnit(++arg0: *JSContext, ++arg1: JSBool, ++arg2: *JSObject, ++arg3: *c_char, ++arg4: size_t) -> JSBool;
fn JS_CompileScript(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: size_t, ++arg4: *c_char, ++arg5: uintN) -> *JSScript;
fn JS_CompileScriptForPrincipals(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSPrincipals, ++arg3: *c_char, ++arg4: size_t, ++arg5: *c_char, ++arg6: uintN) -> *JSScript;
fn JS_CompileScriptForPrincipalsVersion(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSPrincipals, ++arg3: *c_char, ++arg4: size_t, ++arg5: *c_char, ++arg6: uintN, ++arg7: JSVersion) -> *JSScript;
fn JS_CompileUCScript(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jschar, ++arg3: size_t, ++arg4: *c_char, ++arg5: uintN) -> *JSScript;
fn JS_CompileUCScriptForPrincipals(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSPrincipals, ++arg3: *jschar, ++arg4: size_t, ++arg5: *c_char, ++arg6: uintN) -> *JSScript;
fn JS_CompileUCScriptForPrincipalsVersion(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSPrincipals, ++arg3: *jschar, ++arg4: size_t, ++arg5: *c_char, ++arg6: uintN, ++arg7: JSVersion) -> *JSScript;
fn JS_CompileUTF8File(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char) -> *JSScript;
fn JS_CompileUTF8FileHandle(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: *FILE) -> *JSScript;
fn JS_CompileUTF8FileHandleForPrincipals(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: *FILE, ++arg4: *JSPrincipals) -> *JSScript;
fn JS_CompileUTF8FileHandleForPrincipalsVersion(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: *FILE, ++arg4: *JSPrincipals, ++arg5: JSVersion) -> *JSScript;
fn JS_GetGlobalFromScript(++arg0: *JSScript) -> *JSObject;
fn JS_CompileFunction(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: uintN, ++arg4: **c_char, ++arg5: *c_char, ++arg6: size_t, ++arg7: *c_char, ++arg8: uintN) -> *JSFunction;
fn JS_CompileFunctionForPrincipals(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSPrincipals, ++arg3: *c_char, ++arg4: uintN, ++arg5: **c_char, ++arg6: *c_char, ++arg7: size_t, ++arg8: *c_char, ++arg9: uintN) -> *JSFunction;
fn JS_CompileUCFunction(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: uintN, ++arg4: **c_char, ++arg5: *jschar, ++arg6: size_t, ++arg7: *c_char, ++arg8: uintN) -> *JSFunction;
fn JS_CompileUCFunctionForPrincipals(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSPrincipals, ++arg3: *c_char, ++arg4: uintN, ++arg5: **c_char, ++arg6: *jschar, ++arg7: size_t, ++arg8: *c_char, ++arg9: uintN) -> *JSFunction;
fn JS_CompileUCFunctionForPrincipalsVersion(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSPrincipals, ++arg3: *c_char, ++arg4: uintN, ++arg5: **c_char, ++arg6: *jschar, ++arg7: size_t, ++arg8: *c_char, ++arg9: uintN, ++arg10: JSVersion) -> *JSFunction;
fn JS_DecompileScript(++arg0: *JSContext, ++arg1: *JSScript, ++arg2: *c_char, ++arg3: uintN) -> *JSString;
fn JS_DecompileFunction(++arg0: *JSContext, ++arg1: *JSFunction, ++arg2: uintN) -> *JSString;
fn JS_DecompileFunctionBody(++arg0: *JSContext, ++arg1: *JSFunction, ++arg2: uintN) -> *JSString;
fn JS_ExecuteScript(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSScript, ++arg3: *jsval) -> JSBool;
fn JS_ExecuteScriptVersion(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSScript, ++arg3: *jsval, ++arg4: JSVersion) -> JSBool;
fn JS_EvaluateScript(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: uintN, ++arg4: *c_char, ++arg5: uintN, ++arg6: *jsval) -> JSBool;
fn JS_EvaluateScriptForPrincipals(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSPrincipals, ++arg3: *c_char, ++arg4: uintN, ++arg5: *c_char, ++arg6: uintN, ++arg7: *jsval) -> JSBool;
fn JS_EvaluateScriptForPrincipalsVersion(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSPrincipals, ++arg3: *c_char, ++arg4: uintN, ++arg5: *c_char, ++arg6: uintN, ++arg7: *jsval, ++arg8: JSVersion) -> JSBool;
fn JS_EvaluateUCScript(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jschar, ++arg3: uintN, ++arg4: *c_char, ++arg5: uintN, ++arg6: *jsval) -> JSBool;
fn JS_EvaluateUCScriptForPrincipals(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSPrincipals, ++arg3: *jschar, ++arg4: uintN, ++arg5: *c_char, ++arg6: uintN, ++arg7: *jsval) -> JSBool;
fn JS_EvaluateUCScriptForPrincipalsVersion(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSPrincipals, ++arg3: *jschar, ++arg4: uintN, ++arg5: *c_char, ++arg6: uintN, ++arg7: *jsval, ++arg8: JSVersion) -> JSBool;
fn JS_EvaluateUCScriptForPrincipalsVersionOrigin(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSPrincipals, ++arg3: *JSPrincipals, ++arg4: *jschar, ++arg5: uintN, ++arg6: *c_char, ++arg7: uintN, ++arg8: *jsval, ++arg9: JSVersion) -> JSBool;
fn JS_CallFunction(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSFunction, ++arg3: uintN, ++arg4: *jsval, ++arg5: *jsval) -> JSBool;
fn JS_CallFunctionName(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: uintN, ++arg4: *jsval, ++arg5: *jsval) -> JSBool;
fn JS_CallFunctionValue(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: jsval, ++arg3: uintN, ++arg4: *jsval, ++arg5: *jsval) -> JSBool;
fn JS_SetOperationCallback(++arg0: *JSContext, ++arg1: JSOperationCallback) -> JSOperationCallback;
fn JS_GetOperationCallback(++arg0: *JSContext) -> JSOperationCallback;
fn JS_TriggerOperationCallback(++arg0: *JSContext);
fn JS_IsRunning(++arg0: *JSContext) -> JSBool;
fn JS_SaveFrameChain(++arg0: *JSContext) -> JSBool;
fn JS_RestoreFrameChain(++arg0: *JSContext);
fn JS_NewStringCopyN(++arg0: *JSContext, ++arg1: *c_char, ++arg2: size_t) -> *JSString;
fn JS_NewStringCopyZ(++arg0: *JSContext, ++arg1: *c_char) -> *JSString;
fn JS_InternJSString(++arg0: *JSContext, ++arg1: *JSString) -> *JSString;
fn JS_InternString(++arg0: *JSContext, ++arg1: *c_char) -> *JSString;
fn JS_NewUCString(++arg0: *JSContext, ++arg1: *jschar, ++arg2: size_t) -> *JSString;
fn JS_NewUCStringCopyN(++arg0: *JSContext, ++arg1: *jschar, ++arg2: size_t) -> *JSString;
fn JS_NewUCStringCopyZ(++arg0: *JSContext, ++arg1: *jschar) -> *JSString;
fn JS_InternUCStringN(++arg0: *JSContext, ++arg1: *jschar, ++arg2: size_t) -> *JSString;
fn JS_InternUCString(++arg0: *JSContext, ++arg1: *jschar) -> *JSString;
fn JS_CompareStrings(++arg0: *JSContext, ++arg1: *JSString, ++arg2: *JSString, ++arg3: *int32_t) -> JSBool;
fn JS_StringEqualsAscii(++arg0: *JSContext, ++arg1: *JSString, ++arg2: *c_char, ++arg3: *JSBool) -> JSBool;
fn JS_PutEscapedString(++arg0: *JSContext, ++arg1: *c_char, ++arg2: size_t, ++arg3: *JSString, ++arg4: c_char) -> size_t;
fn JS_FileEscapedString(++arg0: *FILE, ++arg1: *JSString, ++arg2: c_char) -> JSBool;
fn JS_GetStringLength(++arg0: *JSString) -> size_t;
fn JS_GetStringCharsAndLength(++arg0: *JSContext, ++arg1: *JSString, ++arg2: *size_t) -> *jschar;
fn JS_GetInternedStringChars(++arg0: *JSString) -> *jschar;
fn JS_GetInternedStringCharsAndLength(++arg0: *JSString, ++arg1: *size_t) -> *jschar;
fn JS_GetStringCharsZ(++arg0: *JSContext, ++arg1: *JSString) -> *jschar;
fn JS_GetStringCharsZAndLength(++arg0: *JSContext, ++arg1: *JSString, ++arg2: *size_t) -> *jschar;
fn JS_FlattenString(++arg0: *JSContext, ++arg1: *JSString) -> *JSFlatString;
fn JS_GetFlatStringChars(++arg0: *JSFlatString) -> *jschar;
fn JS_FlatStringEqualsAscii(++arg0: *JSFlatString, ++arg1: *c_char) -> JSBool;
fn JS_PutEscapedFlatString(++arg0: *c_char, ++arg1: size_t, ++arg2: *JSFlatString, ++arg3: c_char) -> size_t;
fn JS_NewGrowableString(++arg0: *JSContext, ++arg1: *jschar, ++arg2: size_t) -> *JSString;
fn JS_NewDependentString(++arg0: *JSContext, ++arg1: *JSString, ++arg2: size_t, ++arg3: size_t) -> *JSString;
fn JS_ConcatStrings(++arg0: *JSContext, ++arg1: *JSString, ++arg2: *JSString) -> *JSString;
fn JS_UndependString(++arg0: *JSContext, ++arg1: *JSString) -> *jschar;
fn JS_MakeStringImmutable(++arg0: *JSContext, ++arg1: *JSString) -> JSBool;
fn JS_CStringsAreUTF8() -> JSBool;
fn JS_SetCStringsAreUTF8();
fn JS_EncodeCharacters(++arg0: *JSContext, ++arg1: *jschar, ++arg2: size_t, ++arg3: *c_char, ++arg4: *size_t) -> JSBool;
fn JS_DecodeBytes(++arg0: *JSContext, ++arg1: *c_char, ++arg2: size_t, ++arg3: *jschar, ++arg4: *size_t) -> JSBool;
fn JS_DecodeUTF8(++arg0: *JSContext, ++arg1: *c_char, ++arg2: size_t, ++arg3: *jschar, ++arg4: *size_t) -> JSBool;
fn JS_EncodeString(++arg0: *JSContext, ++arg1: *JSString) -> *c_char;
fn JS_GetStringEncodingLength(++arg0: *JSContext, ++arg1: *JSString) -> size_t;
fn JS_EncodeStringToBuffer(++arg0: *JSString, ++arg1: *c_char, ++arg2: size_t) -> size_t;
fn JS_Stringify(++arg0: *JSContext, ++arg1: *jsval, ++arg2: *JSObject, ++arg3: jsval, ++arg4: JSONWriteCallback, ++arg5: *c_void) -> JSBool;
fn JS_ParseJSON(++arg0: *JSContext, ++arg1: *jschar, ++arg2: uint32_t, ++arg3: *jsval) -> JSBool;
fn JS_ParseJSONWithReviver(++arg0: *JSContext, ++arg1: *jschar, ++arg2: uint32_t, ++arg3: jsval, ++arg4: *jsval) -> JSBool;
fn JS_ReadStructuredClone(++arg0: *JSContext, ++arg1: *uint64_t, ++arg2: size_t, ++arg3: uint32_t, ++arg4: *jsval, ++arg5: *JSStructuredCloneCallbacks, ++arg6: *c_void) -> JSBool;
fn JS_WriteStructuredClone(++arg0: *JSContext, ++arg1: jsval, ++arg2: **uint64_t, ++arg3: *size_t, ++arg4: *JSStructuredCloneCallbacks, ++arg5: *c_void) -> JSBool;
fn JS_StructuredClone(++arg0: *JSContext, ++arg1: jsval, ++arg2: *jsval, ++arg3: *JSStructuredCloneCallbacks, ++arg4: *c_void) -> JSBool;
fn JS_SetStructuredCloneCallbacks(++arg0: *JSRuntime, ++arg1: *JSStructuredCloneCallbacks);
fn JS_ReadUint32Pair(++arg0: *JSStructuredCloneReader, ++arg1: *uint32_t, ++arg2: *uint32_t) -> JSBool;
fn JS_ReadBytes(++arg0: *JSStructuredCloneReader, ++arg1: *c_void, ++arg2: size_t) -> JSBool;
fn JS_WriteUint32Pair(++arg0: *JSStructuredCloneWriter, ++arg1: uint32_t, ++arg2: uint32_t) -> JSBool;
fn JS_WriteBytes(++arg0: *JSStructuredCloneWriter, ++arg1: *c_void, ++arg2: size_t) -> JSBool;
fn JS_SetLocaleCallbacks(++arg0: *JSContext, ++arg1: *JSLocaleCallbacks);
fn JS_GetLocaleCallbacks(++arg0: *JSContext) -> *JSLocaleCallbacks;
fn JS_ReportError(++arg0: *JSContext, ++arg1: *c_char/* FIXME: variadic arguments */);
fn JS_ReportErrorNumber(++arg0: *JSContext, ++arg1: JSErrorCallback, ++arg2: *c_void, ++arg3: uintN/* FIXME: variadic arguments */);
fn JS_ReportErrorNumberUC(++arg0: *JSContext, ++arg1: JSErrorCallback, ++arg2: *c_void, ++arg3: uintN/* FIXME: variadic arguments */);
fn JS_ReportWarning(++arg0: *JSContext, ++arg1: *c_char/* FIXME: variadic arguments */) -> JSBool;
fn JS_ReportErrorFlagsAndNumber(++arg0: *JSContext, ++arg1: uintN, ++arg2: JSErrorCallback, ++arg3: *c_void, ++arg4: uintN/* FIXME: variadic arguments */) -> JSBool;
fn JS_ReportErrorFlagsAndNumberUC(++arg0: *JSContext, ++arg1: uintN, ++arg2: JSErrorCallback, ++arg3: *c_void, ++arg4: uintN/* FIXME: variadic arguments */) -> JSBool;
fn JS_ReportOutOfMemory(++arg0: *JSContext);
fn JS_ReportAllocationOverflow(++arg0: *JSContext);
fn JS_GetErrorReporter(++arg0: *JSContext) -> JSErrorReporter;
fn JS_SetErrorReporter(++arg0: *JSContext, ++arg1: JSErrorReporter) -> JSErrorReporter;
fn JS_NewDateObject(++arg0: *JSContext, ++arg1: c_int, ++arg2: c_int, ++arg3: c_int, ++arg4: c_int, ++arg5: c_int, ++arg6: c_int) -> *JSObject;
fn JS_NewDateObjectMsec(++arg0: *JSContext, ++arg1: jsdouble) -> *JSObject;
fn JS_ObjectIsDate(++arg0: *JSContext, ++arg1: *JSObject) -> JSBool;
fn JS_NewRegExpObject(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *c_char, ++arg3: size_t, ++arg4: uintN) -> *JSObject;
fn JS_NewUCRegExpObject(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jschar, ++arg3: size_t, ++arg4: uintN) -> *JSObject;
fn JS_SetRegExpInput(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSString, ++arg3: JSBool);
fn JS_ClearRegExpStatics(++arg0: *JSContext, ++arg1: *JSObject);
fn JS_ExecuteRegExp(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *JSObject, ++arg3: *jschar, ++arg4: size_t, ++arg5: *size_t, ++arg6: JSBool, ++arg7: *jsval) -> JSBool;
fn JS_NewRegExpObjectNoStatics(++arg0: *JSContext, ++arg1: *c_char, ++arg2: size_t, ++arg3: uintN) -> *JSObject;
fn JS_NewUCRegExpObjectNoStatics(++arg0: *JSContext, ++arg1: *jschar, ++arg2: size_t, ++arg3: uintN) -> *JSObject;
fn JS_ExecuteRegExpNoStatics(++arg0: *JSContext, ++arg1: *JSObject, ++arg2: *jschar, ++arg3: size_t, ++arg4: *size_t, ++arg5: JSBool, ++arg6: *jsval) -> JSBool;
fn JS_ObjectIsRegExp(++arg0: *JSContext, ++arg1: *JSObject) -> JSBool;
fn JS_GetRegExpFlags(++arg0: *JSContext, ++arg1: *JSObject) -> uintN;
fn JS_GetRegExpSource(++arg0: *JSContext, ++arg1: *JSObject) -> *JSString;
fn JS_IsExceptionPending(++arg0: *JSContext) -> JSBool;
fn JS_GetPendingException(++arg0: *JSContext, ++arg1: *jsval) -> JSBool;
fn JS_SetPendingException(++arg0: *JSContext, ++arg1: jsval);
fn JS_ClearPendingException(++arg0: *JSContext);
fn JS_ReportPendingException(++arg0: *JSContext) -> JSBool;
fn JS_SaveExceptionState(++arg0: *JSContext) -> *JSExceptionState;
fn JS_RestoreExceptionState(++arg0: *JSContext, ++arg1: *JSExceptionState);
fn JS_DropExceptionState(++arg0: *JSContext, ++arg1: *JSExceptionState);
fn JS_ErrorFromException(++arg0: *JSContext, ++arg1: jsval) -> *JSErrorReport;
fn JS_ThrowReportedError(++arg0: *JSContext, ++arg1: *c_char, ++arg2: *JSErrorReport) -> JSBool;
fn JS_ThrowStopIteration(++arg0: *JSContext) -> JSBool;
fn JS_GetCurrentThread(/* FIXME: variadic arguments */) -> intptr_t;
fn JS_AbortIfWrongThread(++arg0: *JSRuntime);
fn JS_ClearRuntimeThread(++arg0: *JSRuntime);
fn JS_SetRuntimeThread(++arg0: *JSRuntime);
fn JS_NewObjectForConstructor(++arg0: *JSContext, ++arg1: *jsval) -> *JSObject;
fn JS_IndexToId(++arg0: *JSContext, ++arg1: uint32_t, ++arg2: *jsid) -> JSBool;
fn JS_IsIdentifier(++arg0: *JSContext, ++arg1: *JSString, ++arg2: *JSBool) -> JSBool;
}