Rename GlobalInit::GlobalRef to GlobalInit::GetGlobal.
"Ref" is an increasingly overloaded term.
This commit is contained in:
@@ -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),
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -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,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user