diff options
author | Mike Pall <mike> | 2009-12-08 20:35:29 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2009-12-08 20:35:29 +0100 |
commit | 3f1f9e11f4f699ae94182d4cba158092f434a7f6 (patch) | |
tree | 88fbb674a21a1d554d4b1ee9d4ef2c5fed6a1d88 /src/buildvm.c | |
parent | 5287b9326479ea2b7dddd6f642673e58e5a7f354 (diff) | |
download | luajit-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.c | 14 |
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 | ||
217 | const char *const irfield_names[] = { | 217 | const char *const irfield_names[] = { |
218 | #define FLNAME(name, type, field) #name, | 218 | #define FLNAME(name, ofs) #name, |
219 | IRFLDEF(FLNAME) | 219 | IRFLDEF(FLNAME) |
220 | #undef FLNAME | 220 | #undef FLNAME |
221 | NULL | 221 | NULL |
222 | }; | 222 | }; |
223 | 223 | ||
224 | const char *const ircall_names[] = { | ||
225 | #define IRCALLNAME(name, nargs, kind, type, flags) #name, | ||
226 | IRCALLDEF(IRCALLNAME) | ||
227 | #undef IRCALLNAME | ||
228 | NULL | ||
229 | }; | ||
230 | |||
224 | static const char *const trace_errors[] = { | 231 | static 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]); |