From f9a9dbc31b430c691163e2ed2aa31920329282f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Wed, 8 May 2024 18:40:54 -0300 Subject: [PATCH] Add lower constant layout --- crates/concrete_ir/src/lowering.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/crates/concrete_ir/src/lowering.rs b/crates/concrete_ir/src/lowering.rs index 6cf620e..3528f2a 100644 --- a/crates/concrete_ir/src/lowering.rs +++ b/crates/concrete_ir/src/lowering.rs @@ -3,6 +3,7 @@ use std::collections::HashMap; use common::{BuildCtx, FnBodyBuilder, IdGenerator}; use concrete_ast::{ common::Span, + constants::ConstantDef, expressions::{ ArithOp, BinaryOp, BitwiseOp, CmpOp, Expression, FnCallOp, IfExpr, LogicOp, PathOp, PathSegment, ValueExpr, @@ -75,7 +76,9 @@ fn lower_module(mut ctx: BuildCtx, module: &Module, id: DefId) -> Result todo!(), + ModuleDefItem::Constant(info) => { + ctx = lower_constant(ctx, info, id)?; + } ModuleDefItem::Struct(info) => { ctx = lower_struct(ctx, info, id)?; } @@ -179,6 +182,14 @@ fn lower_module(mut ctx: BuildCtx, module: &Module, id: DefId) -> Result Result { + todo!() +} + fn lower_struct( mut ctx: BuildCtx, info: &StructDecl,