[msl-out] Add log tracing for functions and entry points.

This commit is contained in:
Jim Blandy
2021-12-13 11:46:23 -08:00
committed by Dzmitry Malyshau
parent c4b331acb4
commit 8a2fbd360d

View File

@@ -2470,6 +2470,12 @@ impl<W: Write> Writer<W> {
) -> Result<TranslationInfo, Error> {
let mut pass_through_globals = Vec::new();
for (fun_handle, fun) in module.functions.iter() {
log::trace!(
"function {:?}, handle {:?}",
fun.name.as_deref().unwrap_or("(anonymous)"),
fun_handle
);
let fun_info = &mod_info[fun_handle];
pass_through_globals.clear();
let mut supports_array_length = false;
@@ -2601,6 +2607,12 @@ impl<W: Write> Writer<W> {
let mut ep_error = None;
let mut supports_array_length = false;
log::trace!(
"entry point {:?}, index {:?}",
fun.name.as_deref().unwrap_or("(anonymous)"),
ep_index
);
// skip this entry point if any global bindings are missing,
// or their types are incompatible.
if !options.fake_missing_bindings {