more renaming

This commit is contained in:
nub31
2025-05-05 19:26:23 +02:00
parent e5b7982d37
commit bfaad0950b
50 changed files with 25 additions and 7 deletions

View File

@@ -1,12 +1,27 @@
#!/bin/sh #!/bin/sh
mkdir -p out mkdir -p out
dotnet run --project lang/Nub.Lang example out/out.qbe echo "setup..."
gcc -c -g -fno-stack-protector -fno-builtin std/gc.c -o out/gc.o dotnet publish -c Release src/compiler/Nub.Lang > /dev/null
nasm -g -felf64 std/runtime.asm -o out/runtime.o
if [[ $? -ne 0 ]] ; then
printf "\x1b[31mYour compiler is not compiling!\x1b[0m\n"
exit 1
fi
set -e
echo "compiling..."
nub example out/out.qbe
gcc -c -g -fno-stack-protector -fno-builtin src/runtime/gc.c -o out/gc.o
nasm -g -felf64 src/runtime/runtime.asm -o out/runtime.o
qbe out/out.qbe > out/out.s qbe out/out.qbe > out/out.s
gcc -c -g out/out.s -o out/out.o gcc -c -g out/out.s -o out/out.o
gcc -no-pie -nostartfiles -o out/program out/gc.o out/runtime.o out/out.o gcc -no-pie -nostartfiles -o out/program out/gc.o out/runtime.o out/out.o
echo "done..."

View File

@@ -2,8 +2,8 @@
<project version="4"> <project version="4">
<component name="UserContentModel"> <component name="UserContentModel">
<attachedFolders> <attachedFolders>
<Path>../example</Path> <Path>../../example</Path>
<Path>../std</Path> <Path>../core</Path>
</attachedFolders> </attachedFolders>
<explicitIncludes /> <explicitIncludes />
<explicitExcludes /> <explicitExcludes />

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="VcsDirectoryMappings"> <component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
<mapping directory="$PROJECT_DIR$/.." vcs="Git" /> <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component> </component>
</project> </project>

View File

@@ -1,10 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<AssemblyName>nub</AssemblyName>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework> <TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<PublishAot>true</PublishAot>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@@ -48,9 +48,9 @@ internal static class Program
typer.Populate(); typer.Populate();
var generator = new Generator(definitions); var generator = new Generator(definitions);
var asm = generator.Generate(); var result = generator.Generate();
File.WriteAllText(output, asm); File.WriteAllText(output, result);
return 0; return 0;
} }