Exemple #1
0
        public static string GetMangledName(string fnName, FnTyRef fnTy)
        {
            var builder = new StringBuilder().Append("_S");

            builder.Append(fnName.Length);
            builder.Append(fnName);

            builder.Append(fnTy.parameterTys.Count);
            for (int i = 0, len = fnTy.parameterTys.Count; i < len; i++)
                builder.Append(GetTyName(fnTy.parameterTys[i].Raw));

            builder.Append("_R");
            builder.Append(GetTyName(fnTy.returnTy.Raw));

            return builder.ToString();
        }
 public void InsertFn(string fnName, Modifiers mods, FnTyRef ty) =>
     current.InsertFn(fnName, mods, ty);
 public void InsertFn(string fnName, Modifiers mods, FnTyRef ty) =>
     symbols[fnName] = new FnSymbol(fnName, mods, ty);
Exemple #4
0
 public FnSymbol(string name, Modifiers mods, FnTyRef ty)
     : base(name, SymbolKind.FN)
 {
     this.mods = mods;
     this.ty = ty;
 }