From 130746bc856f5c2eb5672cceb0e1304ee2c95b1e Mon Sep 17 00:00:00 2001 From: johannst Date: Wed, 28 Feb 2024 18:32:44 +0000 Subject: deploy: 7cc72737a0140f5f71e9d83d4f87503eb4c7604f --- src/fib/fib.rs.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/fib') diff --git a/src/fib/fib.rs.html b/src/fib/fib.rs.html index f7b4aa6..7c8db91 100644 --- a/src/fib/fib.rs.html +++ b/src/fib/fib.rs.html @@ -1,4 +1,5 @@ -fib.rs - source
1
+fib.rs - source
+    
1
 2
 3
 4
@@ -144,15 +145,15 @@
     // Write out JIT code for visualization.
     // Disassemble for example with `ndisasm -b 64 jit.asm`.
     let code = asm.into_code();
-    std::fs::write("jit.asm", &code).unwrap();
+    std::fs::write("jit.asm", &code).unwrap();
 
     // Move code into executable page and get function pointer to it.
     let mut rt = Runtime::new();
-    let fib = unsafe { rt.add_code::<extern "C" fn(u64) -> u64>(code) };
+    let fib = unsafe { rt.add_code::<extern "C" fn(u64) -> u64>(code) };
 
     for n in 0..15 {
         let fib_jit = fib(n);
-        println!("fib({}) = {}", n, fib_jit);
+        println!("fib({}) = {}", n, fib_jit);
         assert_eq!(fib_jit, fib_rs(n));
     }
 }
-- 
cgit v1.2.3