mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
REVERT ME - add some debug info
This commit is contained in:
parent
58e672749c
commit
36178b5f59
4 changed files with 17 additions and 3 deletions
|
@ -4147,6 +4147,9 @@ pub fn build_procedures<'a, 'ctx, 'env>(
|
|||
let captures_niche = CapturesNiche::no_niche();
|
||||
|
||||
for (symbol, top_level) in glue_layouts.getters.iter().copied() {
|
||||
dbg!(symbol, unsafe {
|
||||
std::mem::transmute::<Symbol, u64>(symbol)
|
||||
});
|
||||
let it = top_level.arguments.iter().copied();
|
||||
let bytes =
|
||||
roc_alias_analysis::func_name_bytes_help(symbol, it, captures_niche, &top_level.result);
|
||||
|
@ -4180,7 +4183,7 @@ pub fn build_procedures<'a, 'ctx, 'env>(
|
|||
getter_fn,
|
||||
top_level.arguments,
|
||||
top_level.result,
|
||||
getter_name,
|
||||
dbg!(getter_name),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -190,7 +190,7 @@ pub fn load_types(
|
|||
// the structs and fields.
|
||||
//
|
||||
// Store them as strings, because symbols won't be useful to glue generators!
|
||||
names.push(name.as_str(&interns).to_string());
|
||||
names.push(dbg!(name.as_str(&interns)).to_string());
|
||||
}
|
||||
|
||||
glue_procs_by_layout.insert(layout, names.into_bump_slice());
|
||||
|
|
|
@ -16,3 +16,8 @@
|
|||
#![allow(clippy::redundant_static_lifetimes)]
|
||||
#![allow(clippy::needless_borrow)]
|
||||
#![allow(clippy::clone_on_copy)]
|
||||
|
||||
type Op_StderrWrite = roc_std::RocStr;
|
||||
type Op_StdoutWrite = roc_std::RocStr;
|
||||
type TODO_roc_function_69 = roc_std::RocStr;
|
||||
type TODO_roc_function_70 = roc_std::RocStr;
|
||||
|
|
|
@ -97,6 +97,8 @@ pub unsafe extern "C" fn roc_send_signal(pid: libc::pid_t, sig: libc::c_int) ->
|
|||
pub extern "C" fn rust_main() -> i32 {
|
||||
use glue::discriminant_Op::*;
|
||||
|
||||
println!("Let's do things!");
|
||||
|
||||
let op: Op = unsafe {
|
||||
let mut mem = MaybeUninit::uninit();
|
||||
|
||||
|
@ -105,11 +107,13 @@ pub extern "C" fn rust_main() -> i32 {
|
|||
mem.assume_init()
|
||||
};
|
||||
|
||||
match op.discriminant() {
|
||||
match dbg!(op.discriminant()) {
|
||||
StdoutWrite => {
|
||||
let output: RocStr = unsafe { op.get_StdoutWrite_0() };
|
||||
// let _next = unsafe { op.get_StdoutWrite_1() };
|
||||
|
||||
dbg!(&output);
|
||||
|
||||
if let Err(e) = std::io::stdout().write_all(output.as_bytes()) {
|
||||
panic!("Writing to stdout failed! {:?}", e);
|
||||
}
|
||||
|
@ -125,6 +129,8 @@ pub extern "C" fn rust_main() -> i32 {
|
|||
Done => {}
|
||||
}
|
||||
|
||||
println!("Done!");
|
||||
|
||||
// Exit code
|
||||
0
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue