store the start of the value for each variable in a table

This commit is contained in:
Folkert 2022-07-27 21:32:49 +02:00
parent 9920184232
commit 631c642950
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
2 changed files with 36 additions and 2 deletions

View file

@ -6,7 +6,10 @@ use roc_mono::{
layout::{CapturesNiche, LayoutCache},
};
use roc_parse::ast::Expr;
use roc_repl_eval::eval::{jit_to_ast, ToAstProblem};
use roc_repl_eval::{
eval::{jit_to_ast, ToAstProblem},
ReplAppMemory,
};
use roc_target::TargetInfo;
use roc_types::subs::{Subs, Variable};
@ -39,7 +42,10 @@ pub fn get_values<'a>(
let app = arena.alloc(app);
for variable in variables {
for (i, variable) in variables.iter().enumerate() {
let start = app.memory.deref_usize(start_offset + i * 8);
app.offset = start;
let expr = {
let variable = *variable;