mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
more debug info
This commit is contained in:
parent
b7ed6929ba
commit
25827fc70e
1 changed files with 23 additions and 15 deletions
|
@ -1743,7 +1743,7 @@ pub fn specialize_all<'a>(
|
||||||
partial_proc,
|
partial_proc,
|
||||||
) {
|
) {
|
||||||
Ok((proc, layout)) => {
|
Ok((proc, layout)) => {
|
||||||
debug_assert_eq!(outside_layout, layout);
|
debug_assert_eq!(outside_layout, layout, " in {:?}", name);
|
||||||
|
|
||||||
if let Layout::Closure(args, closure, ret) = layout {
|
if let Layout::Closure(args, closure, ret) = layout {
|
||||||
procs.specialized.remove(&(name, outside_layout));
|
procs.specialized.remove(&(name, outside_layout));
|
||||||
|
@ -3656,18 +3656,27 @@ pub fn with_hole<'a>(
|
||||||
captured_symbols.sort();
|
captured_symbols.sort();
|
||||||
let captured_symbols = captured_symbols.into_bump_slice();
|
let captured_symbols = captured_symbols.into_bump_slice();
|
||||||
|
|
||||||
procs
|
let inserted = procs.insert_anonymous(
|
||||||
.insert_anonymous(
|
env,
|
||||||
env,
|
name,
|
||||||
name,
|
function_type,
|
||||||
function_type,
|
arguments,
|
||||||
arguments,
|
loc_body,
|
||||||
loc_body,
|
CapturedSymbols::Captured(captured_symbols),
|
||||||
CapturedSymbols::Captured(captured_symbols),
|
return_type,
|
||||||
return_type,
|
layout_cache,
|
||||||
layout_cache,
|
);
|
||||||
)
|
|
||||||
.unwrap();
|
if let Err(runtime_error) = inserted {
|
||||||
|
return Stmt::RuntimeError(env.arena.alloc(format!(
|
||||||
|
"RuntimeError {} line {} {:?}",
|
||||||
|
file!(),
|
||||||
|
line!(),
|
||||||
|
runtime_error,
|
||||||
|
)));
|
||||||
|
} else {
|
||||||
|
drop(inserted);
|
||||||
|
}
|
||||||
|
|
||||||
let closure_data_layout = closure_layout.as_block_of_memory_layout();
|
let closure_data_layout = closure_layout.as_block_of_memory_layout();
|
||||||
// define the function pointer
|
// define the function pointer
|
||||||
|
@ -6221,8 +6230,7 @@ fn call_by_name<'a>(
|
||||||
|
|
||||||
procs.runtime_errors.insert(proc_name, error_msg);
|
procs.runtime_errors.insert(proc_name, error_msg);
|
||||||
|
|
||||||
panic!();
|
Stmt::RuntimeError(error_msg)
|
||||||
// Stmt::RuntimeError(error_msg)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue