Skip to content

Commit

Permalink
Minor Fixes (#542)
Browse files Browse the repository at this point in the history
* Makes error type in declare_builtin_function!() parametric.

* Enables JIT option regardless of feature in CLI.
  • Loading branch information
Lichtso authored Oct 11, 2023
1 parent ae90876 commit 47f57fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ fn main() {
memory
}
};
#[cfg(all(feature = "jit", not(target_os = "windows"), target_arch = "x86_64"))]
#[cfg(all(not(target_os = "windows"), target_arch = "x86_64"))]
if matches.value_of("use") == Some("jit") {
executable.jit_compile().unwrap();
}
Expand Down
4 changes: 2 additions & 2 deletions src/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ macro_rules! declare_builtin_function {
$arg_d:ident : u64,
$arg_e:ident : u64,
$memory_mapping:ident : &mut $MemoryMapping:ty,
) -> Result<u64, Box<dyn std::error::Error>> $rust:tt) => {
) -> Result<u64, $Error:ty> $rust:tt) => {
$(#[$attr])*
pub struct $name {}
impl $name {
Expand All @@ -309,7 +309,7 @@ macro_rules! declare_builtin_function {
$arg_d: u64,
$arg_e: u64,
$memory_mapping: &mut $MemoryMapping,
) -> Result<u64, Box<dyn std::error::Error>> {
) -> Result<u64, $Error> {
$rust
}
/// VM interface
Expand Down

0 comments on commit 47f57fa

Please sign in to comment.