public Variable(Type type) { Type = type; Index = -1; Name = string.Empty; }
public static Type Find(Type c, List<Package> importedPackages) { if (c == null) return null; if (c.Primitive) return c; var array = c as Array; if (array != null) { return new Array(Find(array.ArrayType, importedPackages)); } if (c is PlaceholderType) { var result = Find(c.Name, importedPackages); return result; } return c; }
private OpCodeValue CompileRelation(ByteCodeGenerator generator, Type type) { switch (TypeCodeHelper.Truncate(type)) { case ItemTypeCode.Int: return CompileInt(generator); case ItemTypeCode.Long: CompileLong(generator); break; case ItemTypeCode.Float: CompileFloat(generator); break; case ItemTypeCode.Double: CompileDouble(generator); break; default: throw new NotImplementedException(); } if (node is RelationNode.LessThanEqNode) { return OpCodeValue.ifle; } if (node is RelationNode.GreaterThanEqNode) { return OpCodeValue.ifge; } if (node is RelationNode.LessThanNode) { return OpCodeValue.iflt; } if (node is RelationNode.GreaterThanNode) { return OpCodeValue.ifgt; } throw new NotImplementedException(); }
public IndexedItem(ByteCodeGenerator generator, Type type) : base(generator, type) { }
public static void Add(Type c, List<Package> importedPackages) { CachedClasses.Add(GetCacheKey(c.Name, ProcessImports(importedPackages)), c); }
public bool IsAssignableTo(Type c) { throw new NotImplementedException(); }
public bool CanAssign(Type c) { throw new NotImplementedException(); }
internal Variable(short index, string name, Type type) { Index = index; Name = name; Type = type; }