mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-01 13:34:15 +00:00
Push the layout interner through the backends
This commit is contained in:
parent
c5466810a4
commit
ed04c2040a
11 changed files with 34 additions and 14 deletions
|
|
@ -16,7 +16,7 @@ use roc_collections::all::{MutMap, MutSet};
|
|||
use roc_module::symbol::{Interns, ModuleId, Symbol};
|
||||
use roc_mono::code_gen_help::CodeGenHelp;
|
||||
use roc_mono::ir::{Proc, ProcLayout};
|
||||
use roc_mono::layout::LayoutIds;
|
||||
use roc_mono::layout::{LayoutIds, STLayoutInterner};
|
||||
use roc_target::TargetInfo;
|
||||
use wasm_module::parse::ParseError;
|
||||
|
||||
|
|
@ -43,6 +43,7 @@ pub const STACK_POINTER_NAME: &str = "__stack_pointer";
|
|||
|
||||
pub struct Env<'a> {
|
||||
pub arena: &'a Bump,
|
||||
pub layout_interner: &'a STLayoutInterner<'a>,
|
||||
pub module_id: ModuleId,
|
||||
pub exposed_to_host: MutSet<Symbol>,
|
||||
pub stack_bytes: u32,
|
||||
|
|
|
|||
|
|
@ -2136,7 +2136,10 @@ pub fn call_higher_order_lowlevel<'a>(
|
|||
let (closure_data_layout, closure_data_exists) =
|
||||
match backend.storage.symbol_layouts[captured_environment] {
|
||||
Layout::LambdaSet(lambda_set) => {
|
||||
if lambda_set.is_represented().is_some() {
|
||||
if lambda_set
|
||||
.is_represented(backend.env.layout_interner)
|
||||
.is_some()
|
||||
{
|
||||
(lambda_set.runtime_representation(), true)
|
||||
} else {
|
||||
// Closure data is a lambda set, which *itself* has no closure data!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue