Rename TargetIsa's emit_function to emit_function_to_memory.
This reflects the fact that it takes a concrete `MemoryCodeSink` rather than a `CodeSink` trait object.
This commit is contained in:
@@ -168,7 +168,7 @@ impl Context {
|
|||||||
traps: &mut TrapSink,
|
traps: &mut TrapSink,
|
||||||
) {
|
) {
|
||||||
let _tt = timing::binemit();
|
let _tt = timing::binemit();
|
||||||
isa.emit_function(&self.func, &mut MemoryCodeSink::new(mem, relocs, traps));
|
isa.emit_function_to_memory(&self.func, &mut MemoryCodeSink::new(mem, relocs, traps));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Run the verifier on the function.
|
/// Run the verifier on the function.
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ impl TargetIsa for Isa {
|
|||||||
binemit::emit_inst(func, inst, divert, sink)
|
binemit::emit_inst(func, inst, divert, sink)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn emit_function(&self, func: &ir::Function, sink: &mut MemoryCodeSink) {
|
fn emit_function_to_memory(&self, func: &ir::Function, sink: &mut MemoryCodeSink) {
|
||||||
emit_function(func, binemit::emit_inst, sink)
|
emit_function(func, binemit::emit_inst, sink)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ impl TargetIsa for Isa {
|
|||||||
binemit::emit_inst(func, inst, divert, sink)
|
binemit::emit_inst(func, inst, divert, sink)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn emit_function(&self, func: &ir::Function, sink: &mut MemoryCodeSink) {
|
fn emit_function_to_memory(&self, func: &ir::Function, sink: &mut MemoryCodeSink) {
|
||||||
emit_function(func, binemit::emit_inst, sink)
|
emit_function(func, binemit::emit_inst, sink)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -303,8 +303,8 @@ pub trait TargetIsa: fmt::Display {
|
|||||||
|
|
||||||
/// Emit binary machine code for a single instruction into the `sink` trait object.
|
/// Emit binary machine code for a single instruction into the `sink` trait object.
|
||||||
///
|
///
|
||||||
/// Note that this will call `put*` methods on the trait object via its vtable which is not the
|
/// Note that this will call `put*` methods on the `sink` trait object via its vtable which
|
||||||
/// fastest way of emitting code.
|
/// is not the fastest way of emitting code.
|
||||||
fn emit_inst(
|
fn emit_inst(
|
||||||
&self,
|
&self,
|
||||||
func: &ir::Function,
|
func: &ir::Function,
|
||||||
@@ -316,5 +316,5 @@ pub trait TargetIsa: fmt::Display {
|
|||||||
/// Emit a whole function into memory.
|
/// Emit a whole function into memory.
|
||||||
///
|
///
|
||||||
/// This is more performant than calling `emit_inst` for each instruction.
|
/// This is more performant than calling `emit_inst` for each instruction.
|
||||||
fn emit_function(&self, func: &ir::Function, sink: &mut binemit::MemoryCodeSink);
|
fn emit_function_to_memory(&self, func: &ir::Function, sink: &mut binemit::MemoryCodeSink);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ impl TargetIsa for Isa {
|
|||||||
binemit::emit_inst(func, inst, divert, sink)
|
binemit::emit_inst(func, inst, divert, sink)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn emit_function(&self, func: &ir::Function, sink: &mut MemoryCodeSink) {
|
fn emit_function_to_memory(&self, func: &ir::Function, sink: &mut MemoryCodeSink) {
|
||||||
emit_function(func, binemit::emit_inst, sink)
|
emit_function(func, binemit::emit_inst, sink)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ impl TargetIsa for Isa {
|
|||||||
binemit::emit_inst(func, inst, divert, sink)
|
binemit::emit_inst(func, inst, divert, sink)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn emit_function(&self, func: &ir::Function, sink: &mut MemoryCodeSink) {
|
fn emit_function_to_memory(&self, func: &ir::Function, sink: &mut MemoryCodeSink) {
|
||||||
emit_function(func, binemit::emit_inst, sink)
|
emit_function(func, binemit::emit_inst, sink)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user