Cranelift: Remove ABICallee trait (#4701)
* Cranelift: Remove `ABICallee` trait It has only one implementation: the `ABICalleeImpl` struct. By using that directly we can avoid unnecessary layers of generics and abstractions as well as a couple `Box`es that were previously putting the single implementation into a `Box<dyn>`. * Cranelift: Rename `ABICalleeImpl` to `AbiCallee` * Fix comments as per review * Rename `AbiCallee` to `Callee`
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
//! S390x ISA: binary code emission.
|
||||
|
||||
use crate::binemit::{Reloc, StackMap};
|
||||
use crate::ir::TrapCode;
|
||||
use crate::ir::{MemFlags, RelSourceLoc};
|
||||
use crate::ir::{MemFlags, RelSourceLoc, TrapCode};
|
||||
use crate::isa::s390x::abi::S390xMachineDeps;
|
||||
use crate::isa::s390x::inst::*;
|
||||
use crate::isa::s390x::settings as s390x_settings;
|
||||
use crate::machinst::reg::count_operands;
|
||||
@@ -1260,7 +1260,7 @@ pub struct EmitState {
|
||||
}
|
||||
|
||||
impl MachInstEmitState<Inst> for EmitState {
|
||||
fn new(abi: &dyn ABICallee<I = Inst>) -> Self {
|
||||
fn new(abi: &Callee<S390xMachineDeps>) -> Self {
|
||||
EmitState {
|
||||
virtual_sp_offset: 0,
|
||||
initial_sp_offset: abi.frame_size() as i64,
|
||||
|
||||
Reference in New Issue
Block a user