Classes | Defines | Typedefs | Enumerations | Functions | Variables

jsscript.h File Reference

#include "jsatom.h"
#include "jsprvtd.h"
#include "jsdbgapi.h"
Include dependency graph for jsscript.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  JSTryNote
struct  JSTryNoteArray
struct  JSObjectArray
struct  JSUpvarArray
struct  JSScript

Defines

#define CALLEE_UPVAR_SLOT   0xffff
#define FREE_STATIC_LEVEL   0x3fff
#define FREE_UPVAR_COOKIE   0xffffffff
#define MAKE_UPVAR_COOKIE(skip, slot)   ((skip) << 16 | (slot))
#define UPVAR_FRAME_SKIP(cookie)   ((uint32)(cookie) >> 16)
#define UPVAR_FRAME_SLOT(cookie)   ((uint16)(cookie))
#define JS_OBJECT_ARRAY_SIZE(length)   (offsetof(JSObjectArray, vector) + sizeof(JSObject *) * (length))
#define SHARP_NSLOTS   2
#define JS_GET_SCRIPT_ATOM(script_, pc_, index, atom)
#define js_GetSrcNote(script, pc)   js_GetSrcNoteCached(cx, script, pc)

Typedefs

typedef enum JSTryNoteKind JSTryNoteKind
typedef struct JSTryNoteArray JSTryNoteArray
typedef struct JSObjectArray JSObjectArray
typedef struct JSUpvarArray JSUpvarArray

Enumerations

enum  JSTryNoteKind { JSTRY_CATCH, JSTRY_FINALLY, JSTRY_ITER }

Functions

JSObjectjs_InitScriptClass (JSContext *cx, JSObject *obj)
JSBool js_InitRuntimeScriptState (JSRuntime *rt)
void js_FreeRuntimeScriptState (JSRuntime *rt)
const char * js_SaveScriptFilename (JSContext *cx, const char *filename)
const char * js_SaveScriptFilenameRT (JSRuntime *rt, const char *filename, uint32 flags)
uint32 js_GetScriptFilenameFlags (const char *filename)
void js_MarkScriptFilename (const char *filename)
void js_MarkScriptFilenames (JSRuntime *rt, JSBool keepAtoms)
void js_SweepScriptFilenames (JSRuntime *rt)
JSScriptjs_NewScript (JSContext *cx, uint32 length, uint32 nsrcnotes, uint32 natoms, uint32 nobjects, uint32 nupvars, uint32 nregexps, uint32 ntrynotes)
JSScriptjs_NewScriptFromCG (JSContext *cx, JSCodeGenerator *cg)
void js_CallNewScriptHook (JSContext *cx, JSScript *script, JSFunction *fun)
void js_CallDestroyScriptHook (JSContext *cx, JSScript *script)
void js_DestroyScript (JSContext *cx, JSScript *script)
void js_TraceScript (JSTracer *trc, JSScript *script)
jssrcnotejs_GetSrcNoteCached (JSContext *cx, JSScript *script, jsbytecode *pc)
uintN js_FramePCToLineNumber (JSContext *cx, JSStackFrame *fp)
uintN js_PCToLineNumber (JSContext *cx, JSScript *script, jsbytecode *pc)
jsbytecodejs_LineNumberToPC (JSScript *script, uintN lineno)
uintN js_GetScriptLineExtent (JSScript *script)
JSBool js_XDRScript (JSXDRState *xdr, JSScript **scriptp, bool needMutableScript, JSBool *hasMagic)

Variables

JSClass js_ScriptClass

Define Documentation

#define CALLEE_UPVAR_SLOT   0xffff
#define FREE_STATIC_LEVEL   0x3fff
#define FREE_UPVAR_COOKIE   0xffffffff
#define JS_GET_SCRIPT_ATOM (   script_,
  pc_,
  index,
  atom 
)
Value:
JS_BEGIN_MACRO                                                            \
        if ((pc_) < (script_)->code ||                                        \
            (script_)->code + (script_)->length <= (pc_)) {                   \
            JS_ASSERT((size_t)(index) < js_common_atom_count);                \
            (atom) = COMMON_ATOMS_START(&cx->runtime->atomState)[index];      \
        } else {                                                              \
            (atom) = script_->getAtom(index);                                 \
        }                                                                     \
    JS_END_MACRO
#define js_GetSrcNote (   script,
  pc 
)    js_GetSrcNoteCached(cx, script, pc)
#define JS_OBJECT_ARRAY_SIZE (   length  )     (offsetof(JSObjectArray, vector) + sizeof(JSObject *) * (length))
#define MAKE_UPVAR_COOKIE (   skip,
  slot 
)    ((skip) << 16 | (slot))
#define SHARP_NSLOTS   2
#define UPVAR_FRAME_SKIP (   cookie  )     ((uint32)(cookie) >> 16)
#define UPVAR_FRAME_SLOT (   cookie  )     ((uint16)(cookie))

Typedef Documentation

typedef struct JSObjectArray JSObjectArray
typedef struct JSUpvarArray JSUpvarArray

Enumeration Type Documentation

Enumerator:
JSTRY_CATCH 
JSTRY_FINALLY 
JSTRY_ITER 

Function Documentation

void js_CallDestroyScriptHook ( JSContext cx,
JSScript script 
)
void js_CallNewScriptHook ( JSContext cx,
JSScript script,
JSFunction fun 
)
void js_DestroyScript ( JSContext cx,
JSScript script 
)
uintN js_FramePCToLineNumber ( JSContext cx,
JSStackFrame fp 
)
void js_FreeRuntimeScriptState ( JSRuntime rt  ) 
uint32 js_GetScriptFilenameFlags ( const char *  filename  ) 
uintN js_GetScriptLineExtent ( JSScript script  ) 
jssrcnote* js_GetSrcNoteCached ( JSContext cx,
JSScript script,
jsbytecode pc 
)
JSBool js_InitRuntimeScriptState ( JSRuntime rt  ) 
JSObject* js_InitScriptClass ( JSContext cx,
JSObject obj 
)
jsbytecode* js_LineNumberToPC ( JSScript script,
uintN  lineno 
)
void js_MarkScriptFilename ( const char *  filename  ) 
void js_MarkScriptFilenames ( JSRuntime rt,
JSBool  keepAtoms 
)
JSScript* js_NewScript ( JSContext cx,
uint32  length,
uint32  nsrcnotes,
uint32  natoms,
uint32  nobjects,
uint32  nupvars,
uint32  nregexps,
uint32  ntrynotes 
)
JSScript* js_NewScriptFromCG ( JSContext cx,
JSCodeGenerator cg 
)
uintN js_PCToLineNumber ( JSContext cx,
JSScript script,
jsbytecode pc 
)
const char* js_SaveScriptFilename ( JSContext cx,
const char *  filename 
)
const char* js_SaveScriptFilenameRT ( JSRuntime rt,
const char *  filename,
uint32  flags 
)
void js_SweepScriptFilenames ( JSRuntime rt  ) 
void js_TraceScript ( JSTracer trc,
JSScript script 
)
JSBool js_XDRScript ( JSXDRState xdr,
JSScript **  scriptp,
bool  needMutableScript,
JSBool hasMagic 
)

Variable Documentation