diff options
| Commit | 22b321bb4497543493010f57587c7a9dceb839b6 (patch) | |
|---|---|---|
| Author | 2021-09-21 22:48:52 +0300 | |
| Committer | 2021-09-21 22:48:52 +0300 | |
| Files | 672d53f7d257df54d2222252bd2441f12b3be950 /spasm | |
| IPL-22b321bb4497543493010f57587c7a9dceb839b6.tar IPL-22b321bb4497543493010f57587c7a9dceb839b6.tar.gz IPL-22b321bb4497543493010f57587c7a9dceb839b6.zip | ||
| Parent | f110794b0d57e47e335ae5eeffbb18a7a80580ad (diff) | |
| Parent | 2f9dea35cff40a676b4603b8ffbd1f2669a4195a (diff) | |
Merge pull request #115 from SofiaCPP/feature/gctest
Add app to test GC implementations
11 files changed, 36 insertions, 20 deletions
| -rw-r--r-- | spasm/solution/spasm.vcxproj | 4 | ||||
| -rw-r--r-- | spasm/solution/spasm_lib.vcxproj | 16 | ||||
| -rw-r--r-- | spasm/solution/spasm_lib.vcxproj.filters | 12 | ||||
| -rw-r--r-- | spasm/solution/sprt.vcxproj | 4 | ||||
| -rw-r--r-- | spasm/solution/sprun.vcxproj | 4 | ||||
| -rw-r--r-- | spasm/src/asm/lexdump.cpp | 6 | ||||
| -rw-r--r-- | spasm/src/asm/lexdump3.cpp | 6 | ||||
| -rw-r--r-- | spasm/src/spasm.cpp | 1 | ||||
| -rw-r--r-- | spasm/src/spasm.hpp | 1 | ||||
| -rw-r--r-- | spasm/src/spasm_impl.hpp | 1 | ||||
| -rw-r--r-- | spasm/src/value.hpp | 1 |
diff --git a/spasm/solution/spasm.vcxproj b/spasm/solution/spasm.vcxproj index c4d1cc3..e74771d 100644 --- a/spasm/solution/spasm.vcxproj +++ b/spasm/solution/spasm.vcxproj @@ -31,6 +31,7 @@ <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
@@ -38,6 +39,7 @@ <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
@@ -45,6 +47,7 @@ <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
@@ -52,6 +55,7 @@ <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
diff --git a/spasm/solution/spasm_lib.vcxproj b/spasm/solution/spasm_lib.vcxproj index 72bd81e..bcb4ab9 100644 --- a/spasm/solution/spasm_lib.vcxproj +++ b/spasm/solution/spasm_lib.vcxproj @@ -31,6 +31,7 @@ <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
@@ -38,6 +39,7 @@ <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
@@ -45,6 +47,7 @@ <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
@@ -52,6 +55,7 @@ <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@@ -223,18 +227,18 @@ </Link>
</ItemDefinitionGroup>
<ItemGroup>
- <ClCompile Include="..\src\asm\bytecode.cpp">
- </ClCompile>
- <ClCompile Include="..\src\asm\symbol.cpp">
- </ClCompile>
- <ClCompile Include="..\src\asm\tokenizer.cpp">
- </ClCompile>
<ClCompile Include="..\src\asm\assembler.cpp">
</ClCompile>
+ <ClCompile Include="..\src\asm\bytecode.cpp">
+ </ClCompile>
<ClCompile Include="..\src\asm\lexer.cpp">
</ClCompile>
+ <ClCompile Include="..\src\asm\symbol.cpp">
+ </ClCompile>
<ClCompile Include="..\src\asm\token.cpp">
</ClCompile>
+ <ClCompile Include="..\src\asm\tokenizer.cpp">
+ </ClCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
diff --git a/spasm/solution/spasm_lib.vcxproj.filters b/spasm/solution/spasm_lib.vcxproj.filters index c82311e..82b5f56 100644 --- a/spasm/solution/spasm_lib.vcxproj.filters +++ b/spasm/solution/spasm_lib.vcxproj.filters @@ -9,22 +9,22 @@ </Filter>
</ItemGroup>
<ItemGroup>
- <ClCompile Include="..\src\asm\bytecode.cpp">
+ <ClCompile Include="..\src\asm\assembler.cpp">
<Filter>src\asm</Filter>
</ClCompile>
- <ClCompile Include="..\src\asm\symbol.cpp">
+ <ClCompile Include="..\src\asm\bytecode.cpp">
<Filter>src\asm</Filter>
</ClCompile>
- <ClCompile Include="..\src\asm\tokenizer.cpp">
+ <ClCompile Include="..\src\asm\lexer.cpp">
<Filter>src\asm</Filter>
</ClCompile>
- <ClCompile Include="..\src\asm\assembler.cpp">
+ <ClCompile Include="..\src\asm\symbol.cpp">
<Filter>src\asm</Filter>
</ClCompile>
- <ClCompile Include="..\src\asm\lexer.cpp">
+ <ClCompile Include="..\src\asm\token.cpp">
<Filter>src\asm</Filter>
</ClCompile>
- <ClCompile Include="..\src\asm\token.cpp">
+ <ClCompile Include="..\src\asm\tokenizer.cpp">
<Filter>src\asm</Filter>
</ClCompile>
</ItemGroup>
diff --git a/spasm/solution/sprt.vcxproj b/spasm/solution/sprt.vcxproj index acc26ef..6e7737f 100644 --- a/spasm/solution/sprt.vcxproj +++ b/spasm/solution/sprt.vcxproj @@ -31,6 +31,7 @@ <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
@@ -38,6 +39,7 @@ <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
@@ -45,6 +47,7 @@ <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
@@ -52,6 +55,7 @@ <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
diff --git a/spasm/solution/sprun.vcxproj b/spasm/solution/sprun.vcxproj index a86c487..15ab7f9 100644 --- a/spasm/solution/sprun.vcxproj +++ b/spasm/solution/sprun.vcxproj @@ -31,6 +31,7 @@ <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
@@ -38,6 +39,7 @@ <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
@@ -45,6 +47,7 @@ <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
@@ -52,6 +55,7 @@ <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
diff --git a/spasm/src/asm/lexdump.cpp b/spasm/src/asm/lexdump.cpp index 440ff1e..b609124 100644 --- a/spasm/src/asm/lexdump.cpp +++ b/spasm/src/asm/lexdump.cpp @@ -42,12 +42,12 @@ class TokenDumper : public TokenStream std::cout.width(8); std::cout << token.lineno(); std::cout << ": " << token_name[ttype]; - if (ttype == Token::integer || ttype == Token::xinteger) + if (ttype == Token::Integer || ttype == Token::XInteger) std::cout << '|' << token.value_int() << '|'; - else if (ttype == Token::ident) + else if (ttype == Token::Ident) std::cout << '|' << token.value_str() << '|'; std::cout << std::endl; - if (token.type() == Token::endinput) + if (token.type() == Token::EndInput) end_reached = true; } diff --git a/spasm/src/asm/lexdump3.cpp b/spasm/src/asm/lexdump3.cpp index 4e4ce9e..400058b 100644 --- a/spasm/src/asm/lexdump3.cpp +++ b/spasm/src/asm/lexdump3.cpp @@ -44,16 +44,16 @@ int main() Token token; token = td.next_token(); - while (token.type() != Token::endinput) + while (token.type() != Token::EndInput) { token = td.next_token(); Token::Token_type ttype = token.type(); std::cout.width(8); std::cout << token.lineno(); std::cout << ": " << token_name[ttype]; - if (ttype == Token::integer || ttype == Token::xinteger) + if (ttype == Token::Integer || ttype == Token::XInteger) std::cout << '|' << token.value_int() << '|'; - else if (ttype == Token::ident) + else if (ttype == Token::Ident) std::cout << '|' << token.value_str() << '|'; std::cout << std::endl; } diff --git a/spasm/src/spasm.cpp b/spasm/src/spasm.cpp index 94086a6..dab81b9 100644 --- a/spasm/src/spasm.cpp +++ b/spasm/src/spasm.cpp @@ -1,6 +1,5 @@ #include <algorithm> #include <cassert> -#include <iostream> #include "spasm.hpp" diff --git a/spasm/src/spasm.hpp b/spasm/src/spasm.hpp index da3f44f..01015d3 100644 --- a/spasm/src/spasm.hpp +++ b/spasm/src/spasm.hpp @@ -2,7 +2,6 @@ #define SPASM_HPP
#include "spasm_impl.hpp"
-#include "value.hpp"
namespace Spasm
{
diff --git a/spasm/src/spasm_impl.hpp b/spasm/src/spasm_impl.hpp index 04e809a..c568902 100644 --- a/spasm/src/spasm_impl.hpp +++ b/spasm/src/spasm_impl.hpp @@ -2,6 +2,7 @@ #define SPASM_IMPL_HPP #include <iostream> +#include <cstdint> #include <unordered_set> #include "types.hpp" diff --git a/spasm/src/value.hpp b/spasm/src/value.hpp index 725d48c..a4662f2 100644 --- a/spasm/src/value.hpp +++ b/spasm/src/value.hpp @@ -1,5 +1,6 @@ #pragma once +#include <iostream> #include <cassert> #include "string.hpp" |
