From 30a089031919caa8686d3ecefda85e96ec7e98da Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 6 Dec 2018 16:00:25 -0500 Subject: [PATCH] Rename GlobalInit::GlobalRef to GlobalInit::GetGlobal. "Ref" is an increasingly overloaded term. --- lib/wasm/src/sections_translator.rs | 2 +- lib/wasm/src/translation_utils.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/wasm/src/sections_translator.rs b/lib/wasm/src/sections_translator.rs index ea3c6c6525..10ec04880b 100644 --- a/lib/wasm/src/sections_translator.rs +++ b/lib/wasm/src/sections_translator.rs @@ -187,7 +187,7 @@ pub fn parse_global_section( Operator::F32Const { value } => GlobalInit::F32Const(value.bits()), Operator::F64Const { value } => GlobalInit::F64Const(value.bits()), 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), }; diff --git a/lib/wasm/src/translation_utils.rs b/lib/wasm/src/translation_utils.rs index 899523f17a..9dc8a2ffd6 100644 --- a/lib/wasm/src/translation_utils.rs +++ b/lib/wasm/src/translation_utils.rs @@ -71,7 +71,7 @@ pub enum GlobalInit { /// An `f64.const`. F64Const(u64), /// A `get_global` of another global. - GlobalRef(GlobalIndex), + GetGlobal(GlobalIndex), ///< The global is imported from, and thus initialized by, a different module. Import, }