aboutsummaryrefslogtreecommitdiff
path: root/src/buildvm.c
diff options
context:
space:
mode:
authorMike Pall <mike>2009-12-08 20:35:29 +0100
committerMike Pall <mike>2009-12-08 20:35:29 +0100
commit3f1f9e11f4f699ae94182d4cba158092f434a7f6 (patch)
tree88fbb674a21a1d554d4b1ee9d4ef2c5fed6a1d88 /src/buildvm.c
parent5287b9326479ea2b7dddd6f642673e58e5a7f354 (diff)
downloadluajit-3f1f9e11f4f699ae94182d4cba158092f434a7f6.tar.gz
luajit-3f1f9e11f4f699ae94182d4cba158092f434a7f6.tar.bz2
luajit-3f1f9e11f4f699ae94182d4cba158092f434a7f6.zip
Fast forward to sync public repo.
Compile math.sinh(), math.cosh(), math.tanh() and math.random(). Compile various io.*() functions. Drive the GC forward on string allocations in the parser. Improve KNUM fuse vs. load heuristics. Add abstract C call handling to IR.
Diffstat (limited to 'src/buildvm.c')
-rw-r--r--src/buildvm.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/buildvm.c b/src/buildvm.c
index b3738db4..4aba39d4 100644
--- a/src/buildvm.c
+++ b/src/buildvm.c
@@ -215,12 +215,19 @@ IRFPMDEF(FPMNAME)
215}; 215};
216 216
217const char *const irfield_names[] = { 217const char *const irfield_names[] = {
218#define FLNAME(name, type, field) #name, 218#define FLNAME(name, ofs) #name,
219IRFLDEF(FLNAME) 219IRFLDEF(FLNAME)
220#undef FLNAME 220#undef FLNAME
221 NULL 221 NULL
222}; 222};
223 223
224const char *const ircall_names[] = {
225#define IRCALLNAME(name, nargs, kind, type, flags) #name,
226IRCALLDEF(IRCALLNAME)
227#undef IRCALLNAME
228 NULL
229};
230
224static const char *const trace_errors[] = { 231static const char *const trace_errors[] = {
225#define TREDEF(name, msg) msg, 232#define TREDEF(name, msg) msg,
226#include "lj_traceerr.h" 233#include "lj_traceerr.h"
@@ -269,6 +276,11 @@ static void emit_vmdef(BuildCtx *ctx)
269 } 276 }
270 fprintf(ctx->fp, "}\n\n"); 277 fprintf(ctx->fp, "}\n\n");
271 278
279 fprintf(ctx->fp, "ircall = {\n[0]=");
280 for (i = 0; ircall_names[i]; i++)
281 fprintf(ctx->fp, "\"%s\",\n", ircall_names[i]);
282 fprintf(ctx->fp, "}\n\n");
283
272 fprintf(ctx->fp, "traceerr = {\n[0]="); 284 fprintf(ctx->fp, "traceerr = {\n[0]=");
273 for (i = 0; trace_errors[i]; i++) 285 for (i = 0; trace_errors[i]; i++)
274 fprintf(ctx->fp, "\"%s\",\n", trace_errors[i]); 286 fprintf(ctx->fp, "\"%s\",\n", trace_errors[i]);