rename validate_literal to check_literal_value

This commit is contained in:
Jim Blandy authored and Teodor Tanasoaia committed 2023-10-19 17:55:04 +02:00
1 parent 860c200469
commit 1bb84aef0b
3 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -1231,7 +1231,7 @@ impl<'a> ConstantEvaluator<'a> {
// expression at a time, `Compose` expressions can only refer to other
// expressions, and `ZeroValue` expressions are always okay.
if let Expression::Literal(literal) = expr {
crate::valid::validate_literal(literal)?;
crate::valid::check_literal_value(literal)?;
}
if let Some(FunctionLocalData {
+3 -3
View File
@@ -188,7 +188,7 @@ impl super::Validator {
match gctx.const_expressions[handle] {
E::Literal(literal) => {
validate_literal(literal)?;
check_literal_value(literal)?;
}
E::Constant(_) | E::ZeroValue(_) => {}
E::Compose { ref components, ty } => {
@@ -343,7 +343,7 @@ impl super::Validator {
ShaderStages::all()
}
E::Literal(literal) => {
validate_literal(literal)?;
check_literal_value(literal)?;
ShaderStages::all()
}
E::Constant(_) | E::ZeroValue(_) => ShaderStages::all(),
@@ -1565,7 +1565,7 @@ impl super::Validator {
}
}
pub fn validate_literal(literal: crate::Literal) -> Result<(), LiteralError> {
pub fn check_literal_value(literal: crate::Literal) -> Result<(), LiteralError> {
let is_nan = match literal {
crate::Literal::F64(v) => v.is_nan(),
crate::Literal::F32(v) => v.is_nan(),
+1 -1
View File
@@ -24,7 +24,7 @@ use std::ops;
use crate::span::{AddSpan as _, WithSpan};
pub use analyzer::{ExpressionInfo, FunctionInfo, GlobalUse, Uniformity, UniformityRequirements};
pub use compose::ComposeError;
pub use expression::{validate_literal, LiteralError};
pub use expression::{check_literal_value, LiteralError};
pub use expression::{ConstExpressionError, ExpressionError};
pub use function::{CallError, FunctionError, LocalVariableError};
pub use interface::{EntryPointError, GlobalVariableError, VaryingError};