Throw away usage of stored variables on receiver side

This commit is contained in:
Ayaz Hafiz 2022-12-14 16:29:59 -06:00
parent a96225e92e
commit 2dc19207a3
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
3 changed files with 17 additions and 22 deletions

View file

@ -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))]