From 647dd76dba269f89e83a275298e36dc231a92524 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Capucho?= Date: Fri, 5 Feb 2021 22:28:30 +0000 Subject: [PATCH] Moved the ConstantSolver to the glsl frontend --- src/front/glsl/ast.rs | 4 ++-- src/{proc => front/glsl}/constants.rs | 0 src/front/glsl/mod.rs | 1 + src/proc/mod.rs | 2 -- 4 files changed, 3 insertions(+), 4 deletions(-) rename src/{proc => front/glsl}/constants.rs (100%) diff --git a/src/front/glsl/ast.rs b/src/front/glsl/ast.rs index 4ebc2da023..7962f59b37 100644 --- a/src/front/glsl/ast.rs +++ b/src/front/glsl/ast.rs @@ -1,6 +1,6 @@ -use super::error::ErrorKind; +use super::{constants::ConstantSolver, error::ErrorKind}; use crate::{ - proc::{ConstantSolver, ResolveContext, Typifier}, + proc::{ResolveContext, Typifier}, Arena, BinaryOperator, Binding, Constant, Expression, FastHashMap, Function, FunctionArgument, GlobalVariable, Handle, Interpolation, LocalVariable, Module, ShaderStage, Statement, StorageClass, Type, diff --git a/src/proc/constants.rs b/src/front/glsl/constants.rs similarity index 100% rename from src/proc/constants.rs rename to src/front/glsl/constants.rs diff --git a/src/front/glsl/mod.rs b/src/front/glsl/mod.rs index a05a62fd3f..7d3faf3e88 100644 --- a/src/front/glsl/mod.rs +++ b/src/front/glsl/mod.rs @@ -14,6 +14,7 @@ use ast::Program; use lex::Lexer; mod error; pub use error::ParseError; +mod constants; mod functions; mod parser; #[cfg(test)] diff --git a/src/proc/mod.rs b/src/proc/mod.rs index 7aa2ca0568..5dec4285bf 100644 --- a/src/proc/mod.rs +++ b/src/proc/mod.rs @@ -2,7 +2,6 @@ #[cfg(feature = "petgraph")] mod call_graph; -mod constants; mod interface; mod layouter; mod namer; @@ -12,7 +11,6 @@ mod validator; #[cfg(feature = "petgraph")] pub use call_graph::{CallGraph, CallGraphBuilder}; -pub use constants::{ConstantSolver, ConstantSolvingError}; pub use interface::{Interface, Visitor}; pub use layouter::{Alignment, Layouter}; pub use namer::{EntryPointIndex, NameKey, Namer};