Refactor jv structure.

New structure layout is simpler and also faster.  In particular, it's
now small enough to be passed in registers on amd64.
This commit is contained in:
Stephen Dolan committed 2013-12-08 17:46:23 +00:00
1 parent fee21c959a
commit 74a14f5de7
3 files changed
+218 -230

No files matched your search

+7 -7
View File
@@ -16,17 +16,17 @@ typedef enum {
} jv_kind;
struct jv_refcnt;
typedef struct{
struct jv_refcnt* ptr;
int i[2];
} jv_nontrivial;
/* All of the fields of this struct are private.
Really. Do not play with them. */
typedef struct {
jv_kind kind;
unsigned char kind;
unsigned short offset; /* array offsets */
int size;
union {
struct jv_refcnt* ptr;
double number;
jv_nontrivial nontrivial;
} val;
} u;
} jv;
/*