⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jsobj.h

📁 Swfdec still is development software, but has also followed a rigid no-crashes-allowed policy. I b
💻 H
📖 第 1 页 / 共 2 页
字号:
#define SHARP_BIT       ((jsatomid) 1)#define BUSY_BIT        ((jsatomid) 2)#define SHARP_ID_SHIFT  2#define IS_SHARP(he)    (JS_PTR_TO_UINT32((he)->value) & SHARP_BIT)#define MAKE_SHARP(he)  ((he)->value = JS_UINT32_TO_PTR(JS_PTR_TO_UINT32((he)->value)|SHARP_BIT))#define IS_BUSY(he)     (JS_PTR_TO_UINT32((he)->value) & BUSY_BIT)#define MAKE_BUSY(he)   ((he)->value = JS_UINT32_TO_PTR(JS_PTR_TO_UINT32((he)->value)|BUSY_BIT))#define CLEAR_BUSY(he)  ((he)->value = JS_UINT32_TO_PTR(JS_PTR_TO_UINT32((he)->value)&~BUSY_BIT))extern JSHashEntry *js_EnterSharpObject(JSContext *cx, JSObject *obj, JSIdArray **idap,		    jschar **sp);extern voidjs_LeaveSharpObject(JSContext *cx, JSIdArray **idap);extern JSBooljs_obj_toSource(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,		jsval *rval);extern JSBooljs_obj_toString(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,		jsval *rval);extern JSObject *js_InitObjectClass(JSContext *cx, JSObject *obj);/* Select Object.prototype method names shared between jsapi.c and jsobj.c. */extern const char js_watch_str[];extern const char js_unwatch_str[];extern const char js_hasOwnProperty_str[];extern const char js_isPrototypeOf_str[];extern const char js_propertyIsEnumerable_str[];extern const char js_defineGetter_str[];extern const char js_defineSetter_str[];extern const char js_lookupGetter_str[];extern const char js_lookupSetter_str[];extern voidjs_InitObjectMap(JSObjectMap *map, jsrefcount nrefs, JSObjectOps *ops,		 const JSClass *clasp);extern JSObjectMap *js_NewObjectMap(JSContext *cx, jsrefcount nrefs, JSObjectOps *ops,		const JSClass *clasp, JSObject *obj);extern voidjs_DestroyObjectMap(JSContext *cx, JSObjectMap *map);extern JSObjectMap *js_HoldObjectMap(JSContext *cx, JSObjectMap *map);extern JSObjectMap *js_DropObjectMap(JSContext *cx, JSObjectMap *map, JSObject *obj);extern JSObject *js_NewObject(JSContext *cx, const JSClass *clasp, JSObject *proto, JSObject *parent);extern JSObject *js_ConstructObject(JSContext *cx, JSClass *clasp, JSObject *proto,                   JSObject *parent, uintN argc, jsval *argv);extern voidjs_FinalizeObject(JSContext *cx, JSObject *obj);extern JSBooljs_AllocSlot(JSContext *cx, JSObject *obj, uint32 *slotp);extern voidjs_FreeSlot(JSContext *cx, JSObject *obj, uint32 slot);/* * Find or create a property named by id in obj's scope, with the given getter * and setter, slot, attributes, and other members. */extern JSScopeProperty *js_AddNativeProperty(JSContext *cx, JSObject *obj, jsid id,                     JSPropertyOp getter, JSPropertyOp setter, uint32 slot,                     uintN attrs, uintN flags, intN shortid);/* * Change sprop to have the given attrs, getter, and setter in scope, morphing * it into a potentially new JSScopeProperty.  Return a pointer to the changed * or identical property. */extern JSScopeProperty *js_ChangeNativePropertyAttrs(JSContext *cx, JSObject *obj,                             JSScopeProperty *sprop, uintN attrs, uintN mask,                             JSPropertyOp getter, JSPropertyOp setter);/* * On error, return false.  On success, if propp is non-null, return true with * obj locked and with a held property in *propp; if propp is null, return true * but release obj's lock first.  Therefore all callers who pass non-null propp * result parameters must later call OBJ_DROP_PROPERTY(cx, obj, *propp) both to * drop the held property, and to release the lock on obj. */extern JSBooljs_DefineProperty(JSContext *cx, JSObject *obj, jsid id, jsval value,		  JSPropertyOp getter, JSPropertyOp setter, uintN attrs,		  JSProperty **propp);extern JSBooljs_DefineNativeProperty(JSContext *cx, JSObject *obj, jsid id, jsval value,                        JSPropertyOp getter, JSPropertyOp setter, uintN attrs,                        uintN flags, intN shortid, JSProperty **propp);/* * Unlike js_DefineProperty, propp must be non-null.  On success, and if id was * found, return true with *objp non-null and locked, and with a held property * stored in *propp.  If successful but id was not found, return true with both * *objp and *propp null.  Therefore all callers who receive a non-null *propp * must later call OBJ_DROP_PROPERTY(cx, *objp, *propp). */#if defined JS_THREADSAFE && defined DEBUGextern JS_FRIEND_API(JSBool)_js_LookupProperty(JSContext *cx, JSObject *obj, jsid id, JSObject **objp,		   JSProperty **propp, const char *file, uintN line);#define js_LookupProperty(cx,obj,id,objp,propp) \    _js_LookupProperty(cx,obj,id,objp,propp,__FILE__,__LINE__)#elseextern JS_FRIEND_API(JSBool)js_LookupProperty(JSContext *cx, JSObject *obj, jsid id, JSObject **objp,		  JSProperty **propp);#endif/* * Specialized subroutine that allows caller to preset JSRESOLVE_* flags. */extern JSBooljs_LookupPropertyWithFlags(JSContext *cx, JSObject *obj, jsid id, uintN flags,                           JSObject **objp, JSProperty **propp#if defined JS_THREADSAFE && defined DEBUG                           , const char *file, uintN line#endif                           );extern JS_FRIEND_API(JSBool)js_FindProperty(JSContext *cx, jsid id, JSObject **objp, JSObject **pobjp,		JSProperty **propp);extern JSObject *js_FindIdentifierBase(JSContext *cx, jsid id);extern JSObject *js_FindVariableScope(JSContext *cx, JSFunction **funp);extern JSBooljs_GetProperty(JSContext *cx, JSObject *obj, jsid id, jsval *vp);extern JSBooljs_SetProperty(JSContext *cx, JSObject *obj, jsid id, jsval *vp);extern JSBooljs_GetAttributes(JSContext *cx, JSObject *obj, jsid id, JSProperty *prop,		 uintN *attrsp);extern JSBooljs_SetAttributes(JSContext *cx, JSObject *obj, jsid id, JSProperty *prop,		 uintN *attrsp);extern JSBooljs_DeleteProperty(JSContext *cx, JSObject *obj, jsid id, jsval *rval);extern JSBooljs_DefaultValue(JSContext *cx, JSObject *obj, JSType hint, jsval *vp);extern JSIdArray *js_NewIdArray(JSContext *cx, jsint length);extern JSIdArray *js_GrowIdArray(JSContext *cx, JSIdArray *ida, jsint length);extern JSBooljs_Enumerate(JSContext *cx, JSObject *obj, JSIterateOp enum_op,	     jsval *statep, jsid *idp);extern JSBooljs_CheckAccess(JSContext *cx, JSObject *obj, jsid id, JSAccessMode mode,	       jsval *vp, uintN *attrsp);extern JSBooljs_Call(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval);extern JSBooljs_Construct(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,	     jsval *rval);extern JSBooljs_HasInstance(JSContext *cx, JSObject *obj, jsval v, JSBool *bp);extern JSBooljs_SetProtoOrParent(JSContext *cx, JSObject *obj, uint32 slot, JSObject *pobj);extern JSBooljs_IsDelegate(JSContext *cx, JSObject *obj, jsval v, JSBool *bp);extern JSBooljs_GetClassPrototype(JSContext *cx, const char *name, JSObject **protop);extern JSBooljs_SetClassPrototype(JSContext *cx, JSObject *ctor, JSObject *proto,		     uintN attrs);extern JSBooljs_ValueToObject(JSContext *cx, jsval v, JSObject **objp);extern JSObject *js_ValueToNonNullObject(JSContext *cx, jsval v);extern JSBooljs_TryValueOf(JSContext *cx, JSObject *obj, JSType type, jsval *rval);extern JSBooljs_TryMethod(JSContext *cx, JSObject *obj, JSAtom *atom,	     uintN argc, jsval *argv, jsval *rval);extern JSBooljs_XDRObject(JSXDRState *xdr, JSObject **objp);extern uint32js_Mark(JSContext *cx, JSObject *obj, void *arg);extern voidjs_Clear(JSContext *cx, JSObject *obj);extern jsvaljs_GetRequiredSlot(JSContext *cx, JSObject *obj, uint32 slot);extern voidjs_SetRequiredSlot(JSContext *cx, JSObject *obj, uint32 slot, jsval v);JS_END_EXTERN_C#endif /* jsobj_h___ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -