diff --git a/compiler/compilation/CompilationTask.cs b/compiler/compilation/CompilationTask.cs index 0afed5c7..36177ec2 100644 --- a/compiler/compilation/CompilationTask.cs +++ b/compiler/compilation/CompilationTask.cs @@ -193,7 +193,7 @@ private bool ProcessFiles(IReadOnlyCollection files, IReadOnlyCollecti result.FileEntity = key; result.SourceText = value; // apply root namespace into includes - result.Includes.Add($"global::{result.Name}"); + result.Includes.Add($"{result.Name}"); Target.AST.Add(key, result); } catch (VeinParseException e) diff --git a/compiler/compilation/parts/aspects.cs b/compiler/compilation/parts/aspects.cs index 1807c345..f89a85e7 100644 --- a/compiler/compilation/parts/aspects.cs +++ b/compiler/compilation/parts/aspects.cs @@ -31,8 +31,8 @@ public Aspect FindAspect(AspectSyntax syntax, DocumentDeclaration doc) public ClassBuilder CompileAspect(AspectDeclarationSyntax member, DocumentDeclaration doc) { var name = member.Identifier.ExpressionString.EndsWith("Aspect") - ? $"global::{doc.Name}/{member.Identifier.ExpressionString}" - : $"global::{doc.Name}/{member.Identifier.ExpressionString}Aspect"; + ? $"{doc.Name}/{member.Identifier.ExpressionString}" + : $"{doc.Name}/{member.Identifier.ExpressionString}Aspect"; var clazz = module.DefineClass(name) .WithIncludes(doc.Includes); diff --git a/compiler/compilation/parts/classes.cs b/compiler/compilation/parts/classes.cs index d12c2331..cf176fd6 100644 --- a/compiler/compilation/parts/classes.cs +++ b/compiler/compilation/parts/classes.cs @@ -199,7 +199,7 @@ public void GenerateLinksForAliases(DocumentDeclaration doc) if (alias.IsType) { var type = FetchType(alias.Type!.Typeword, doc); - Context.Module.alias_table.Add(new VeinAliasType($"{module.Name}%global::{doc.Name}/{alias.AliasName.ExpressionString}", + Context.Module.alias_table.Add(new VeinAliasType($"{module.Name}%{doc.Name}/{alias.AliasName.ExpressionString}", type)); Status.VeinStatus($"Regeneration type alias [grey]'{type}'[/] -> [grey]'{alias.AliasName.ExpressionString}'[/]"); @@ -223,8 +223,8 @@ public void GenerateLinksForAliases(DocumentDeclaration doc) public ClassBuilder DefineDelegateClass(AliasSyntax alias, DocumentDeclaration doc, VeinCore types) { - var aliasName = new QualityTypeName(module.Name, alias.AliasName.ExpressionString, $"global::{doc.Name}"); - var multicastFnType = new QualityTypeName("std", "FunctionMulticast", $"global::std"); + var aliasName = new QualityTypeName(module.Name, alias.AliasName.ExpressionString, $"{doc.Name}"); + var multicastFnType = new QualityTypeName("std", "FunctionMulticast", $"std"); var args = GenerateArgument(alias.MethodDeclaration!, doc); @@ -243,7 +243,8 @@ public ClassBuilder DefineDelegateClass(AliasSyntax alias, DocumentDeclaration d var objType = VeinTypeCode.TYPE_OBJECT.AsClass(types); var rawType = VeinTypeCode.TYPE_RAW.AsClass(types); - var ctorMethod = clazz.DefineMethod(VeinMethod.METHOD_NAME_CONSTRUCTOR, VeinTypeCode.TYPE_VOID.AsClass(types), [ + var ctorMethod = clazz.DefineMethod(VeinMethod.METHOD_NAME_CONSTRUCTOR, clazz, [ + new (VeinArgumentRef.THIS_ARGUMENT, clazz), new("fn", rawType), new("scope", objType) ]); @@ -254,25 +255,33 @@ public ClassBuilder DefineDelegateClass(AliasSyntax alias, DocumentDeclaration d var ctorGen = ctorMethod.GetGenerator(); - ctorGen.Emit(OpCodes.LDARG_0); - ctorGen.Emit(OpCodes.STF, ptrRef); - ctorGen.Emit(OpCodes.LDARG_1); - ctorGen.Emit(OpCodes.STF, scope); - ctorGen.Emit(OpCodes.RET); + ctorGen.Emit(OpCodes.LDARG_1); // load ref + ctorGen.Emit(OpCodes.LDARG_0); // load this + ctorGen.Emit(OpCodes.STF, ptrRef); // this.ptrRef = ref; + ctorGen.Emit(OpCodes.LDARG_2); // load scope + ctorGen.Emit(OpCodes.LDARG_0); // load this + ctorGen.Emit(OpCodes.STF, scope); // this.scope = scope; + ctorGen.Emit(OpCodes.LDARG_0); // load this + ctorGen.Emit(OpCodes.RET); // return this + var method = clazz.DefineMethod("invoke", Internal | Special, - sig.ReturnType,sig.Arguments.Where(VeinMethodSignature.NotThis).ToArray()); + sig.ReturnType, new List { new (VeinArgumentRef.THIS_ARGUMENT, clazz) }.Concat(sig.Arguments.Where(VeinMethodSignature.NotThis)).ToArray()); - var hasThis = sig.Arguments.All(VeinMethodSignature.NotThis); + var hasNotThis = sig.Arguments.All(VeinMethodSignature.NotThis); var generator = method.GetGenerator(); - if (hasThis) + if (!hasNotThis) + { + generator.EmitThis(); generator.Emit(OpCodes.LDF, scope); - foreach (int i in ..method.Signature.ArgLength) - generator.Emit(OpCodes.LDARG_S, i); // TODO optimization for LDARG_X + } + foreach (int i in ..method.Signature.Arguments.Where(VeinMethodSignature.NotThis).Count()) + generator.EmitLoadArgument(i + 1); + generator.EmitThis(); generator.Emit(OpCodes.LDF, ptrRef); generator.Emit(OpCodes.CALL_SP); generator.Emit(OpCodes.RET); @@ -311,7 +320,7 @@ void _defineClass(ClassBuilder clz) throw new ForwardedTypeNotDefinedException(member.Identifier.ExpressionString); } - var clazz = module.DefineClass($"global::{doc.Name}/{member.Identifier.ExpressionString}") + var clazz = module.DefineClass($"{doc.Name}/{member.Identifier.ExpressionString}") .WithIncludes(doc.Includes); _defineClass(clazz); CompileAspectFor(member, doc, clazz); diff --git a/compiler/compilation/parts/types.cs b/compiler/compilation/parts/types.cs index bed0702f..fb844195 100644 --- a/compiler/compilation/parts/types.cs +++ b/compiler/compilation/parts/types.cs @@ -30,7 +30,7 @@ private VeinClass FetchType(IdentifierExpression typename, DocumentDeclaration d if (retType is null) { Log.Defer.Error($"[red bold]Cannot resolve type[/] '[purple underline]{typename}[/]'", typename, doc); - return new UnresolvedVeinClass($"{this.module.Name}%global::{doc.Name}/{typename}"); + return new UnresolvedVeinClass($"{this.module.Name}%{doc.Name}/{typename}"); } return KnowClasses[typename] = retType; diff --git a/lib/ast/syntax/DocumentDeclaration.cs b/lib/ast/syntax/DocumentDeclaration.cs index 471085eb..5f66df48 100644 --- a/lib/ast/syntax/DocumentDeclaration.cs +++ b/lib/ast/syntax/DocumentDeclaration.cs @@ -38,8 +38,8 @@ public string Name { var result = x.Value.Token; - if (!result.StartsWith("global::")) - return $"global::{result}"; + if (!result.StartsWith("")) + return $"{result}"; return result; }).ToList(); } diff --git a/lib/ast/syntax/ast/TypeSyntax.cs b/lib/ast/syntax/ast/TypeSyntax.cs index 5c52f55a..f5f4effa 100644 --- a/lib/ast/syntax/ast/TypeSyntax.cs +++ b/lib/ast/syntax/ast/TypeSyntax.cs @@ -66,7 +66,7 @@ public override IEnumerable ChildNodes public string GetFullName() { - var result = $"global::"; + var result = $""; if (Namespaces.Any()) result = $"{result}{Namespaces.Select(x => x.ExpressionString).Join("/")}/"; result = $"{result}{Identifier}"; diff --git a/metadata/gen.csx b/metadata/gen.csx index ac73f699..09fef564 100644 --- a/metadata/gen.csx +++ b/metadata/gen.csx @@ -1,231 +1,231 @@ -#!/bin/dotnet run -#r "nuget: Newtonsoft.Json, 12.0.3" -#r "nuget: YamlDotNet, 9.1.4" -using System; -using System.Collections; -using System.IO; -using System.Linq; -using Newtonsoft.Json; -using YamlDotNet.Serialization; -using YamlDotNet.Serialization.NamingConventions; -const string header = "/// don't touch this file, for modification use gen.csx "; - -record OpCode( - string name, - byte? override_size, - string description, string note = null, - string flow = null, string chain = null); - -var deserializer = - new DeserializerBuilder() - .WithNamingConvention(UnderscoredNamingConvention.Instance) - .Build(); -var content = File.ReadAllText("opcodes.yaml"); -var version = int.Parse(File.ReadAllText("version")); -version++; -File.WriteAllText("version", $"{version}"); -var obj = deserializer.Deserialize(content); -var ops = new List(); -var ops_values = new Dictionary(); -load_db(); - - -#region parsing -T getKeyAndRemove(object obj, string name) -{ - var dict = (IDictionary) obj; - if (!dict.Contains(name)) - return default; - var result = dict[name]; - dict.Remove(name); - return (T)result; -} -bool hasKey(object obj, string name) -{ - var dict = (IDictionary) obj; - return dict.Contains(name); -} -IEnumerable fillData(string name, IDictionary kv) -{ - var desc = getKeyAndRemove(kv, "description"); - var note = getKeyAndRemove(kv, "note"); - var flow = getKeyAndRemove(kv, "flow"); - var chain = getKeyAndRemove(kv, "chain"); - var size_str = getKeyAndRemove(kv, "override-size"); - var range_str = getKeyAndRemove(kv, "range"); - var size = size_str is not null ? byte.Parse(size_str) : (byte)0; - if (range_str is null) - yield return new OpCode(name, size, desc, note); - else if(bool.Parse(range_str)) - { - foreach (var i in Enumerable.Range(0, 6)) - yield return new OpCode($"{name}.{i}", 0, desc); - if (!hasKey(kv, $"S")) - yield return new OpCode($"{name}.S", size == (byte)0 ? (byte)1 : size, desc); - } -} -foreach (var v in (IList)obj) -{ - var (key, raw_value) = ((IDictionary)v).Single(); - var value = (IDictionary) raw_value; - var name = (string)key; - var variations = getKeyAndRemove>(value, "variations")?.Select(x => x.ToString())?.ToArray(); - - - var result = fillData(name, value).ToArray(); - var hasSaved = getKeyAndRemove(value, "use-root") == "true"; - - AddRange(result); - - - if (variations is { } && variations.Count() != 0) - { - var res = result.First(); - AddRange(variations.Select(s => - new OpCode($"{name}.{s}", res.override_size, res.description))); - } - - if (value.Any()) - { - foreach (var o in value) - { - var (key1, value1) = o; - result = fillData($"{name}.{(string) key1}", (IDictionary) value1).ToArray(); - AddRange(result); - } - } - if (!hasSaved) - if ((variations is { } && variations.Count() != 0) || value.Any()) - { - if (ops.Any(x => x.name.Equals(name))) - ops.Remove(ops.First(x => x.name.Equals(name))); - } -} -#endregion -var cpp_def = new StringBuilder(); -var cs_def = new StringBuilder(); -var cs_def_props = new StringBuilder(); - -void gen_cpp_def(StringBuilder builder) -{ - foreach(var i in ops.Select((x, y) => (x.name, y, x.override_size))) - builder.AppendLine($"OP_DEF({i.name.Replace(".", "_")}, 0x{i.y:X2}, {i.override_size})"); -} - -void AddRange(IEnumerable enumerable) -{ - foreach (var code in enumerable) - { - ops.Add(code); - } -} - -void gen_cs_def(StringBuilder builder) -{ - builder.AppendLine(header); - builder.AppendLine("namespace ishtar \n{"); - builder.AppendLine("\tpublic enum OpCodeValue : ushort \n\t{"); - - foreach(var i in ops.Select((x, y) => (x.name, y, x))) - { - var desc = i.x.description; - var note = i.x.note; - builder.AppendLine($"\t\t/// "); - builder.AppendLine($"\t\t/// {desc}"); - builder.AppendLine($"\t\t/// "); - if (note is not null) - { - builder.AppendLine($"\t\t/// "); - builder.AppendLine($"\t\t/// {note}"); - builder.AppendLine($"\t\t/// "); - } - builder.AppendLine($"\t\t{i.name.Replace(".", "_")} = 0x{ops_values[i.name]:X2},"); - } - - - builder.AppendLine("\t}\n}"); -} - -void load_db() -{ - if (!File.Exists("./db_opcodes.json")) - return; - ops_values = JsonConvert.DeserializeObject>(File.ReadAllText("./db_opcodes.json")); -} -void save_db() -{ - if (File.Exists("./db_opcodes.json")) - File.Delete("./db_opcodes.json"); - File.WriteAllText("./db_opcodes.json", JsonConvert.SerializeObject(ops_values, Formatting.Indented)); -} - -int get(string r) -{ - if (r is null) - return 0; - return int.Parse(r); -} - -void gen_cs_props(StringBuilder builder) -{ - var global_index = ops_values.Count; - int CreateFlag(byte size, int flow, int chain) - => ((chain << 0xC) | 0x1F) | ((flow << 0x11) | 0x1F) | ((size << 0x16) | 0x1F); - builder.AppendLine(header); - builder.AppendLine("namespace ishtar \n{"); - builder.AppendLine("\tusing global::vein.runtime;"); - builder.AppendLine("\tusing global::ishtar.emit;"); - builder.AppendLine("\tusing global::System.Collections.Generic;"); - builder.AppendLine("\tpublic static class OpCodes \n\t{"); - - builder.AppendLine($"\t\tinternal static int SetVersion = {version};"); - foreach(var i in ops.Select((x, y) => (x.name, y, x.override_size, get(x.flow), get(x.chain), x))) - { - var desc = i.x.description; - var note = i.x.note; - builder.AppendLine($"\t\t/// "); - builder.AppendLine($"\t\t/// {desc}"); - builder.AppendLine($"\t\t/// size: {i.override_size}"); - builder.AppendLine($"\t\t/// flow: {i.Item4}"); - builder.AppendLine($"\t\t/// chain: {i.Item5}"); - builder.AppendLine($"\t\t/// "); - if (note is not null) - { - builder.AppendLine($"\t\t/// "); - builder.AppendLine($"\t\t/// {note}"); - builder.AppendLine($"\t\t/// "); - } - - if (!ops_values.ContainsKey(i.x.name)) - ops_values.Add(i.x.name, global_index++); - - builder.AppendLine($"\t\tpublic static readonly OpCode {i.name.Replace(".", "_")} "+ - $"= new (0x{ops_values[i.x.name]:X2}, 0x{CreateFlag(i.override_size ?? 0, i.Item4, i.Item5):X8});"); - } - builder.AppendLine("\n\t\tpublic static readonly Dictionary all = new ()"); - builder.AppendLine("\t\t{"); - foreach(var i in ops.Select((x, y) => x.name)) - builder.AppendLine($"\t\t\t{{OpCodeValue.{i.Replace(".", "_")}, {i.Replace(".", "_")}}},"); - builder.AppendLine("\t\t};"); - builder.AppendLine("\t}\n}"); -} - -gen_cpp_def(cpp_def); -gen_cs_props(cs_def_props); -gen_cs_def(cs_def); - -if (File.Exists("opcodes.def")) - File.Delete("opcodes.def"); -if (File.Exists("opcodes.def.cs")) - File.Delete("opcodes.def.cs"); -if (File.Exists("opcodes.list.def.cs")) - File.Delete("opcodes.list.def.cs"); - - - -File.WriteAllText("opcodes.def", cpp_def.ToString()); -File.WriteAllText("opcodes.def.cs", cs_def.ToString()); -File.WriteAllText("opcodes.list.def.cs", cs_def_props.ToString()); - - -save_db(); +#!/bin/dotnet run +#r "nuget: Newtonsoft.Json, 12.0.3" +#r "nuget: YamlDotNet, 9.1.4" +using System; +using System.Collections; +using System.IO; +using System.Linq; +using Newtonsoft.Json; +using YamlDotNet.Serialization; +using YamlDotNet.Serialization.NamingConventions; +const string header = "/// don't touch this file, for modification use gen.csx "; + +record OpCode( + string name, + byte? override_size, + string description, string note = null, + string flow = null, string chain = null); + +var deserializer = + new DeserializerBuilder() + .WithNamingConvention(UnderscoredNamingConvention.Instance) + .Build(); +var content = File.ReadAllText("opcodes.yaml"); +var version = int.Parse(File.ReadAllText("version")); +version++; +File.WriteAllText("version", $"{version}"); +var obj = deserializer.Deserialize(content); +var ops = new List(); +var ops_values = new Dictionary(); +load_db(); + + +#region parsing +T getKeyAndRemove(object obj, string name) +{ + var dict = (IDictionary) obj; + if (!dict.Contains(name)) + return default; + var result = dict[name]; + dict.Remove(name); + return (T)result; +} +bool hasKey(object obj, string name) +{ + var dict = (IDictionary) obj; + return dict.Contains(name); +} +IEnumerable fillData(string name, IDictionary kv) +{ + var desc = getKeyAndRemove(kv, "description"); + var note = getKeyAndRemove(kv, "note"); + var flow = getKeyAndRemove(kv, "flow"); + var chain = getKeyAndRemove(kv, "chain"); + var size_str = getKeyAndRemove(kv, "override-size"); + var range_str = getKeyAndRemove(kv, "range"); + var size = size_str is not null ? byte.Parse(size_str) : (byte)0; + if (range_str is null) + yield return new OpCode(name, size, desc, note); + else if(bool.Parse(range_str)) + { + foreach (var i in Enumerable.Range(0, 6)) + yield return new OpCode($"{name}.{i}", 0, desc); + if (!hasKey(kv, $"S")) + yield return new OpCode($"{name}.S", size == (byte)0 ? (byte)1 : size, desc); + } +} +foreach (var v in (IList)obj) +{ + var (key, raw_value) = ((IDictionary)v).Single(); + var value = (IDictionary) raw_value; + var name = (string)key; + var variations = getKeyAndRemove>(value, "variations")?.Select(x => x.ToString())?.ToArray(); + + + var result = fillData(name, value).ToArray(); + var hasSaved = getKeyAndRemove(value, "use-root") == "true"; + + AddRange(result); + + + if (variations is { } && variations.Count() != 0) + { + var res = result.First(); + AddRange(variations.Select(s => + new OpCode($"{name}.{s}", res.override_size, res.description))); + } + + if (value.Any()) + { + foreach (var o in value) + { + var (key1, value1) = o; + result = fillData($"{name}.{(string) key1}", (IDictionary) value1).ToArray(); + AddRange(result); + } + } + if (!hasSaved) + if ((variations is { } && variations.Count() != 0) || value.Any()) + { + if (ops.Any(x => x.name.Equals(name))) + ops.Remove(ops.First(x => x.name.Equals(name))); + } +} +#endregion +var cpp_def = new StringBuilder(); +var cs_def = new StringBuilder(); +var cs_def_props = new StringBuilder(); + +void gen_cpp_def(StringBuilder builder) +{ + foreach(var i in ops.Select((x, y) => (x.name, y, x.override_size))) + builder.AppendLine($"OP_DEF({i.name.Replace(".", "_")}, 0x{i.y:X2}, {i.override_size})"); +} + +void AddRange(IEnumerable enumerable) +{ + foreach (var code in enumerable) + { + ops.Add(code); + } +} + +void gen_cs_def(StringBuilder builder) +{ + builder.AppendLine(header); + builder.AppendLine("namespace ishtar \n{"); + builder.AppendLine("\tpublic enum OpCodeValue : ushort \n\t{"); + + foreach(var i in ops.Select((x, y) => (x.name, y, x))) + { + var desc = i.x.description; + var note = i.x.note; + builder.AppendLine($"\t\t/// "); + builder.AppendLine($"\t\t/// {desc}"); + builder.AppendLine($"\t\t/// "); + if (note is not null) + { + builder.AppendLine($"\t\t/// "); + builder.AppendLine($"\t\t/// {note}"); + builder.AppendLine($"\t\t/// "); + } + builder.AppendLine($"\t\t{i.name.Replace(".", "_")} = 0x{ops_values[i.name]:X2},"); + } + + + builder.AppendLine("\t}\n}"); +} + +void load_db() +{ + if (!File.Exists("./db_opcodes.json")) + return; + ops_values = JsonConvert.DeserializeObject>(File.ReadAllText("./db_opcodes.json")); +} +void save_db() +{ + if (File.Exists("./db_opcodes.json")) + File.Delete("./db_opcodes.json"); + File.WriteAllText("./db_opcodes.json", JsonConvert.SerializeObject(ops_values, Formatting.Indented)); +} + +int get(string r) +{ + if (r is null) + return 0; + return int.Parse(r); +} + +void gen_cs_props(StringBuilder builder) +{ + var global_index = ops_values.Count; + int CreateFlag(byte size, int flow, int chain) + => ((chain << 0xC) | 0x1F) | ((flow << 0x11) | 0x1F) | ((size << 0x16) | 0x1F); + builder.AppendLine(header); + builder.AppendLine("namespace ishtar \n{"); + builder.AppendLine("\tusing vein.runtime;"); + builder.AppendLine("\tusing ishtar.emit;"); + builder.AppendLine("\tusing System.Collections.Generic;"); + builder.AppendLine("\tpublic static class OpCodes \n\t{"); + + builder.AppendLine($"\t\tinternal static int SetVersion = {version};"); + foreach(var i in ops.Select((x, y) => (x.name, y, x.override_size, get(x.flow), get(x.chain), x))) + { + var desc = i.x.description; + var note = i.x.note; + builder.AppendLine($"\t\t/// "); + builder.AppendLine($"\t\t/// {desc}"); + builder.AppendLine($"\t\t/// size: {i.override_size}"); + builder.AppendLine($"\t\t/// flow: {i.Item4}"); + builder.AppendLine($"\t\t/// chain: {i.Item5}"); + builder.AppendLine($"\t\t/// "); + if (note is not null) + { + builder.AppendLine($"\t\t/// "); + builder.AppendLine($"\t\t/// {note}"); + builder.AppendLine($"\t\t/// "); + } + + if (!ops_values.ContainsKey(i.x.name)) + ops_values.Add(i.x.name, global_index++); + + builder.AppendLine($"\t\tpublic static readonly OpCode {i.name.Replace(".", "_")} "+ + $"= new (0x{ops_values[i.x.name]:X2}, 0x{CreateFlag(i.override_size ?? 0, i.Item4, i.Item5):X8});"); + } + builder.AppendLine("\n\t\tpublic static readonly Dictionary all = new ()"); + builder.AppendLine("\t\t{"); + foreach(var i in ops.Select((x, y) => x.name)) + builder.AppendLine($"\t\t\t{{OpCodeValue.{i.Replace(".", "_")}, {i.Replace(".", "_")}}},"); + builder.AppendLine("\t\t};"); + builder.AppendLine("\t}\n}"); +} + +gen_cpp_def(cpp_def); +gen_cs_props(cs_def_props); +gen_cs_def(cs_def); + +if (File.Exists("opcodes.def")) + File.Delete("opcodes.def"); +if (File.Exists("opcodes.def.cs")) + File.Delete("opcodes.def.cs"); +if (File.Exists("opcodes.list.def.cs")) + File.Delete("opcodes.list.def.cs"); + + + +File.WriteAllText("opcodes.def", cpp_def.ToString()); +File.WriteAllText("opcodes.def.cs", cs_def.ToString()); +File.WriteAllText("opcodes.list.def.cs", cs_def_props.ToString()); + + +save_db(); diff --git a/metadata/internal.args.def b/metadata/internal.args.def index bf280e41..95a0591d 100644 --- a/metadata/internal.args.def +++ b/metadata/internal.args.def @@ -1,3 +1,3 @@ -FE_ARG(println)(L"value", L"corlib%global::wave/lang/String"); -FE_ARG(print)(L"value", L"corlib%global::wave/lang/String"); +FE_ARG(println)(L"value", L"corlib%wave/lang/String"); +FE_ARG(print)(L"value", L"corlib%wave/lang/String"); FE_ARG(GetPlatform)(L"", L""); \ No newline at end of file diff --git a/metadata/internal.def b/metadata/internal.def index ac3a85e5..e83331bb 100644 --- a/metadata/internal.def +++ b/metadata/internal.def @@ -1,3 +1,3 @@ -FE_CALL(println, L"corlib%global::wave/lang/Console", i_call_console_println, 1) -FE_CALL(print, L"corlib%global::wave/lang/Console", i_call_console_print, 1) -FE_CALL(GetPlatform, L"corlib%global::wave/lang/Native", i_call_get_Platform, 0) \ No newline at end of file +FE_CALL(println, L"corlib%wave/lang/Console", i_call_console_println, 1) +FE_CALL(print, L"corlib%wave/lang/Console", i_call_console_print, 1) +FE_CALL(GetPlatform, L"corlib%wave/lang/Native", i_call_get_Platform, 0) \ No newline at end of file diff --git a/metadata/opcodes.list.def.cs b/metadata/opcodes.list.def.cs index 8506dda2..6fbc2fdf 100644 --- a/metadata/opcodes.list.def.cs +++ b/metadata/opcodes.list.def.cs @@ -1,9 +1,9 @@ /// don't touch this file, for modification use gen.csx namespace ishtar { - using global::vein.runtime; - using global::ishtar.emit; - using global::System.Collections.Generic; + using vein.runtime; + using ishtar.emit; + using System.Collections.Generic; public static class OpCodes { internal static int SetVersion = 20; diff --git a/runtime/common/reflection/TypeName.cs b/runtime/common/reflection/TypeName.cs index f846b928..35a4998e 100644 --- a/runtime/common/reflection/TypeName.cs +++ b/runtime/common/reflection/TypeName.cs @@ -67,7 +67,7 @@ public QualityTypeName(string asmName, string name, string ns) : this($"{asmName public static implicit operator QualityTypeName(string name) { - if (!Regex.IsMatch(name, @"(.+)\%global::(.+)\/(.+)")) + if (!Regex.IsMatch(name, @"(.+)\%(.+)\/(.+)")) throw new InvalidTypeNameException($"'{name}' is not valid type name."); return new QualityTypeName(name); } diff --git a/runtime/common/reflection/VeinCore.cs b/runtime/common/reflection/VeinCore.cs index 84a2b4be..fea92b85 100644 --- a/runtime/common/reflection/VeinCore.cs +++ b/runtime/common/reflection/VeinCore.cs @@ -66,29 +66,29 @@ private void init() { var asmName = "std%"; var coreModule = new VeinModule("std", new Version(1, 0, 0), this); - ObjectClass = new($"{asmName}global::std/Object", (VeinClass)null, coreModule) { TypeCode = VeinTypeCode.TYPE_OBJECT }; - ValueTypeClass = new($"{asmName}global::std/ValueType", (VeinClass)null, coreModule) { TypeCode = VeinTypeCode.TYPE_OBJECT }; - VoidClass = new($"{asmName}global::std/Void", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_VOID }; - StringClass = new($"{asmName}global::std/String", ObjectClass, coreModule) { TypeCode = VeinTypeCode.TYPE_STRING }; - ByteClass = new($"{asmName}global::std/Byte", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_U1 }; - SByteClass = new($"{asmName}global::std/SByte", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_I1 }; - Int16Class = new($"{asmName}global::std/Int16", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_I2 }; - Int32Class = new($"{asmName}global::std/Int32", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_I4 }; - Int64Class = new($"{asmName}global::std/Int64", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_I8 }; - UInt16Class = new($"{asmName}global::std/UInt16", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_U2 }; - UInt32Class = new($"{asmName}global::std/UInt32", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_U4 }; - UInt64Class = new($"{asmName}global::std/UInt64", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_U8 }; - HalfClass = new($"{asmName}global::std/Half", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_R2 }; - FloatClass = new($"{asmName}global::std/Float", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_R4 }; - DoubleClass = new($"{asmName}global::std/Double", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_R8 }; - DecimalClass = new($"{asmName}global::std/Decimal", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_R16 }; - BoolClass = new($"{asmName}global::std/Boolean", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_BOOLEAN }; - CharClass = new($"{asmName}global::std/Char", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_CHAR }; - ArrayClass = new($"{asmName}global::std/Array", ObjectClass, coreModule) { TypeCode = VeinTypeCode.TYPE_ARRAY }; - ExceptionClass = new($"{asmName}global::std/Exception", ObjectClass, coreModule) { TypeCode = VeinTypeCode.TYPE_CLASS }; - RawClass = new($"{asmName}global::std/Raw", ObjectClass, coreModule) { TypeCode = VeinTypeCode.TYPE_RAW }; - AspectClass = new($"{asmName}global::std/Aspect", ObjectClass, coreModule) { TypeCode = VeinTypeCode.TYPE_CLASS }; - FunctionClass = new($"{asmName}global::std/Function", ObjectClass, coreModule) { TypeCode = VeinTypeCode.TYPE_FUNCTION }; + ObjectClass = new($"{asmName}std/Object", (VeinClass)null, coreModule) { TypeCode = VeinTypeCode.TYPE_OBJECT }; + ValueTypeClass = new($"{asmName}std/ValueType", (VeinClass)null, coreModule) { TypeCode = VeinTypeCode.TYPE_OBJECT }; + VoidClass = new($"{asmName}std/Void", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_VOID }; + StringClass = new($"{asmName}std/String", ObjectClass, coreModule) { TypeCode = VeinTypeCode.TYPE_STRING }; + ByteClass = new($"{asmName}std/Byte", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_U1 }; + SByteClass = new($"{asmName}std/SByte", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_I1 }; + Int16Class = new($"{asmName}std/Int16", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_I2 }; + Int32Class = new($"{asmName}std/Int32", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_I4 }; + Int64Class = new($"{asmName}std/Int64", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_I8 }; + UInt16Class = new($"{asmName}std/UInt16", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_U2 }; + UInt32Class = new($"{asmName}std/UInt32", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_U4 }; + UInt64Class = new($"{asmName}std/UInt64", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_U8 }; + HalfClass = new($"{asmName}std/Half", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_R2 }; + FloatClass = new($"{asmName}std/Float", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_R4 }; + DoubleClass = new($"{asmName}std/Double", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_R8 }; + DecimalClass = new($"{asmName}std/Decimal", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_R16 }; + BoolClass = new($"{asmName}std/Boolean", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_BOOLEAN }; + CharClass = new($"{asmName}std/Char", ValueTypeClass, coreModule) { TypeCode = VeinTypeCode.TYPE_CHAR }; + ArrayClass = new($"{asmName}std/Array", ObjectClass, coreModule) { TypeCode = VeinTypeCode.TYPE_ARRAY }; + ExceptionClass = new($"{asmName}std/Exception", ObjectClass, coreModule) { TypeCode = VeinTypeCode.TYPE_CLASS }; + RawClass = new($"{asmName}std/Raw", ObjectClass, coreModule) { TypeCode = VeinTypeCode.TYPE_RAW }; + AspectClass = new($"{asmName}std/Aspect", ObjectClass, coreModule) { TypeCode = VeinTypeCode.TYPE_CLASS }; + FunctionClass = new($"{asmName}std/Function", ObjectClass, coreModule) { TypeCode = VeinTypeCode.TYPE_FUNCTION }; } } } diff --git a/runtime/ishtar.base/emit/ModuleReader.cs b/runtime/ishtar.base/emit/ModuleReader.cs index 692aa20e..e82e886c 100644 --- a/runtime/ishtar.base/emit/ModuleReader.cs +++ b/runtime/ishtar.base/emit/ModuleReader.cs @@ -8,7 +8,7 @@ namespace ishtar.emit using System.Runtime.CompilerServices; using System.Text; using extensions; - using global::ishtar; + using ishtar; using vein.exceptions; using vein.reflection; using vein.extensions; diff --git a/runtime/ishtar.base/emit/OpCode.cs b/runtime/ishtar.base/emit/OpCode.cs index 9d2c2dc8..c8a0cdc5 100644 --- a/runtime/ishtar.base/emit/OpCode.cs +++ b/runtime/ishtar.base/emit/OpCode.cs @@ -1,8 +1,8 @@ namespace ishtar.emit { using System; - using global::ishtar; - using global::vein.runtime.emit; + using ishtar; + using vein.runtime.emit; public readonly struct OpCode : IEquatable { diff --git a/runtime/ishtar.base/emit/TypeForwarder.cs b/runtime/ishtar.base/emit/TypeForwarder.cs index ab30949e..2f401105 100644 --- a/runtime/ishtar.base/emit/TypeForwarder.cs +++ b/runtime/ishtar.base/emit/TypeForwarder.cs @@ -9,87 +9,87 @@ public static void Indicate(VeinCore types, VeinClass clazz) { switch (clazz.FullName.NameWithNS) { - case "global::std/Aspect": + case "std/Aspect": clazz.TypeCode = VeinTypeCode.TYPE_CLASS; types.AspectClass = clazz; break; - case "global::std/Raw": + case "std/Raw": clazz.TypeCode = VeinTypeCode.TYPE_RAW; types.RawClass = clazz; break; - case "global::std/Object": + case "std/Object": clazz.TypeCode = VeinTypeCode.TYPE_OBJECT; types.ObjectClass = clazz; break; - case "global::std/ValueType": + case "std/ValueType": clazz.TypeCode = VeinTypeCode.TYPE_OBJECT; types.ValueTypeClass = clazz; break; - case "global::std/Array": + case "std/Array": clazz.TypeCode = VeinTypeCode.TYPE_ARRAY; types.ArrayClass = clazz; break; - case "global::std/Void": + case "std/Void": clazz.TypeCode = VeinTypeCode.TYPE_VOID; types.VoidClass = clazz; break; - case "global::std/Int64": + case "std/Int64": clazz.TypeCode = VeinTypeCode.TYPE_I8; types.Int64Class = clazz; break; - case "global::std/Int32": + case "std/Int32": clazz.TypeCode = VeinTypeCode.TYPE_I4; types.Int32Class = clazz; break; - case "global::std/Int16": + case "std/Int16": clazz.TypeCode = VeinTypeCode.TYPE_I2; types.Int16Class = clazz; break; - case "global::std/UInt64": + case "std/UInt64": clazz.TypeCode = VeinTypeCode.TYPE_U8; types.UInt64Class = clazz; break; - case "global::std/UInt32": + case "std/UInt32": clazz.TypeCode = VeinTypeCode.TYPE_U4; types.UInt32Class = clazz; break; - case "global::std/UInt16": + case "std/UInt16": clazz.TypeCode = VeinTypeCode.TYPE_U2; types.UInt16Class = clazz; break; - case "global::std/Boolean": + case "std/Boolean": clazz.TypeCode = VeinTypeCode.TYPE_BOOLEAN; types.BoolClass = clazz; break; - case "global::std/String": + case "std/String": clazz.TypeCode = VeinTypeCode.TYPE_STRING; types.StringClass = clazz; break; - case "global::std/Char": + case "std/Char": clazz.TypeCode = VeinTypeCode.TYPE_CHAR; types.CharClass = clazz; break; - case "global::std/Half": + case "std/Half": clazz.TypeCode = VeinTypeCode.TYPE_R2; types.HalfClass = clazz; break; - case "global::std/Float": + case "std/Float": clazz.TypeCode = VeinTypeCode.TYPE_R4; types.FloatClass = clazz; break; - case "global::std/Double": + case "std/Double": clazz.TypeCode = VeinTypeCode.TYPE_R8; types.DoubleClass = clazz; break; - case "global::std/Decimal": + case "std/Decimal": clazz.TypeCode = VeinTypeCode.TYPE_R16; types.DecimalClass = clazz; break; - case "global::std/Byte": + case "std/Byte": clazz.TypeCode = VeinTypeCode.TYPE_U1; types.ByteClass = clazz; break; - case "global::std/Exception": + case "std/Exception": clazz.TypeCode = VeinTypeCode.TYPE_CLASS; types.ExceptionClass = clazz; break; diff --git a/runtime/ishtar.base/emit/VeinModuleBuilder.cs b/runtime/ishtar.base/emit/VeinModuleBuilder.cs index 75934450..700914c1 100644 --- a/runtime/ishtar.base/emit/VeinModuleBuilder.cs +++ b/runtime/ishtar.base/emit/VeinModuleBuilder.cs @@ -7,7 +7,7 @@ namespace ishtar.emit using System.Linq; using System.Text; using extensions; - using global::ishtar; + using ishtar; using MoreLinq; using vein; using vein.exceptions; @@ -23,11 +23,11 @@ public VeinModuleBuilder(string name, Version ver, VeinCore types) : base(name, /// Define class by name. /// /// - /// 'assemblyName%global::namespace/className' - VALID + /// 'assemblyName%namespace/className' - VALID ///
- /// 'global::namespace/className' - VALID + /// 'namespace/className' - VALID ///
- /// 'namespace/className' - INVALID, need 'global::' prefix. + /// 'namespace/className' - INVALID, need '' prefix. ///
/// 'className' - INVALID, need describe namespace. ///
@@ -48,8 +48,8 @@ public ClassBuilder DefineClass(string classFullname) if (typename.TryGet(x => x.Namespace) is null) throw new IncompleteClassNameException($"Class name has incorrect format."); - if (!typename.Namespace.StartsWith("global::")) - throw new IncompleteClassNameException($"Class namespace not start with 'global::'."); + if (!typename.Namespace.StartsWith("")) + throw new IncompleteClassNameException($"Class namespace not start with ''."); return DefineClass(typename); } diff --git a/runtime/ishtar.base/emit/extensions/OpCodeExtensions.cs b/runtime/ishtar.base/emit/extensions/OpCodeExtensions.cs index 4cb9640f..4181e234 100644 --- a/runtime/ishtar.base/emit/extensions/OpCodeExtensions.cs +++ b/runtime/ishtar.base/emit/extensions/OpCodeExtensions.cs @@ -1,6 +1,6 @@ namespace ishtar.emit.extensions { - using global::ishtar; + using ishtar; using vein.extensions; public static class OpCodeExtensions diff --git a/runtime/ishtar.generator/GeneratorContext.cs b/runtime/ishtar.generator/GeneratorContext.cs index 9ab7e664..ae7f69f7 100644 --- a/runtime/ishtar.generator/GeneratorContext.cs +++ b/runtime/ishtar.generator/GeneratorContext.cs @@ -80,7 +80,7 @@ public bool HasDefinedType(IdentifierExpression id) } public ClassBuilder CreateHiddenType(string name) { - QualityTypeName fullName = $"{Module.Name}%global::internal/{name}"; + QualityTypeName fullName = $"{Module.Name}%internal/{name}"; var currentType = Module.FindType(fullName, false, false); @@ -98,7 +98,7 @@ public ClassBuilder CreateHiddenType(string name) public ClassBuilder CreateHiddenType(string name, VeinClass parent) { - QualityTypeName fullName = $"{Module.Name}%global::internal/{name}"; + QualityTypeName fullName = $"{Module.Name}%internal/{name}"; var currentType = Module.FindType(fullName, false, false); @@ -169,7 +169,7 @@ public VeinComplexType ResolveScopedIdentifierType(IdentifierExpression id) public VeinClass CreateFunctionMulticastGroup(VeinMethodSignature sig) { var @base = CurrentScope.Context.Module - .FindType(new QualityTypeName("std", "FunctionMulticast", "global::std"), + .FindType(new QualityTypeName("std", "FunctionMulticast", "std"), true, true); var hiddenClass = CurrentScope.Context diff --git a/runtime/ishtar.vm/ModuleEx.cs b/runtime/ishtar.vm/ModuleEx.cs index a4eeea35..978ba2fb 100644 --- a/runtime/ishtar.vm/ModuleEx.cs +++ b/runtime/ishtar.vm/ModuleEx.cs @@ -1,7 +1,7 @@ //namespace vein.runtime //{ // using System.Linq; -// using global::ishtar; +// using ishtar; // public static unsafe class ModuleEx // { diff --git a/runtime/ishtar.vm/VirtualMachine.cs b/runtime/ishtar.vm/VirtualMachine.cs index 6acc98bb..b1f834ce 100644 --- a/runtime/ishtar.vm/VirtualMachine.cs +++ b/runtime/ishtar.vm/VirtualMachine.cs @@ -53,7 +53,7 @@ public static VirtualMachine Create(string name) vm.InternalModule = vm.Vault.DefineModule("$ishtar$"); - vm.InternalClass = vm.InternalModule->DefineClass("sys%global::$ishtar$/global".L(), + vm.InternalClass = vm.InternalModule->DefineClass("sys%$ishtar$/global".L(), vm.Types->ObjectClass); vm.Frames = new IshtarFrames(vm); diff --git a/runtime/ishtar.vm/runtime/KnowTypes.cs b/runtime/ishtar.vm/runtime/KnowTypes.cs index 7b166964..23620329 100644 --- a/runtime/ishtar.vm/runtime/KnowTypes.cs +++ b/runtime/ishtar.vm/runtime/KnowTypes.cs @@ -14,7 +14,7 @@ public static class Reflection public static class Native { public static QualityTypeName NativeHandleTypeName = - new("std", nameof(NativeHandle), "global::std/native"); + new("std", nameof(NativeHandle), "std/native"); public static RuntimeIshtarClass* NativeHandle(CallFrame* frame) => findType(NativeHandleTypeName, frame); @@ -22,28 +22,28 @@ public static class Native public static QualityTypeName FileNotFoundFaultTypeName = - new("std", nameof(FileNotFoundFault), "global::std"); + new("std", nameof(FileNotFoundFault), "std"); public static RuntimeIshtarClass* FileNotFoundFault(CallFrame* frame) => findType(FileNotFoundFaultTypeName, frame); } - public static QualityTypeName TypeInfoTypeName = new("std", nameof(Type), "global::std"); - public static QualityTypeName FieldInfoTypeName = new("std", nameof(Field), "global::std"); - public static QualityTypeName FunctionInfoTypeName = new("std", nameof(Function), "global::std"); + public static QualityTypeName TypeInfoTypeName = new("std", nameof(Type), "std"); + public static QualityTypeName FieldInfoTypeName = new("std", nameof(Field), "std"); + public static QualityTypeName FunctionInfoTypeName = new("std", nameof(Function), "std"); - public static QualityTypeName NullPointerExceptionTypeName = new("std", "NullPointerException", "global::std"); - public static QualityTypeName IncorrectCastFaultTypeName = new("std", "IncorrectCastFault", "global::std"); + public static QualityTypeName NullPointerExceptionTypeName = new("std", "NullPointerException", "std"); + public static QualityTypeName IncorrectCastFaultTypeName = new("std", "IncorrectCastFault", "std"); public static QualityTypeName FreeImmortalObjectFaultTypeName = - new("std", nameof(FreeImmortalObjectFault), "global::std"); + new("std", nameof(FreeImmortalObjectFault), "std"); public static QualityTypeName TypeNotFoundFaultTypeName = - new("std", nameof(TypeNotFoundFault), "global::std/reflection"); + new("std", nameof(TypeNotFoundFault), "std/reflection"); public static QualityTypeName MultipleTypeFoundFaultTypeName = - new("std", nameof(MultipleTypeFoundFault), "global::std/reflection"); + new("std", nameof(MultipleTypeFoundFault), "std/reflection"); public static QualityTypeName PlatformIsNotSupportFaultTypeName = - new("std", nameof(PlatformIsNotSupportFault), "global::std"); - public static QualityTypeName IshatFault = new("std", nameof(IshatFault), "global::std"); + new("std", nameof(PlatformIsNotSupportFault), "std"); + public static QualityTypeName IshatFault = new("std", nameof(IshatFault), "std"); public static RuntimeIshtarClass* NullPointerException(CallFrame* frame) => findType(NullPointerExceptionTypeName, frame); diff --git a/runtime/ishtar.vm/runtime/vm/IshtarTypes.cs b/runtime/ishtar.vm/runtime/vm/IshtarTypes.cs index 9b108d08..1e9019f9 100644 --- a/runtime/ishtar.vm/runtime/vm/IshtarTypes.cs +++ b/runtime/ishtar.vm/runtime/vm/IshtarTypes.cs @@ -89,34 +89,34 @@ public readonly unsafe struct IshtarTypes( *module = new RuntimeIshtarModule(vault, "unnamed_types", module, new IshtarVersion(0, 0)); - var objectClass = r->create($"std%global::std/Object".L(), null, module, TYPE_OBJECT); - var valueTypeClass = r->create($"std%global::std/ValueType".L(), null, module, TYPE_OBJECT); + var objectClass = r->create($"std%std/Object".L(), null, module, TYPE_OBJECT); + var valueTypeClass = r->create($"std%std/ValueType".L(), null, module, TYPE_OBJECT); *r = new IshtarTypes( objectClass, valueTypeClass, - r->create($"std%global::std/Void".L(), valueTypeClass, module, TYPE_VOID), - r->create($"std%global::std/String".L(), objectClass, module, TYPE_STRING), - r->create($"std%global::std/Byte".L(), valueTypeClass, module, TYPE_U1), - r->create($"std%global::std/SByte".L(), valueTypeClass, module, TYPE_I1), - r->create($"std%global::std/Int16".L(), valueTypeClass, module, TYPE_I2), - r->create($"std%global::std/Int32".L(), valueTypeClass, module, TYPE_I4), - r->create($"std%global::std/Int64".L(), valueTypeClass, module, TYPE_I8), - r->create($"std%global::std/UInt16".L(), valueTypeClass, module, TYPE_U2), - r->create($"std%global::std/UInt32".L(), valueTypeClass, module, TYPE_U4), - r->create($"std%global::std/UInt64".L(), valueTypeClass,module, TYPE_U8), - r->create($"std%global::std/Half".L(), valueTypeClass, module, TYPE_R2), - r->create($"std%global::std/Float".L(), valueTypeClass, module, TYPE_R4), - r->create($"std%global::std/Double".L(), valueTypeClass, module, TYPE_R8), - r->create($"std%global::std/Decimal".L(), valueTypeClass, module, TYPE_R16), - r->create($"std%global::std/Boolean".L(), valueTypeClass, module, TYPE_BOOLEAN), - r->create($"std%global::std/Char".L(), valueTypeClass, module, TYPE_CHAR), - r->create($"std%global::std/Array".L(), objectClass, module, TYPE_ARRAY), - r->create($"std%global::std/Exception".L(), objectClass, module, TYPE_CLASS), - r->create($"std%global::std/Raw".L(), valueTypeClass, module, TYPE_RAW), - r->create($"std%global::std/Aspect".L(), objectClass, module, TYPE_CLASS), - r->create($"std%global::std/Function".L(), objectClass, module, TYPE_FUNCTION), - r->create($"std%global::std/Range".L(), objectClass, module, TYPE_CLASS) + r->create($"std%std/Void".L(), valueTypeClass, module, TYPE_VOID), + r->create($"std%std/String".L(), objectClass, module, TYPE_STRING), + r->create($"std%std/Byte".L(), valueTypeClass, module, TYPE_U1), + r->create($"std%std/SByte".L(), valueTypeClass, module, TYPE_I1), + r->create($"std%std/Int16".L(), valueTypeClass, module, TYPE_I2), + r->create($"std%std/Int32".L(), valueTypeClass, module, TYPE_I4), + r->create($"std%std/Int64".L(), valueTypeClass, module, TYPE_I8), + r->create($"std%std/UInt16".L(), valueTypeClass, module, TYPE_U2), + r->create($"std%std/UInt32".L(), valueTypeClass, module, TYPE_U4), + r->create($"std%std/UInt64".L(), valueTypeClass,module, TYPE_U8), + r->create($"std%std/Half".L(), valueTypeClass, module, TYPE_R2), + r->create($"std%std/Float".L(), valueTypeClass, module, TYPE_R4), + r->create($"std%std/Double".L(), valueTypeClass, module, TYPE_R8), + r->create($"std%std/Decimal".L(), valueTypeClass, module, TYPE_R16), + r->create($"std%std/Boolean".L(), valueTypeClass, module, TYPE_BOOLEAN), + r->create($"std%std/Char".L(), valueTypeClass, module, TYPE_CHAR), + r->create($"std%std/Array".L(), objectClass, module, TYPE_ARRAY), + r->create($"std%std/Exception".L(), objectClass, module, TYPE_CLASS), + r->create($"std%std/Raw".L(), valueTypeClass, module, TYPE_RAW), + r->create($"std%std/Aspect".L(), objectClass, module, TYPE_CLASS), + r->create($"std%std/Function".L(), objectClass, module, TYPE_FUNCTION), + r->create($"std%std/Range".L(), objectClass, module, TYPE_CLASS) ); r->Add(objectClass, false); r->Add(r->VoidClass, false); diff --git a/test/ishtar_test/FECallTest.cs b/test/ishtar_test/FECallTest.cs index fa243cf3..a7009647 100644 --- a/test/ishtar_test/FECallTest.cs +++ b/test/ishtar_test/FECallTest.cs @@ -13,7 +13,7 @@ public void Call_FE_Console_Println() { using var scope = CreateScope(); scope.OnClassBuild((x, storage) => { - var type = x.Owner.FindType("std%global::vein/lang/Out", true); + var type = x.Owner.FindType("std%vein/lang/Out", true); storage.method = type.FindMethod("@_println"); }); diff --git a/test/ishtar_test/InterfacesTest.cs b/test/ishtar_test/InterfacesTest.cs index 3941a11e..a9af1fa3 100644 --- a/test/ishtar_test/InterfacesTest.cs +++ b/test/ishtar_test/InterfacesTest.cs @@ -15,8 +15,8 @@ public unsafe class InterfacesTest : IshtarTestBase //{ // var module = new RuntimeIshtarModule(GetVM().Vault, _module.Name); - // var IFoo1 = new RuntimeIshtarClass("tst%global::foo/IFoo1", T.OBJECT, module); - // var IFoo2 = new RuntimeIshtarClass("tst%global::foo/IFoo2", T.OBJECT, module); + // var IFoo1 = new RuntimeIshtarClass("tst%foo/IFoo1", T.OBJECT, module); + // var IFoo2 = new RuntimeIshtarClass("tst%foo/IFoo2", T.OBJECT, module); // IFoo1.Flags = ClassFlags.Interface | ClassFlags.Public | ClassFlags.Abstract; @@ -28,7 +28,7 @@ public unsafe class InterfacesTest : IshtarTestBase // IFoo2.DefineMethod("moomoo", T.VOID, // MethodFlags.Abstract | MethodFlags.Public); - // var Zoo1 = new RuntimeIshtarClass("tst%global::foo/Zoo1", new [] + // var Zoo1 = new RuntimeIshtarClass("tst%foo/Zoo1", new [] // { // T.OBJECT, // IFoo1, diff --git a/test/ishtar_test/IshtarTestBase.cs b/test/ishtar_test/IshtarTestBase.cs index 5de98428..eecd5059 100644 --- a/test/ishtar_test/IshtarTestBase.cs +++ b/test/ishtar_test/IshtarTestBase.cs @@ -60,7 +60,7 @@ public IshtarPreparationContext OnClassBuild(Action actio public void OnCodeBuild(Action ctor) { - Class = Module.DefineClass($"global::test/testClass_{testCase}_{uid}"); + Class = Module.DefineClass($"test/testClass_{testCase}_{uid}"); ClassCtor?.Invoke(Class, _context); var _method = Class.DefineMethod($"master_{testCase}_{uid}", MethodFlags.Public | MethodFlags.Static, VeinTypeCode.TYPE_OBJECT.AsClass()(Types)); diff --git a/test/ishtar_test/NotCompletedValidateCallTest.cs b/test/ishtar_test/NotCompletedValidateCallTest.cs index fecb6b1a..3d4737b3 100644 --- a/test/ishtar_test/NotCompletedValidateCallTest.cs +++ b/test/ishtar_test/NotCompletedValidateCallTest.cs @@ -9,7 +9,7 @@ public void ValidateNotCompletedClasses() { using var scope = CreateScope(); scope.OnClassBuild((x, storage) => { - var type = x.Owner.FindType("std%global::vein/lang/Out", true); + var type = x.Owner.FindType("std%vein/lang/Out", true); storage.method = type.FindMethod("@_println"); }); diff --git a/test/ishtar_test/override_test.cs b/test/ishtar_test/override_test.cs index fb93a011..4a6b4674 100644 --- a/test/ishtar_test/override_test.cs +++ b/test/ishtar_test/override_test.cs @@ -13,13 +13,13 @@ public unsafe class OverrideTest : IshtarTestBase //{ // var module = new RuntimeIshtarModule(GetVM().Vault, _module.Name); - // var b1 = new RuntimeIshtarClass("tst%global::foo/bar1", VeinTypeCode.TYPE_OBJECT.AsRuntimeClass(Types), module); + // var b1 = new RuntimeIshtarClass("tst%foo/bar1", VeinTypeCode.TYPE_OBJECT.AsRuntimeClass(Types), module); // var m1 = b1.DefineMethod("soq", VeinTypeCode.TYPE_VOID.AsRuntimeClass(Types), MethodFlags.Public | MethodFlags.Virtual); // m1.PIInfo = PInvokeInfo.New(((delegate*)&Foo1)); - // var b2 = new RuntimeIshtarClass("tst%global::foo/bar2", b1, module); + // var b2 = new RuntimeIshtarClass("tst%foo/bar2", b1, module); // var m2 = b2.DefineMethod("soq", VeinTypeCode.TYPE_VOID.AsRuntimeClass(Types), MethodFlags.Public | MethodFlags.Override); @@ -47,13 +47,13 @@ public void TestNotValidCall() { //var module = new RuntimeIshtarModule(AppVault.CurrentVault, _module.Name); - //var b1 = new RuntimeIshtarClass("tst%global::foo/bar1", VeinTypeCode.TYPE_OBJECT.AsRuntimeClass(), module); + //var b1 = new RuntimeIshtarClass("tst%foo/bar1", VeinTypeCode.TYPE_OBJECT.AsRuntimeClass(), module); //var m1 = b1.DefineMethod("soq", VeinTypeCode.TYPE_VOID.AsRuntimeClass(), MethodFlags.Public | MethodFlags.Virtual); //m1.PIInfo = PInvokeInfo.New(((delegate*)&Foo1)); - //var b2 = new RuntimeIshtarClass("tst%global::foo/bar2", b1, module); + //var b2 = new RuntimeIshtarClass("tst%foo/bar2", b1, module); //var m2 = b2.DefineMethod("soq", VeinTypeCode.TYPE_VOID.AsRuntimeClass(), MethodFlags.Public | MethodFlags.Override); diff --git a/test/ishtar_test/std.wll.lay b/test/ishtar_test/std.wll.lay index 8577f2ab..1ce84226 100644 --- a/test/ishtar_test/std.wll.lay +++ b/test/ishtar_test/std.wll.lay @@ -4,7 +4,7 @@ .table const { .s 000000:'App' - .s 000001:'global::vein/lang' + .s 000001:'vein/lang' .s 000002:'std' .s 000003:'BitConvert' .s 000004:'NullPointerException' @@ -20,26 +20,26 @@ .s 000014:'Testable' .s 000015:'TimeSpan' .s 000016:'LineAspect' - .s 000017:'global::vein/lang/aspects' + .s 000017:'vein/lang/aspects' .s 000018:'getUsages' .s 000019:'getUsages()' .s 000020:'IYieldable' - .s 000021:'global::vein/lang/collections' + .s 000021:'vein/lang/collections' .s 000022:'IYield' .s 000023:'Yieldable' .s 000024:'IEEEConsts' .s 000025:'NetworkStream' - .s 000026:'global::vein/lang/network' + .s 000026:'vein/lang/network' .s 000027:'TcpListener' .s 000028:'TcpSocket' .s 000029:'BigInt' - .s 000030:'global::vein/lang/numeric' + .s 000030:'vein/lang/numeric' .s 000031:'Quaternion' .s 000032:'TypeNotFoundFault' .s 000033:'MemberNotFoundFault' .s 000034:'MultipleTypeFoundFault' .s 000035:'DeprecatedAspect' - .s 000036:'global::vein/lang/workspace' + .s 000036:'vein/lang/workspace' .s 000037:'MaybeNullableAspect' .s 000038:'@_get_os_value' .s 000039:'@_get_os_value()' @@ -155,7 +155,7 @@ .s 000149:'type_ctor()' .s 000150:'Array' .s 000151:'StaticArray_INIT_object_0_0' - .s 000152:'global::internal' + .s 000152:'internal' .s 000153:'$init' .s 000154:'$init()' .s 000155:'Null pointer detected' @@ -213,57 +213,57 @@ .s 000207:'w' .s 000208:'m' .s 000209:'0.12.11.0' - .t 000000:'std%global::vein/lang/App' - .t 000001:'std%global::vein/lang/Object' - .t 000002:'std%global::internal/StaticArray_INIT_object_0_0' - .t 000003:'std%global::vein/lang/Array' - .t 000004:'std%global::vein/lang/ValueType' - .t 000005:'std%global::vein/lang/Exception' - .t 000006:'std%global::vein/lang/GC' - .t 000007:'std%global::vein/lang/Guid' - .t 000008:'std%global::vein/lang/IEEEConsts' - .t 000009:'std%global::vein/lang/Out' - .t 000010:'std%global::vein/lang/Range' - .t 000011:'std%global::vein/lang/String' - .t 000012:'std%global::vein/lang/TimeSpan' - .t 000013:'std%global::vein/lang/Aspect' - .t 000014:'std%global::vein/lang/collections/Yieldable' - .t 000015:'std%global::vein/lang/network/TcpListener' - .t 000016:'std%global::vein/lang/network/TcpSocket' - .t 000017:'std%global::vein/lang/numeric/Quaternion' - .t 000018:'std%global::vein/lang/Int32' - .t 000019:'std%global::vein/lang/Void' - .t 000020:'std%global::vein/lang/Boolean' - .t 000021:'std%global::vein/lang/Int64' - .t 000022:'std%global::vein/lang/BitConvert' - .t 000023:'std%global::vein/lang/Byte' - .t 000024:'std%global::vein/lang/Char' - .t 000025:'std%global::vein/lang/Decimal' - .t 000026:'std%global::vein/lang/Double' - .t 000027:'std%global::vein/lang/NullPointerException' - .t 000028:'std%global::vein/lang/TypeLoadFault' - .t 000029:'std%global::vein/lang/IncorrectCastFault' - .t 000030:'std%global::vein/lang/FreeImmortalObjectFault' - .t 000031:'std%global::vein/lang/PlatformIsNotSupportFault' - .t 000032:'std%global::vein/lang/Float' - .t 000033:'std%global::vein/lang/UInt64' - .t 000034:'std%global::vein/lang/Int16' - .t 000035:'std%global::vein/lang/Half' - .t 000036:'std%global::vein/lang/Mathf' - .t 000037:'std%global::vein/lang/UInt32' - .t 000038:'std%global::vein/lang/Raw' - .t 000039:'std%global::vein/lang/Testable' - .t 000040:'std%global::vein/lang/UInt16' - .t 000041:'std%global::vein/lang/aspects/LineAspect' - .t 000042:'std%global::vein/lang/collections/IYieldable' - .t 000043:'std%global::vein/lang/collections/IYield' - .t 000044:'std%global::vein/lang/network/NetworkStream' - .t 000045:'std%global::vein/lang/numeric/BigInt' - .t 000046:'std%global::vein/lang/TypeNotFoundFault' - .t 000047:'std%global::vein/lang/MemberNotFoundFault' - .t 000048:'std%global::vein/lang/MultipleTypeFoundFault' - .t 000049:'std%global::vein/lang/workspace/DeprecatedAspect' - .t 000050:'std%global::vein/lang/workspace/MaybeNullableAspect' + .t 000000:'std%vein/lang/App' + .t 000001:'std%vein/lang/Object' + .t 000002:'std%internal/StaticArray_INIT_object_0_0' + .t 000003:'std%vein/lang/Array' + .t 000004:'std%vein/lang/ValueType' + .t 000005:'std%vein/lang/Exception' + .t 000006:'std%vein/lang/GC' + .t 000007:'std%vein/lang/Guid' + .t 000008:'std%vein/lang/IEEEConsts' + .t 000009:'std%vein/lang/Out' + .t 000010:'std%vein/lang/Range' + .t 000011:'std%vein/lang/String' + .t 000012:'std%vein/lang/TimeSpan' + .t 000013:'std%vein/lang/Aspect' + .t 000014:'std%vein/lang/collections/Yieldable' + .t 000015:'std%vein/lang/network/TcpListener' + .t 000016:'std%vein/lang/network/TcpSocket' + .t 000017:'std%vein/lang/numeric/Quaternion' + .t 000018:'std%vein/lang/Int32' + .t 000019:'std%vein/lang/Void' + .t 000020:'std%vein/lang/Boolean' + .t 000021:'std%vein/lang/Int64' + .t 000022:'std%vein/lang/BitConvert' + .t 000023:'std%vein/lang/Byte' + .t 000024:'std%vein/lang/Char' + .t 000025:'std%vein/lang/Decimal' + .t 000026:'std%vein/lang/Double' + .t 000027:'std%vein/lang/NullPointerException' + .t 000028:'std%vein/lang/TypeLoadFault' + .t 000029:'std%vein/lang/IncorrectCastFault' + .t 000030:'std%vein/lang/FreeImmortalObjectFault' + .t 000031:'std%vein/lang/PlatformIsNotSupportFault' + .t 000032:'std%vein/lang/Float' + .t 000033:'std%vein/lang/UInt64' + .t 000034:'std%vein/lang/Int16' + .t 000035:'std%vein/lang/Half' + .t 000036:'std%vein/lang/Mathf' + .t 000037:'std%vein/lang/UInt32' + .t 000038:'std%vein/lang/Raw' + .t 000039:'std%vein/lang/Testable' + .t 000040:'std%vein/lang/UInt16' + .t 000041:'std%vein/lang/aspects/LineAspect' + .t 000042:'std%vein/lang/collections/IYieldable' + .t 000043:'std%vein/lang/collections/IYield' + .t 000044:'std%vein/lang/network/NetworkStream' + .t 000045:'std%vein/lang/numeric/BigInt' + .t 000046:'std%vein/lang/TypeNotFoundFault' + .t 000047:'std%vein/lang/MemberNotFoundFault' + .t 000048:'std%vein/lang/MultipleTypeFoundFault' + .t 000049:'std%vein/lang/workspace/DeprecatedAspect' + .t 000050:'std%vein/lang/workspace/MaybeNullableAspect' .f 000000:'Array.!!value' .f 000001:'Array.!!block' .f 000002:'Array.!!size' @@ -446,7 +446,7 @@ @'UInt64.MaxValue' = '18446744073709551615' @'UInt64.MinValue' = '0' - .namespace 'global::vein/lang' + .namespace 'vein/lang' .class 'App' public static extends 'Object' { .method extern @_get_os_value () static private -> Int32; @@ -519,7 +519,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .struct 'Array' public special extends 'Object' { .field '!!value' as 'ValueType' special @@ -561,14 +561,14 @@ .locals { } /* ::0010 */ .call StaticArray_INIT_object_0_0::$init() - /* ::0020 */ .stsf empty std%global::vein/lang/Array, Public, Special + /* ::0020 */ .stsf empty std%vein/lang/Array, Public, Special /* ::0022 */ .ret } } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .class 'BitConvert' public extends 'Object' { .method special 'ctor' (: BitConvert) public special -> BitConvert @@ -598,7 +598,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .struct 'Boolean' public special extends 'ValueType' { .field '!!value' as 'ValueType' special @@ -633,7 +633,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .struct 'Byte' public special extends 'ValueType' { .field '!!value' as 'ValueType' special @@ -664,7 +664,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .struct 'Char' public special extends 'ValueType' { .field '!!value' as 'ValueType' special @@ -695,7 +695,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .struct 'Decimal' public special extends 'ValueType' { .field '!!value' as 'ValueType' special @@ -726,7 +726,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .struct 'Double' public special extends 'ValueType' { .field '!!value' as 'ValueType' special @@ -757,7 +757,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .class 'Exception' public special extends 'Object' { .field 'message' as 'String' public @@ -769,7 +769,7 @@ .locals { } /* ::0002 */ .ldarg.0 - /* ::0012 */ .ldf message std%global::vein/lang/String, Public, Special + /* ::0012 */ .ldf message std%vein/lang/String, Public, Special /* ::0014 */ .ret } @@ -785,7 +785,7 @@ /* ::0012 */ .call Object::ctor(: Object) /* ::0014 */ .ldnull /* ::0016 */ .ldarg.0 - /* ::0026 */ .stf message std%global::vein/lang/String, Public, Special + /* ::0026 */ .stf message std%vein/lang/String, Public, Special /* ::0028 */ .ldarg.0 /* ::0030 */ .ret @@ -804,7 +804,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .class 'NullPointerException' public extends 'Exception' { .method 'ctor' (: NullPointerException) public -> NullPointerException @@ -817,7 +817,7 @@ /* ::0006 */ .ldc.str .0x0000009B /* ::0008 */ .ldarg.0 /* ::0010 */ .ldarg.0 - /* ::0020 */ .stf message std%global::vein/lang/String, Public, Special + /* ::0020 */ .stf message std%vein/lang/String, Public, Special /* ::0022 */ .ldarg.0 /* ::0032 */ .call Exception::ctor(: Exception) /* ::0034 */ .ldarg.0 @@ -838,7 +838,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .class 'TypeLoadFault' public extends 'Exception' { .method 'ctor' (: TypeLoadFault, msg: String) public -> TypeLoadFault @@ -851,7 +851,7 @@ /* ::0002 */ .ldarg.1 /* ::0004 */ .ldarg.0 /* ::0006 */ .ldarg.0 - /* ::0016 */ .stf message std%global::vein/lang/String, Public, Special + /* ::0016 */ .stf message std%vein/lang/String, Public, Special /* ::0018 */ .ldarg.0 /* ::0028 */ .call Exception::ctor(: Exception) /* ::0030 */ .ldarg.0 @@ -872,7 +872,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .class 'IncorrectCastFault' public extends 'Exception' { .method 'ctor' (: IncorrectCastFault) public -> IncorrectCastFault @@ -899,7 +899,7 @@ /* ::0002 */ .ldarg.1 /* ::0004 */ .ldarg.0 /* ::0006 */ .ldarg.0 - /* ::0016 */ .stf message std%global::vein/lang/String, Public, Special + /* ::0016 */ .stf message std%vein/lang/String, Public, Special } @@ -916,7 +916,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .class 'FreeImmortalObjectFault' public extends 'Exception' { .method 'ctor' (: FreeImmortalObjectFault) public -> FreeImmortalObjectFault @@ -943,7 +943,7 @@ /* ::0002 */ .ldarg.1 /* ::0004 */ .ldarg.0 /* ::0006 */ .ldarg.0 - /* ::0016 */ .stf message std%global::vein/lang/String, Public, Special + /* ::0016 */ .stf message std%vein/lang/String, Public, Special } @@ -960,7 +960,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .class 'PlatformIsNotSupportFault' public extends 'Exception' { .method 'ctor' (: PlatformIsNotSupportFault) public -> PlatformIsNotSupportFault @@ -987,7 +987,7 @@ /* ::0002 */ .ldarg.1 /* ::0004 */ .ldarg.0 /* ::0006 */ .ldarg.0 - /* ::0016 */ .stf message std%global::vein/lang/String, Public, Special + /* ::0016 */ .stf message std%vein/lang/String, Public, Special } @@ -1004,7 +1004,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .struct 'Float' public special extends 'ValueType' { .field '!!value' as 'ValueType' special @@ -1035,7 +1035,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .class 'GC' public static extends 'Object' { .method extern _get_allocated () static private -> UInt64; @@ -1093,7 +1093,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .struct 'Guid' public extends 'ValueType', 'Object' { .field 'Empty' as 'Guid' public static readonly @@ -1121,37 +1121,37 @@ /* ::0024 */ .call Object::ctor(: Object) /* ::0026 */ .ldnull /* ::0028 */ .ldarg.0 - /* ::0038 */ .stf _a std%global::vein/lang/Int32, Public, Special + /* ::0038 */ .stf _a std%vein/lang/Int32, Public, Special /* ::0040 */ .ldnull /* ::0042 */ .ldarg.0 - /* ::0052 */ .stf _b std%global::vein/lang/Int16, Public, Special + /* ::0052 */ .stf _b std%vein/lang/Int16, Public, Special /* ::0054 */ .ldnull /* ::0056 */ .ldarg.0 - /* ::0066 */ .stf _c std%global::vein/lang/Int16, Public, Special + /* ::0066 */ .stf _c std%vein/lang/Int16, Public, Special /* ::0068 */ .ldnull /* ::0070 */ .ldarg.0 - /* ::0080 */ .stf _d std%global::vein/lang/Byte, Public, Special + /* ::0080 */ .stf _d std%vein/lang/Byte, Public, Special /* ::0082 */ .ldnull /* ::0084 */ .ldarg.0 - /* ::0094 */ .stf _e std%global::vein/lang/Byte, Public, Special + /* ::0094 */ .stf _e std%vein/lang/Byte, Public, Special /* ::0096 */ .ldnull /* ::0098 */ .ldarg.0 - /* ::0108 */ .stf _f std%global::vein/lang/Byte, Public, Special + /* ::0108 */ .stf _f std%vein/lang/Byte, Public, Special /* ::0110 */ .ldnull /* ::0112 */ .ldarg.0 - /* ::0122 */ .stf _g std%global::vein/lang/Byte, Public, Special + /* ::0122 */ .stf _g std%vein/lang/Byte, Public, Special /* ::0124 */ .ldnull /* ::0126 */ .ldarg.0 - /* ::0136 */ .stf _h std%global::vein/lang/Byte, Public, Special + /* ::0136 */ .stf _h std%vein/lang/Byte, Public, Special /* ::0138 */ .ldnull /* ::0140 */ .ldarg.0 - /* ::0150 */ .stf _i std%global::vein/lang/Byte, Public, Special + /* ::0150 */ .stf _i std%vein/lang/Byte, Public, Special /* ::0152 */ .ldnull /* ::0154 */ .ldarg.0 - /* ::0164 */ .stf _j std%global::vein/lang/Byte, Public, Special + /* ::0164 */ .stf _j std%vein/lang/Byte, Public, Special /* ::0166 */ .ldnull /* ::0168 */ .ldarg.0 - /* ::0178 */ .stf _k std%global::vein/lang/Byte, Public, Special + /* ::0178 */ .stf _k std%vein/lang/Byte, Public, Special /* ::0180 */ .ldarg.0 /* ::0182 */ .ret @@ -1164,16 +1164,16 @@ .locals 0x00000000 .locals { } - /* ::0006 */ .newobj [std%global::vein/lang/Guid] + /* ::0006 */ .newobj [std%vein/lang/Guid] /* ::0016 */ .call Guid::ctor(: Guid) - /* ::0026 */ .stsf Empty std%global::vein/lang/Guid, Public + /* ::0026 */ .stsf Empty std%vein/lang/Guid, Public /* ::0028 */ .ret } } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .struct 'Half' public special extends 'ValueType' { .field '!!value' as 'ValueType' special @@ -1252,7 +1252,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .struct 'Int16' public special extends 'ValueType' { .field '!!value' as 'ValueType' special @@ -1285,7 +1285,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .struct 'Int32' public special extends 'ValueType' { .field '!!value' as 'ValueType' special @@ -1318,7 +1318,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .struct 'Int64' public special extends 'ValueType' { .field '!!value' as 'ValueType' special @@ -1351,7 +1351,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .class 'Mathf' public static extends 'Object' { .field 'E' as 'Float' literal public @@ -1397,7 +1397,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .struct 'Object' public special extends { .method 'toString' (: Object) public virtual -> String @@ -1437,7 +1437,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .class 'Out' public static extends 'Object' { .method extern @_println (value: String) public static -> Void; @@ -1482,7 +1482,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .class 'Range' public special extends 'Object', 'ValueType' { .field 'Start' as 'UInt32' public @@ -1497,11 +1497,11 @@ /* ::0002 */ .ldarg.1 /* ::0004 */ .ldarg.0 /* ::0006 */ .ldarg.0 - /* ::0016 */ .stf Start std%global::vein/lang/UInt32, Public, Special + /* ::0016 */ .stf Start std%vein/lang/UInt32, Public, Special /* ::0018 */ .ldarg.2 /* ::0020 */ .ldarg.0 /* ::0022 */ .ldarg.0 - /* ::0032 */ .stf End std%global::vein/lang/UInt32, Public, Special + /* ::0032 */ .stf End std%vein/lang/UInt32, Public, Special /* ::0034 */ .ldarg.0 /* ::0044 */ .call Object::ctor(: Object) /* ::0046 */ .ldarg.0 @@ -1524,7 +1524,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .struct 'Raw' internal special extends 'Object' { .method special 'ctor' (: Raw) public special -> Raw @@ -1554,7 +1554,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .class 'String' public special extends 'Object' { .field '!!value' as 'Raw' special @@ -1597,7 +1597,7 @@ /* ::0012 */ .call ValueType::toString(: ValueType) /* ::0018 */ .stloc.s 0x00000000.int /* ::0020 */ .ldarg.0 - /* ::0020 */ /* access local, var: 't', index: '0', type: 'global::vein/lang/String' */ + /* ::0020 */ /* access local, var: 't', index: '0', type: 'vein/lang/String' */ /* ::0026 */ .ldloc.s 0x00000000.int /* ::0036 */ .call String::Concat(v1: String,v2: String) /* ::0038 */ .ret @@ -1647,14 +1647,14 @@ .locals { [0]: Array, {'a'} }; - /* ::0006 */ .ld.type [std%global::vein/lang/String] + /* ::0006 */ .ld.type [std%vein/lang/String] /* ::0008 */ .ldc.i4.1 /* ::0010 */ .newarr /* ::0012 */ .ldarg.1 /* ::0018 */ .stelem.s 0x00000000.int /* ::0024 */ .stloc.s 0x00000000.int /* ::0026 */ .ldarg.0 - /* ::0026 */ /* access local, var: 'a', index: '0', type: 'global::vein/lang/Array' */ + /* ::0026 */ /* access local, var: 'a', index: '0', type: 'vein/lang/Array' */ /* ::0032 */ .ldloc.s 0x00000000.int /* ::0042 */ .call String::_fmt(t: String,arr: Array) /* ::0044 */ .ret @@ -1670,7 +1670,7 @@ .locals { [0]: Array, {'a'} }; - /* ::0006 */ .ld.type [std%global::vein/lang/String] + /* ::0006 */ .ld.type [std%vein/lang/String] /* ::0008 */ .ldc.i4.2 /* ::0010 */ .newarr /* ::0012 */ .ldarg.1 @@ -1679,7 +1679,7 @@ /* ::0026 */ .stelem.s 0x00000001.int /* ::0032 */ .stloc.s 0x00000000.int /* ::0034 */ .ldarg.0 - /* ::0034 */ /* access local, var: 'a', index: '0', type: 'global::vein/lang/Array' */ + /* ::0034 */ /* access local, var: 'a', index: '0', type: 'vein/lang/Array' */ /* ::0040 */ .ldloc.s 0x00000000.int /* ::0050 */ .call String::_fmt(t: String,arr: Array) /* ::0052 */ .ret @@ -1695,7 +1695,7 @@ .locals { [0]: Array, {'a'} }; - /* ::0006 */ .ld.type [std%global::vein/lang/String] + /* ::0006 */ .ld.type [std%vein/lang/String] /* ::0008 */ .ldc.i4.3 /* ::0010 */ .newarr /* ::0012 */ .ldarg.1 @@ -1706,7 +1706,7 @@ /* ::0034 */ .stelem.s 0x00000002.int /* ::0040 */ .stloc.s 0x00000000.int /* ::0042 */ .ldarg.0 - /* ::0042 */ /* access local, var: 'a', index: '0', type: 'global::vein/lang/Array' */ + /* ::0042 */ /* access local, var: 'a', index: '0', type: 'vein/lang/Array' */ /* ::0048 */ .ldloc.s 0x00000000.int /* ::0058 */ .call String::_fmt(t: String,arr: Array) /* ::0060 */ .ret @@ -1740,7 +1740,7 @@ /* ::0012 */ .call Object::ctor(: Object) /* ::0014 */ .ldnull /* ::0016 */ .ldarg.0 - /* ::0026 */ .stf Length std%global::vein/lang/Int32, Public, Special + /* ::0026 */ .stf Length std%vein/lang/Int32, Public, Special /* ::0028 */ .ldarg.0 /* ::0030 */ .ret @@ -1759,7 +1759,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .class 'Testable' public extends 'Object' { .method 'master' () public static -> Void @@ -1802,7 +1802,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .class 'TimeSpan' public extends 'Object' { .field 'TicksPerDay' as 'Int64' public @@ -1822,27 +1822,27 @@ /* ::0002 */ .ldarg.1 /* ::0004 */ .ldarg.0 /* ::0006 */ .ldarg.0 - /* ::0016 */ .stf _ticks std%global::vein/lang/Int64, Public, Special + /* ::0016 */ .stf _ticks std%vein/lang/Int64, Public, Special /* ::0018 */ .ldarg.0 /* ::0028 */ .call Object::ctor(: Object) /* ::0038 */ .ldc.i8.s 0xC92A69C000.long /* ::0040 */ .ldarg.0 - /* ::0050 */ .stf TicksPerDay std%global::vein/lang/Int64, Public, Special + /* ::0050 */ .stf TicksPerDay std%vein/lang/Int64, Public, Special /* ::0060 */ .ldc.i8.s 0x861C46800.long /* ::0062 */ .ldarg.0 - /* ::0072 */ .stf TicksPerHour std%global::vein/lang/Int64, Public, Special + /* ::0072 */ .stf TicksPerHour std%vein/lang/Int64, Public, Special /* ::0082 */ .ldc.i8.s 0x23C34600.long /* ::0084 */ .ldarg.0 - /* ::0094 */ .stf TicksPerMinute std%global::vein/lang/Int64, Public, Special + /* ::0094 */ .stf TicksPerMinute std%vein/lang/Int64, Public, Special /* ::0104 */ .ldc.i8.s 0x00989680.long /* ::0106 */ .ldarg.0 - /* ::0116 */ .stf TicksPerSecond std%global::vein/lang/Int64, Public, Special + /* ::0116 */ .stf TicksPerSecond std%vein/lang/Int64, Public, Special /* ::0126 */ .ldc.i8.s 0x00002710.long /* ::0128 */ .ldarg.0 - /* ::0138 */ .stf TicksPerMillisecond std%global::vein/lang/Int64, Public, Special + /* ::0138 */ .stf TicksPerMillisecond std%vein/lang/Int64, Public, Special /* ::0144 */ .ldc.f4 1E-07.float /* ::0146 */ .ldarg.0 - /* ::0156 */ .stf SecondsPerTick std%global::vein/lang/Float, Public, Special + /* ::0156 */ .stf SecondsPerTick std%vein/lang/Float, Public, Special /* ::0158 */ .ldarg.0 /* ::0160 */ .ret @@ -1868,7 +1868,7 @@ .locals { } /* ::0002 */ .ldarg.0 - /* ::0012 */ .ldf _ticks std%global::vein/lang/Int64, Public, Special + /* ::0012 */ .ldf _ticks std%vein/lang/Int64, Public, Special /* ::0014 */ .ret } @@ -1881,9 +1881,9 @@ .locals { } /* ::0002 */ .ldarg.0 - /* ::0012 */ .ldf _ticks std%global::vein/lang/Int64, Public, Special + /* ::0012 */ .ldf _ticks std%vein/lang/Int64, Public, Special /* ::0014 */ .ldarg.0 - /* ::0024 */ .ldf TicksPerDay std%global::vein/lang/Int64, Public, Special + /* ::0024 */ .ldf TicksPerDay std%vein/lang/Int64, Public, Special /* ::0026 */ .div /* ::0028 */ .ret @@ -1897,9 +1897,9 @@ .locals { } /* ::0002 */ .ldarg.0 - /* ::0012 */ .ldf _ticks std%global::vein/lang/Int64, Public, Special + /* ::0012 */ .ldf _ticks std%vein/lang/Int64, Public, Special /* ::0014 */ .ldarg.0 - /* ::0024 */ .ldf TicksPerHour std%global::vein/lang/Int64, Public, Special + /* ::0024 */ .ldf TicksPerHour std%vein/lang/Int64, Public, Special /* ::0026 */ .div /* ::0036 */ .ldc.i8.s 0x00000018.long /* ::0038 */ .mod @@ -1915,9 +1915,9 @@ .locals { } /* ::0002 */ .ldarg.0 - /* ::0012 */ .ldf _ticks std%global::vein/lang/Int64, Public, Special + /* ::0012 */ .ldf _ticks std%vein/lang/Int64, Public, Special /* ::0014 */ .ldarg.0 - /* ::0024 */ .ldf TicksPerMillisecond std%global::vein/lang/Int64, Public, Special + /* ::0024 */ .ldf TicksPerMillisecond std%vein/lang/Int64, Public, Special /* ::0026 */ .div /* ::0036 */ .ldc.i8.s 0x000003E8.long /* ::0038 */ .mod @@ -1933,9 +1933,9 @@ .locals { } /* ::0002 */ .ldarg.0 - /* ::0012 */ .ldf _ticks std%global::vein/lang/Int64, Public, Special + /* ::0012 */ .ldf _ticks std%vein/lang/Int64, Public, Special /* ::0014 */ .ldarg.0 - /* ::0024 */ .ldf TicksPerMinute std%global::vein/lang/Int64, Public, Special + /* ::0024 */ .ldf TicksPerMinute std%vein/lang/Int64, Public, Special /* ::0026 */ .div /* ::0036 */ .ldc.i8.s 0x0000003C.long /* ::0038 */ .mod @@ -1951,9 +1951,9 @@ .locals { } /* ::0002 */ .ldarg.0 - /* ::0012 */ .ldf _ticks std%global::vein/lang/Int64, Public, Special + /* ::0012 */ .ldf _ticks std%vein/lang/Int64, Public, Special /* ::0014 */ .ldarg.0 - /* ::0024 */ .ldf TicksPerSecond std%global::vein/lang/Int64, Public, Special + /* ::0024 */ .ldf TicksPerSecond std%vein/lang/Int64, Public, Special /* ::0026 */ .div /* ::0036 */ .ldc.i8.s 0x0000003C.long /* ::0038 */ .mod @@ -1969,9 +1969,9 @@ .locals { } /* ::0002 */ .ldarg.0 - /* ::0012 */ .ldf _ticks std%global::vein/lang/Int64, Public, Special + /* ::0012 */ .ldf _ticks std%vein/lang/Int64, Public, Special /* ::0014 */ .ldarg.0 - /* ::0024 */ .ldf SecondsPerTick std%global::vein/lang/Float, Public, Special + /* ::0024 */ .ldf SecondsPerTick std%vein/lang/Float, Public, Special /* ::0026 */ .mul /* ::0028 */ .ret @@ -1990,7 +1990,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .struct 'UInt16' public special extends 'ValueType' { .field '!!value' as 'ValueType' special @@ -2023,7 +2023,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .struct 'UInt32' public special extends 'ValueType' { .field '!!value' as 'ValueType' special @@ -2056,7 +2056,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .struct 'UInt64' public special extends 'ValueType' { .field '!!value' as 'ValueType' special @@ -2089,7 +2089,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .struct 'ValueType' public special extends { .field '!!value' as 'Raw' special @@ -2129,7 +2129,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .struct 'Void' public special extends 'ValueType' { .method special 'ctor' (: Void) public special -> Void @@ -2159,7 +2159,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .class 'Aspect' public special extends 'Object' { .field 'USAGE_METHOD' as 'Int32' public static @@ -2197,26 +2197,26 @@ /* ::0002 */ .ldc.i4.1 /* ::0004 */ .ldc.i4.1 /* ::0006 */ .shl - /* ::0016 */ .stsf USAGE_METHOD std%global::vein/lang/Int32, Public, Special + /* ::0016 */ .stsf USAGE_METHOD std%vein/lang/Int32, Public, Special /* ::0018 */ .ldc.i4.1 /* ::0020 */ .ldc.i4.2 /* ::0022 */ .shl - /* ::0032 */ .stsf USAGE_CLASS std%global::vein/lang/Int32, Public, Special + /* ::0032 */ .stsf USAGE_CLASS std%vein/lang/Int32, Public, Special /* ::0034 */ .ldc.i4.1 /* ::0036 */ .ldc.i4.3 /* ::0038 */ .shl - /* ::0048 */ .stsf USAGE_FIELD std%global::vein/lang/Int32, Public, Special + /* ::0048 */ .stsf USAGE_FIELD std%vein/lang/Int32, Public, Special /* ::0050 */ .ldc.i4.1 /* ::0052 */ .ldc.i4.4 /* ::0054 */ .shl - /* ::0064 */ .stsf USAGE_PROPERTY std%global::vein/lang/Int32, Public, Special + /* ::0064 */ .stsf USAGE_PROPERTY std%vein/lang/Int32, Public, Special /* ::0066 */ .ret } } - .namespace 'global::vein/lang/aspects' + .namespace 'vein/lang/aspects' .class 'LineAspect' public aspect extends 'Aspect' { .method 'getUsages' () public override -> Int32 @@ -2233,7 +2233,7 @@ } - .namespace 'global::vein/lang/collections' + .namespace 'vein/lang/collections' .interface 'IYieldable' public abstract extends 'Object' { .method 'get_Current' (: IYieldable) abstract -> Object @@ -2271,7 +2271,7 @@ } - .namespace 'global::vein/lang/collections' + .namespace 'vein/lang/collections' .interface 'IYield' public abstract extends 'Object' { .method 'get_Yield' (: IYield) public abstract -> IYieldable @@ -2305,7 +2305,7 @@ } - .namespace 'global::vein/lang/collections' + .namespace 'vein/lang/collections' .class 'Yieldable' public extends 'Object' { .field '_current' as 'Object' @@ -2319,7 +2319,7 @@ /* ::0002 */ .ldarg.1 /* ::0004 */ .ldarg.0 /* ::0006 */ .ldarg.0 - /* ::0016 */ .stf _current std%global::vein/lang/Object, Public, Special + /* ::0016 */ .stf _current std%vein/lang/Object, Public, Special } @@ -2331,7 +2331,7 @@ .locals { } /* ::0002 */ .ldarg.0 - /* ::0012 */ .ldf _current std%global::vein/lang/Object, Public, Special + /* ::0012 */ .ldf _current std%vein/lang/Object, Public, Special /* ::0014 */ .ret } @@ -2347,7 +2347,7 @@ /* ::0012 */ .call Object::ctor(: Object) /* ::0014 */ .ldnull /* ::0016 */ .ldarg.0 - /* ::0026 */ .stf _current std%global::vein/lang/Object, Public, Special + /* ::0026 */ .stf _current std%vein/lang/Object, Public, Special /* ::0028 */ .ldarg.0 /* ::0030 */ .ret @@ -2366,7 +2366,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .class 'IEEEConsts' static internal extends 'Object' { .method extern getHalfNaN () public static -> Half; @@ -2420,7 +2420,7 @@ } - .namespace 'global::vein/lang/network' + .namespace 'vein/lang/network' .class 'NetworkStream' public extends 'Object' { .method special 'ctor' (: NetworkStream) public special -> NetworkStream @@ -2450,7 +2450,7 @@ } - .namespace 'global::vein/lang/network' + .namespace 'vein/lang/network' .class 'TcpListener' public extends 'Object' { .field '_port' as 'UInt16' @@ -2478,7 +2478,7 @@ .locals { } /* ::0002 */ .ldarg.0 - /* ::0012 */ .ldf _active std%global::vein/lang/Boolean, Public, Special + /* ::0012 */ .ldf _active std%vein/lang/Boolean, Public, Special /* ::0014 */ .ret } @@ -2505,19 +2505,19 @@ /* ::0012 */ .call Object::ctor(: Object) /* ::0014 */ .ldnull /* ::0016 */ .ldarg.0 - /* ::0026 */ .stf _port std%global::vein/lang/UInt16, Public, Special + /* ::0026 */ .stf _port std%vein/lang/UInt16, Public, Special /* ::0028 */ .ldnull /* ::0030 */ .ldarg.0 - /* ::0040 */ .stf _dualMode std%global::vein/lang/Boolean, Public, Special + /* ::0040 */ .stf _dualMode std%vein/lang/Boolean, Public, Special /* ::0042 */ .ldnull /* ::0044 */ .ldarg.0 - /* ::0054 */ .stf _active std%global::vein/lang/Boolean, Public, Special + /* ::0054 */ .stf _active std%vein/lang/Boolean, Public, Special /* ::0056 */ .ldnull /* ::0058 */ .ldarg.0 - /* ::0068 */ .stf _socket std%global::vein/lang/network/TcpSocket, Public + /* ::0068 */ .stf _socket std%vein/lang/network/TcpSocket, Public /* ::0070 */ .ldnull /* ::0072 */ .ldarg.0 - /* ::0082 */ .stf ExclusiveAddressUse std%global::vein/lang/Boolean, Public, Special + /* ::0082 */ .stf ExclusiveAddressUse std%vein/lang/Boolean, Public, Special /* ::0084 */ .ldarg.0 /* ::0086 */ .ret @@ -2536,7 +2536,7 @@ } - .namespace 'global::vein/lang/network' + .namespace 'vein/lang/network' .class 'TcpSocket' public extends 'Object' { .field '_port' as 'UInt16' @@ -2552,7 +2552,7 @@ .locals { } /* ::0002 */ .ldarg.0 - /* ::0012 */ .ldf _blocked std%global::vein/lang/Boolean, Public, Special + /* ::0012 */ .ldf _blocked std%vein/lang/Boolean, Public, Special /* ::0014 */ .ret } @@ -2565,7 +2565,7 @@ .locals { } /* ::0002 */ .ldarg.0 - /* ::0012 */ .ldf _is_listing std%global::vein/lang/Boolean, Public, Special + /* ::0012 */ .ldf _is_listing std%vein/lang/Boolean, Public, Special /* ::0014 */ .ret } @@ -2578,7 +2578,7 @@ .locals { } /* ::0002 */ .ldarg.0 - /* ::0012 */ .ldf _connected std%global::vein/lang/Boolean, Public, Special + /* ::0012 */ .ldf _connected std%vein/lang/Boolean, Public, Special /* ::0014 */ .ret } @@ -2635,19 +2635,19 @@ /* ::0012 */ .call Object::ctor(: Object) /* ::0014 */ .ldnull /* ::0016 */ .ldarg.0 - /* ::0026 */ .stf _port std%global::vein/lang/UInt16, Public, Special + /* ::0026 */ .stf _port std%vein/lang/UInt16, Public, Special /* ::0028 */ .ldnull /* ::0030 */ .ldarg.0 - /* ::0040 */ .stf _is_listing std%global::vein/lang/Boolean, Public, Special + /* ::0040 */ .stf _is_listing std%vein/lang/Boolean, Public, Special /* ::0042 */ .ldnull /* ::0044 */ .ldarg.0 - /* ::0054 */ .stf _handle std%global::vein/lang/ValueType, Public, Special + /* ::0054 */ .stf _handle std%vein/lang/ValueType, Public, Special /* ::0056 */ .ldnull /* ::0058 */ .ldarg.0 - /* ::0068 */ .stf _blocked std%global::vein/lang/Boolean, Public, Special + /* ::0068 */ .stf _blocked std%vein/lang/Boolean, Public, Special /* ::0070 */ .ldnull /* ::0072 */ .ldarg.0 - /* ::0082 */ .stf _connected std%global::vein/lang/Boolean, Public, Special + /* ::0082 */ .stf _connected std%vein/lang/Boolean, Public, Special /* ::0084 */ .ldarg.0 /* ::0086 */ .ret @@ -2666,7 +2666,7 @@ } - .namespace 'global::vein/lang/numeric' + .namespace 'vein/lang/numeric' .class 'BigInt' public extends 'Object', 'ValueType' { .method special 'ctor' (: BigInt) public special -> BigInt @@ -2698,7 +2698,7 @@ } - .namespace 'global::vein/lang/numeric' + .namespace 'vein/lang/numeric' .class 'Quaternion' public extends 'Object', 'ValueType' { .field 'X' as 'Float' public @@ -2713,15 +2713,15 @@ .locals { } /* ::0002 */ .ldarg.0 - /* ::0012 */ .ldf X std%global::vein/lang/Float, Public, Special + /* ::0012 */ .ldf X std%vein/lang/Float, Public, Special /* ::0014 */ .ldarg.0 - /* ::0024 */ .ldf Y std%global::vein/lang/Float, Public, Special + /* ::0024 */ .ldf Y std%vein/lang/Float, Public, Special /* ::0026 */ .add /* ::0028 */ .ldarg.0 - /* ::0038 */ .ldf Z std%global::vein/lang/Float, Public, Special + /* ::0038 */ .ldf Z std%vein/lang/Float, Public, Special /* ::0040 */ .add /* ::0042 */ .ldarg.0 - /* ::0052 */ .ldf W std%global::vein/lang/Float, Public, Special + /* ::0052 */ .ldf W std%vein/lang/Float, Public, Special /* ::0054 */ .add /* ::0056 */ .ldc.i4.0 /* ::0058 */ .eql.t @@ -2739,19 +2739,19 @@ /* ::0002 */ .ldarg.1 /* ::0004 */ .ldarg.0 /* ::0006 */ .ldarg.0 - /* ::0016 */ .stf X std%global::vein/lang/Float, Public, Special + /* ::0016 */ .stf X std%vein/lang/Float, Public, Special /* ::0018 */ .ldarg.2 /* ::0020 */ .ldarg.0 /* ::0022 */ .ldarg.0 - /* ::0032 */ .stf Y std%global::vein/lang/Float, Public, Special + /* ::0032 */ .stf Y std%vein/lang/Float, Public, Special /* ::0034 */ .ldarg.3 /* ::0036 */ .ldarg.0 /* ::0038 */ .ldarg.0 - /* ::0048 */ .stf Z std%global::vein/lang/Float, Public, Special + /* ::0048 */ .stf Z std%vein/lang/Float, Public, Special /* ::0050 */ .ldarg.4 /* ::0052 */ .ldarg.0 /* ::0054 */ .ldarg.0 - /* ::0064 */ .stf W std%global::vein/lang/Float, Public, Special + /* ::0064 */ .stf W std%vein/lang/Float, Public, Special /* ::0066 */ .ldarg.0 /* ::0076 */ .call Object::ctor(: Object) /* ::0078 */ .ldarg.0 @@ -2774,7 +2774,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .class 'TypeNotFoundFault' public extends 'Exception' { .method 'ctor' (: TypeNotFoundFault, m: String) public -> TypeNotFoundFault @@ -2787,7 +2787,7 @@ /* ::0002 */ .ldarg.1 /* ::0004 */ .ldarg.0 /* ::0006 */ .ldarg.0 - /* ::0016 */ .stf message std%global::vein/lang/String, Public, Special + /* ::0016 */ .stf message std%vein/lang/String, Public, Special /* ::0018 */ .ldarg.0 /* ::0028 */ .call Exception::ctor(: Exception) /* ::0030 */ .ldarg.0 @@ -2808,7 +2808,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .class 'MemberNotFoundFault' public extends 'Exception' { .method 'ctor' (: MemberNotFoundFault, m: String) public -> MemberNotFoundFault @@ -2821,7 +2821,7 @@ /* ::0002 */ .ldarg.1 /* ::0004 */ .ldarg.0 /* ::0006 */ .ldarg.0 - /* ::0016 */ .stf message std%global::vein/lang/String, Public, Special + /* ::0016 */ .stf message std%vein/lang/String, Public, Special /* ::0018 */ .ldarg.0 /* ::0028 */ .call Exception::ctor(: Exception) /* ::0030 */ .ldarg.0 @@ -2842,7 +2842,7 @@ } - .namespace 'global::vein/lang' + .namespace 'vein/lang' .class 'MultipleTypeFoundFault' public extends 'Exception' { .method 'ctor' (: MultipleTypeFoundFault, m: String) public -> MultipleTypeFoundFault @@ -2855,7 +2855,7 @@ /* ::0002 */ .ldarg.1 /* ::0004 */ .ldarg.0 /* ::0006 */ .ldarg.0 - /* ::0016 */ .stf message std%global::vein/lang/String, Public, Special + /* ::0016 */ .stf message std%vein/lang/String, Public, Special /* ::0018 */ .ldarg.0 /* ::0028 */ .call Exception::ctor(: Exception) /* ::0030 */ .ldarg.0 @@ -2876,7 +2876,7 @@ } - .namespace 'global::vein/lang/workspace' + .namespace 'vein/lang/workspace' .class 'DeprecatedAspect' public aspect extends 'Aspect' { .method 'getUsages' () public override -> Int32 @@ -2893,7 +2893,7 @@ } - .namespace 'global::vein/lang/workspace' + .namespace 'vein/lang/workspace' .class 'MaybeNullableAspect' public aspect extends 'Aspect' { .method 'getUsages' () public override -> Int32 @@ -2910,7 +2910,7 @@ } - .namespace 'global::internal' + .namespace 'internal' .class 'StaticArray_INIT_object_0_0' internal special extends 'Object' { .method '$init' () public static -> Array @@ -2921,7 +2921,7 @@ .locals { } /* ::0002 */ .nop - /* ::0008 */ .ld.type [std%global::vein/lang/Object] + /* ::0008 */ .ld.type [std%vein/lang/Object] /* ::0018 */ .ldc.i8.s 0x00000000.long /* ::0020 */ .newarr /* ::0022 */ .ret diff --git a/test/ishtar_test/test.std.wll.lay b/test/ishtar_test/test.std.wll.lay index 5c89130e..6588936f 100644 --- a/test/ishtar_test/test.std.wll.lay +++ b/test/ishtar_test/test.std.wll.lay @@ -5,7 +5,7 @@ .table const { .s 000000:'Testable' - .s 000001:'global::test' + .s 000001:'test' .s 000002:'test.std' .s 000003:'master' .s 000004:'master()' @@ -17,14 +17,14 @@ .s 000010:'type_ctor()' .s 000011:'' .s 000012:'1.0.0.0' - .t 000000:'std%global::vein/lang/Out' - .t 000001:'test.std%global::test/Testable' - .t 000002:'std%global::vein/lang/Object' - .t 000003:'std%global::vein/lang/Void' + .t 000000:'std%vein/lang/Out' + .t 000001:'test.std%test/Testable' + .t 000002:'std%vein/lang/Object' + .t 000003:'std%vein/lang/Void' } - .namespace 'global::test' + .namespace 'test' .class 'Testable' public extends 'Object' { .method 'master' () public static -> Void diff --git a/test/vc_test/Features/QualifiedExpressionTest.cs b/test/vc_test/Features/QualifiedExpressionTest.cs index 29bd6110..c94505b0 100644 --- a/test/vc_test/Features/QualifiedExpressionTest.cs +++ b/test/vc_test/Features/QualifiedExpressionTest.cs @@ -15,7 +15,7 @@ public void NewExpTest() Assert.NotNull(exp); Assert.AreEqual(SyntaxType.NewExpression, exp.Kind); IshtarAssert.IsType(exp.CtorArgs); - Assert.AreEqual("global::Foo", exp.TargetType.Typeword.GetFullName()); + Assert.AreEqual("Foo", exp.TargetType.Typeword.GetFullName()); } [Test] public void ExpSimplifyTest() @@ -60,7 +60,7 @@ public void GenericExpressionTest() => [TestCase("foo.bar.zoo(a, b, 4, woo())")] [TestCase("foo.bar.zoo(a, b, 4, zak.woo())")] [TestCase("foo.bar.zoo(a, b, 4, zak.woo(a, b, 4))")] - //[TestCase("global::foo.bar.zoo(a, b, 4, 4 + 4);")] + //[TestCase("foo.bar.zoo(a, b, 4, 4 + 4);")] public void InvocationTest(string parseStr) => VeinAst.QualifiedExpression.End().ParseVein(parseStr); diff --git a/test/vc_test/expression_test.cs b/test/vc_test/expression_test.cs index f5c2e174..ece40af1 100644 --- a/test/vc_test/expression_test.cs +++ b/test/vc_test/expression_test.cs @@ -136,7 +136,7 @@ public void DetermineSelfMethodType() var genCtx = new GeneratorContext(new GeneratorContextConfig(true)); genCtx.Module = new VeinModuleBuilder("doo", Types.Storage); - var @class = genCtx.Module.DefineClass("global::mana/foo"); + var @class = genCtx.Module.DefineClass("mana/foo"); genCtx.CurrentMethod = @class.DefineMethod("ata", MethodFlags.Public, VeinTypeCode.TYPE_VOID.AsClass()(Types.Storage)); genCtx.CurrentScope = new VeinScope(genCtx); @@ -159,12 +159,12 @@ public void DetermineOtherMethodType() genCtx.Document = new DocumentDeclaration { FileEntity = new FileInfo(".data") }; genCtx.Module = new VeinModuleBuilder("doo", Types.Storage); - var @class = genCtx.Module.DefineClass("global::mana/foo"); - var anotherClass = genCtx.Module.DefineClass("global::mana/goo"); + var @class = genCtx.Module.DefineClass("mana/foo"); + var anotherClass = genCtx.Module.DefineClass("mana/goo"); anotherClass.DefineMethod("gota", MethodFlags.Public, VeinTypeCode.TYPE_I1.AsClass()(Types.Storage)); - @class.Includes.Add("global::mana"); + @class.Includes.Add("mana"); genCtx.CurrentMethod = @class.DefineMethod("ata", MethodFlags.Public, VeinTypeCode.TYPE_VOID.AsClass()(Types.Storage)); genCtx.CurrentScope = new VeinScope(genCtx); diff --git a/test/vc_test/generator_test.cs b/test/vc_test/generator_test.cs index 57f4b753..2ca86844 100644 --- a/test/vc_test/generator_test.cs +++ b/test/vc_test/generator_test.cs @@ -21,7 +21,7 @@ public class generator_test public void Test() { var module = new VeinModuleBuilder("xuy", (Types.Storage)); - var clazz = module.DefineClass("xuy%global::vein/lang/svack_pidars"); + var clazz = module.DefineClass("xuy%vein/lang/svack_pidars"); clazz.Flags = ClassFlags.Public | ClassFlags.Static; var method = clazz.DefineMethod("insert_dick_into_svack", MethodFlags.Public, VeinTypeCode.TYPE_VOID.AsClass()((Types.Storage)), VeinArgumentRef.Create(Types.Storage, ("x", VeinTypeCode.TYPE_STRING))); method.Flags = MethodFlags.Public | MethodFlags.Static; @@ -65,7 +65,7 @@ public void Test() public void TestIL() { var module = new VeinModuleBuilder("xuy", (Types.Storage)); - var clazz = module.DefineClass("global::vein/lang/svack_pidars"); + var clazz = module.DefineClass("vein/lang/svack_pidars"); clazz.Flags = ClassFlags.Public | ClassFlags.Static; var method = clazz.DefineMethod("insert_dick_into_svack", MethodFlags.Public, VeinTypeCode.TYPE_VOID.AsClass()((Types.Storage)), VeinArgumentRef.Create(Types.Storage, ("x", VeinTypeCode.TYPE_STRING))); method.Flags = MethodFlags.Public | MethodFlags.Static; @@ -103,7 +103,7 @@ public void AST2ILTest() { if (member is ClassDeclarationSyntax classMember) { - var @class = module.DefineClass($"global::vein/lang/{classMember.Identifier}"); + var @class = module.DefineClass($"vein/lang/{classMember.Identifier}"); foreach (var methodMember in classMember.Methods) { @@ -183,7 +183,7 @@ public void ReturnStatementCompilation3() public static ILGenerator CreateGenerator(params VeinArgumentRef[] args) { var module = new VeinModuleBuilder(Guid.NewGuid().ToString(), (Types.Storage)); - var @class = module.DefineClass("global::foo/bar"); + var @class = module.DefineClass("foo/bar"); var method = @class.DefineMethod("foo", VeinTypeCode.TYPE_VOID.AsClass()(Types.Storage), args); var gen = method.GetGenerator(); @@ -240,7 +240,7 @@ public void Fib() public void ManualGenCallExternFunction() { var module = new VeinModuleBuilder("hello_world", (Types.Storage)); - var clazz = module.DefineClass("hello_world%global::wave/lang/program"); + var clazz = module.DefineClass("hello_world%wave/lang/program"); clazz.Flags = ClassFlags.Public | ClassFlags.Static; @@ -273,7 +273,7 @@ public void ManualGenCallExternFunction() public void ManualGen() { var module = new VeinModuleBuilder("satl", (Types.Storage)); - var clazz = module.DefineClass("satl%global::wave/lang/program"); + var clazz = module.DefineClass("satl%wave/lang/program"); clazz.Flags = ClassFlags.Public | ClassFlags.Static; @@ -338,7 +338,7 @@ public void ManualGen() fibGen.Emit(OpCodes.STLOC_3); // var exceptionType = - // module.FindType(new QualityTypeName("std%global::wave/lang/Exception")).AsClass(); + // module.FindType(new QualityTypeName("std%wave/lang/Exception")).AsClass(); //fibGen.Emit(OpCodes.NEWOBJ, exceptionType.FullName); //fibGen.Emit(OpCodes.CALL, exceptionType.FindMethod("ctor()")); diff --git a/test/vc_test/il_test.cs b/test/vc_test/il_test.cs index cff4f4a2..7ab896b5 100644 --- a/test/vc_test/il_test.cs +++ b/test/vc_test/il_test.cs @@ -97,7 +97,7 @@ public unsafe void DeconstructOpcodes3() public static ILGenerator CreateGenerator(params VeinArgumentRef[] args) { var module = new VeinModuleBuilder(Guid.NewGuid().ToString(), (Types.Storage)); - var @class = new ClassBuilder(module, $"{module.Name}%global::foo/bar"); + var @class = new ClassBuilder(module, $"{module.Name}%foo/bar"); var method = @class.DefineMethod("foo", VeinTypeCode.TYPE_VOID.AsClass()(Types.Storage), args); return method.GetGenerator(); } diff --git a/test/vc_test/module_test.cs b/test/vc_test/module_test.cs index 6933753e..70edc434 100644 --- a/test/vc_test/module_test.cs +++ b/test/vc_test/module_test.cs @@ -54,7 +54,7 @@ public void WriteTest() moduleSR.Deps.AddRange(GetDeps()); - var @class = moduleSR.DefineClass("set1%global::wave/lang/SR"); + var @class = moduleSR.DefineClass("set1%wave/lang/SR"); @class.Flags = ClassFlags.Public | ClassFlags.Static; @@ -81,7 +81,7 @@ public void WriteTest() module.Deps.AddRange(GetDeps()); - var @class = module.DefineClass("set2%global::wave/lang/DR"); + var @class = module.DefineClass("set2%wave/lang/DR"); @class.Flags = ClassFlags.Public | ClassFlags.Static; @@ -146,7 +146,7 @@ public void ReaderTest() //IshtarAssert.NotEmpty(result.class_table); //var @class = result.class_table.First(); //Assert.AreEqual("DR", @class.Name); - //Assert.AreEqual("aspera%global::wave/lang/DR", @class.FullName.fullName); + //Assert.AreEqual("aspera%wave/lang/DR", @class.FullName.fullName); //IshtarAssert.NotEmpty(@class.Methods); //var method = @class.Methods.First(); //Assert.AreEqual("blank()", method.Name); diff --git a/vein_lang.sln b/vein_lang.sln index b1234d71..2bc7d555 100644 --- a/vein_lang.sln +++ b/vein_lang.sln @@ -59,7 +59,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ishtar_collections_test", " EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ishtar.vm.libuv", "runtime\ishtar.vm.libuv\ishtar.vm.libuv.csproj", "{3E9D576A-C96E-407F-8112-E0D15F11322A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "vein.std", "lib\vein.std\vein.std.csproj", "{4630487E-D9EA-4B62-A677-B8F0CDB3831F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "vein.std", "lib\vein.std\vein.std.csproj", "{4630487E-D9EA-4B62-A677-B8F0CDB3831F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ishtar.debug.console", "lib\ishtar.debug.console\ishtar.debug.console.csproj", "{17D286DB-1DF3-4280-8852-CED37FF50006}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -299,6 +301,18 @@ Global {4630487E-D9EA-4B62-A677-B8F0CDB3831F}.Release|x64.Build.0 = Release|Any CPU {4630487E-D9EA-4B62-A677-B8F0CDB3831F}.Release|x86.ActiveCfg = Release|Any CPU {4630487E-D9EA-4B62-A677-B8F0CDB3831F}.Release|x86.Build.0 = Release|Any CPU + {17D286DB-1DF3-4280-8852-CED37FF50006}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {17D286DB-1DF3-4280-8852-CED37FF50006}.Debug|Any CPU.Build.0 = Debug|Any CPU + {17D286DB-1DF3-4280-8852-CED37FF50006}.Debug|x64.ActiveCfg = Debug|Any CPU + {17D286DB-1DF3-4280-8852-CED37FF50006}.Debug|x64.Build.0 = Debug|Any CPU + {17D286DB-1DF3-4280-8852-CED37FF50006}.Debug|x86.ActiveCfg = Debug|Any CPU + {17D286DB-1DF3-4280-8852-CED37FF50006}.Debug|x86.Build.0 = Debug|Any CPU + {17D286DB-1DF3-4280-8852-CED37FF50006}.Release|Any CPU.ActiveCfg = Release|Any CPU + {17D286DB-1DF3-4280-8852-CED37FF50006}.Release|Any CPU.Build.0 = Release|Any CPU + {17D286DB-1DF3-4280-8852-CED37FF50006}.Release|x64.ActiveCfg = Release|Any CPU + {17D286DB-1DF3-4280-8852-CED37FF50006}.Release|x64.Build.0 = Release|Any CPU + {17D286DB-1DF3-4280-8852-CED37FF50006}.Release|x86.ActiveCfg = Release|Any CPU + {17D286DB-1DF3-4280-8852-CED37FF50006}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -323,6 +337,7 @@ Global {A9632845-23EC-4F5F-B422-92DDE1234134} = {5AF546C3-347F-4595-9CA9-3DE286DBC585} {3E9D576A-C96E-407F-8112-E0D15F11322A} = {F1A3DE9B-263D-4F44-9A88-9ED37E9A9330} {4630487E-D9EA-4B62-A677-B8F0CDB3831F} = {B79D9C1A-8074-4105-8447-93A5A059A2CB} + {17D286DB-1DF3-4280-8852-CED37FF50006} = {B79D9C1A-8074-4105-8447-93A5A059A2CB} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {E2BB3994-6F65-4E41-BA44-6258F00A3A28} diff --git a/vein_lang.sln.DotSettings b/vein_lang.sln.DotSettings index a54e319c..18138467 100644 --- a/vein_lang.sln.DotSettings +++ b/vein_lang.sln.DotSettings @@ -68,6 +68,7 @@ True True True + True True True True