Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Commit

Permalink
fix compiling crash
Browse files Browse the repository at this point in the history
  • Loading branch information
0xF6 committed May 22, 2020
1 parent 80b94b7 commit 5933541
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 9 deletions.
6 changes: 5 additions & 1 deletion acc/Host.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,11 @@ public static (byte[] data, byte[] map) Compile(string source, Args args)
{
void CompileToken(Instruction token)
{
map.symbols.Add(((short)offset, source.Split('\n')[offset]));
try
{
map.symbols.Add(((short)offset, source.Split('\n')[offset]));
}
catch{}
offset++;
gen.Emit(token);
var value = token.Assembly();
Expand Down
2 changes: 1 addition & 1 deletion acc/acc.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<TargetFramework>net5.0</TargetFramework>
<PackageId>flame.compiler</PackageId>
<RuntimeIdentifiers>win10-x64;osx.10.14-x64;linux-x64</RuntimeIdentifiers>
<Version>0.70.500-beta</Version>
<Version>0.70.504-beta</Version>
<Authors>Yuuki Wesp</Authors>
<Product>flame.compiler</Product>
<Copyright>Yuuki Wesp (C) 2020</Copyright>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Authors>Yuuki Wesp</Authors>
<Company>Ancient Project</Company>
<Version>0.70.694.120</Version>
<Version>0.70.699.120</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Sprache" Version="2.3.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>0.70.672.37</Version>
<Version>0.70.673.37</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageIconUrl>https://raw.githubusercontent.com/ancientproject/cli/master/resource/icon.png</PackageIconUrl>
<PackageProjectUrl>https://github.com/0xF6/ancient_cpu</PackageProjectUrl>
Expand Down
9 changes: 5 additions & 4 deletions libs/Ancient.Runtime.Context/DeviceLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ static DeviceLoader()
if(AppFlag.GetVariable("VM_TRACE"))
OnTrace += Console.WriteLine;

//AssemblyLoadContext.Default.Resolving += (context, name) => {
// var assemblyPath = $"./{name.Name}.dll";
// return context.LoadFromAssemblyPath(assemblyPath);
//};
AssemblyLoadContext.Default.Resolving += (context, name) =>
{
var assemblyPath = $"./{name.Name}.dll";
return context.LoadFromAssemblyPath(assemblyPath);
};
}

public static void Boot(Action<IDevice> hook)
Expand Down
2 changes: 1 addition & 1 deletion vm/csharp/vm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
win10-arm64;
win10-arm;
</RuntimeIdentifiers>
<Version>0.70.753-beta</Version>
<Version>0.70.754-beta</Version>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Copyright>Yuuki Wesp (C) 2020</Copyright>
</PropertyGroup>
Expand Down

0 comments on commit 5933541

Please sign in to comment.