mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 23:31:12 +00:00
Add macros for common builtin types
This commit is contained in:
parent
1a6ca4be59
commit
d3c344e4da
2 changed files with 42 additions and 67 deletions
|
@ -1430,3 +1430,31 @@ impl<
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! single_register_integers {
|
||||
() => {
|
||||
Builtin::Int1
|
||||
| Builtin::Int8
|
||||
| Builtin::Int16
|
||||
| Builtin::Int32
|
||||
| Builtin::Int64
|
||||
| Builtin::Usize
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! single_register_floats {
|
||||
() => {
|
||||
// Float16 is explicitly ignored because it is not supported by must hardware and may require special exceptions.
|
||||
// Builtin::Float16 |
|
||||
Builtin::Float32 | Builtin::Float64
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! single_register_builtins {
|
||||
() => {
|
||||
single_register_integers!() | single_register_floats!()
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue