File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
Filter options
Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
Original file line number Diff line number Diff line change @@ -1165,8 +1165,7 @@ impl<'a, 'b> FunctionCompiler<'a, 'b> {
1165
1165
1166
1166
// ----- Merge: Return the final result.
1167
1167
self . builder . switch_to_block ( merge_block) ;
1168
- let final_val = self . builder . block_params ( merge_block) [ 0 ] ;
1169
- final_val
1168
+ self . builder . block_params ( merge_block) [ 0 ]
1170
1169
}
1171
1170
1172
1171
fn compile_ipow ( & mut self , a : Value , b : Value ) -> Value {
Original file line number Diff line number Diff line change @@ -15,7 +15,13 @@ pub enum JitCompileError {
15
15
#[ error( "bad bytecode" ) ]
16
16
BadBytecode ,
17
17
#[ error( "error while compiling to machine code: {0}" ) ]
18
- CraneliftError ( #[ from] ModuleError ) ,
18
+ CraneliftError ( Box < ModuleError > ) ,
19
+ }
20
+
21
+ impl From < ModuleError > for JitCompileError {
22
+ fn from ( err : ModuleError ) -> Self {
23
+ Self :: CraneliftError ( Box :: new ( err) )
24
+ }
19
25
}
20
26
21
27
#[ derive( Debug , thiserror:: Error , Eq , PartialEq ) ]
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ impl StackMachine {
78
78
79
79
pub fn run ( & mut self , code : CodeObject ) {
80
80
let mut oparg_state = OpArgState :: default ( ) ;
81
- code. instructions . iter ( ) . try_for_each ( |& word| {
81
+ let _ = code. instructions . iter ( ) . try_for_each ( |& word| {
82
82
let ( instruction, arg) = oparg_state. get ( word) ;
83
83
self . process_instruction ( instruction, arg, & code. constants , & code. names )
84
84
} ) ;
You can’t perform that action at this time.
0 commit comments