intrinsic arrays
This commit is contained in:
@@ -74,11 +74,12 @@ typedef uint32_t JSAtom;
|
||||
|
||||
enum {
|
||||
/* all tags with a reference count are negative */
|
||||
JS_TAG_FIRST = -9, /* first negative tag */
|
||||
JS_TAG_BIG_INT = -9,
|
||||
JS_TAG_SYMBOL = -8,
|
||||
JS_TAG_STRING = -7,
|
||||
JS_TAG_STRING_ROPE = -6,
|
||||
JS_TAG_FIRST = -10, /* first negative tag */
|
||||
JS_TAG_BIG_INT = -10,
|
||||
JS_TAG_SYMBOL = -9,
|
||||
JS_TAG_STRING = -8,
|
||||
JS_TAG_STRING_ROPE = -7,
|
||||
JS_TAG_ARRAY = -6, /* intrinsic array type */
|
||||
JS_TAG_MODULE = -3, /* used internally */
|
||||
JS_TAG_FUNCTION_BYTECODE = -2, /* used internally */
|
||||
JS_TAG_OBJECT = -1,
|
||||
@@ -449,22 +450,6 @@ typedef struct JSPropertyDescriptor {
|
||||
JSValue setter;
|
||||
} JSPropertyDescriptor;
|
||||
|
||||
typedef struct JSClassExoticMethods {
|
||||
/* Return -1 if exception (can only happen in case of Proxy object),
|
||||
FALSE if the property does not exists, TRUE if it exists. If 1 is
|
||||
returned, the property descriptor 'desc' is filled if != NULL. */
|
||||
int (*get_own_property)(JSContext *ctx, JSPropertyDescriptor *desc,
|
||||
JSValueConst obj, JSAtom prop);
|
||||
|
||||
/* return < 0 if exception, or TRUE/FALSE */
|
||||
int (*delete_property)(JSContext *ctx, JSValueConst obj, JSAtom prop);
|
||||
/* return < 0 if exception or TRUE/FALSE */
|
||||
int (*define_own_property)(JSContext *ctx, JSValueConst this_obj,
|
||||
JSAtom prop, JSValueConst val,
|
||||
JSValueConst getter, JSValueConst setter,
|
||||
int flags);
|
||||
} JSClassExoticMethods;
|
||||
|
||||
typedef void JSClassFinalizer(JSRuntime *rt, JSValue val);
|
||||
typedef void JSClassGCMark(JSRuntime *rt, JSValueConst val,
|
||||
JS_MarkFunc *mark_func);
|
||||
@@ -478,9 +463,6 @@ typedef struct JSClassDef {
|
||||
JSClassGCMark *gc_mark;
|
||||
/* if call != NULL, the object is a function */
|
||||
JSClassCall *call;
|
||||
/* XXX: suppress this indirection ? It is here only to save memory
|
||||
because only a few classes need these methods */
|
||||
JSClassExoticMethods *exotic;
|
||||
} JSClassDef;
|
||||
|
||||
#define JS_INVALID_CLASS_ID 0
|
||||
|
||||
Reference in New Issue
Block a user