Resolve wasm traps to unit source
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
namespace {
|
||||
|
||||
const u64 UCE_UNIT_ABI_VERSION = 9;
|
||||
const u64 UCE_UNIT_ABI_VERSION = 10;
|
||||
|
||||
struct SharedUnitFilesystemState
|
||||
{
|
||||
@@ -294,10 +294,16 @@ String compiler_cached_wasm_path(String wasm_path)
|
||||
return(wasm_path + ".cwasm");
|
||||
}
|
||||
|
||||
String compiler_source_map_path(String wasm_path)
|
||||
{
|
||||
return(wasm_path + ".source-map");
|
||||
}
|
||||
|
||||
void compiler_unlink_unit_wasm_artifacts(SharedUnit* su)
|
||||
{
|
||||
file_unlink(su->wasm_name);
|
||||
file_unlink(compiler_cached_wasm_path(su->wasm_name));
|
||||
file_unlink(compiler_source_map_path(su->wasm_name));
|
||||
}
|
||||
|
||||
String compiler_wasm_compile_script(Request* context)
|
||||
@@ -937,7 +943,7 @@ void compile_shared_unit(Request* context, SharedUnit* su)
|
||||
file_put_contents(su->compile_output_file_name, su->compiler_messages + "\n");
|
||||
file_put_contents(su->wasm_check_file_name, su->compiler_messages + "\n");
|
||||
file_put_contents(su->meta_file_name, compiler_unit_metadata_text(context, su));
|
||||
file_unlink(su->wasm_name);
|
||||
compiler_unlink_unit_wasm_artifacts(su);
|
||||
compiler_record_compile_result(su, time_precise() - comp_start, false, "compile_error", su->compiler_messages);
|
||||
printf("%s \n", compiler_format_source_read_failure(context, su, su->compiler_messages).c_str());
|
||||
compiler_mark_source_generation(context);
|
||||
|
||||
Reference in New Issue
Block a user