Rename GlobalInit::GlobalRef to GlobalInit::GetGlobal.

"Ref" is an increasingly overloaded term.
This commit is contained in:
Dan Gohman
2018-12-06 16:00:25 -05:00
parent 566c160c37
commit 30a0890319
2 changed files with 2 additions and 2 deletions

View File

@@ -187,7 +187,7 @@ pub fn parse_global_section(
Operator::F32Const { value } => GlobalInit::F32Const(value.bits()), Operator::F32Const { value } => GlobalInit::F32Const(value.bits()),
Operator::F64Const { value } => GlobalInit::F64Const(value.bits()), Operator::F64Const { value } => GlobalInit::F64Const(value.bits()),
Operator::GetGlobal { global_index } => { Operator::GetGlobal { global_index } => {
GlobalInit::GlobalRef(GlobalIndex::new(global_index as usize)) GlobalInit::GetGlobal(GlobalIndex::new(global_index as usize))
} }
ref s => panic!("unsupported init expr in global section: {:?}", s), ref s => panic!("unsupported init expr in global section: {:?}", s),
}; };

View File

@@ -71,7 +71,7 @@ pub enum GlobalInit {
/// An `f64.const`. /// An `f64.const`.
F64Const(u64), F64Const(u64),
/// A `get_global` of another global. /// A `get_global` of another global.
GlobalRef(GlobalIndex), GetGlobal(GlobalIndex),
///< The global is imported from, and thus initialized by, a different module. ///< The global is imported from, and thus initialized by, a different module.
Import, Import,
} }