Classes | Namespaces | Defines | Typedefs | Enumerations | Functions | Variables

jscntxt.h File Reference

#include <string.h>
#include "jsprvtd.h"
#include "jsarena.h"
#include "jsclist.h"
#include "jslong.h"
#include "jsatom.h"
#include "jsdhash.h"
#include "jsdtoa.h"
#include "jsfun.h"
#include "jsgc.h"
#include "jsgcchunk.h"
#include "jshashtable.h"
#include "jsinterp.h"
#include "jsmath.h"
#include "jsobj.h"
#include "jspropertycache.h"
#include "jspropertytree.h"
#include "jsstaticcheck.h"
#include "jsutil.h"
#include "jsarray.h"
#include "jsvector.h"
#include "prmjtime.h"
#include "js.msg"
Include dependency graph for jscntxt.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  JSGSNCache
class  js::ContextAllocPolicy
class  js::StackSegment
class  js::InvokeArgsGuard
struct  js::InvokeArgsAlreadyOnTheStack
class  js::InvokeFrameGuard
class  js::FrameGuard
class  js::ExecuteFrameGuard
class  js::DummyFrameGuard
class  js::GeneratorFrameGuard
class  js::StackSpace
struct  js::StackSpace::EnsureSpaceCheck
struct  js::StackSpace::LimitCheck
class  js::FrameRegsIter
class  js::AllFramesIter
struct  JSPendingProxyOperation
struct  JSThreadData
struct  JSThread
struct  JSPropertyTreeEntry
struct  JSRuntime
struct  JSResolvingKey
struct  JSResolvingEntry
struct  JSContext
class  js::AutoGCRooter
class  js::AutoValueRooter
class  js::AutoObjectRooter
class  js::AutoStringRooter
class  js::AutoArrayRooter
class  js::AutoShapeRooter
class  js::AutoScriptRooter
class  js::AutoIdRooter
class  js::AutoIdArray
class  js::AutoEnumStateRooter
class  js::AutoXMLRooter
class  js::AutoBindingsRooter
class  js::AutoLockGC
class  js::AutoUnlockGC
class  js::AutoLockAtomsCompartment
class  js::AutoUnlockAtomsCompartment
class  js::AutoKeepAtoms
class  js::AutoArenaAllocator
class  js::AutoReleasePtr
class  js::AutoReleaseNullablePtr
class  js::AutoLocalNameArray
class  js::AlreadyIncRefed< RefCountable >
class  js::NeedsIncRef< RefCountable >
class  js::AutoRefCount< RefCountable >
class  JSAutoResolveFlags
class  js::ThreadDataIter
class  js::AutoValueVector
class  js::AutoIdVector

Namespaces

namespace  nanojit
namespace  js
namespace  js::mjit
namespace  js::VersionFlags

Defines

#define GSN_CACHE_METER(cache, cnt)
#define js_FinishGSNCache(cache)   js_PurgeGSNCache(cache)
#define JS_PURGE_GSN_CACHE(cx)   js_PurgeGSNCache(&JS_GSN_CACHE(cx))
#define JS_METER_GSN_CACHE(cx, cnt)   GSN_CACHE_METER(&JS_GSN_CACHE(cx), cnt)
#define NON_NULL_SUSPENDED_REGS   ((JSFrameRegs *)0x1)
#define JS_ON_TRACE(cx)   (cx->compartment && JS_TRACE_MONITOR(cx).ontrace())
#define JS_FUNCTION_METER(cx, x)   ((void)0)
#define JS_THREAD_DATA(cx)   (&(cx)->thread->data)
#define JS_PROPERTY_TREE(cx)   ((cx)->runtime->propertyTree)
#define ENUM_CACHE_METER(name)   ((void) 0)
#define JS_GSN_CACHE(cx)   (JS_THREAD_DATA(cx)->gsnCache)
#define JS_PROPERTY_CACHE(cx)   (JS_THREAD_DATA(cx)->propertyCache)
#define JS_RUNTIME_METER(rt, which)
#define JS_RUNTIME_UNMETER(rt, which)
#define JS_KEEP_ATOMS(rt)   JS_ATOMIC_INCREMENT(&(rt)->gcKeepAtoms);
#define JS_UNKEEP_ATOMS(rt)   JS_ATOMIC_DECREMENT(&(rt)->gcKeepAtoms);
#define JSRESFLAG_LOOKUP   0x1
#define JSRESFLAG_WATCH   0x2
#define JSRESOLVE_INFER   0xffff
#define JS_HAS_OPTION(cx, option)   (((cx)->options & (option)) != 0)
#define JS_HAS_STRICT_OPTION(cx)   JS_HAS_OPTION(cx, JSOPTION_STRICT)
#define JS_HAS_WERROR_OPTION(cx)   JS_HAS_OPTION(cx, JSOPTION_WERROR)
#define JS_HAS_COMPILE_N_GO_OPTION(cx)   JS_HAS_OPTION(cx, JSOPTION_COMPILE_N_GO)
#define JS_HAS_ATLINE_OPTION(cx)   JS_HAS_OPTION(cx, JSOPTION_ATLINE)
#define CX_FROM_THREAD_LINKS(tl)   ((JSContext *)((char *)(tl) - offsetof(JSContext, threadLinks)))
#define CREATE_BODY(parms)
#define JS_THREAD_ID(cx)   ((cx)->thread ? (cx)->thread->id : 0)
#define CHECK_REQUEST(cx)   ((void) 0)
#define CHECK_REQUEST_THREAD(cx)   ((void) 0)
#define MSG_DEF(name, number, count, exception, format)   name = number,
#define JS_CHECK_RECURSION(cx, onerror)
#define js_ReportValueError(cx, errorNumber, spindex, v, fallback)
#define js_ReportValueError2(cx, errorNumber, spindex, v, fallback, arg1)
#define js_ReportValueError3(cx, errorNumber, spindex, v, fallback, arg1, arg2)
#define JS_ASSERT_REQUEST_DEPTH(cx)
#define JS_CHECK_OPERATION_LIMIT(cx)

Typedefs

typedef struct JSGSNCache JSGSNCache
typedef Queue< uint16js::SlotList
typedef enum JSDestroyContextMode JSDestroyContextMode
typedef enum JSRuntimeState JSRuntimeState
typedef struct JSPropertyTreeEntry JSPropertyTreeEntry
typedef void(* JSActivityCallback )(void *arg, JSBool active)
typedef js::Vector
< JSCompartment
*, 0, js::SystemAllocPolicy
js::WrapperVector
typedef struct JSResolvingKey JSResolvingKey
typedef struct JSResolvingEntry JSResolvingEntry
typedef js::HashSet< JSObject
*, js::DefaultHasher< JSObject * >
, js::SystemAllocPolicy
js::BusyArraysMap
typedef enum JSErrNum JSErrNum

Enumerations

enum  JSDestroyContextMode { JSDCM_NO_GC, JSDCM_MAYBE_GC, JSDCM_FORCE_GC, JSDCM_NEW_FAILED }
enum  JSRuntimeState { JSRTS_DOWN, JSRTS_LAUNCHING, JSRTS_UP, JSRTS_LANDING }
enum  JSErrNum

Functions

void js_PurgeGSNCache (JSGSNCache *cache)
void js::js_static_assert (int arg[(sizeof(StackSegment)%sizeof(Value)==0)?1:-1])
void js::js_static_assert (int arg[(StackSpace::CAPACITY_VALS%StackSpace::COMMIT_VALS==0)?1:-1])
JSThreadjs_CurrentThread (JSRuntime *rt)
JSBool js_InitContextThread (JSContext *cx)
void js_ClearContextThread (JSContext *cx)
JSThreadDatajs_CurrentThreadData (JSRuntime *rt)
JSBool js_InitThreads (JSRuntime *rt)
void js_FinishThreads (JSRuntime *rt)
void js_PurgeThreads (JSContext *cx)
JSContextjs_NewContext (JSRuntime *rt, size_t stackChunkSize)
void js_DestroyContext (JSContext *cx, JSDestroyContextMode mode)
JSContextjs_ContextIterator (JSRuntime *rt, JSBool unlocked, JSContext **iterp)
JSContextjs_NextActiveContext (JSRuntime *, JSContext *)
JSBool js_StartResolving (JSContext *cx, JSResolvingKey *key, uint32 flag, JSResolvingEntry **entryp)
void js_StopResolving (JSContext *cx, JSResolvingKey *key, uint32 flag, JSResolvingEntry *entry, uint32 generation)
 MSG_DEF (JSMSG_PAREN_AFTER_LET, 52, 0, JSEXN_SYNTAXERR,"missing ) after let head") MSG_DEF(JSMSG_UNMATCHED_RIGHT_PAREN
unmatched in regular expression MSG_DEF (JSMSG_PAREN_AFTER_FORMAL, 71, 0, JSEXN_SYNTAXERR,"missing ) after formal parameters") MSG_DEF(JSMSG_PAREN_AFTER_COND
unmatched in regular
expression missing after
condition 
MSG_DEF (JSMSG_PAREN_AFTER_SWITCH, 81, 0, JSEXN_SYNTAXERR,"missing ) after switch expression") MSG_DEF(JSMSG_PAREN_AFTER_FOR_CTRL
unmatched in regular
expression missing after
condition missing after for
loop control 
MSG_DEF (JSMSG_PAREN_AFTER_CATCH, 93, 0, JSEXN_SYNTAXERR,"missing ) after catch") MSG_DEF(JSMSG_PAREN_AFTER_WITH
unmatched in regular
expression missing after
condition missing after for
loop control missing after
with statement object 
MSG_DEF (JSMSG_PAREN_AFTER_ARGS, 104, 0, JSEXN_SYNTAXERR,"missing ) after argument list") MSG_DEF(JSMSG_PAREN_IN_PAREN
unmatched in regular
expression missing after
condition missing after for
loop control missing after
with statement object missing
in parenthetical 
MSG_DEF (JSMSG_EQUAL_AS_ASSIGN, 112, 1, JSEXN_SYNTAXERR,"test for equality (==) mistyped as assignment (=)?{0}") JSErr_Limit
const JSErrorFormatStringjs_GetErrorMessage (void *userRef, const char *locale, const uintN errorNumber)
void js_ReportOutOfMemory (JSContext *cx)
void js_ReportOutOfScriptQuota (JSContext *cx)
void js_ReportOverRecursed (JSContext *cx)
void js_ReportAllocationOverflow (JSContext *cx)
void js_ReportErrorAgain (JSContext *cx, const char *message, JSErrorReport *report)
void js_ReportIsNotDefined (JSContext *cx, const char *name)
JSBool js_ReportIsNullOrUndefined (JSContext *cx, intN spindex, const js::Value &v, JSString *fallback)
void js_ReportMissingArg (JSContext *cx, const js::Value &v, uintN arg)
JSBool js_ReportValueErrorFlags (JSContext *cx, uintN flags, const uintN errorNumber, intN spindex, const js::Value &v, JSString *fallback, const char *arg1, const char *arg2)
JSBool js_InvokeOperationCallback (JSContext *cx)
JSBool js_HandleExecutionInterrupt (JSContext *cx)
void js::TriggerOperationCallback (JSContext *cx)
void js::TriggerAllOperationCallbacks (JSRuntime *rt)
JSStackFramejs_GetScriptedCaller (JSContext *cx, JSStackFrame *fp)
jsbytecodejs_GetCurrentBytecodePC (JSContext *cx)
bool js_CurrentPCIsInImacro (JSContext *cx)
void js::LeaveTrace (JSContext *cx)
JSIdArrayjs::NewIdArray (JSContext *cx, jsint length)

Variables

const JSDebugHooks js_NullDebugHooks
JSErrorFormatString js_ErrorFormatString [JSErr_Limit]

Define Documentation

#define CHECK_REQUEST (   cx  )     ((void) 0)
#define CHECK_REQUEST_THREAD (   cx  )     ((void) 0)
#define CREATE_BODY (   parms  ) 
Value:
void *memory = this->malloc(sizeof(T));                                   \
    if (!memory)                                                              \
        return NULL;                                                          \
    return new(memory) T parms;
#define CX_FROM_THREAD_LINKS (   tl  )     ((JSContext *)((char *)(tl) - offsetof(JSContext, threadLinks)))
#define ENUM_CACHE_METER (   name  )     ((void) 0)
#define GSN_CACHE_METER (   cache,
  cnt 
)
#define JS_ASSERT_REQUEST_DEPTH (   cx  ) 
Value:
(JS_ASSERT((cx)->thread),               \
                                       JS_ASSERT((cx)->thread->data.requestDepth >= 1))
#define JS_CHECK_OPERATION_LIMIT (   cx  ) 
Value:
(JS_ASSERT_REQUEST_DEPTH(cx),                                             \
     (!JS_THREAD_DATA(cx)->interruptFlags || js_InvokeOperationCallback(cx)))
#define JS_CHECK_RECURSION (   cx,
  onerror 
)
Value:
JS_BEGIN_MACRO                                                            \
        int stackDummy_;                                                      \
                                                                              \
        if (!JS_CHECK_STACK_SIZE(cx->stackLimit, &stackDummy_)) {             \
            js_ReportOverRecursed(cx);                                        \
            onerror;                                                          \
        }                                                                     \
    JS_END_MACRO
#define js_FinishGSNCache (   cache  )     js_PurgeGSNCache(cache)
#define JS_FUNCTION_METER (   cx,
  x 
)    ((void)0)
#define JS_GSN_CACHE (   cx  )     (JS_THREAD_DATA(cx)->gsnCache)
#define JS_HAS_ATLINE_OPTION (   cx  )     JS_HAS_OPTION(cx, JSOPTION_ATLINE)
#define JS_HAS_COMPILE_N_GO_OPTION (   cx  )     JS_HAS_OPTION(cx, JSOPTION_COMPILE_N_GO)
#define JS_HAS_OPTION (   cx,
  option 
)    (((cx)->options & (option)) != 0)
#define JS_HAS_STRICT_OPTION (   cx  )     JS_HAS_OPTION(cx, JSOPTION_STRICT)
#define JS_HAS_WERROR_OPTION (   cx  )     JS_HAS_OPTION(cx, JSOPTION_WERROR)
#define JS_KEEP_ATOMS (   rt  )     JS_ATOMIC_INCREMENT(&(rt)->gcKeepAtoms);
#define JS_METER_GSN_CACHE (   cx,
  cnt 
)    GSN_CACHE_METER(&JS_GSN_CACHE(cx), cnt)
#define JS_ON_TRACE (   cx  )     (cx->compartment && JS_TRACE_MONITOR(cx).ontrace())
#define JS_PROPERTY_CACHE (   cx  )     (JS_THREAD_DATA(cx)->propertyCache)
#define JS_PROPERTY_TREE (   cx  )     ((cx)->runtime->propertyTree)
#define JS_PURGE_GSN_CACHE (   cx  )     js_PurgeGSNCache(&JS_GSN_CACHE(cx))
#define js_ReportValueError (   cx,
  errorNumber,
  spindex,
  v,
  fallback 
)
Value:
((void)js_ReportValueErrorFlags(cx, JSREPORT_ERROR, errorNumber,          \
                                    spindex, v, fallback, NULL, NULL))
#define js_ReportValueError2 (   cx,
  errorNumber,
  spindex,
  v,
  fallback,
  arg1 
)
Value:
((void)js_ReportValueErrorFlags(cx, JSREPORT_ERROR, errorNumber,          \
                                    spindex, v, fallback, arg1, NULL))
#define js_ReportValueError3 (   cx,
  errorNumber,
  spindex,
  v,
  fallback,
  arg1,
  arg2 
)
Value:
((void)js_ReportValueErrorFlags(cx, JSREPORT_ERROR, errorNumber,          \
                                    spindex, v, fallback, arg1, arg2))
#define JS_RUNTIME_METER (   rt,
  which 
)
#define JS_RUNTIME_UNMETER (   rt,
  which 
)
#define JS_THREAD_DATA (   cx  )     (&(cx)->thread->data)
#define JS_THREAD_ID (   cx  )     ((cx)->thread ? (cx)->thread->id : 0)
#define JS_UNKEEP_ATOMS (   rt  )     JS_ATOMIC_DECREMENT(&(rt)->gcKeepAtoms);
#define JSRESFLAG_LOOKUP   0x1
#define JSRESFLAG_WATCH   0x2
#define JSRESOLVE_INFER   0xffff
#define MSG_DEF (   name,
  number,
  count,
  exception,
  format 
)    name = number,
#define NON_NULL_SUSPENDED_REGS   ((JSFrameRegs *)0x1)

Typedef Documentation

typedef void(* JSActivityCallback)(void *arg, JSBool active)
typedef enum JSErrNum JSErrNum
typedef struct JSGSNCache JSGSNCache

Enumeration Type Documentation

Enumerator:
JSDCM_NO_GC 
JSDCM_MAYBE_GC 
JSDCM_FORCE_GC 
JSDCM_NEW_FAILED 
enum JSErrNum
Enumerator:
JSRTS_DOWN 
JSRTS_LAUNCHING 
JSRTS_UP 
JSRTS_LANDING 

Function Documentation

void js_ClearContextThread ( JSContext cx  ) 
JSContext* js_ContextIterator ( JSRuntime rt,
JSBool  unlocked,
JSContext **  iterp 
)
bool js_CurrentPCIsInImacro ( JSContext cx  ) 
JSThread* js_CurrentThread ( JSRuntime rt  ) 
JSThreadData* js_CurrentThreadData ( JSRuntime rt  ) 
void js_DestroyContext ( JSContext cx,
JSDestroyContextMode  mode 
)
void js_FinishThreads ( JSRuntime rt  ) 
jsbytecode* js_GetCurrentBytecodePC ( JSContext cx  ) 
const JSErrorFormatString* js_GetErrorMessage ( void *  userRef,
const char *  locale,
const uintN  errorNumber 
)
JSStackFrame* js_GetScriptedCaller ( JSContext cx,
JSStackFrame fp 
)
JSBool js_HandleExecutionInterrupt ( JSContext cx  ) 
JSBool js_InitContextThread ( JSContext cx  ) 
JSBool js_InitThreads ( JSRuntime rt  ) 
JSBool js_InvokeOperationCallback ( JSContext cx  ) 
JSContext* js_NewContext ( JSRuntime rt,
size_t  stackChunkSize 
)
JSContext* js_NextActiveContext ( JSRuntime ,
JSContext  
)
void js_PurgeGSNCache ( JSGSNCache cache  ) 
void js_PurgeThreads ( JSContext cx  ) 
void js_ReportAllocationOverflow ( JSContext cx  ) 
void js_ReportErrorAgain ( JSContext cx,
const char *  message,
JSErrorReport report 
)
void js_ReportIsNotDefined ( JSContext cx,
const char *  name 
)
JSBool js_ReportIsNullOrUndefined ( JSContext cx,
intN  spindex,
const js::Value v,
JSString fallback 
)
void js_ReportMissingArg ( JSContext cx,
const js::Value v,
uintN  arg 
)
void js_ReportOutOfMemory ( JSContext cx  ) 
void js_ReportOutOfScriptQuota ( JSContext cx  ) 
void js_ReportOverRecursed ( JSContext cx  ) 
JSBool js_ReportValueErrorFlags ( JSContext cx,
uintN  flags,
const uintN  errorNumber,
intN  spindex,
const js::Value v,
JSString fallback,
const char *  arg1,
const char *  arg2 
)
JSBool js_StartResolving ( JSContext cx,
JSResolvingKey key,
uint32  flag,
JSResolvingEntry **  entryp 
)
void js_StopResolving ( JSContext cx,
JSResolvingKey key,
uint32  flag,
JSResolvingEntry entry,
uint32  generation 
)
JSErrNum::MSG_DEF ( JSMSG_PAREN_AFTER_LET  ,
52  ,
,
JSEXN_SYNTAXERR  ,
missing 
)
unmatched in regular expression JSErrNum::MSG_DEF ( JSMSG_PAREN_AFTER_FORMAL  ,
71  ,
,
JSEXN_SYNTAXERR  ,
missing 
)
unmatched in regular expression missing after condition JSErrNum::MSG_DEF ( JSMSG_PAREN_AFTER_SWITCH  ,
81  ,
,
JSEXN_SYNTAXERR  ,
missing 
)
unmatched in regular expression missing after condition missing after for loop control missing after with statement object JSErrNum::MSG_DEF ( JSMSG_PAREN_AFTER_ARGS  ,
104  ,
,
JSEXN_SYNTAXERR  ,
missing 
)
unmatched in regular expression missing after condition missing after for loop control missing after with statement object missing in parenthetical JSErrNum::MSG_DEF ( JSMSG_EQUAL_AS_ASSIGN  ,
112  ,
,
JSEXN_SYNTAXERR   
)
unmatched in regular expression missing after condition missing after for loop control JSErrNum::MSG_DEF ( JSMSG_PAREN_AFTER_CATCH  ,
93  ,
,
JSEXN_SYNTAXERR  ,
missing 
)

Variable Documentation