Files
@ 85419b0950c7
Branch filter:
Location: CSY/reowolf/src/macros.rs - annotation
85419b0950c7
856 B
application/rls-services+xml
Rewrote typing to use indices.
Currently it is slower than before, because we do a HashMap lookup
followed up by actually using the index. But it serves as the basis
for a faster type inferencer.
The main goal, however, is to fix the manner in which polymorph
types are determined. The typing queue of functions still needs to
correctly write this data to the type table.
Currently it is slower than before, because we do a HashMap lookup
followed up by actually using the index. But it serves as the basis
for a faster type inferencer.
The main goal, however, is to fix the manner in which polymorph
types are determined. The typing queue of functions still needs to
correctly write this data to the type table.
e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 e406c61b1158 27ba74fbac9f 27ba74fbac9f 27ba74fbac9f 27ba74fbac9f 91c57e99c66e 9485a0862e90 9f8f7a65f90d 9f8f7a65f90d 9f8f7a65f90d 9485a0862e90 91c57e99c66e 6a7d3acfcb5e 6a7d3acfcb5e 6a7d3acfcb5e 6a7d3acfcb5e 91c57e99c66e 91c57e99c66e | macro_rules! enabled_debug_print {
(false, $name:literal, $format:literal) => {};
(false, $name:literal, $format:literal, $($args:expr),*) => {};
(true, $name:literal, $format:literal) => {
println!("[{}] {}", $name, $format)
};
(true, $name:literal, $format:literal, $($args:expr),*) => {
println!("[{}] {}", $name, format!($format, $($args),*))
};
}
/*
Change the definition of these macros to control the logging level statically
*/
macro_rules! log {
(@ENDPT, $logger:expr, $($arg:tt)*) => {{
// if let Some(w) = $logger.line_writer() {
// let _ = writeln!(w, $($arg)*);
// }
}};
($logger:expr, $($arg:tt)*) => {{
#[cfg(not(feature = "no_logging"))]
if let Some(w) = $logger.line_writer() {
let _ = writeln!(w, $($arg)*);
}
}};
}
|