minor refactoring, OP_INVOKE performance boost

This commit is contained in:
2020-11-13 17:39:47 -06:00
parent 71d3a8e1c4
commit 9ebae876f6
10 changed files with 86 additions and 71 deletions

View File

@@ -13,8 +13,8 @@ typedef enum {
COBJ_OBJECT,
COBJ_FUNCTION,
COBJ_CFUNCTION,
COBJ_METHOD,
// internal use
COBJ_METHOD,
COBJ_CLOSURE,
COBJ_UPVALUE,
} CObjType;
@@ -39,6 +39,7 @@ typedef struct CObjString {
typedef struct CObjObject {
CommonHeader; // "is a" CObj
CTable tbl;
void *user; // userdata (NULL by default)
struct CObjObject *meta; // metaobject, describes the behavior of the object
} CObjObject;