public void SetupMetadata(CST.Global global) { NumWarnings = 0; NumErrors = 0; Global = global; if (tracerStream != null) { Tracer = new CST.CSTWriter(global, CST.WriterStyle.Debug, tracerStream); } Validity = new ValidityContext(this); GenericEnumeratorTypeConstructorRef = MkRef(Constants.GenericEnumeratorTypeConstructorName); JSContextRef = MkRef(Constants.JSContextName); JSObjectRef = MkRef(Constants.JSObjectName); JSPropertyRef = MkRef(Constants.JSPropertyName); JSExceptionRef = MkRef(Constants.JSExceptionName); GlobalMapping = new GlobalMapping(this); AttributeHelper = new AttributeHelper(this); InteropManager = new InteropManager(this); JSTHelpers = new JSTHelpers(this); InlinedMethods = new InlinedMethodCache(this); Traces = new Traces(this); }
public string ResolveTypeRefToSlot(CST.TypeRef typeRef) { var assemblyDef = default(CST.AssemblyDef); if (typeRef.QualifiedTypeName.Assembly.PrimTryResolve(env.Global, out assemblyDef)) { return(AssemblyMappingFor(assemblyDef).ResolveTypeDefinitionToSlot(typeRef.QualifiedTypeName.Type)); } else { throw new InvalidOperationException("invalid type ref"); } }
public JST.Expression ResolveType(CST.TypeRef typeRef, TypePhase typePhase) { return(Env.JSTHelpers.DefaultResolveType(this, typeRef, typePhase)); }
public void SetupMetadata(CST.Global global) { NumWarnings = 0; NumErrors = 0; Global = global; if (tracerStream != null) Tracer = new CST.CSTWriter(global, CST.WriterStyle.Debug, tracerStream); Validity = new ValidityContext(this); GenericEnumeratorTypeConstructorRef = MkRef(Constants.GenericEnumeratorTypeConstructorName); JSContextRef = MkRef(Constants.JSContextName); JSObjectRef = MkRef(Constants.JSObjectName); JSPropertyRef = MkRef(Constants.JSPropertyName); JSExceptionRef = MkRef(Constants.JSExceptionName); GlobalMapping = new GlobalMapping(this); AttributeHelper = new AttributeHelper(this); InteropManager = new InteropManager(this); JSTHelpers = new JSTHelpers(this); InlinedMethods = new InlinedMethodCache(this); Traces = new Traces(this); }
public override CST.InvalidInfo ImplementableTypeRef(MessageContext ctxt, CST.RootEnvironment rootEnv, CST.TypeRef typeRef) { var s = typeRef.Style(rootEnv); if (s is CST.UnmanagedPointerTypeStyle) { Log(new CST.InvalidTypeRef(ctxt, typeRef, "Unmanaged pointers are not supported")); return(new CST.InvalidInfo(CST.MessageContextBuilders.Type(Global, typeRef))); } return(null); }
public CustomAttribute(TypeRef typeRef, ISeq <object> positionalProperties, IMap <string, object> namedProperties) { Type = typeRef; PositionalProperties = positionalProperties ?? new Seq <object>(); NamedProperties = namedProperties ?? new Map <string, object>(); }
public BoxCell(Expression box, TypeRef valueType) { Box = box; ValueType = valueType; }
public override MemberRef WithDefiningType(TypeRef typeRef) { return(new EventRef(typeRef, Name)); }
public abstract MemberRef WithDefiningType(TypeRef typeRef);
public PropertySignature(string name, bool isStatic, IImSeq <TypeRef> parameters, TypeRef result) : base(name) { IsStatic = isStatic; Parameters = parameters ?? Constants.EmptyTypeRefs; Result = result; }
public override MemberRef WithDefiningType(TypeRef typeRef) { return(new PropertyRef(typeRef, Name, IsStatic, Parameters, Result)); }
public override MemberRef WithDefiningType(TypeRef typeRef) { return(new FieldRef(typeRef, Name, FieldType)); }
public FieldSignature(string name, TypeRef fieldType) : base(name) { FieldType = fieldType; }
public override TypeRef ToCodePointer(Global global) { return(TypeRef.CodePointerFrom(global, Parameters, Result)); }
public override MemberRef WithDefiningType(TypeRef typeRef) { return(new PolymorphicMethodRef(typeRef, Name, IsStatic, TypeArity, Parameters, Result)); }
public MethodSignature(string name, bool isStatic, int typeArity, IImSeq <TypeRef> parameters, TypeRef result) : base(name) { IsStatic = isStatic; TypeArity = typeArity; Parameters = parameters ?? Constants.EmptyTypeRefs; Result = result; }