Excise hardcoded Vec4F

...unit tests need some work
2 files changed, 3 insertions(+), 14 deletions(-)

M src/compile/mod.rs
M src/verify.rs
M src/compile/mod.rs +0 -12
@@ 74,7 74,6 @@ impl CContext {
         // unit testing easier.
         use verify::TypeDef;
         s.add_type(&TypeDef::F32);
-        s.add_type(&TypeDef::Vec4F);
         s.add_type(&TypeDef::VecN(2));
         s.add_type(&TypeDef::VecN(3));
         s.add_type(&TypeDef::VecN(4));

          
@@ 237,17 236,6 @@ impl CContext {
                     .entry(typedef.clone())
                     .or_insert_with(|| b.type_float(32))
             }
-            TypeDef::Vec4F => {
-                if let Some(val) = self.typetable.get(typedef) {
-                    // Vec4F already exists
-                    *val
-                } else {
-                    let f_type_word = self.add_type(&verify::TypeDef::F32);
-                    let vec_type_word = self.b.type_vector(f_type_word, 4);
-                    self.typetable.insert(typedef.clone(), vec_type_word);
-                    vec_type_word
-                }
-            }
             TypeDef::VecN(n) => {
                 assert!(*n <= 4, "Vector of length {}, really?  Try <= 4", n);
                 if let Some(val) = self.typetable.get(typedef) {

          
M src/verify.rs +3 -2
@@ 74,7 74,6 @@ use crate::Error;
 #[derive(Clone, Debug, PartialEq, Eq, Hash)]
 pub enum TypeDef {
     F32,
-    Vec4F,
     /// For now vec's only contain f32's
     VecN(u32),
     Bool,

          
@@ 114,8 113,10 @@ impl Default for VContext {
         {
             // Default types.
             types.insert("F32".into(), TypeDef::F32);
-            types.insert("Vec4F".into(), TypeDef::Vec4F);
             types.insert("Bool".into(), TypeDef::Bool);
+            types.insert("Vec2".into(), TypeDef::VecN(2));
+            types.insert("Vec3".into(), TypeDef::VecN(3));
+            types.insert("Vec4".into(), TypeDef::VecN(4));
             types.insert("()".into(), TypeDef::Unit);
             types.insert(
                 "Struct4F".into(),