/[jscoverage]/trunk/js/jsscript.h
ViewVC logotype

Diff of /trunk/js/jsscript.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 399 by siliconforks, Tue Dec 9 03:37:47 2008 UTC revision 460 by siliconforks, Sat Sep 26 23:15:22 2009 UTC
# Line 45  Line 45 
45   */   */
46  #include "jsatom.h"  #include "jsatom.h"
47  #include "jsprvtd.h"  #include "jsprvtd.h"
48    #include "jsdbgapi.h"
49    
50  JS_BEGIN_EXTERN_C  JS_BEGIN_EXTERN_C
51    
# Line 85  Line 86 
86      uint32          length;     /* count of indexed upvar cookies */      uint32          length;     /* count of indexed upvar cookies */
87  } JSUpvarArray;  } JSUpvarArray;
88    
89    #define CALLEE_UPVAR_SLOT               0xffff
90    #define FREE_STATIC_LEVEL               0x3fff
91    #define FREE_UPVAR_COOKIE               0xffffffff
92  #define MAKE_UPVAR_COOKIE(skip,slot)    ((skip) << 16 | (slot))  #define MAKE_UPVAR_COOKIE(skip,slot)    ((skip) << 16 | (slot))
93  #define UPVAR_FRAME_SKIP(cookie)        ((uint32)(cookie) >> 16)  #define UPVAR_FRAME_SKIP(cookie)        ((uint32)(cookie) >> 16)
94  #define UPVAR_FRAME_SLOT(cookie)        ((uint16)(cookie))  #define UPVAR_FRAME_SLOT(cookie)        ((uint16)(cookie))
# Line 117  Line 121 
121      const char      *filename;  /* source filename or null */      const char      *filename;  /* source filename or null */
122      uint32          lineno;     /* base line number of script */      uint32          lineno;     /* base line number of script */
123      uint16          nslots;     /* vars plus maximum stack depth */      uint16          nslots;     /* vars plus maximum stack depth */
124      uint16          staticDepth;/* static depth for display maintenance */      uint16          staticLevel;/* static level for display maintenance */
125      JSPrincipals    *principals;/* principals for this script */      JSPrincipals    *principals;/* principals for this script */
126      union {      union {
127          JSObject    *object;    /* optional Script-class object wrapper */          JSObject    *object;    /* optional Script-class object wrapper */
# Line 130  Line 134 
134    
135  #define JSSF_NO_SCRIPT_RVAL     0x01    /* no need for result value of last  #define JSSF_NO_SCRIPT_RVAL     0x01    /* no need for result value of last
136                                             expression statement */                                             expression statement */
137    #define JSSF_SAVED_CALLER_FUN   0x02    /* object 0 is caller function */
138    
139  static JS_INLINE uintN  static JS_INLINE uintN
140  StackDepth(JSScript *script)  StackDepth(JSScript *script)
# Line 158  Line 163 
163    
164  #define JS_GET_SCRIPT_ATOM(script_, index, atom)                              \  #define JS_GET_SCRIPT_ATOM(script_, index, atom)                              \
165      JS_BEGIN_MACRO                                                            \      JS_BEGIN_MACRO                                                            \
166          if (cx->fp && cx->fp->imacpc && cx->fp->script == script_) {          \          JSStackFrame *fp_ = js_GetTopStackFrame(cx);                          \
167            if (fp_ && fp_->imacpc && fp_->script == script_) {                   \
168              JS_ASSERT((size_t)(index) < js_common_atom_count);                \              JS_ASSERT((size_t)(index) < js_common_atom_count);                \
169              (atom) = COMMON_ATOMS_START(&cx->runtime->atomState)[index];      \              (atom) = COMMON_ATOMS_START(&cx->runtime->atomState)[index];      \
170          } else {                                                              \          } else {                                                              \
# Line 313  Line 319 
319  extern JS_FRIEND_API(uintN)  extern JS_FRIEND_API(uintN)
320  js_GetScriptLineExtent(JSScript *script);  js_GetScriptLineExtent(JSScript *script);
321    
322    static JS_INLINE JSOp
323    js_GetOpcode(JSContext *cx, JSScript *script, jsbytecode *pc)
324    {
325        JSOp op = (JSOp) *pc;
326        if (op == JSOP_TRAP)
327            op = JS_GetTrapOpcode(cx, script, pc);
328        return op;
329    }
330    
331  /*  /*
332   * If magic is non-null, js_XDRScript succeeds on magic number mismatch but   * If magic is non-null, js_XDRScript succeeds on magic number mismatch but
333   * returns false in *magic; it reflects a match via a true *magic out param.   * returns false in *magic; it reflects a match via a true *magic out param.

Legend:
Removed from v.399  
changed lines
  Added in v.460

  ViewVC Help
Powered by ViewVC 1.1.24