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

Diff of /trunk/js/jsprvtd.h

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

revision 460 by siliconforks, Sat Sep 26 23:15:22 2009 UTC revision 507 by siliconforks, Sun Jan 10 07:23:34 2010 UTC
# Line 127  Line 127 
127  typedef struct JSScopeOps           JSScopeOps;  typedef struct JSScopeOps           JSScopeOps;
128  typedef struct JSScopeProperty      JSScopeProperty;  typedef struct JSScopeProperty      JSScopeProperty;
129  typedef struct JSStackHeader        JSStackHeader;  typedef struct JSStackHeader        JSStackHeader;
 typedef struct JSStringBuffer       JSStringBuffer;  
130  typedef struct JSSubString          JSSubString;  typedef struct JSSubString          JSSubString;
131  typedef struct JSTraceableNative    JSTraceableNative;  typedef struct JSNativeTraceInfo    JSNativeTraceInfo;
132    typedef struct JSSpecializedNative  JSSpecializedNative;
133  typedef struct JSXML                JSXML;  typedef struct JSXML                JSXML;
134  typedef struct JSXMLArray           JSXMLArray;  typedef struct JSXMLArray           JSXMLArray;
135  typedef struct JSXMLArrayCursor     JSXMLArrayCursor;  typedef struct JSXMLArrayCursor     JSXMLArrayCursor;
136    
137    /*
138     * Template declarations.
139     *
140     * jsprvtd.h can be included in both C and C++ translation units. For C++, it
141     * may possibly be wrapped in an extern "C" block which does not agree with
142     * templates.
143     */
144    #ifdef __cplusplus
145    extern "C++" {
146    
147    namespace js {
148    
149    class ContextAllocPolicy;
150    class SystemAllocPolicy;
151    
152    template <class T,
153              size_t MinInlineCapacity = 0,
154              class AllocPolicy = ContextAllocPolicy>
155    class Vector;
156    
157    } /* namespace js */
158    
159    /* Common instantiations. */
160    typedef js::Vector<jschar, 32> JSCharBuffer;
161    
162    } /* export "C++" */
163    #endif  /* __cplusplus */
164    
165  /* "Friend" types used by jscntxt.h and jsdbgapi.h. */  /* "Friend" types used by jscntxt.h and jsdbgapi.h. */
166  typedef enum JSTrapStatus {  typedef enum JSTrapStatus {
167      JSTRAP_ERROR,      JSTRAP_ERROR,
# Line 239  Line 267 
267  typedef union JSTempValueUnion {  typedef union JSTempValueUnion {
268      jsval               value;      jsval               value;
269      JSObject            *object;      JSObject            *object;
     JSString            *string;  
270      JSXML               *xml;      JSXML               *xml;
271      JSTempValueTrace    trace;      JSTempValueTrace    trace;
272      JSScopeProperty     *sprop;      JSScopeProperty     *sprop;
# Line 280  Line 307 
307    
308  /*  /*
309   * Define obj[id], a direct property of obj named id, having the given initial   * Define obj[id], a direct property of obj named id, having the given initial
310   * value, with the specified getter, setter, and attributes.  If the propp out   * value, with the specified getter, setter, and attributes.
  * param is non-null, *propp on successful return contains an opaque property  
  * pointer usable as a speedup hint with JSAttributesOp.  But note that propp  
  * may be null, indicating that the caller is not interested in recovering an  
  * opaque pointer to the newly-defined property.  
  *  
  * If propp is non-null and JSDefinePropOp succeeds, its caller must be sure  
  * to drop *propp using JSObjectOps.dropProperty in short order, just as with  
  * JSLookupPropOp.  
311   */   */
312  typedef JSBool  typedef JSBool
313  (* JSDefinePropOp)(JSContext *cx, JSObject *obj, jsid id, jsval value,  (* JSDefinePropOp)(JSContext *cx, JSObject *obj, jsid id, jsval value,
314                     JSPropertyOp getter, JSPropertyOp setter, uintN attrs,                     JSPropertyOp getter, JSPropertyOp setter, uintN attrs);
                    JSProperty **propp);  
315    
316  /*  /*
317   * Get, set, or delete obj[id], returning false on error or exception, true   * Get, set, or delete obj[id], returning false on error or exception, true
# Line 335  Line 353 
353  (* JSPropertyRefOp)(JSContext *cx, JSObject *obj, JSProperty *prop);  (* JSPropertyRefOp)(JSContext *cx, JSObject *obj, JSProperty *prop);
354    
355  /*  /*
  * Get and set a required slot, one that should already have been allocated.  
  * These operations are infallible, so required slots must be pre-allocated,  
  * or implementations must suppress out-of-memory errors.  The native ops  
  * (js_ObjectOps, see jsobj.c) access slots reserved by including a call to  
  * the JSCLASS_HAS_RESERVED_SLOTS(n) macro in the JSClass.flags initializer.  
  *  
  * NB: the slot parameter is a zero-based index into obj slots, unlike the  
  * index parameter to the JS_GetReservedSlot and JS_SetReservedSlot API entry  
  * points, which is a zero-based index into the JSCLASS_RESERVED_SLOTS(clasp)  
  * reserved slots that come after the initial well-known slots: proto, parent,  
  * class, and optionally, the private data slot.  
  */  
 typedef jsval  
 (* JSGetRequiredSlotOp)(JSContext *cx, JSObject *obj, uint32 slot);  
   
 typedef JSBool  
 (* JSSetRequiredSlotOp)(JSContext *cx, JSObject *obj, uint32 slot, jsval v);  
   
 /*  
356   * The following determines whether JS_EncodeCharacters and JS_DecodeBytes   * The following determines whether JS_EncodeCharacters and JS_DecodeBytes
357   * treat char[] as utf-8 or simply as bytes that need to be inflated/deflated.   * treat char[] as utf-8 or simply as bytes that need to be inflated/deflated.
358   */   */
# Line 363  Line 362 
362  extern JSBool js_CStringsAreUTF8;  extern JSBool js_CStringsAreUTF8;
363  #endif  #endif
364    
365    /*
366     * Maximum supported value of Arguments.length. It bounds the maximum number
367     * of arguments that can be supplied to the function call using
368     * Function.prototype.apply. This value also gives the maximum number of
369     * elements in the array initializer.
370     */
371    #define JS_ARGS_LENGTH_MAX      (JS_BIT(24) - 1)
372    
373  #endif /* jsprvtd_h___ */  #endif /* jsprvtd_h___ */

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

  ViewVC Help
Powered by ViewVC 1.1.24