issue #145 move collectable bit left by one bit to make an extra bit available for encoding typeinfo

pull/167/head
Dibyendu Majumdar 6 years ago
parent f62b1eb557
commit 1ca729a4c2

@ -36,7 +36,7 @@ union Value {
struct TValue {
union Value value_;
int tt_;
lu_byte tt_;
};
struct TString {
@ -330,7 +330,7 @@ union GCUnion {
#define rttype(o) ((o)->tt_)
#define BIT_ISCOLLECTABLE (1 << 6)
#define BIT_ISCOLLECTABLE (1 << 7)
#define iscollectable(o) (rttype(o) & BIT_ISCOLLECTABLE)
#define upisopen(up) ((up)->v != &(up)->u.value)

@ -63,7 +63,7 @@
/* Bit mark for collectable types */
#define BIT_ISCOLLECTABLE (1 << 6)
#define BIT_ISCOLLECTABLE (1 << 7)
/* mark a tag as collectable */
#define ctb(t) ((t) | BIT_ISCOLLECTABLE)

@ -85,7 +85,7 @@ static const char Lua_header[] = ""
"#define LUA_TNUMINT (LUA_TNUMBER | (1 << 4))\n"
"#define RAVI_TIARRAY (LUA_TTABLE | (1 << 4))\n"
"#define RAVI_TFARRAY (LUA_TTABLE | (2 << 4))\n"
"#define BIT_ISCOLLECTABLE (1 << 6)\n"
"#define BIT_ISCOLLECTABLE (1 << 7)\n"
"#define ctb(t) ((t) | BIT_ISCOLLECTABLE)\n"
"typedef struct GCObject GCObject;\n"
"#define CommonHeader GCObject *next; lu_byte tt; lu_byte marked\n"

@ -73,7 +73,7 @@
/* Bit mark for collectable types */
#define BIT_ISCOLLECTABLE (1 << 6)
#define BIT_ISCOLLECTABLE (1 << 7)
/* mark a tag as collectable */
#define ctb(t) ((t) | BIT_ISCOLLECTABLE)

Loading…
Cancel
Save