public override bool TypeEquals(TypeDefn other) { var o = other as ArrayType; if (o == null) return false; if (!ArrayOf.TypeEquals(o.ArrayOf)) return false; if (Size == null && o.Size == null) return true; if (Size == null || o.Size == null) return false; return true; }
static BuiltinType() { i8 = new IntegerType { Name = "i8", FullyQualifiedName = "i8", SymbolName = "int8_t", Size = 1, Alignment = 1, Signed = true/*, Context = BindingContext.EmptyContext */}; i16 = new IntegerType { Name = "i16", FullyQualifiedName = "i16", SymbolName = "int16_t", Size = 2, Alignment = 2, Signed = true/*, Context = BindingContext.EmptyContext */}; i32 = new IntegerType { Name = "i32", FullyQualifiedName = "i32", SymbolName = "int32_t", Size = 4, Alignment = 4, Signed = true/*, Context = BindingContext.EmptyContext */}; i64 = new IntegerType { Name = "i64", FullyQualifiedName = "i64", SymbolName = "int64_t", Size = 8, Alignment = 8, Signed = true/*, Context = BindingContext.EmptyContext */}; u8 = new IntegerType { Name = "u8", FullyQualifiedName = "u8", SymbolName = "uint8_t", Size = 1, Alignment = 1, Signed = false/*, Context = BindingContext.EmptyContext */}; u16 = new IntegerType { Name = "u16", FullyQualifiedName = "u16", SymbolName = "uint16_t", Size = 2, Alignment = 2, Signed = false/*, Context = BindingContext.EmptyContext */}; u32 = new IntegerType { Name = "u32", FullyQualifiedName = "u32", SymbolName = "uint32_t", Size = 4, Alignment = 4, Signed = false/*, Context = BindingContext.EmptyContext */}; u64 = new IntegerType { Name = "u64", FullyQualifiedName = "u64", SymbolName = "uint64_t", Size = 8, Alignment = 8, Signed = false/*, Context = BindingContext.EmptyContext */}; f32 = new FloatType { Name = "f32", FullyQualifiedName = "f32", SymbolName = "float", Size = 4, Alignment = 4 /*, Context = BindingContext.EmptyContext */}; f64 = new FloatType { Name = "f64", FullyQualifiedName = "f64", SymbolName = "double", Size = 8, Alignment = 8 /*, Context = BindingContext.EmptyContext */}; Void = new VoidType { Name = "void", FullyQualifiedName = "void", SymbolName = "void" /*, Context = BindingContext.EmptyContext */}; Auto = new AutoType(); VoidPtr = new PointerType { PointsTo = Void }; CharPtr = new PointerType { PointsTo = i8 }; }
public override bool TypeEquals(TypeDefn other) { return false; }
public override bool TypeEquals(TypeDefn other) { return other is VoidType; }
public abstract bool TypeEquals(TypeDefn other);
public override bool TypeEquals(TypeDefn other) { return Type.TypeEquals(other); }
public override bool TypeEquals(TypeDefn other) { var o = other as PointerType; if (o == null) return false; return PointsTo.Equals(o.PointsTo); }
public override bool TypeEquals(TypeDefn other) { var o = other as IntegerType; if (o == null) return false; if (Size != o.Size) return false; if (Signed != o.Signed) return false; if (Alignment != o.Alignment) return false; return true; }