Rename GlobalVarData::VmCtx for consistency with ArgumentPurpose::VMContext.

This commit is contained in:
Dan Gohman
2018-04-17 09:29:45 -07:00
parent 85662fbca9
commit 635d14c251
4 changed files with 6 additions and 6 deletions

View File

@@ -9,7 +9,7 @@ use std::fmt;
pub enum GlobalVarData {
/// Variable is part of the VM context struct, it's address is a constant offset from the VM
/// context pointer.
VmCtx {
VMContext {
/// Offset from the `vmctx` pointer to this global.
offset: Offset32,
},
@@ -54,7 +54,7 @@ impl GlobalVarData {
impl fmt::Display for GlobalVarData {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GlobalVarData::VmCtx { offset } => write!(f, "vmctx{}", offset),
GlobalVarData::VMContext { offset } => write!(f, "vmctx{}", offset),
GlobalVarData::Deref { base, offset } => write!(f, "deref({}){}", base, offset),
GlobalVarData::Sym {
ref name,

View File

@@ -25,7 +25,7 @@ pub fn expand_global_addr(
};
match func.global_vars[gv] {
ir::GlobalVarData::VmCtx { offset } => vmctx_addr(inst, func, offset.into()),
ir::GlobalVarData::VMContext { offset } => vmctx_addr(inst, func, offset.into()),
ir::GlobalVarData::Deref { base, offset } => deref_addr(inst, func, base, offset.into()),
ir::GlobalVarData::Sym { .. } => globalsym(inst, func, gv),
}