mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
update comment
This commit is contained in:
parent
75ee81db88
commit
7304154452
1 changed files with 7 additions and 5 deletions
|
@ -5720,11 +5720,13 @@ fn call_by_pointer<'a>(
|
||||||
let is_specialized = procs.specialized.keys().any(|(s, _)| *s == symbol);
|
let is_specialized = procs.specialized.keys().any(|(s, _)| *s == symbol);
|
||||||
if env.is_imported_symbol(symbol) || procs.partial_procs.contains_key(&symbol) || is_specialized
|
if env.is_imported_symbol(symbol) || procs.partial_procs.contains_key(&symbol) || is_specialized
|
||||||
{
|
{
|
||||||
// TODO we should be able to call by name in this wrapper for "normal" functions
|
// anything that is not a thunk can be called by-value in the wrapper
|
||||||
// but closures, specifically top-level values that are closures (by unification)
|
// (the above condition guarantees we're dealing with a top-level symbol)
|
||||||
// cause issues. The caller (which is here) doesn't know whether the called is a closure
|
//
|
||||||
// so we're safe rather than sorry for now. Hopefully we can figure out how to call by name
|
// But thunks cannot be called by-value, since they are not really functions to all parts
|
||||||
// more in the future
|
// of the system (notably RC insertion). So we still call those by-pointer.
|
||||||
|
// Luckily such values were top-level originally (in the user code), and can therefore
|
||||||
|
// not be closures
|
||||||
let is_thunk =
|
let is_thunk =
|
||||||
procs.module_thunks.contains(&symbol) || procs.imported_module_thunks.contains(&symbol);
|
procs.module_thunks.contains(&symbol) || procs.imported_module_thunks.contains(&symbol);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue