Fix typos caused by find-and-replace
This commit is contained in:
committed by
Dan Gohman
parent
5c320a0d30
commit
3686fc2fc7
@@ -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<Self> {
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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`.
|
||||
|
||||
@@ -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`.
|
||||
|
||||
@@ -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),
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user