diff options
| author | Mike Pall <mike> | 2013-05-16 20:34:34 +0200 |
|---|---|---|
| committer | Mike Pall <mike> | 2013-05-16 20:34:34 +0200 |
| commit | fe8773677753040345afa2c2d708fe5ea8068c8e (patch) | |
| tree | d4078f02a49227468543c800b450014ca46c0913 /src/host | |
| parent | 647cc4613f3acd5ec8785920102af22b85cf2b9c (diff) | |
| download | luajit-fe8773677753040345afa2c2d708fe5ea8068c8e.tar.gz luajit-fe8773677753040345afa2c2d708fe5ea8068c8e.tar.bz2 luajit-fe8773677753040345afa2c2d708fe5ea8068c8e.zip | |
Get rid of module() in all internal modules.
Diffstat (limited to 'src/host')
| -rw-r--r-- | src/host/buildvm.c | 15 | ||||
| -rw-r--r-- | src/host/buildvm_lib.c | 2 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/host/buildvm.c b/src/host/buildvm.c index ba8fbcba..ef5f7fb9 100644 --- a/src/host/buildvm.c +++ b/src/host/buildvm.c | |||
| @@ -314,20 +314,20 @@ static void emit_vmdef(BuildCtx *ctx) | |||
| 314 | char buf[80]; | 314 | char buf[80]; |
| 315 | int i; | 315 | int i; |
| 316 | fprintf(ctx->fp, "-- This is a generated file. DO NOT EDIT!\n\n"); | 316 | fprintf(ctx->fp, "-- This is a generated file. DO NOT EDIT!\n\n"); |
| 317 | fprintf(ctx->fp, "module(...)\n\n"); | 317 | fprintf(ctx->fp, "return {\n\n"); |
| 318 | 318 | ||
| 319 | fprintf(ctx->fp, "bcnames = \""); | 319 | fprintf(ctx->fp, "bcnames = \""); |
| 320 | for (i = 0; bc_names[i]; i++) fprintf(ctx->fp, "%-6s", bc_names[i]); | 320 | for (i = 0; bc_names[i]; i++) fprintf(ctx->fp, "%-6s", bc_names[i]); |
| 321 | fprintf(ctx->fp, "\"\n\n"); | 321 | fprintf(ctx->fp, "\",\n\n"); |
| 322 | 322 | ||
| 323 | fprintf(ctx->fp, "irnames = \""); | 323 | fprintf(ctx->fp, "irnames = \""); |
| 324 | for (i = 0; ir_names[i]; i++) fprintf(ctx->fp, "%-6s", ir_names[i]); | 324 | for (i = 0; ir_names[i]; i++) fprintf(ctx->fp, "%-6s", ir_names[i]); |
| 325 | fprintf(ctx->fp, "\"\n\n"); | 325 | fprintf(ctx->fp, "\",\n\n"); |
| 326 | 326 | ||
| 327 | fprintf(ctx->fp, "irfpm = { [0]="); | 327 | fprintf(ctx->fp, "irfpm = { [0]="); |
| 328 | for (i = 0; irfpm_names[i]; i++) | 328 | for (i = 0; irfpm_names[i]; i++) |
| 329 | fprintf(ctx->fp, "\"%s\", ", lower(buf, irfpm_names[i])); | 329 | fprintf(ctx->fp, "\"%s\", ", lower(buf, irfpm_names[i])); |
| 330 | fprintf(ctx->fp, "}\n\n"); | 330 | fprintf(ctx->fp, "},\n\n"); |
| 331 | 331 | ||
| 332 | fprintf(ctx->fp, "irfield = { [0]="); | 332 | fprintf(ctx->fp, "irfield = { [0]="); |
| 333 | for (i = 0; irfield_names[i]; i++) { | 333 | for (i = 0; irfield_names[i]; i++) { |
| @@ -337,17 +337,17 @@ static void emit_vmdef(BuildCtx *ctx) | |||
| 337 | if (p) *p = '.'; | 337 | if (p) *p = '.'; |
| 338 | fprintf(ctx->fp, "\"%s\", ", buf); | 338 | fprintf(ctx->fp, "\"%s\", ", buf); |
| 339 | } | 339 | } |
| 340 | fprintf(ctx->fp, "}\n\n"); | 340 | fprintf(ctx->fp, "},\n\n"); |
| 341 | 341 | ||
| 342 | fprintf(ctx->fp, "ircall = {\n[0]="); | 342 | fprintf(ctx->fp, "ircall = {\n[0]="); |
| 343 | for (i = 0; ircall_names[i]; i++) | 343 | for (i = 0; ircall_names[i]; i++) |
| 344 | fprintf(ctx->fp, "\"%s\",\n", ircall_names[i]); | 344 | fprintf(ctx->fp, "\"%s\",\n", ircall_names[i]); |
| 345 | fprintf(ctx->fp, "}\n\n"); | 345 | fprintf(ctx->fp, "},\n\n"); |
| 346 | 346 | ||
| 347 | fprintf(ctx->fp, "traceerr = {\n[0]="); | 347 | fprintf(ctx->fp, "traceerr = {\n[0]="); |
| 348 | for (i = 0; trace_errors[i]; i++) | 348 | for (i = 0; trace_errors[i]; i++) |
| 349 | fprintf(ctx->fp, "\"%s\",\n", trace_errors[i]); | 349 | fprintf(ctx->fp, "\"%s\",\n", trace_errors[i]); |
| 350 | fprintf(ctx->fp, "}\n\n"); | 350 | fprintf(ctx->fp, "},\n\n"); |
| 351 | } | 351 | } |
| 352 | 352 | ||
| 353 | /* -- Argument parsing ---------------------------------------------------- */ | 353 | /* -- Argument parsing ---------------------------------------------------- */ |
| @@ -484,6 +484,7 @@ int main(int argc, char **argv) | |||
| 484 | case BUILD_vmdef: | 484 | case BUILD_vmdef: |
| 485 | emit_vmdef(ctx); | 485 | emit_vmdef(ctx); |
| 486 | emit_lib(ctx); | 486 | emit_lib(ctx); |
| 487 | fprintf(ctx->fp, "}\n\n"); | ||
| 487 | break; | 488 | break; |
| 488 | case BUILD_ffdef: | 489 | case BUILD_ffdef: |
| 489 | case BUILD_libdef: | 490 | case BUILD_libdef: |
diff --git a/src/host/buildvm_lib.c b/src/host/buildvm_lib.c index dcd3ca41..f578bbc9 100644 --- a/src/host/buildvm_lib.c +++ b/src/host/buildvm_lib.c | |||
| @@ -432,7 +432,7 @@ void emit_lib(BuildCtx *ctx) | |||
| 432 | "#ifndef FF_NUM_ASMFUNC\n#define FF_NUM_ASMFUNC %d\n#endif\n\n", | 432 | "#ifndef FF_NUM_ASMFUNC\n#define FF_NUM_ASMFUNC %d\n#endif\n\n", |
| 433 | ffasmfunc); | 433 | ffasmfunc); |
| 434 | } else if (ctx->mode == BUILD_vmdef) { | 434 | } else if (ctx->mode == BUILD_vmdef) { |
| 435 | fprintf(ctx->fp, "}\n\n"); | 435 | fprintf(ctx->fp, "},\n\n"); |
| 436 | } else if (ctx->mode == BUILD_bcdef) { | 436 | } else if (ctx->mode == BUILD_bcdef) { |
| 437 | int i; | 437 | int i; |
| 438 | fprintf(ctx->fp, "\n};\n\n"); | 438 | fprintf(ctx->fp, "\n};\n\n"); |
