Rename "Stackmap" to "StackMap"

And "stackmap" to "stack_map".

This commit is purely mechanical.
This commit is contained in:
Nick Fitzgerald
2020-08-06 16:41:59 -07:00
parent b5a6daedc4
commit 05bf9ea3f3
44 changed files with 218 additions and 211 deletions

View File

@@ -76,7 +76,7 @@ pub struct StackMapInformation {
pub code_offset: binemit::CodeOffset,
/// The stack map for identifying live GC refs at the GC safepoint.
pub stack_map: binemit::Stackmap,
pub stack_map: binemit::StackMap,
}
/// An error while compiling WebAssembly to machine code.

View File

@@ -208,8 +208,8 @@ struct StackMapSink {
infos: Vec<StackMapInformation>,
}
impl binemit::StackmapSink for StackMapSink {
fn add_stackmap(&mut self, code_offset: binemit::CodeOffset, stack_map: binemit::Stackmap) {
impl binemit::StackMapSink for StackMapSink {
fn add_stack_map(&mut self, code_offset: binemit::CodeOffset, stack_map: binemit::StackMap) {
self.infos.push(StackMapInformation {
code_offset,
stack_map,

View File

@@ -1,7 +1,7 @@
#![doc(hidden)]
pub mod ir {
pub use cranelift_codegen::binemit::{Reloc, Stackmap};
pub use cranelift_codegen::binemit::{Reloc, StackMap};
pub use cranelift_codegen::ir::{
types, AbiParam, ArgumentPurpose, JumpTableOffsets, LibCall, Signature, SourceLoc,
StackSlots, TrapCode, Type, ValueLabel, ValueLoc,

View File

@@ -22,7 +22,7 @@ pub use cranelift_frontend::{FunctionBuilder, FunctionBuilderContext};
pub mod binemit {
pub use cranelift_codegen::binemit::NullTrapSink;
pub(super) use cranelift_codegen::binemit::{Addend, Reloc, RelocSink};
pub use cranelift_codegen::binemit::{CodeOffset, NullStackmapSink, TrapSink};
pub use cranelift_codegen::binemit::{CodeOffset, NullStackMapSink, TrapSink};
}
/// Create a trampoline for invoking a function.
@@ -130,14 +130,14 @@ pub(crate) fn build_trampoline(
let mut code_buf = Vec::new();
let mut reloc_sink = TrampolineRelocSink::default();
let mut trap_sink = binemit::NullTrapSink {};
let mut stackmap_sink = binemit::NullStackmapSink {};
let mut stack_map_sink = binemit::NullStackMapSink {};
context
.compile_and_emit(
isa,
&mut code_buf,
&mut reloc_sink,
&mut trap_sink,
&mut stackmap_sink,
&mut stack_map_sink,
)
.map_err(|error| {
SetupError::Compile(CompileError::Codegen(pretty_error(

View File

@@ -110,7 +110,7 @@ use std::mem;
use std::ops::Deref;
use std::ptr::{self, NonNull};
use std::rc::Rc;
use wasmtime_environ::{ir::Stackmap, StackMapInformation};
use wasmtime_environ::{ir::StackMap, StackMapInformation};
/// An external reference to some opaque data.
///
@@ -780,7 +780,7 @@ struct ModuleStackMaps {
/// A map from a PC in this module (that is a GC safepoint) to its
/// associated stack map.
pc_to_stack_map: Vec<(usize, Rc<Stackmap>)>,
pc_to_stack_map: Vec<(usize, Rc<StackMap>)>,
}
impl StackMapRegistry {
@@ -849,7 +849,7 @@ impl StackMapRegistry {
}
/// Lookup the stack map for the given PC, if any.
pub fn lookup_stack_map(&self, pc: usize) -> Option<Rc<Stackmap>> {
pub fn lookup_stack_map(&self, pc: usize) -> Option<Rc<StackMap>> {
let inner = self.inner.borrow();
let stack_maps = inner.module_stack_maps(pc)?;

View File

@@ -174,14 +174,14 @@ fn make_trampoline(
let mut code_buf: Vec<u8> = Vec::new();
let mut reloc_sink = trampoline::TrampolineRelocSink::default();
let mut trap_sink = binemit::NullTrapSink {};
let mut stackmap_sink = binemit::NullStackmapSink {};
let mut stack_map_sink = binemit::NullStackMapSink {};
context
.compile_and_emit(
isa,
&mut code_buf,
&mut reloc_sink,
&mut trap_sink,
&mut stackmap_sink,
&mut stack_map_sink,
)
.map_err(|error| pretty_error(&context.func, Some(isa), error))
.expect("compile_and_emit");