Add special bytecodes for builtins.

BC_ISTYPE, BC_ISNUM: fast type checks/coercions.
BC_TGETR, BC_TSETR: fast rawgeti/rawseti, no type checks for table/key.
This commit is contained in:
Mike Pall
2013-02-23 02:09:19 +01:00
parent b359ce804b
commit 73ef845fca
16 changed files with 614 additions and 38 deletions

View File

@@ -3,8 +3,8 @@
static const int libbc_endian = 0;
static const uint8_t libbc_code[] = {
0,1,2,0,0,1,2,22,1,0,0,72,1,2,0,241,135,158,166,3,220,203,178,130,4,0,1,2,0,
0,1,2,22,1,0,0,72,1,2,0,243,244,148,165,20,198,190,199,252,3,0
0,1,2,0,0,1,2,24,1,0,0,76,1,2,0,241,135,158,166,3,220,203,178,130,4,0,1,2,0,
0,1,2,24,1,0,0,76,1,2,0,243,244,148,165,20,198,190,199,252,3,0
};
static const struct { const char *name; int ofs; } libbc_map[] = {