mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
WIP
This commit is contained in:
parent
8dc3146a7d
commit
0754b8e3ce
4 changed files with 16 additions and 9 deletions
|
@ -813,8 +813,6 @@ pub fn build_exp_call<'a, 'ctx, 'env>(
|
|||
let callee_var = CalleeSpecVar(&bytes);
|
||||
let func_spec = func_spec_solutions.callee_spec(callee_var).unwrap();
|
||||
|
||||
dbg!(name, &func_spec);
|
||||
|
||||
roc_call_with_args(
|
||||
env,
|
||||
&full_layout,
|
||||
|
@ -2901,7 +2899,7 @@ where
|
|||
let info = builder
|
||||
.build_catch_all_landing_pad(
|
||||
&landing_pad_type,
|
||||
&BasicValueEnum::IntValue(context.i8_type().const_zero()),
|
||||
BasicValueEnum::IntValue(context.i8_type().const_zero()),
|
||||
context.i8_type().ptr_type(AddressSpace::Generic),
|
||||
"main_landing_pad",
|
||||
)
|
||||
|
@ -3252,10 +3250,10 @@ fn build_proc_header<'a, 'ctx, 'env>(
|
|||
let args = proc.args;
|
||||
let arena = env.arena;
|
||||
|
||||
dbg!(&symbol, &func_spec);
|
||||
|
||||
let fn_name = func_spec_name(env.arena, &env.interns, symbol, func_spec);
|
||||
|
||||
dbg!(&fn_name);
|
||||
|
||||
let ret_type = basic_type_from_layout(env, &proc.ret_layout);
|
||||
let mut arg_basic_types = Vec::with_capacity_in(args.len(), arena);
|
||||
|
||||
|
@ -3572,6 +3570,7 @@ pub fn build_proc<'a, 'ctx, 'env>(
|
|||
//
|
||||
// * roc__mainForHost_1_Update_size() -> i64
|
||||
// * roc__mainForHost_1_Update_result_size() -> i64
|
||||
continue;
|
||||
|
||||
let evaluator_layout = env.arena.alloc(top_level).full();
|
||||
let evaluator_name = layout_ids
|
||||
|
|
|
@ -84,6 +84,12 @@ where
|
|||
for proc in procs {
|
||||
let spec = proc_spec(proc)?;
|
||||
|
||||
dbg!(proc.name);
|
||||
for b in &func_name_bytes(proc) {
|
||||
eprint!("{:x}", b);
|
||||
}
|
||||
eprintln!("");
|
||||
|
||||
m.add_func(FuncName(&func_name_bytes(proc)), spec)?;
|
||||
|
||||
if format!("{:?}", proc.name).contains("mainForHost") {
|
||||
|
@ -127,6 +133,8 @@ where
|
|||
p.build()?
|
||||
};
|
||||
|
||||
eprintln!("{}", program.to_source_string());
|
||||
|
||||
morphic_lib::solve(program)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ use roc_types::subs::{Content, FlatType, Subs, Variable};
|
|||
use std::collections::HashMap;
|
||||
use ven_pretty::{BoxAllocator, DocAllocator, DocBuilder};
|
||||
|
||||
pub const PRETTY_PRINT_IR_SYMBOLS: bool = false;
|
||||
pub const PRETTY_PRINT_IR_SYMBOLS: bool = true;
|
||||
|
||||
macro_rules! return_on_layout_error {
|
||||
($env:expr, $layout_result:expr) => {
|
||||
|
|
|
@ -7,9 +7,9 @@ app "closure"
|
|||
|
||||
main : Task.Task {} []
|
||||
main = closure1 {}
|
||||
|> Task.after (\_ -> closure2 {})
|
||||
|> Task.after (\_ -> closure3 {})
|
||||
|> Task.after (\_ -> closure4 {})
|
||||
# |> Task.after (\_ -> closure2 {})
|
||||
# |> Task.after (\_ -> closure3 {})
|
||||
# |> Task.after (\_ -> closure4 {})
|
||||
|
||||
# ---
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue