|
@@ -159,7 +159,11 @@ int main(int argc, char **argv)
|
|
output_file = fopen(output_filename, "w");
|
|
output_file = fopen(output_filename, "w");
|
|
if (output_file == NULL) { fatal_error(strerror(errno)); }
|
|
if (output_file == NULL) { fatal_error(strerror(errno)); }
|
|
|
|
|
|
|
|
+ #if defined(LUAOT_USE_GOTOS)
|
|
println("#include \"luaot_header.c\"");
|
|
println("#include \"luaot_header.c\"");
|
|
|
|
+ #elif defined(LUAOT_USE_SWITCHES)
|
|
|
|
+ println("#include \"trampoline_header.c\"");
|
|
|
|
+ #endif
|
|
printnl();
|
|
printnl();
|
|
print_functions(proto);
|
|
print_functions(proto);
|
|
printnl();
|
|
printnl();
|
|
@@ -167,7 +171,12 @@ int main(int argc, char **argv)
|
|
printnl();
|
|
printnl();
|
|
println("#define LUAOT_LUAOPEN_NAME luaopen_%s", module_name);
|
|
println("#define LUAOT_LUAOPEN_NAME luaopen_%s", module_name);
|
|
printnl();
|
|
printnl();
|
|
|
|
+ #if defined(LUAOT_USE_GOTOS)
|
|
println("#include \"luaot_footer.c\"");
|
|
println("#include \"luaot_footer.c\"");
|
|
|
|
+ #elif defined(LUAOT_USE_SWITCHES)
|
|
|
|
+ println("#include \"trampoline_footer.c\"");
|
|
|
|
+ #endif
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
// Deduce the Lua module name given the file name
|
|
// Deduce the Lua module name given the file name
|