[meta] Morph a few pub into pub(crate), and remove dead code;
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use crate::cdsl::formats::{FormatRegistry, InstructionFormatBuilder as Builder};
|
||||
use crate::shared::{entities::EntityRefs, immediates::Immediates};
|
||||
|
||||
pub fn define(imm: &Immediates, entities: &EntityRefs) -> FormatRegistry {
|
||||
pub(crate) fn define(imm: &Immediates, entities: &EntityRefs) -> FormatRegistry {
|
||||
let mut registry = FormatRegistry::new();
|
||||
|
||||
registry.insert(Builder::new("Unary").value());
|
||||
|
||||
@@ -2,7 +2,7 @@ use crate::cdsl::operands::{OperandKind, OperandKindBuilder as Builder};
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
pub struct Immediates {
|
||||
pub(crate) struct Immediates {
|
||||
/// A 64-bit immediate integer operand.
|
||||
///
|
||||
/// This type of immediate integer can interact with SSA values with any IntType type.
|
||||
|
||||
@@ -11,7 +11,7 @@ use crate::cdsl::typevar::{Interval, TypeSetBuilder, TypeVar};
|
||||
use crate::shared::types;
|
||||
use crate::shared::{entities::EntityRefs, immediates::Immediates};
|
||||
|
||||
pub fn define(
|
||||
pub(crate) fn define(
|
||||
all_instructions: &mut AllInstructions,
|
||||
format_registry: &FormatRegistry,
|
||||
imm: &Immediates,
|
||||
|
||||
@@ -6,7 +6,7 @@ use crate::shared::immediates::Immediates;
|
||||
use crate::shared::types::Float::{F32, F64};
|
||||
use crate::shared::types::Int::{I16, I32, I64, I8};
|
||||
|
||||
pub fn define(insts: &InstructionGroup, imm: &Immediates) -> TransformGroups {
|
||||
pub(crate) fn define(insts: &InstructionGroup, imm: &Immediates) -> TransformGroups {
|
||||
let mut narrow = TransformGroupBuilder::new(
|
||||
"narrow",
|
||||
r#"
|
||||
|
||||
@@ -16,7 +16,7 @@ use crate::cdsl::xform::TransformGroups;
|
||||
use crate::shared::entities::EntityRefs;
|
||||
use crate::shared::immediates::Immediates;
|
||||
|
||||
pub struct Definitions {
|
||||
pub(crate) struct Definitions {
|
||||
pub settings: SettingGroup,
|
||||
pub all_instructions: AllInstructions,
|
||||
pub instructions: InstructionGroup,
|
||||
@@ -25,7 +25,7 @@ pub struct Definitions {
|
||||
pub transform_groups: TransformGroups,
|
||||
}
|
||||
|
||||
pub fn define() -> Definitions {
|
||||
pub(crate) fn define() -> Definitions {
|
||||
let mut all_instructions = AllInstructions::new();
|
||||
|
||||
let immediates = Immediates::new();
|
||||
|
||||
Reference in New Issue
Block a user