diff --git a/cranelift/docs/compare-llvm.rst b/cranelift/docs/compare-llvm.rst index 4765cdc18b..6afc5ed419 100644 --- a/cranelift/docs/compare-llvm.rst +++ b/cranelift/docs/compare-llvm.rst @@ -110,7 +110,7 @@ Program structure In LLVM IR, the largest representable unit is the *module* which corresponds more or less to a C translation unit. It is a collection of functions and -global valueiables that may contain references to external symbols too. +global values that may contain references to external symbols too. In Cretonne IR, the largest representable unit is the *function*. This is so that functions can easily be compiled in parallel without worrying about diff --git a/cranelift/docs/langref.rst b/cranelift/docs/langref.rst index 707927f454..3736565f94 100644 --- a/cranelift/docs/langref.rst +++ b/cranelift/docs/langref.rst @@ -554,7 +554,7 @@ stack overflow checks in the prologue. the stack pointer has reached or exceeded the limit, generate a trap with a ``stk_ovf`` code. - The global valueiable must be accessible and naturally aligned for a + The global value must be accessible and naturally aligned for a pointer-sized value. Setting `stack_limit` is an alternative way to detect stack overflow, when using @@ -563,12 +563,12 @@ stack overflow checks in the prologue. Global variables ---------------- -A *global valueiable* is an :term:`accessible` object in memory whose address is +A *global value* is an :term:`accessible` object in memory whose address is not known at compile time. The address is computed at runtime by :inst:`global_value`, possibly using information provided by the linker via -relocations. There are multiple kinds of global valueiables using different +relocations. There are multiple kinds of global values using different methods for determining their address. Cretonne does not track the type or even -the size of global valueiables, they are just pointers to non-stack memory. +the size of global values, they are just pointers to non-stack memory. When Cretonne is generating code for a virtual machine environment, globals can be used to access data structures in the VM's runtime. This requires functions @@ -578,26 +578,26 @@ Cretonne functions. .. inst:: GV = vmctx+Offset - Declare a global valueiable in the VM context struct. + Declare a global value in the VM context struct. - This declares a global valueiable whose address is a constant offset from the + This declares a global value whose address is a constant offset from the VM context pointer which is passed as a hidden argument to all functions JIT-compiled for the VM. - Typically, the VM context is a C struct, and the declared global valueiable + Typically, the VM context is a C struct, and the declared global value is a member of the struct. :arg Offset: Byte offset from the VM context pointer to the global variable. :result GV: Global variable. -The address of a global valueiable can also be derived by treating another global +The address of a global value can also be derived by treating another global variable as a struct pointer. This makes it possible to chase pointers into VM runtime data structures. .. inst:: GV = deref(BaseGV)+Offset - Declare a global valueiable in a struct pointed to by BaseGV. + Declare a global value in a struct pointed to by BaseGV. The address of GV can be computed by first loading a pointer from BaseGV and adding Offset to it. @@ -605,7 +605,7 @@ runtime data structures. It is assumed the BaseGV resides in readable memory with the appropriate alignment for storing a pointer. - Chains of ``deref`` global valueiables are possible, but cycles are not + Chains of ``deref`` global values are possible, but cycles are not allowed. They will be caught by the IR verifier. :arg BaseGV: Global variable containing the base pointer. @@ -615,7 +615,7 @@ runtime data structures. .. inst:: GV = [colocated] globalsym name - Declare a global valueiable at a symbolic address. + Declare a global value at a symbolic address. The address of GV is symbolic and will be assigned a relocation, so that it can be resolved by a later linking phase. @@ -701,7 +701,7 @@ trap when accessed. address space reserved for the heap, not including the guard pages. :arg GuardBytes: Size of the guard pages in bytes. -When the base is a global valueiable, it must be :term:`accessible` and naturally +When the base is a global value, it must be :term:`accessible` and naturally aligned for a pointer value. The ``reserved_reg`` option is not yet implemented. @@ -711,7 +711,7 @@ Dynamic heaps A *dynamic heap* can be relocated to a different base address when it is resized, and its bound can move dynamically. The guard pages move when the heap -is resized. The bound of a dynamic heap is stored in a global valueiable. +is resized. The bound of a dynamic heap is stored in a global value. .. inst:: H = dynamic Base, min MinBytes, bound BoundGV, guard GuardBytes @@ -724,7 +724,7 @@ is resized. The bound of a dynamic heap is stored in a global valueiable. :arg BoundGV: Global variable containing the current heap bound in bytes. :arg GuardBytes: Size of the guard pages in bytes. -When the base is a global valueiable, it must be :term:`accessible` and naturally +When the base is a global value, it must be :term:`accessible` and naturally aligned for a pointer value. The ``reserved_reg`` option is not yet implemented. diff --git a/cranelift/docs/metaref.rst b/cranelift/docs/metaref.rst index 70cc5ecc98..357f1f1fde 100644 --- a/cranelift/docs/metaref.rst +++ b/cranelift/docs/metaref.rst @@ -15,7 +15,7 @@ The meta language descriptions are Python modules under the steps: 1. The Python modules are imported. This has the effect of building static data - structures in global valueiables in the modules. These static data structures + structures in global values in the modules. These static data structures in the :mod:`base` and :mod:`isa` packages use the classes in the :mod:`cdsl` package to describe instruction sets and other properties. @@ -81,7 +81,7 @@ open :class:`InstructionGroup`. :members: The basic Cretonne instruction set described in :doc:`langref` is defined by the -Python module :mod:`base.instructions`. This module has a global valueiable +Python module :mod:`base.instructions`. This module has a global value :data:`base.instructions.GROUP` which is an :class:`InstructionGroup` instance containing all the base instructions. diff --git a/cranelift/filetests/parser/memory.cton b/cranelift/filetests/parser/memory.cton index 8e01eb8cae..6df76ce561 100644 --- a/cranelift/filetests/parser/memory.cton +++ b/cranelift/filetests/parser/memory.cton @@ -25,7 +25,7 @@ ebb0: return v1 } -; Refer to a global valueiable before it's been declared. +; Refer to a global value before it's been declared. function %backref() -> i32 { gv1 = deref(gv2)-32 ; check: gv1 = deref(gv2)-32 diff --git a/lib/codegen/meta/base/entities.py b/lib/codegen/meta/base/entities.py index e8915a0f79..a91d894e04 100644 --- a/lib/codegen/meta/base/entities.py +++ b/lib/codegen/meta/base/entities.py @@ -16,7 +16,7 @@ ebb = EntityRefKind( #: A reference to a stack slot declared in the function preamble. stack_slot = EntityRefKind('stack_slot', 'A stack slot.') -#: A reference to a global valueiable. +#: A reference to a global value. global_value = EntityRefKind('global_value', 'A global value.') #: A reference to a function sugnature declared in the function preamble. diff --git a/lib/codegen/meta/base/formats.py b/lib/codegen/meta/base/formats.py index 1c0d7284f2..90adc83176 100644 --- a/lib/codegen/meta/base/formats.py +++ b/lib/codegen/meta/base/formats.py @@ -79,5 +79,5 @@ CondTrap = InstructionFormat(VALUE, trapcode) IntCondTrap = InstructionFormat(intcc, VALUE, trapcode) FloatCondTrap = InstructionFormat(floatcc, VALUE, trapcode) -# Finally extract the names of global valueiables in this module. +# Finally extract the names of global values in this module. InstructionFormat.extract_names(globals()) diff --git a/lib/codegen/meta/base/settings.py b/lib/codegen/meta/base/settings.py index c3f9ae182b..0abeab59e4 100644 --- a/lib/codegen/meta/base/settings.py +++ b/lib/codegen/meta/base/settings.py @@ -53,7 +53,7 @@ call_conv = EnumSetting( # Note that Cretonne doesn't currently need an is_pie flag, because PIE is just # PIC where symbols can't be pre-empted, which can be expressed with the -# `colocated` flag on external functions and global valueiables. +# `colocated` flag on external functions and global values. is_pic = BoolSetting("Enable Position-Independent Code generation") colocated_libcalls = BoolSetting( diff --git a/lib/codegen/meta/cdsl/formats.py b/lib/codegen/meta/cdsl/formats.py index ebee96281e..a1e84e4737 100644 --- a/lib/codegen/meta/cdsl/formats.py +++ b/lib/codegen/meta/cdsl/formats.py @@ -208,7 +208,7 @@ class InstructionFormat(object): """ Given a dict mapping name -> object as returned by `globals()`, find all the InstructionFormat objects and set their name from the dict key. - This is used to name a bunch of global valueiables in a module. + This is used to name a bunch of global values in a module. """ for name, obj in globs.items(): if isinstance(obj, InstructionFormat): diff --git a/lib/codegen/meta/cdsl/registers.py b/lib/codegen/meta/cdsl/registers.py index 4dccbc808a..0c96583db0 100644 --- a/lib/codegen/meta/cdsl/registers.py +++ b/lib/codegen/meta/cdsl/registers.py @@ -365,7 +365,7 @@ class RegClass(object): """ Given a dict mapping name -> object as returned by `globals()`, find all the RegClass objects and set their name from the dict key. - This is used to name a bunch of global valueiables in a module. + This is used to name a bunch of global values in a module. """ for name, obj in globs.items(): if isinstance(obj, RegClass): diff --git a/lib/codegen/src/ir/entities.rs b/lib/codegen/src/ir/entities.rs index d6461d47df..847a9ba925 100644 --- a/lib/codegen/src/ir/entities.rs +++ b/lib/codegen/src/ir/entities.rs @@ -82,13 +82,13 @@ impl StackSlot { } } -/// An opaque reference to a global valueiable. +/// An opaque reference to a global value. #[derive(Copy, Clone, PartialEq, Eq, Hash)] pub struct GlobalValue(u32); entity_impl!(GlobalValue, "gv"); impl GlobalValue { - /// Create a new global valueiable reference from its number. + /// Create a new global value reference from its number. /// /// This method is for use by the parser. pub fn with_number(n: u32) -> Option { diff --git a/lib/codegen/src/ir/extfunc.rs b/lib/codegen/src/ir/extfunc.rs index 98b6e4fb40..00ac6da86f 100644 --- a/lib/codegen/src/ir/extfunc.rs +++ b/lib/codegen/src/ir/extfunc.rs @@ -284,7 +284,7 @@ pub enum ArgumentPurpose { /// A VM context pointer. /// /// This is a pointer to a context struct containing details about the current sandbox. It is - /// used as a base pointer for `vmctx` global valueiables. + /// used as a base pointer for `vmctx` global values. VMContext, /// A signature identifier. diff --git a/lib/codegen/src/ir/function.rs b/lib/codegen/src/ir/function.rs index 5d59e6f3ce..e060c94029 100644 --- a/lib/codegen/src/ir/function.rs +++ b/lib/codegen/src/ir/function.rs @@ -145,7 +145,7 @@ impl Function { self.dfg.ext_funcs.push(data) } - /// Declares a global valueiable accessible to the function. + /// Declares a global value accessible to the function. pub fn create_global_value(&mut self, data: GlobalValueData) -> GlobalValue { self.global_values.push(data) } diff --git a/lib/codegen/src/ir/globalvalue.rs b/lib/codegen/src/ir/globalvalue.rs index 5d068a7583..26c0e48434 100644 --- a/lib/codegen/src/ir/globalvalue.rs +++ b/lib/codegen/src/ir/globalvalue.rs @@ -4,7 +4,7 @@ use ir::immediates::Offset32; use ir::{ExternalName, GlobalValue}; use std::fmt; -/// Information about a global valueiable declaration. +/// Information about a global value declaration. #[derive(Clone)] pub enum GlobalValueData { /// Variable is part of the VM context struct, it's address is a constant offset from the VM @@ -14,13 +14,13 @@ pub enum GlobalValueData { offset: Offset32, }, - /// Variable is part of a struct pointed to by another global valueiable. + /// Variable is part of a struct pointed to by another global value. /// - /// The `base` global valueiable is assumed to contain a pointer to a struct. This global + /// The `base` global value is assumed to contain a pointer to a struct. This global /// variable lives at an offset into the struct. The memory must be accessible, and /// naturally aligned to hold a pointer value. Deref { - /// The base pointer global valueiable. + /// The base pointer global value. base: GlobalValue, /// Byte offset to be added to the pointer loaded from `base`. diff --git a/lib/codegen/src/ir/globalvar.rs b/lib/codegen/src/ir/globalvar.rs index 5d068a7583..26c0e48434 100644 --- a/lib/codegen/src/ir/globalvar.rs +++ b/lib/codegen/src/ir/globalvar.rs @@ -4,7 +4,7 @@ use ir::immediates::Offset32; use ir::{ExternalName, GlobalValue}; use std::fmt; -/// Information about a global valueiable declaration. +/// Information about a global value declaration. #[derive(Clone)] pub enum GlobalValueData { /// Variable is part of the VM context struct, it's address is a constant offset from the VM @@ -14,13 +14,13 @@ pub enum GlobalValueData { offset: Offset32, }, - /// Variable is part of a struct pointed to by another global valueiable. + /// Variable is part of a struct pointed to by another global value. /// - /// The `base` global valueiable is assumed to contain a pointer to a struct. This global + /// The `base` global value is assumed to contain a pointer to a struct. This global /// variable lives at an offset into the struct. The memory must be accessible, and /// naturally aligned to hold a pointer value. Deref { - /// The base pointer global valueiable. + /// The base pointer global value. base: GlobalValue, /// Byte offset to be added to the pointer loaded from `base`. diff --git a/lib/codegen/src/ir/heap.rs b/lib/codegen/src/ir/heap.rs index 812ffa01d3..4bb0b69166 100644 --- a/lib/codegen/src/ir/heap.rs +++ b/lib/codegen/src/ir/heap.rs @@ -29,7 +29,7 @@ pub enum HeapBase { /// This feature is not yet implemented. ReservedReg, - /// The heap base is in a global valueiable. The variable must be accessible and naturally + /// The heap base is in a global value. The variable must be accessible and naturally /// aligned for a pointer. GlobalValue(GlobalValue), } diff --git a/lib/codegen/src/legalizer/globalvalue.rs b/lib/codegen/src/legalizer/globalvalue.rs index fbea36b9e6..c6f1a1d930 100644 --- a/lib/codegen/src/legalizer/globalvalue.rs +++ b/lib/codegen/src/legalizer/globalvalue.rs @@ -1,14 +1,14 @@ -//! Legalization of global valueiables. +//! Legalization of global values. //! //! This module exports the `expand_global_value` function which transforms a `global_value` -//! instruction into code that depends on the kind of global valueiable referenced. +//! instruction into code that depends on the kind of global value referenced. use cursor::{Cursor, FuncCursor}; use flowgraph::ControlFlowGraph; use ir::{self, InstBuilder}; use isa::TargetIsa; -/// Expand a `global_value` instruction according to the definition of the global valueiable. +/// Expand a `global_value` instruction according to the definition of the global value. pub fn expand_global_value( inst: ir::Inst, func: &mut ir::Function, @@ -46,7 +46,7 @@ fn vmctx_addr(inst: ir::Inst, func: &mut ir::Function, offset: i64) { /// Expand a `global_value` instruction for a deref global. fn deref_addr(inst: ir::Inst, func: &mut ir::Function, base: ir::GlobalValue, offset: i64) { - // We need to load a pointer from the `base` global valueiable, so insert a new `global_value` + // We need to load a pointer from the `base` global value, so insert a new `global_value` // instruction. This depends on the iterative legalization loop. Note that the IR verifier // detects any cycles in the `deref` globals. let ptr_ty = func.dfg.value_type(func.dfg.first_result(inst)); diff --git a/lib/codegen/src/regalloc/solver.rs b/lib/codegen/src/regalloc/solver.rs index 779396cc57..1140aa7536 100644 --- a/lib/codegen/src/regalloc/solver.rs +++ b/lib/codegen/src/regalloc/solver.rs @@ -920,7 +920,7 @@ impl Solver { Some(reg) => reg, None => { // If `v` must avoid global interference, there is not point in requesting - // live registers be diverted. We need to make it a non-global valueiable. + // live registers be diverted. We need to make it a non-global value. if v.is_global && gregs.iter(rc).next().is_none() { return Err(SolverError::Global(v.value)); } else { diff --git a/lib/codegen/src/verifier/mod.rs b/lib/codegen/src/verifier/mod.rs index 98766e233d..b25d770c3f 100644 --- a/lib/codegen/src/verifier/mod.rs +++ b/lib/codegen/src/verifier/mod.rs @@ -168,7 +168,7 @@ impl<'a> Verifier<'a> { } } - // Check for cycles in the global valueiable declarations. + // Check for cycles in the global value declarations. fn verify_global_values(&self) -> VerifierResult<()> { let mut seen = SparseSet::new(); @@ -415,7 +415,7 @@ impl<'a> Verifier<'a> { fn verify_global_value(&self, inst: Inst, gv: GlobalValue) -> VerifierResult<()> { if !self.func.global_values.is_valid(gv) { - err!(inst, "invalid global valueiable {}", gv) + err!(inst, "invalid global value {}", gv) } else { Ok(()) } diff --git a/lib/frontend/src/frontend.rs b/lib/frontend/src/frontend.rs index fc2280623a..89d933d2ae 100644 --- a/lib/frontend/src/frontend.rs +++ b/lib/frontend/src/frontend.rs @@ -377,7 +377,7 @@ where self.func.import_function(data) } - /// Declares a global valueiable accessible to the function. + /// Declares a global value accessible to the function. pub fn create_global_value(&mut self, data: GlobalValueData) -> GlobalValue { self.func.create_global_value(data) } diff --git a/lib/module/src/data_context.rs b/lib/module/src/data_context.rs index 69cca4b5fe..9ecd29399f 100644 --- a/lib/module/src/data_context.rs +++ b/lib/module/src/data_context.rs @@ -114,7 +114,7 @@ impl DataContext { self.description.function_decls.push(name) } - /// Declares a global valueiable import. + /// Declares a global value import. /// /// TODO: Rename to import_data? /// diff --git a/lib/reader/src/parser.rs b/lib/reader/src/parser.rs index 996c7af6ca..7e85a8cc00 100644 --- a/lib/reader/src/parser.rs +++ b/lib/reader/src/parser.rs @@ -139,7 +139,7 @@ impl<'a> Context<'a> { } } - // Allocate a global valueiable slot. + // Allocate a global value slot. fn add_gv( &mut self, gv: GlobalValue, @@ -156,10 +156,10 @@ impl<'a> Context<'a> { self.map.def_gv(gv, loc) } - // Resolve a reference to a global valueiable. + // Resolve a reference to a global value. fn check_gv(&self, gv: GlobalValue, loc: &Location) -> ParseResult<()> { if !self.map.contains_gv(gv) { - err!(loc, "undefined global valueiable {}", gv) + err!(loc, "undefined global value {}", gv) } else { Ok(()) } @@ -401,7 +401,7 @@ impl<'a> Parser<'a> { err!(self.loc, err_msg) } - // Match and consume a global valueiable reference. + // Match and consume a global value reference. fn match_gv(&mut self, err_msg: &str) -> ParseResult { if let Some(Token::GlobalValue(gv)) = self.token() { self.consume(); @@ -1077,7 +1077,7 @@ impl<'a> Parser<'a> { Ok((ss, data)) } - // Parse a global valueiable decl. + // Parse a global value decl. // // global-var-decl ::= * GlobalValue(gv) "=" global-var-desc // global-var-desc ::= "vmctx" offset32 @@ -1085,28 +1085,19 @@ impl<'a> Parser<'a> { // | globalsym ["colocated"] name // fn parse_global_value_decl(&mut self) -> ParseResult<(GlobalValue, GlobalValueData)> { - let gv = self.match_gv("expected global valueiable number: gv«n»")?; + let gv = self.match_gv("expected global value number: gv«n»")?; - self.match_token( - Token::Equal, - "expected '=' in global valueiable declaration", - )?; + self.match_token(Token::Equal, "expected '=' in global value declaration")?; - let data = match self.match_any_identifier("expected global valueiable kind")? { + let data = match self.match_any_identifier("expected global value kind")? { "vmctx" => { let offset = self.optional_offset32()?; GlobalValueData::VMContext { offset } } "deref" => { - self.match_token( - Token::LPar, - "expected '(' in 'deref' global valueiable decl", - )?; - let base = self.match_gv("expected global valueiable: gv«n»")?; - self.match_token( - Token::RPar, - "expected ')' in 'deref' global valueiable decl", - )?; + self.match_token(Token::LPar, "expected '(' in 'deref' global value decl")?; + let base = self.match_gv("expected global value: gv«n»")?; + self.match_token(Token::RPar, "expected ')' in 'deref' global value decl")?; let offset = self.optional_offset32()?; GlobalValueData::Deref { base, offset } } @@ -1115,7 +1106,7 @@ impl<'a> Parser<'a> { let name = self.parse_external_name()?; GlobalValueData::Sym { name, colocated } } - other => return err!(self.loc, "Unknown global valueiable kind '{}'", other), + other => return err!(self.loc, "Unknown global value kind '{}'", other), }; // Collect any trailing comments. @@ -1150,7 +1141,7 @@ impl<'a> Parser<'a> { Some(Token::GlobalValue(base_num)) => { let base_gv = match GlobalValue::with_number(base_num) { Some(gv) => gv, - None => return err!(self.loc, "invalid global valueiable number for heap base"), + None => return err!(self.loc, "invalid global value number for heap base"), }; HeapBase::GlobalValue(base_gv) } @@ -1327,7 +1318,7 @@ impl<'a> Parser<'a> { fn parse_stack_limit_decl(&mut self) -> ParseResult { self.consume(); self.match_token(Token::Equal, "expected '=' in stack limit declaration")?; - let gv = self.match_gv("expected global valueiable")?; + let gv = self.match_gv("expected global value")?; Ok(gv) } @@ -1904,7 +1895,7 @@ impl<'a> Parser<'a> { imm: self.match_bool("expected immediate boolean operand")?, }, InstructionFormat::UnaryGlobalValue => { - let gv = self.match_gv("expected global valueiable")?; + let gv = self.match_gv("expected global value")?; ctx.check_gv(gv, &self.loc)?; InstructionData::UnaryGlobalValue { opcode, diff --git a/lib/reader/src/sourcemap.rs b/lib/reader/src/sourcemap.rs index 1bb6231596..814baf8e1b 100644 --- a/lib/reader/src/sourcemap.rs +++ b/lib/reader/src/sourcemap.rs @@ -36,7 +36,7 @@ impl SourceMap { self.locations.contains_key(&ss.into()) } - /// Look up a global valueiable entity. + /// Look up a global value entity. pub fn contains_gv(&self, gv: GlobalValue) -> bool { self.locations.contains_key(&gv.into()) } @@ -154,7 +154,7 @@ impl SourceMap { self.def_entity(entity.into(), loc) } - /// Define the global valueiable `entity`. + /// Define the global value `entity`. pub fn def_gv(&mut self, entity: GlobalValue, loc: &Location) -> ParseResult<()> { self.def_entity(entity.into(), loc) } diff --git a/lib/wasm/src/environ/spec.rs b/lib/wasm/src/environ/spec.rs index 848f29747c..4d97a34cc5 100644 --- a/lib/wasm/src/environ/spec.rs +++ b/lib/wasm/src/environ/spec.rs @@ -9,7 +9,7 @@ use translation_utils::{FunctionIndex, Global, GlobalIndex, Memory, MemoryIndex, Table, TableIndex}; use wasmparser::BinaryReaderError; -/// The value of a WebAssembly global valueiable. +/// The value of a WebAssembly global value. #[derive(Clone, Copy)] pub enum GlobalValue { /// This is a constant global with a value known at compile time. @@ -17,9 +17,9 @@ pub enum GlobalValue { /// This is a variable in memory that should be referenced as a `GlobalValue`. Memory { - /// Which global valueiable should be referenced. + /// Which global value should be referenced. gv: ir::GlobalValue, - /// The global valueiable's type. + /// The global value's type. ty: ir::Type, }, } @@ -88,12 +88,12 @@ pub trait FuncEnvironment { ir::Type::int(u16::from(self.triple().pointer_width().unwrap().bits())).unwrap() } - /// Set up the necessary preamble definitions in `func` to access the global valueiable + /// Set up the necessary preamble definitions in `func` to access the global value /// identified by `index`. /// /// The index space covers both imported globals and globals defined by the module. /// - /// Return the global valueiable reference that should be used to access the global and the + /// Return the global value reference that should be used to access the global and the /// WebAssembly type of the global. fn make_global(&mut self, func: &mut ir::Function, index: GlobalIndex) -> GlobalValue; diff --git a/lib/wasm/src/sections_translator.rs b/lib/wasm/src/sections_translator.rs index d3dc64496a..5fec99afb3 100644 --- a/lib/wasm/src/sections_translator.rs +++ b/lib/wasm/src/sections_translator.rs @@ -4,7 +4,7 @@ //! The code of theses helper function is straightforward since it is only about reading metadata //! about linear memories, tables, globals, etc. and storing them for later use. //! -//! The special case of the initialize expressions for table elements offsets or global valueiables +//! The special case of the initialize expressions for table elements offsets or global values //! is handled, according to the semantics of WebAssembly, to only specific expressions that are //! interpreted on the fly. use cretonne_codegen::ir::{self, AbiParam, Signature}; diff --git a/lib/wasm/src/state.rs b/lib/wasm/src/state.rs index 372cd297b7..beba6e666f 100644 --- a/lib/wasm/src/state.rs +++ b/lib/wasm/src/state.rs @@ -134,7 +134,7 @@ pub struct TranslationState { pub control_stack: Vec, pub reachable: bool, - // Map of global valueiables that have already been created by `FuncEnvironment::make_global`. + // Map of global values that have already been created by `FuncEnvironment::make_global`. globals: HashMap, // Map of heaps that have been created by `FuncEnvironment::make_heap`. @@ -272,7 +272,7 @@ impl TranslationState { /// Methods for handling entity references. impl TranslationState { - /// Get the `GlobalValue` reference that should be used to access the global valueiable `index`. + /// Get the `GlobalValue` reference that should be used to access the global value `index`. /// Create the reference if necessary. /// Also return the WebAssembly type of the global. pub fn get_global( diff --git a/lib/wasm/src/translation_utils.rs b/lib/wasm/src/translation_utils.rs index 9257870264..3c16d0897e 100644 --- a/lib/wasm/src/translation_utils.rs +++ b/lib/wasm/src/translation_utils.rs @@ -7,7 +7,7 @@ use wasmparser; pub type FunctionIndex = usize; /// Index of a table (imported or defined) inside the WebAssembly module. pub type TableIndex = usize; -/// Index of a global valueiable (imported or defined) inside the WebAssembly module. +/// Index of a global value (imported or defined) inside the WebAssembly module. pub type GlobalIndex = usize; /// Index of a linear memory (imported or defined) inside the WebAssembly module. pub type MemoryIndex = usize;