mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
Throw away usage of stored variables on receiver side
This commit is contained in:
parent
a96225e92e
commit
2dc19207a3
3 changed files with 17 additions and 22 deletions
|
@ -32,9 +32,10 @@ pub fn get_values<'a>(
|
|||
layout_interner: &Arc<GlobalInterner<'a, Layout<'a>>>,
|
||||
start: *const u8,
|
||||
start_offset: usize,
|
||||
variables: &[Variable],
|
||||
) -> (usize, Vec<Expr<'a>>) {
|
||||
let mut result = Vec::with_capacity(variables.len());
|
||||
number_of_lookups: usize,
|
||||
) -> (usize, Vec<Expr<'a>>, Vec<Variable>) {
|
||||
let mut result = Vec::with_capacity(number_of_lookups);
|
||||
let mut result_vars = Vec::with_capacity(number_of_lookups);
|
||||
|
||||
let memory = ExpectMemory { start };
|
||||
|
||||
|
@ -45,7 +46,7 @@ pub fn get_values<'a>(
|
|||
|
||||
let app = arena.alloc(app);
|
||||
|
||||
for (i, variable) in variables.iter().enumerate() {
|
||||
for i in 0..number_of_lookups {
|
||||
let size_of_lookup_header = 8 /* pointer to value */ + 4 /* type variable */;
|
||||
|
||||
let start = app
|
||||
|
@ -83,9 +84,10 @@ pub fn get_values<'a>(
|
|||
};
|
||||
|
||||
result.push(expr);
|
||||
result_vars.push(variable);
|
||||
}
|
||||
|
||||
(app.offset, result)
|
||||
(app.offset, result, result_vars)
|
||||
}
|
||||
|
||||
#[cfg(not(windows))]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue