Add LJ_FR2 mode: Two-slot frame info.

This commit is contained in:
Mike Pall
2015-01-03 15:04:38 +01:00
parent a13dfd66c3
commit 054e6abe37
33 changed files with 300 additions and 139 deletions

View File

@@ -58,7 +58,7 @@ LJLIB_ASM(string_byte) LJLIB_REC(string_range 0)
lj_state_checkstack(L, (MSize)n);
p = (const unsigned char *)strdata(s) + start;
for (i = 0; i < n; i++)
setintV(L->base + i-1, p[i]);
setintV(L->base + i-1-LJ_FR2, p[i]);
return FFH_RES(n);
}
@@ -72,7 +72,7 @@ LJLIB_ASM(string_char) LJLIB_REC(.)
lj_err_arg(L, i, LJ_ERR_BADVAL);
buf[i-1] = (char)k;
}
setstrV(L, L->base-1, lj_str_new(L, buf, (size_t)nargs));
setstrV(L, L->base-1-LJ_FR2, lj_str_new(L, buf, (size_t)nargs));
return FFH_RES(1);
}