diff options
| Commit | 64a545c0c9988755a1b022bffd5f4303d0070af2 (patch) | |
|---|---|---|
| Author | 2020-11-09 22:09:38 +0200 | |
| Committer | 2020-11-09 22:09:38 +0200 | |
| Files | 99816280741e7e6d6a8460ed216484b84fd4aefc /JSImpl | |
| IPL-64a545c0c9988755a1b022bffd5f4303d0070af2.tar IPL-64a545c0c9988755a1b022bffd5f4303d0070af2.tar.gz IPL-64a545c0c9988755a1b022bffd5f4303d0070af2.zip | ||
| Parent | 1d2838877d4b905c68578e5bd4c01ab2857099ee (diff) | |
| Parent | f4598a0e6deb5fb1a63b4fc125804aa85ca818bd (diff) | |
Merge branch 'feature/interpreter_string'
22 files changed, 428 insertions, 1209 deletions
| -rw-r--r-- | JSImpl/solution/JSImpl.make | 72 | ||||
| -rw-r--r-- | JSImpl/solution/JSImpl.sln | 47 | ||||
| -rw-r--r-- | JSImpl/solution/JSImpl.vcxproj | 110 | ||||
| -rw-r--r-- | JSImpl/solution/JSLib.make | 84 | ||||
| -rw-r--r-- | JSImpl/solution/JSLib.vcxproj | 108 | ||||
| -rw-r--r-- | JSImpl/solution/Makefile | 2 | ||||
| -rw-r--r-- | JSImpl/solution/genie.lua | 2 | ||||
| -rw-r--r-- | JSImpl/src/ASTInterpreter.cpp | 296 | ||||
| -rw-r--r-- | JSImpl/src/ASTInterpreter.h | 12 | ||||
| -rw-r--r-- | JSImpl/src/Parser.cpp | 6 | ||||
| -rw-r--r-- | JSImpl/src/main.cpp | 6 | ||||
| -rw-r--r-- | JSImpl/test/ASTInterpreterTests.cpp | 77 | ||||
| -rw-r--r-- | JSImpl/test/ParserTests.cpp | 52 | ||||
| -rw-r--r-- | JSImpl/test/Test.make | 88 | ||||
| -rw-r--r-- | JSImpl/test/Test.vcxproj | 116 | ||||
| -rw-r--r-- | JSImpl/test/Test.vcxproj.filters | 1 | ||||
| -rw-r--r-- | JSImpl/test/gmock.make | 74 | ||||
| -rw-r--r-- | JSImpl/test/gmock.vcxproj | 112 | ||||
| -rw-r--r-- | JSImpl/test/gtest.make | 74 | ||||
| -rw-r--r-- | JSImpl/test/gtest.vcxproj | 112 | ||||
| -rw-r--r-- | JSImpl/test/gtest_main.make | 74 | ||||
| -rw-r--r-- | JSImpl/test/gtest_main.vcxproj | 112 |
diff --git a/JSImpl/solution/JSImpl.make b/JSImpl/solution/JSImpl.make index f79241f..355d4a1 100644 --- a/JSImpl/solution/JSImpl.make +++ b/JSImpl/solution/JSImpl.make @@ -50,9 +50,9 @@ ifeq ($(config),debug) ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g - ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -std=c++14 + ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -std=c++17 ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g - ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -std=c++14 + ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -std=c++17 ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) ALL_LDFLAGS += $(LDFLAGS) -L"../build/bin/Debug" LIBDEPS += ../build/bin/Debug/libJSLib.a @@ -82,9 +82,9 @@ ifeq ($(config),release) ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 - ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -std=c++14 + ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -std=c++17 ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 - ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -std=c++14 + ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -std=c++17 ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) ALL_LDFLAGS += $(LDFLAGS) -L"../build/bin/Release" LIBDEPS += ../build/bin/Release/libJSLib.a @@ -106,70 +106,6 @@ ifeq ($(config),release) endef endif -ifeq ($(config),debug64) - OBJDIR = ../build/obj/Debug/x64/Debug/JSImpl - TARGETDIR = ../build/bin/Debug - TARGET = $(TARGETDIR)/JSImpl - DEFINES += -D_SCL_SECURE_NO_WARNINGS - ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) - ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 - ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 - ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 -std=c++14 - ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 - ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 -std=c++14 - ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) - ALL_LDFLAGS += $(LDFLAGS) -L"../build/bin/Debug" -m64 - LIBDEPS += ../build/bin/Debug/libJSLib.a - LDDEPS += ../build/bin/Debug/libJSLib.a - LDRESP = - LIBS += $(LDDEPS) - EXTERNAL_LIBS += - LINKOBJS = $(OBJECTS) - LINKCMD = $(CXX) -o $(TARGET) $(LINKOBJS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) - OBJRESP = - OBJECTS := \ - $(OBJDIR)/src/main.o \ - - define PREBUILDCMDS - endef - define PRELINKCMDS - endef - define POSTBUILDCMDS - endef -endif - -ifeq ($(config),release64) - OBJDIR = ../build/obj/Release/x64/Release/JSImpl - TARGETDIR = ../build/bin/Release - TARGET = $(TARGETDIR)/JSImpl - DEFINES += -D_SCL_SECURE_NO_WARNINGS - ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) - ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 - ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 - ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 -std=c++14 - ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 - ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 -std=c++14 - ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) - ALL_LDFLAGS += $(LDFLAGS) -L"../build/bin/Release" -m64 - LIBDEPS += ../build/bin/Release/libJSLib.a - LDDEPS += ../build/bin/Release/libJSLib.a - LDRESP = - LIBS += $(LDDEPS) - EXTERNAL_LIBS += - LINKOBJS = $(OBJECTS) - LINKCMD = $(CXX) -o $(TARGET) $(LINKOBJS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) - OBJRESP = - OBJECTS := \ - $(OBJDIR)/src/main.o \ - - define PREBUILDCMDS - endef - define PRELINKCMDS - endef - define POSTBUILDCMDS - endef -endif - OBJDIRS := \ $(OBJDIR) \ $(OBJDIR)/src \ diff --git a/JSImpl/solution/JSImpl.sln b/JSImpl/solution/JSImpl.sln index ce219bf..850831a 100644 --- a/JSImpl/solution/JSImpl.sln +++ b/JSImpl/solution/JSImpl.sln @@ -1,8 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
-VisualStudioVersion = 16.0.29613.14
-MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Spasm", "Spasm", "{9892E17D-8434-0C54-6DEF-1FA8593093A4}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gtest", "gtest", "{1BAF0A7D-0751-3553-F00B-49A7DC4CBCA3}"
@@ -49,91 +47,49 @@ EndProject Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
- Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
- Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FD605F10-6975-87C1-32F7-2A219ECA83F2}.Debug|Win32.ActiveCfg = Debug|Win32
{FD605F10-6975-87C1-32F7-2A219ECA83F2}.Debug|Win32.Build.0 = Debug|Win32
- {FD605F10-6975-87C1-32F7-2A219ECA83F2}.Debug|x64.ActiveCfg = Debug|x64
- {FD605F10-6975-87C1-32F7-2A219ECA83F2}.Debug|x64.Build.0 = Debug|x64
{FD605F10-6975-87C1-32F7-2A219ECA83F2}.Release|Win32.ActiveCfg = Release|Win32
{FD605F10-6975-87C1-32F7-2A219ECA83F2}.Release|Win32.Build.0 = Release|Win32
- {FD605F10-6975-87C1-32F7-2A219ECA83F2}.Release|x64.ActiveCfg = Release|x64
- {FD605F10-6975-87C1-32F7-2A219ECA83F2}.Release|x64.Build.0 = Release|x64
{45DC8C7C-3113-8E0D-DAFF-7310C6150A0F}.Debug|Win32.ActiveCfg = Debug|Win32
{45DC8C7C-3113-8E0D-DAFF-7310C6150A0F}.Debug|Win32.Build.0 = Debug|Win32
- {45DC8C7C-3113-8E0D-DAFF-7310C6150A0F}.Debug|x64.ActiveCfg = Debug|x64
- {45DC8C7C-3113-8E0D-DAFF-7310C6150A0F}.Debug|x64.Build.0 = Debug|x64
{45DC8C7C-3113-8E0D-DAFF-7310C6150A0F}.Release|Win32.ActiveCfg = Release|Win32
{45DC8C7C-3113-8E0D-DAFF-7310C6150A0F}.Release|Win32.Build.0 = Release|Win32
- {45DC8C7C-3113-8E0D-DAFF-7310C6150A0F}.Release|x64.ActiveCfg = Release|x64
- {45DC8C7C-3113-8E0D-DAFF-7310C6150A0F}.Release|x64.Build.0 = Release|x64
{EC34880F-5849-B0C0-21CB-53208D9EACF1}.Debug|Win32.ActiveCfg = Debug|Win32
{EC34880F-5849-B0C0-21CB-53208D9EACF1}.Debug|Win32.Build.0 = Debug|Win32
- {EC34880F-5849-B0C0-21CB-53208D9EACF1}.Debug|x64.ActiveCfg = Debug|x64
- {EC34880F-5849-B0C0-21CB-53208D9EACF1}.Debug|x64.Build.0 = Debug|x64
{EC34880F-5849-B0C0-21CB-53208D9EACF1}.Release|Win32.ActiveCfg = Release|Win32
{EC34880F-5849-B0C0-21CB-53208D9EACF1}.Release|Win32.Build.0 = Release|Win32
- {EC34880F-5849-B0C0-21CB-53208D9EACF1}.Release|x64.ActiveCfg = Release|x64
- {EC34880F-5849-B0C0-21CB-53208D9EACF1}.Release|x64.Build.0 = Release|x64
{B686840F-229B-ACC0-EB1C-502057F0A8F1}.Debug|Win32.ActiveCfg = Debug|Win32
{B686840F-229B-ACC0-EB1C-502057F0A8F1}.Debug|Win32.Build.0 = Debug|Win32
- {B686840F-229B-ACC0-EB1C-502057F0A8F1}.Debug|x64.ActiveCfg = Debug|x64
- {B686840F-229B-ACC0-EB1C-502057F0A8F1}.Debug|x64.Build.0 = Debug|x64
{B686840F-229B-ACC0-EB1C-502057F0A8F1}.Release|Win32.ActiveCfg = Release|Win32
{B686840F-229B-ACC0-EB1C-502057F0A8F1}.Release|Win32.Build.0 = Release|Win32
- {B686840F-229B-ACC0-EB1C-502057F0A8F1}.Release|x64.ActiveCfg = Release|x64
- {B686840F-229B-ACC0-EB1C-502057F0A8F1}.Release|x64.Build.0 = Release|x64
{30B03E7E-1C68-80CB-856F-592771461BBC}.Debug|Win32.ActiveCfg = Debug|Win32
{30B03E7E-1C68-80CB-856F-592771461BBC}.Debug|Win32.Build.0 = Debug|Win32
- {30B03E7E-1C68-80CB-856F-592771461BBC}.Debug|x64.ActiveCfg = Debug|x64
- {30B03E7E-1C68-80CB-856F-592771461BBC}.Debug|x64.Build.0 = Debug|x64
{30B03E7E-1C68-80CB-856F-592771461BBC}.Release|Win32.ActiveCfg = Release|Win32
{30B03E7E-1C68-80CB-856F-592771461BBC}.Release|Win32.Build.0 = Release|Win32
- {30B03E7E-1C68-80CB-856F-592771461BBC}.Release|x64.ActiveCfg = Release|x64
- {30B03E7E-1C68-80CB-856F-592771461BBC}.Release|x64.Build.0 = Release|x64
{19EA680D-85FE-90BE-4E80-341EBA538DEF}.Debug|Win32.ActiveCfg = Debug|Win32
{19EA680D-85FE-90BE-4E80-341EBA538DEF}.Debug|Win32.Build.0 = Debug|Win32
- {19EA680D-85FE-90BE-4E80-341EBA538DEF}.Debug|x64.ActiveCfg = Debug|x64
- {19EA680D-85FE-90BE-4E80-341EBA538DEF}.Debug|x64.Build.0 = Debug|x64
{19EA680D-85FE-90BE-4E80-341EBA538DEF}.Release|Win32.ActiveCfg = Release|Win32
{19EA680D-85FE-90BE-4E80-341EBA538DEF}.Release|Win32.Build.0 = Release|Win32
- {19EA680D-85FE-90BE-4E80-341EBA538DEF}.Release|x64.ActiveCfg = Release|x64
- {19EA680D-85FE-90BE-4E80-341EBA538DEF}.Release|x64.Build.0 = Release|x64
{549B84BA-403D-AF90-29F8-C2E4153936E1}.Debug|Win32.ActiveCfg = Debug|Win32
{549B84BA-403D-AF90-29F8-C2E4153936E1}.Debug|Win32.Build.0 = Debug|Win32
- {549B84BA-403D-AF90-29F8-C2E4153936E1}.Debug|x64.ActiveCfg = Debug|x64
- {549B84BA-403D-AF90-29F8-C2E4153936E1}.Debug|x64.Build.0 = Debug|x64
{549B84BA-403D-AF90-29F8-C2E4153936E1}.Release|Win32.ActiveCfg = Release|Win32
{549B84BA-403D-AF90-29F8-C2E4153936E1}.Release|Win32.Build.0 = Release|Win32
- {549B84BA-403D-AF90-29F8-C2E4153936E1}.Release|x64.ActiveCfg = Release|x64
- {549B84BA-403D-AF90-29F8-C2E4153936E1}.Release|x64.Build.0 = Release|x64
{AE0A9E7C-9A41-9F0D-432E-85102F441B0F}.Debug|Win32.ActiveCfg = Debug|Win32
{AE0A9E7C-9A41-9F0D-432E-85102F441B0F}.Debug|Win32.Build.0 = Debug|Win32
- {AE0A9E7C-9A41-9F0D-432E-85102F441B0F}.Debug|x64.ActiveCfg = Debug|x64
- {AE0A9E7C-9A41-9F0D-432E-85102F441B0F}.Debug|x64.Build.0 = Debug|x64
{AE0A9E7C-9A41-9F0D-432E-85102F441B0F}.Release|Win32.ActiveCfg = Release|Win32
{AE0A9E7C-9A41-9F0D-432E-85102F441B0F}.Release|Win32.Build.0 = Release|Win32
- {AE0A9E7C-9A41-9F0D-432E-85102F441B0F}.Release|x64.ActiveCfg = Release|x64
- {AE0A9E7C-9A41-9F0D-432E-85102F441B0F}.Release|x64.Build.0 = Release|x64
{3F16CDE1-AB80-8158-F4BE-32FE60685FAD}.Debug|Win32.ActiveCfg = Debug|Win32
{3F16CDE1-AB80-8158-F4BE-32FE60685FAD}.Debug|Win32.Build.0 = Debug|Win32
- {3F16CDE1-AB80-8158-F4BE-32FE60685FAD}.Debug|x64.ActiveCfg = Debug|x64
- {3F16CDE1-AB80-8158-F4BE-32FE60685FAD}.Debug|x64.Build.0 = Debug|x64
{3F16CDE1-AB80-8158-F4BE-32FE60685FAD}.Release|Win32.ActiveCfg = Release|Win32
{3F16CDE1-AB80-8158-F4BE-32FE60685FAD}.Release|Win32.Build.0 = Release|Win32
- {3F16CDE1-AB80-8158-F4BE-32FE60685FAD}.Release|x64.ActiveCfg = Release|x64
- {3F16CDE1-AB80-8158-F4BE-32FE60685FAD}.Release|x64.Build.0 = Release|x64
{69185F10-D52C-87C1-9EAE-2A210A8283F2}.Debug|Win32.ActiveCfg = Debug|Win32
{69185F10-D52C-87C1-9EAE-2A210A8283F2}.Debug|Win32.Build.0 = Debug|Win32
- {69185F10-D52C-87C1-9EAE-2A210A8283F2}.Debug|x64.ActiveCfg = Debug|x64
- {69185F10-D52C-87C1-9EAE-2A210A8283F2}.Debug|x64.Build.0 = Debug|x64
{69185F10-D52C-87C1-9EAE-2A210A8283F2}.Release|Win32.ActiveCfg = Release|Win32
{69185F10-D52C-87C1-9EAE-2A210A8283F2}.Release|Win32.Build.0 = Release|Win32
- {69185F10-D52C-87C1-9EAE-2A210A8283F2}.Release|x64.ActiveCfg = Release|x64
- {69185F10-D52C-87C1-9EAE-2A210A8283F2}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -149,7 +105,4 @@ Global {3F16CDE1-AB80-8158-F4BE-32FE60685FAD} = {9892E17D-8434-0C54-6DEF-1FA8593093A4}
{69185F10-D52C-87C1-9EAE-2A210A8283F2} = {9892E17D-8434-0C54-6DEF-1FA8593093A4}
EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {B9E3E8B3-5BA4-4521-B598-F1EF432D2126}
- EndGlobalSection
EndGlobal
diff --git a/JSImpl/solution/JSImpl.vcxproj b/JSImpl/solution/JSImpl.vcxproj index 8db08cc..a2bc858 100644 --- a/JSImpl/solution/JSImpl.vcxproj +++ b/JSImpl/solution/JSImpl.vcxproj @@ -5,18 +5,10 @@ <Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{549B84BA-403D-AF90-29F8-C2E4153936E1}</ProjectGuid>
@@ -33,13 +25,6 @@ <PlatformToolset>v142</PlatformToolset>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <VCProjectVersion>16.0</VCProjectVersion>
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
- <DebugSymbols>true</DebugSymbols>
- </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<VCProjectVersion>16.0</VCProjectVersion>
<ConfigurationType>Application</ConfigurationType>
@@ -47,28 +32,15 @@ <PlatformToolset>v142</PlatformToolset>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <VCProjectVersion>16.0</VCProjectVersion>
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
- <DebugSymbols>true</DebugSymbols>
- </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>..\build\bin\Debug\</OutDir>
@@ -77,13 +49,6 @@ <TargetExt>.exe</TargetExt>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <OutDir>..\build\bin\Debug\</OutDir>
- <IntDir>..\build\obj\Debug\x64\Debug\JSImpl\</IntDir>
- <TargetName>JSImpl</TargetName>
- <TargetExt>.exe</TargetExt>
- <LinkIncremental>true</LinkIncremental>
- </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>..\build\bin\Release\</OutDir>
<IntDir>..\build\obj\Release\Release\JSImpl\</IntDir>
@@ -91,13 +56,6 @@ <TargetExt>.exe</TargetExt>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <OutDir>..\build\bin\Release\</OutDir>
- <IntDir>..\build\obj\Release\x64\Release\JSImpl\</IntDir>
- <TargetName>JSImpl</TargetName>
- <TargetExt>.exe</TargetExt>
- <LinkIncremental>false</LinkIncremental>
- </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
@@ -111,37 +69,7 @@ <PrecompiledHeader></PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
- <LanguageStandard>stdcpp14</LanguageStandard>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <ProgramDataBaseFileName>$(IntDir)JSImpl.compile.pdb</ProgramDataBaseFileName>
- <DiagnosticsFormat>Caret</DiagnosticsFormat>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)JSImpl.pdb</ProgramDatabaseFile>
- <AdditionalLibraryDirectories>;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <OutputFile>$(OutDir)JSImpl.exe</OutputFile>
- <EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <PrecompiledHeader></PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
- <LanguageStandard>stdcpp14</LanguageStandard>
+ <LanguageStandard>stdcpp17</LanguageStandard>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<ProgramDataBaseFileName>$(IntDir)JSImpl.compile.pdb</ProgramDataBaseFileName>
<DiagnosticsFormat>Caret</DiagnosticsFormat>
@@ -156,7 +84,6 @@ <AdditionalLibraryDirectories>;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<OutputFile>$(OutDir)JSImpl.exe</OutputFile>
<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
- <TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -172,39 +99,7 @@ <PrecompiledHeader></PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
- <LanguageStandard>stdcpp14</LanguageStandard>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <ProgramDataBaseFileName>$(IntDir)JSImpl.compile.pdb</ProgramDataBaseFileName>
- <DiagnosticsFormat>Caret</DiagnosticsFormat>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)JSImpl.pdb</ProgramDatabaseFile>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <OutputFile>$(OutDir)JSImpl.exe</OutputFile>
- <EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
- <Optimization>MaxSpeed</Optimization>
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <StringPooling>true</StringPooling>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <PrecompiledHeader></PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
- <LanguageStandard>stdcpp14</LanguageStandard>
+ <LanguageStandard>stdcpp17</LanguageStandard>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ProgramDataBaseFileName>$(IntDir)JSImpl.compile.pdb</ProgramDataBaseFileName>
<DiagnosticsFormat>Caret</DiagnosticsFormat>
@@ -221,7 +116,6 @@ <AdditionalLibraryDirectories>;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<OutputFile>$(OutDir)JSImpl.exe</OutputFile>
<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
- <TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
diff --git a/JSImpl/solution/JSLib.make b/JSImpl/solution/JSLib.make index 9770cb0..6d92807 100644 --- a/JSImpl/solution/JSLib.make +++ b/JSImpl/solution/JSLib.make @@ -50,9 +50,9 @@ ifeq ($(config),debug) ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g - ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -std=c++14 + ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -std=c++17 ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g - ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -std=c++14 + ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -std=c++17 ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) ALL_LDFLAGS += $(LDFLAGS) LIBDEPS += @@ -88,9 +88,9 @@ ifeq ($(config),release) ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 - ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -std=c++14 + ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -std=c++17 ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 - ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -std=c++14 + ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -std=c++17 ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) ALL_LDFLAGS += $(LDFLAGS) LIBDEPS += @@ -118,82 +118,6 @@ ifeq ($(config),release) endef endif -ifeq ($(config),debug64) - OBJDIR = ../build/obj/Debug/x64/Debug/JSLib - TARGETDIR = ../build/bin/Debug - TARGET = $(TARGETDIR)/libJSLib.a - DEFINES += -D_SCL_SECURE_NO_WARNINGS - ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) - ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 - ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 - ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 -std=c++14 - ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 - ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 -std=c++14 - ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) - ALL_LDFLAGS += $(LDFLAGS) -m64 - LIBDEPS += - LDDEPS += - LDRESP = - LIBS += $(LDDEPS) - EXTERNAL_LIBS += - LINKOBJS = $(OBJECTS) - LINKCMD = $(AR) -rcs $(TARGET) - OBJRESP = - OBJECTS := \ - $(OBJDIR)/src/ASTInterpreter.o \ - $(OBJDIR)/src/ASTPrinter.o \ - $(OBJDIR)/src/ByteCodeGenerator.o \ - $(OBJDIR)/src/Expression.o \ - $(OBJDIR)/src/JSONParser.o \ - $(OBJDIR)/src/Lexer.o \ - $(OBJDIR)/src/Parser.o \ - - define PREBUILDCMDS - endef - define PRELINKCMDS - endef - define POSTBUILDCMDS - endef -endif - -ifeq ($(config),release64) - OBJDIR = ../build/obj/Release/x64/Release/JSLib - TARGETDIR = ../build/bin/Release - TARGET = $(TARGETDIR)/libJSLib.a - DEFINES += -D_SCL_SECURE_NO_WARNINGS - ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) - ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 - ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 - ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 -std=c++14 - ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 - ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 -std=c++14 - ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) - ALL_LDFLAGS += $(LDFLAGS) -m64 - LIBDEPS += - LDDEPS += - LDRESP = - LIBS += $(LDDEPS) - EXTERNAL_LIBS += - LINKOBJS = $(OBJECTS) - LINKCMD = $(AR) -rcs $(TARGET) - OBJRESP = - OBJECTS := \ - $(OBJDIR)/src/ASTInterpreter.o \ - $(OBJDIR)/src/ASTPrinter.o \ - $(OBJDIR)/src/ByteCodeGenerator.o \ - $(OBJDIR)/src/Expression.o \ - $(OBJDIR)/src/JSONParser.o \ - $(OBJDIR)/src/Lexer.o \ - $(OBJDIR)/src/Parser.o \ - - define PREBUILDCMDS - endef - define PRELINKCMDS - endef - define POSTBUILDCMDS - endef -endif - OBJDIRS := \ $(OBJDIR) \ $(OBJDIR)/src \ diff --git a/JSImpl/solution/JSLib.vcxproj b/JSImpl/solution/JSLib.vcxproj index 67600b0..b56083a 100644 --- a/JSImpl/solution/JSLib.vcxproj +++ b/JSImpl/solution/JSLib.vcxproj @@ -5,18 +5,10 @@ <Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{19EA680D-85FE-90BE-4E80-341EBA538DEF}</ProjectGuid>
@@ -33,13 +25,6 @@ <PlatformToolset>v142</PlatformToolset>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <VCProjectVersion>16.0</VCProjectVersion>
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
- <DebugSymbols>true</DebugSymbols>
- </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<VCProjectVersion>16.0</VCProjectVersion>
<ConfigurationType>StaticLibrary</ConfigurationType>
@@ -47,28 +32,15 @@ <PlatformToolset>v142</PlatformToolset>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <VCProjectVersion>16.0</VCProjectVersion>
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
- <DebugSymbols>true</DebugSymbols>
- </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>..\build\bin\Debug\</OutDir>
@@ -76,24 +48,12 @@ <TargetName>JSLib</TargetName>
<TargetExt>.lib</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <OutDir>..\build\bin\Debug\</OutDir>
- <IntDir>..\build\obj\Debug\x64\Debug\JSLib\</IntDir>
- <TargetName>JSLib</TargetName>
- <TargetExt>.lib</TargetExt>
- </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>..\build\bin\Release\</OutDir>
<IntDir>..\build\obj\Release\Release\JSLib\</IntDir>
<TargetName>JSLib</TargetName>
<TargetExt>.lib</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <OutDir>..\build\bin\Release\</OutDir>
- <IntDir>..\build\obj\Release\x64\Release\JSLib\</IntDir>
- <TargetName>JSLib</TargetName>
- <TargetExt>.lib</TargetExt>
- </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
@@ -107,37 +67,7 @@ <PrecompiledHeader></PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
- <LanguageStandard>stdcpp14</LanguageStandard>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <ProgramDataBaseFileName>$(OutDir)JSLib.pdb</ProgramDataBaseFileName>
- <DiagnosticsFormat>Caret</DiagnosticsFormat>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- <Lib>
- <OutputFile>$(OutDir)JSLib.lib</OutputFile>
- </Lib>
- <Link>
- <SubSystem>Windows</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)JSLib.pdb</ProgramDatabaseFile>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <PrecompiledHeader></PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
- <LanguageStandard>stdcpp14</LanguageStandard>
+ <LanguageStandard>stdcpp17</LanguageStandard>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<ProgramDataBaseFileName>$(OutDir)JSLib.pdb</ProgramDataBaseFileName>
<DiagnosticsFormat>Caret</DiagnosticsFormat>
@@ -147,7 +77,6 @@ </ResourceCompile>
<Lib>
<OutputFile>$(OutDir)JSLib.lib</OutputFile>
- <TargetMachine>MachineX64</TargetMachine>
</Lib>
<Link>
<SubSystem>Windows</SubSystem>
@@ -168,39 +97,7 @@ <PrecompiledHeader></PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
- <LanguageStandard>stdcpp14</LanguageStandard>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <ProgramDataBaseFileName>$(OutDir)JSLib.pdb</ProgramDataBaseFileName>
- <DiagnosticsFormat>Caret</DiagnosticsFormat>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- <Lib>
- <OutputFile>$(OutDir)JSLib.lib</OutputFile>
- </Lib>
- <Link>
- <SubSystem>Windows</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)JSLib.pdb</ProgramDatabaseFile>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
- <Optimization>MaxSpeed</Optimization>
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <StringPooling>true</StringPooling>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <PrecompiledHeader></PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
- <LanguageStandard>stdcpp14</LanguageStandard>
+ <LanguageStandard>stdcpp17</LanguageStandard>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ProgramDataBaseFileName>$(OutDir)JSLib.pdb</ProgramDataBaseFileName>
<DiagnosticsFormat>Caret</DiagnosticsFormat>
@@ -210,7 +107,6 @@ </ResourceCompile>
<Lib>
<OutputFile>$(OutDir)JSLib.lib</OutputFile>
- <TargetMachine>MachineX64</TargetMachine>
</Lib>
<Link>
<SubSystem>Windows</SubSystem>
diff --git a/JSImpl/solution/Makefile b/JSImpl/solution/Makefile index fe89e52..fd12d74 100644 --- a/JSImpl/solution/Makefile +++ b/JSImpl/solution/Makefile @@ -70,8 +70,6 @@ help: @echo "CONFIGURATIONS:" @echo " debug" @echo " release" - @echo " debug64" - @echo " release64" @echo "" @echo "TARGETS:" @echo " all (default)" diff --git a/JSImpl/solution/genie.lua b/JSImpl/solution/genie.lua index 247f72d..777446b 100644 --- a/JSImpl/solution/genie.lua +++ b/JSImpl/solution/genie.lua @@ -3,7 +3,7 @@ solution 'JSImpl' flags { 'FatalWarnings', 'ExtraWarnings', - 'Cpp14', + 'Cpp17', 'Symbols', } defines { diff --git a/JSImpl/src/ASTInterpreter.cpp b/JSImpl/src/ASTInterpreter.cpp index 9874a4d..f550da9 100644 --- a/JSImpl/src/ASTInterpreter.cpp +++ b/JSImpl/src/ASTInterpreter.cpp @@ -6,6 +6,224 @@ #undef NOT_IMPLEMENTED #define NOT_IMPLEMENTED (void)e; assert(0 && "not-implemented") +namespace +{ + template <typename T> + ASTInterpreter::ValuePtr MakeValue(T&& v) + { + return IPLMakeSharePtr<ASTInterpreter::Value>(v); + } + + template <typename T> + ASTInterpreter::ValuePtr MakeValue(const T& v) + { + return IPLMakeSharePtr<ASTInterpreter::Value>(v); + } + + struct ValueToBool + { + bool operator()(double d) const + { + return d != 0.0; + } + bool operator()(const IPLString& s) const + { + return !s.empty(); + } + }; + + struct UnsupportedOpReport + { + template <typename V> + ASTInterpreter::ValuePtr operator()(V) const + { + throw std::runtime_error("unsupported operation"); + } + + template <typename L, typename R> + ASTInterpreter::ValuePtr operator()(L, R) const + { + throw std::runtime_error("unsupported operation"); + } + }; + + struct ValueAdd : UnsupportedOpReport + { + using UnsupportedOpReport::operator(); + + ASTInterpreter::ValuePtr operator()(double l, double r) const + { + return MakeValue(l + r); + } + + ASTInterpreter::ValuePtr operator()(const IPLString& l, const IPLString& r) const + { + return MakeValue(l + r); + } + }; + + struct ValueMinus : UnsupportedOpReport + { + using UnsupportedOpReport::operator(); + + ASTInterpreter::ValuePtr operator()(double l, double r) const + { + return MakeValue(l - r); + } + }; + + struct ValueProduct : UnsupportedOpReport + { + using UnsupportedOpReport::operator(); + + ASTInterpreter::ValuePtr operator()(double l, double r) const + { + return MakeValue(l * r); + } + }; + + struct ValueDivide : UnsupportedOpReport + { + using UnsupportedOpReport::operator(); + + ASTInterpreter::ValuePtr operator()(double l, double r) const + { + return MakeValue(l / r); + } + }; + + struct ValueLess : UnsupportedOpReport + { + using UnsupportedOpReport::operator(); + + template <typename V> + ASTInterpreter::ValuePtr operator()(const V& l, const V& r) const + { + return MakeValue(l < r); + } + }; + struct ValueLessEqual : UnsupportedOpReport + { + using UnsupportedOpReport::operator(); + + template <typename V> + ASTInterpreter::ValuePtr operator()(V l, V r) const + { + return MakeValue(l <= r); + } + }; + + struct ValueGreater : UnsupportedOpReport + { + using UnsupportedOpReport::operator(); + + template <typename V> + ASTInterpreter::ValuePtr operator()(V l, V r) const + { + return MakeValue(l > r); + } + }; + + struct ValueGreaterEqual : UnsupportedOpReport + { + using UnsupportedOpReport::operator(); + + template <typename V> + ASTInterpreter::ValuePtr operator()(V l, V r) const + { + return MakeValue(l >= r); + } + }; + + struct ValueEqualEqual : UnsupportedOpReport + { + using UnsupportedOpReport::operator(); + + ASTInterpreter::ValuePtr operator()(double left, double right) const + { + return MakeValue(fabs(left - right) <= 0.0001); + } + + ASTInterpreter::ValuePtr operator()(const IPLString& left, const IPLString& right) const + { + return MakeValue(left == right); + } + }; + + struct ValueBangEqual : UnsupportedOpReport + { + using UnsupportedOpReport::operator(); + + ASTInterpreter::ValuePtr operator()(double left, double right) const + { + return MakeValue(fabs(left - right) > 0.0001); + } + ASTInterpreter::ValuePtr operator()(const IPLString& left, const IPLString& right) const + { + return MakeValue(left != right); + } + }; + + struct ValueUnaryMinus : UnsupportedOpReport + { + using UnsupportedOpReport::operator(); + + ASTInterpreter::ValuePtr operator()(double v) const + { + return MakeValue(-v); + } + }; + + struct ValueIncrement + { + void operator()(double& v) const + { + v += 1; + } + + template <typename V> + void operator()(V&) const + { + throw std::runtime_error("unsupported operation"); + } + }; + + struct ValueDecrement + { + void operator()(double& v) const + { + v -= 1; + } + + template <typename V> + void operator()(V&) const + { + throw std::runtime_error("unsupported operation"); + } + }; + + struct ValuePrint + { + ValuePrint(const char* name, ASTInterpreter::Printer* printer) + : Name(name) + , Printer(printer) + {} + + void operator()(double value) const + { + Printer->PrintVariable(Name, value); + } + + void operator()(const IPLString& value) const + { + Printer->PrintVariable(Name, value); + } + + const char* Name; + ASTInterpreter::Printer* Printer; + }; +} + struct LValueExtractor : public ExpressionVisitor { public: @@ -14,17 +232,17 @@ public: {} ~LValueExtractor() {} - ASTInterpreter::value_type* Run(Expression* program) + ASTInterpreter::ValuePtr Run(Expression* program) { m_LValue = nullptr; program->Accept(*this); return m_LValue; } - virtual void Visit(IdentifierExpression* e) override { m_LValue = &m_Interpreter->ModifyVariable(e->GetName()); } + virtual void Visit(IdentifierExpression* e) override { m_LValue = m_Interpreter->ModifyVariable(e->GetName()); } ASTInterpreter* m_Interpreter; - ASTInterpreter::value_type* m_LValue; + ASTInterpreter::ValuePtr m_LValue; }; @@ -98,7 +316,7 @@ bool ASTInterpreter::EvalToBool(const ExpressionPtr& e) e->Accept(*this); auto result = m_Evaluation.back(); m_Evaluation.pop_back(); - return result != 0.0; + return std::visit(ValueToBool(), *result); } void ASTInterpreter::EnterScope() @@ -119,7 +337,7 @@ void ASTInterpreter::LeaveScope() m_Scopes.pop(); } -ASTInterpreter::value_type& ASTInterpreter::ModifyVariable(const IPLString& name) +ASTInterpreter::ValuePtr& ASTInterpreter::ModifyVariable(const IPLString& name) { auto values = m_Variables.find(name); if (values != m_Variables.end()) { @@ -128,7 +346,7 @@ ASTInterpreter::value_type& ASTInterpreter::ModifyVariable(const IPLString& name else { assert(0 && "not-defined"); } - static value_type undefined; + static ValuePtr undefined; return undefined; } @@ -145,7 +363,7 @@ void ASTInterpreter::Visit(LiteralUndefined* e) { NOT_IMPLEMENTED; } void ASTInterpreter::Visit(LiteralString* e) { - NOT_IMPLEMENTED; + m_Evaluation.push_back(MakeValue(e->GetValue())); } void ASTInterpreter::Visit(LiteralObject* e) @@ -154,54 +372,54 @@ void ASTInterpreter::Visit(LiteralObject* e) } void ASTInterpreter::Visit(LiteralNumber* e) { - m_Evaluation.push_back(e->GetValue()); + m_Evaluation.push_back(MakeValue(e->GetValue())); } void ASTInterpreter::Visit(LiteralBoolean* e) { - m_Evaluation.push_back(e->GetValue()); + m_Evaluation.push_back(MakeValue(e->GetValue())); } void ASTInterpreter::Visit(BinaryExpression* e) { e->GetLeft()->Accept(*this); e->GetRight()->Accept(*this); - auto right = m_Evaluation.back(); + auto right = *m_Evaluation.back(); m_Evaluation.pop_back(); - auto left = m_Evaluation.back(); + auto left = *m_Evaluation.back(); m_Evaluation.pop_back(); switch (e->GetOperator()) { case TokenType::Plus: - m_Evaluation.push_back(left + right); + m_Evaluation.push_back(std::visit(ValueAdd(), left, right)); break; case TokenType::Minus: - m_Evaluation.push_back(left - right); + m_Evaluation.push_back(std::visit(ValueMinus(), left, right)); break; case TokenType::Star: - m_Evaluation.push_back(left * right); + m_Evaluation.push_back(std::visit(ValueProduct(), left, right)); break; case TokenType::Division: - m_Evaluation.push_back(left / right); + m_Evaluation.push_back(std::visit(ValueDivide(), left, right)); break; case TokenType::Less: - m_Evaluation.push_back(left < right); + m_Evaluation.push_back(std::visit(ValueLess(), left, right)); + break; + case TokenType::LessEqual: + m_Evaluation.push_back(std::visit(ValueLessEqual(), left, right)); + break; + case TokenType::Greater: + m_Evaluation.push_back(std::visit(ValueGreater(), left, right)); + break; + case TokenType::GreaterEqual: + m_Evaluation.push_back(std::visit(ValueGreaterEqual(), left, right)); break; - case TokenType::LessEqual: - m_Evaluation.push_back(left <= right); - break; - case TokenType::Greater: - m_Evaluation.push_back(left > right); - break; - case TokenType::GreaterEqual: - m_Evaluation.push_back(left >= right); - break; case TokenType::Comma: - m_Evaluation.push_back(right); + m_Evaluation.push_back(MakeValue(std::move(right))); break; case TokenType::EqualEqual: - m_Evaluation.push_back(fabs(left - right) < 0.0001); + m_Evaluation.push_back(std::visit(ValueEqualEqual(), left, right)); break; case TokenType::BangEqual: - m_Evaluation.push_back(fabs(left - right) > 0.0001); + m_Evaluation.push_back(std::visit(ValueBangEqual(), left, right)); break; case TokenType::Equal: { @@ -221,7 +439,9 @@ void ASTInterpreter::Visit(UnaryExpression* e) { case TokenType::Minus: { e->GetExpr()->Accept(*this); - m_Evaluation.back() *= -1; + auto v = m_Evaluation.back(); + m_Evaluation.pop_back(); + m_Evaluation.push_back(std::visit(ValueUnaryMinus(), *v)); break; } case TokenType::Plus: @@ -236,12 +456,19 @@ void ASTInterpreter::Visit(UnaryExpression* e) { auto lvalue = extractor.Run(e->GetExpr().get()); if (e->GetSuffix()) { - m_Evaluation.push_back(*lvalue); + m_Evaluation.push_back(MakeValue(*lvalue)); + } + if (e->GetOperator() == TokenType::PlusPlus) + { + std::visit(ValueIncrement(), *lvalue); + } + else + { + std::visit(ValueDecrement(), *lvalue); } - *lvalue += e->GetOperator() == TokenType::PlusPlus ? 1 : -1; if (!e->GetSuffix()) { - m_Evaluation.push_back(*lvalue); + m_Evaluation.push_back(MakeValue(*lvalue)); } break; } @@ -347,6 +574,7 @@ void ASTInterpreter::Print(Printer& p) { for (auto& it : m_Variables) { - p.PrintVariable(it.first.c_str(), ModifyVariable(it.first)); + auto& value = ModifyVariable(it.first); + std::visit(ValuePrint(it.first.c_str(), &p), *value); } -}
\ No newline at end of file +} diff --git a/JSImpl/src/ASTInterpreter.h b/JSImpl/src/ASTInterpreter.h index db89013..cce6108 100644 --- a/JSImpl/src/ASTInterpreter.h +++ b/JSImpl/src/ASTInterpreter.h @@ -2,6 +2,8 @@ #include "ExpressionVisitor.h" +#include <variant> + class ASTInterpreter : public ExpressionVisitor { public: @@ -9,10 +11,9 @@ public: ~ASTInterpreter(); - // TODO: Changing this to a shared_ptr<Value> (or GC-enabled value*) will - // allow for much simpler implementation of all varible assignments. - typedef double value_type; - typedef IPLVector<value_type> ValueStack; + typedef std::variant<double, IPLString> Value; + typedef IPLSharedPtr<Value> ValuePtr; + typedef IPLVector<ValuePtr> ValueStack; ValueStack Run(Expression* program); @@ -39,13 +40,14 @@ public: virtual void Visit(EmptyExpression* e) override; virtual void Visit(CallExpression* e) override; - value_type& ModifyVariable(const IPLString& name); + ValuePtr& ModifyVariable(const IPLString& name); bool HasVariable(const IPLString& name); class Printer { public: virtual void PrintVariable(const char* name, double value) = 0; + virtual void PrintVariable(const char* name, const IPLString& value) = 0; }; void Print(Printer& p); diff --git a/JSImpl/src/Parser.cpp b/JSImpl/src/Parser.cpp index 89ba3df..bc4920f 100644 --- a/JSImpl/src/Parser.cpp +++ b/JSImpl/src/Parser.cpp @@ -320,7 +320,11 @@ ExpressionPtr Parser::SimpleExpression() } else if (Match(TokenType::String)) { - return IPLMakeSharePtr<LiteralString>(Prev().Lexeme); + const auto& lexeme = Prev().Lexeme; + const auto length = lexeme.length(); + assert(length >= 2); + auto value = lexeme.substr(1, length-2); + return IPLMakeSharePtr<LiteralString>(value); } else if (Match(TokenType::Null)) { diff --git a/JSImpl/src/main.cpp b/JSImpl/src/main.cpp index 6ed1122..06421a7 100644 --- a/JSImpl/src/main.cpp +++ b/JSImpl/src/main.cpp @@ -38,7 +38,11 @@ class InterpreterPrinter : public ASTInterpreter::Printer public: virtual void PrintVariable(const char* name, double value) override { - std::cout << name << ": " << value << std::endl; + std::cout << name << ": number : " << value << std::endl; + } + virtual void PrintVariable(const char* name, const IPLString& value) override + { + std::cout << name << ": string : " << value << std::endl; } }; diff --git a/JSImpl/test/ASTInterpreterTests.cpp b/JSImpl/test/ASTInterpreterTests.cpp new file mode 100644 index 0000000..e8cf282 --- /dev/null +++ b/JSImpl/test/ASTInterpreterTests.cpp @@ -0,0 +1,77 @@ +#include <gtest/gtest.h> + +#include <src/CommonTypes.h> +#include <src/Lexer.h> +#include <src/Parser.h> +#include <src/ASTPrinter.h> +#include <src/ASTInterpreter.h> + +struct ASTInterpret : ::testing::Test +{ + void Run(const char* program) + { + auto tokens = Tokenize(program).tokens; + auto expr = Parse(tokens); + Interpreter.Run(expr.get()); + } + + bool HasVariable(const char* name) + { + return Interpreter.HasVariable(name); + } + + double ValueAsNumber(const char* name) + { + return std::get<double>(*Interpreter.ModifyVariable(name)); + } + + IPLString ValueAsString(const char* name) + { + return std::get<IPLString>(*Interpreter.ModifyVariable(name)); + } + + ASTInterpreter Interpreter; +}; + +TEST_F(ASTInterpret, VarNumber) +{ + Run("var answer = 6 * 7"); + ASSERT_TRUE(HasVariable("answer")); + ASSERT_DOUBLE_EQ(ValueAsNumber("answer"), 42.0); +} + +TEST_F(ASTInterpret, VarString) +{ + Run("var name = 'John' + ' ' + 'Doe'"); + ASSERT_TRUE(HasVariable("name")); + ASSERT_EQ(ValueAsString("name"), "John Doe"); +} + +TEST_F(ASTInterpret, StringPlusNumberNotSupported) +{ + ASSERT_THROW(Run("var data = 'John Doe' + 42"), std::runtime_error); +} + +TEST_F(ASTInterpret, StringMinusString) +{ + ASSERT_THROW(Run("var data = 'John' - 'Doe'"), std::runtime_error); +} + +TEST_F(ASTInterpret, LessNumber) +{ + Run("var answer = 6 < 7"); + ASSERT_TRUE(HasVariable("answer")); + ASSERT_DOUBLE_EQ(ValueAsNumber("answer"), 1.0); +} + +TEST_F(ASTInterpret, LessString) +{ + Run("var name = 'John' < 'Doe'"); + ASSERT_TRUE(HasVariable("name")); + ASSERT_DOUBLE_EQ(ValueAsNumber("name"), 0.0); +} + +TEST_F(ASTInterpret, StringLessNumber) +{ + ASSERT_THROW(Run("var data = 'John' < 42"), std::runtime_error); +} diff --git a/JSImpl/test/ParserTests.cpp b/JSImpl/test/ParserTests.cpp index d63ae60..f47b4b3 100644 --- a/JSImpl/test/ParserTests.cpp +++ b/JSImpl/test/ParserTests.cpp @@ -27,7 +27,7 @@ TEST(Parser, VariableDeclaration) ASTInterpreter i; i.Run(expr.get()); ASSERT_TRUE(i.HasVariable("s")); - ASSERT_TRUE(i.ModifyVariable("s") == 0.0); + ASSERT_TRUE(std::get<double>(*i.ModifyVariable("s")) == 0.0); } TEST(Parser, Assignment) @@ -38,7 +38,7 @@ TEST(Parser, Assignment) ASTInterpreter i; i.Run(expr.get()); ASSERT_TRUE(i.HasVariable("s")); - ASSERT_TRUE(i.ModifyVariable("s") == 100); + ASSERT_TRUE(std::get<double>(*i.ModifyVariable("s")) == 100); } TEST(Parser, VariableDeclarationAdditionOfLiterals) @@ -49,7 +49,7 @@ TEST(Parser, VariableDeclarationAdditionOfLiterals) ASTInterpreter i; i.Run(expr.get()); ASSERT_TRUE(i.HasVariable("s")); - ASSERT_DOUBLE_EQ(i.ModifyVariable("s"), 11.0); + ASSERT_DOUBLE_EQ(std::get<double>(*i.ModifyVariable("s")), 11.0); } TEST(Parser, VariableDeclarationAdditionOfVariables) @@ -62,9 +62,9 @@ TEST(Parser, VariableDeclarationAdditionOfVariables) ASSERT_TRUE(i.HasVariable("a")); ASSERT_TRUE(i.HasVariable("b")); ASSERT_TRUE(i.HasVariable("c")); - ASSERT_DOUBLE_EQ(i.ModifyVariable("a"), 5.0); - ASSERT_DOUBLE_EQ(i.ModifyVariable("b"), 4.0); - ASSERT_DOUBLE_EQ(i.ModifyVariable("c"), 9.0); + ASSERT_DOUBLE_EQ(std::get<double>(*i.ModifyVariable("a")), 5.0); + ASSERT_DOUBLE_EQ(std::get<double>(*i.ModifyVariable("b")), 4.0); + ASSERT_DOUBLE_EQ(std::get<double>(*i.ModifyVariable("c")), 9.0); } TEST(Parser, VariableDeclarationMultiplicationOfLiterals) @@ -75,7 +75,7 @@ TEST(Parser, VariableDeclarationMultiplicationOfLiterals) ASTInterpreter i; i.Run(expr.get()); ASSERT_TRUE(i.HasVariable("s")); - ASSERT_DOUBLE_EQ(i.ModifyVariable("s"), 30.0); + ASSERT_DOUBLE_EQ(std::get<double>(*i.ModifyVariable("s")), 30.0); } TEST(Parser, VariableDeclarationMultiplicationOfVariables) @@ -88,9 +88,9 @@ TEST(Parser, VariableDeclarationMultiplicationOfVariables) ASSERT_TRUE(i.HasVariable("a")); ASSERT_TRUE(i.HasVariable("b")); ASSERT_TRUE(i.HasVariable("c")); - ASSERT_DOUBLE_EQ(i.ModifyVariable("a"), 5.0); - ASSERT_DOUBLE_EQ(i.ModifyVariable("b"), 4.0); - ASSERT_DOUBLE_EQ(i.ModifyVariable("c"), 20.0); + ASSERT_DOUBLE_EQ(std::get<double>(*i.ModifyVariable("a")), 5.0); + ASSERT_DOUBLE_EQ(std::get<double>(*i.ModifyVariable("b")), 4.0); + ASSERT_DOUBLE_EQ(std::get<double>(*i.ModifyVariable("c")), 20.0); } @@ -103,10 +103,10 @@ TEST(Parser, Unary) i.Run(expr.get()); ASSERT_TRUE(i.HasVariable("a")); ASSERT_TRUE(i.HasVariable("b")); - ASSERT_DOUBLE_EQ(i.ModifyVariable("a"), 6.0); - ASSERT_DOUBLE_EQ(i.ModifyVariable("b"), 5.0); - ASSERT_DOUBLE_EQ(i.ModifyVariable("minusB"), -5.0); - ASSERT_DOUBLE_EQ(i.ModifyVariable("plusB"), +5.0); + ASSERT_DOUBLE_EQ(std::get<double>(*i.ModifyVariable("a")), 6.0); + ASSERT_DOUBLE_EQ(std::get<double>(*i.ModifyVariable("b")), 5.0); + ASSERT_DOUBLE_EQ(std::get<double>(*i.ModifyVariable("minusB")), -5.0); + ASSERT_DOUBLE_EQ(std::get<double>(*i.ModifyVariable("plusB")), +5.0); } @@ -120,8 +120,8 @@ TEST(Parser, If) i.Run(expr.get()); ASSERT_TRUE(i.HasVariable("a")); ASSERT_TRUE(i.HasVariable("b")); - ASSERT_DOUBLE_EQ(i.ModifyVariable("a"), 6.0); - ASSERT_DOUBLE_EQ(i.ModifyVariable("b"), 5.0); + ASSERT_DOUBLE_EQ(std::get<double>(*i.ModifyVariable("a")), 6.0); + ASSERT_DOUBLE_EQ(std::get<double>(*i.ModifyVariable("b")), 5.0); } { IPLVector<Token> tokens = Tokenize("var a = 5; var b = 3; if(a == 5)a++; b++; b++;").tokens; @@ -131,8 +131,8 @@ TEST(Parser, If) i.Run(expr.get()); ASSERT_TRUE(i.HasVariable("a")); ASSERT_TRUE(i.HasVariable("b")); - ASSERT_DOUBLE_EQ(i.ModifyVariable("a"), 6.0); - ASSERT_DOUBLE_EQ(i.ModifyVariable("b"), 5.0); + ASSERT_DOUBLE_EQ(std::get<double>(*i.ModifyVariable("a")), 6.0); + ASSERT_DOUBLE_EQ(std::get<double>(*i.ModifyVariable("b")), 5.0); } { @@ -143,8 +143,8 @@ TEST(Parser, If) i.Run(expr.get()); ASSERT_TRUE(i.HasVariable("a")); ASSERT_TRUE(i.HasVariable("b")); - ASSERT_DOUBLE_EQ(i.ModifyVariable("a"), 5.0); - ASSERT_DOUBLE_EQ(i.ModifyVariable("b"), 5.0); + ASSERT_DOUBLE_EQ(std::get<double>(*i.ModifyVariable("a")), 5.0); + ASSERT_DOUBLE_EQ(std::get<double>(*i.ModifyVariable("b")), 5.0); } { @@ -155,8 +155,8 @@ TEST(Parser, If) i.Run(expr.get()); ASSERT_TRUE(i.HasVariable("a")); ASSERT_TRUE(i.HasVariable("b")); - ASSERT_DOUBLE_EQ(i.ModifyVariable("a"), 5.0); - ASSERT_DOUBLE_EQ(i.ModifyVariable("b"), 5.0); + ASSERT_DOUBLE_EQ(std::get<double>(*i.ModifyVariable("a")), 5.0); + ASSERT_DOUBLE_EQ(std::get<double>(*i.ModifyVariable("b")), 5.0); } { @@ -167,8 +167,8 @@ TEST(Parser, If) i.Run(expr.get()); ASSERT_TRUE(i.HasVariable("a")); ASSERT_TRUE(i.HasVariable("b")); - ASSERT_DOUBLE_EQ(i.ModifyVariable("a"), 6.0); - ASSERT_DOUBLE_EQ(i.ModifyVariable("b"), 4.0); + ASSERT_DOUBLE_EQ(std::get<double>(*i.ModifyVariable("a")), 6.0); + ASSERT_DOUBLE_EQ(std::get<double>(*i.ModifyVariable("b")), 4.0); } } @@ -181,7 +181,7 @@ TEST(Parser, For) ASTInterpreter i; i.Run(expr.get()); ASSERT_TRUE(i.HasVariable("i")); - ASSERT_DOUBLE_EQ(i.ModifyVariable("i"), 45.0); + ASSERT_DOUBLE_EQ(std::get<double>(*i.ModifyVariable("i")), 45.0); } { IPLVector<Token> tokens = Tokenize("var i = 0; for (var j = 0; j < 10; j++) i = i + j;").tokens; @@ -189,7 +189,7 @@ TEST(Parser, For) ASTInterpreter i; i.Run(expr.get()); ASSERT_TRUE(i.HasVariable("i")); - ASSERT_DOUBLE_EQ(i.ModifyVariable("i"), 45.0); + ASSERT_DOUBLE_EQ(std::get<double>(*i.ModifyVariable("i")), 45.0); } } diff --git a/JSImpl/test/Test.make b/JSImpl/test/Test.make index 68e167d..0510fa2 100644 --- a/JSImpl/test/Test.make +++ b/JSImpl/test/Test.make @@ -51,9 +51,9 @@ ifeq ($(config),debug) ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g - ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -std=c++14 + ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -std=c++17 ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g - ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -std=c++14 + ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -std=c++17 ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) ALL_LDFLAGS += $(LDFLAGS) -L"../build/bin/Debug" -L"." LIBDEPS += ../build/bin/Debug/libsprt.a ../build/bin/Debug/libspasm_lib.a ../build/bin/Debug/libJSLib.a ../build/bin/Debug/libgtest.a ../build/bin/Debug/libgmock.a ../build/bin/Debug/libgtest_main.a @@ -65,6 +65,7 @@ ifeq ($(config),debug) LINKCMD = $(CXX) -o $(TARGET) $(LINKOBJS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) OBJRESP = OBJECTS := \ + $(OBJDIR)/ASTInterpreterTests.o \ $(OBJDIR)/CodeGenerationTests.o \ $(OBJDIR)/LexerTests.o \ $(OBJDIR)/ParserTests.o \ @@ -88,9 +89,9 @@ ifeq ($(config),release) ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 - ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -std=c++14 + ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -std=c++17 ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 - ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -std=c++14 + ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -std=c++17 ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) ALL_LDFLAGS += $(LDFLAGS) -L"../build/bin/Release" -L"." LIBDEPS += ../build/bin/Release/libsprt.a ../build/bin/Release/libspasm_lib.a ../build/bin/Release/libJSLib.a ../build/bin/Release/libgtest.a ../build/bin/Release/libgmock.a ../build/bin/Release/libgtest_main.a @@ -102,80 +103,7 @@ ifeq ($(config),release) LINKCMD = $(CXX) -o $(TARGET) $(LINKOBJS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) OBJRESP = OBJECTS := \ - $(OBJDIR)/CodeGenerationTests.o \ - $(OBJDIR)/LexerTests.o \ - $(OBJDIR)/ParserTests.o \ - $(OBJDIR)/empty.o \ - $(OBJDIR)/sprtTests.o \ - - define PREBUILDCMDS - endef - define PRELINKCMDS - endef - define POSTBUILDCMDS - endef -endif - -ifeq ($(config),debug64) - OBJDIR = ../build/obj/Debug/x64/Debug/Test - TARGETDIR = ../build/bin/Debug - TARGET = $(TARGETDIR)/Test - DEFINES += -D_SCL_SECURE_NO_WARNINGS - INCLUDES += -I"googletest/googletest/include" -I"googletest/googlemock/include" -I".." -I"../../spasm/src" -I"../../spasm/src/asm" - ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) - ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 - ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 - ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 -std=c++14 - ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 - ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 -std=c++14 - ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) - ALL_LDFLAGS += $(LDFLAGS) -L"../build/bin/Debug" -L"." -m64 - LIBDEPS += ../build/bin/Debug/libsprt.a ../build/bin/Debug/libspasm_lib.a ../build/bin/Debug/libJSLib.a ../build/bin/Debug/libgtest.a ../build/bin/Debug/libgmock.a ../build/bin/Debug/libgtest_main.a - LDDEPS += ../build/bin/Debug/libsprt.a ../build/bin/Debug/libspasm_lib.a ../build/bin/Debug/libJSLib.a ../build/bin/Debug/libgtest.a ../build/bin/Debug/libgmock.a ../build/bin/Debug/libgtest_main.a - LDRESP = - LIBS += $(LDDEPS) -lpthread - EXTERNAL_LIBS += - LINKOBJS = $(OBJECTS) - LINKCMD = $(CXX) -o $(TARGET) $(LINKOBJS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) - OBJRESP = - OBJECTS := \ - $(OBJDIR)/CodeGenerationTests.o \ - $(OBJDIR)/LexerTests.o \ - $(OBJDIR)/ParserTests.o \ - $(OBJDIR)/empty.o \ - $(OBJDIR)/sprtTests.o \ - - define PREBUILDCMDS - endef - define PRELINKCMDS - endef - define POSTBUILDCMDS - endef -endif - -ifeq ($(config),release64) - OBJDIR = ../build/obj/Release/x64/Release/Test - TARGETDIR = ../build/bin/Release - TARGET = $(TARGETDIR)/Test - DEFINES += -D_SCL_SECURE_NO_WARNINGS - INCLUDES += -I"googletest/googletest/include" -I"googletest/googlemock/include" -I".." -I"../../spasm/src" -I"../../spasm/src/asm" - ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) - ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 - ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 - ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 -std=c++14 - ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 - ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 -std=c++14 - ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) - ALL_LDFLAGS += $(LDFLAGS) -L"../build/bin/Release" -L"." -m64 - LIBDEPS += ../build/bin/Release/libsprt.a ../build/bin/Release/libspasm_lib.a ../build/bin/Release/libJSLib.a ../build/bin/Release/libgtest.a ../build/bin/Release/libgmock.a ../build/bin/Release/libgtest_main.a - LDDEPS += ../build/bin/Release/libsprt.a ../build/bin/Release/libspasm_lib.a ../build/bin/Release/libJSLib.a ../build/bin/Release/libgtest.a ../build/bin/Release/libgmock.a ../build/bin/Release/libgtest_main.a - LDRESP = - LIBS += $(LDDEPS) -lpthread - EXTERNAL_LIBS += - LINKOBJS = $(OBJECTS) - LINKCMD = $(CXX) -o $(TARGET) $(LINKOBJS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) - OBJRESP = - OBJECTS := \ + $(OBJDIR)/ASTInterpreterTests.o \ $(OBJDIR)/CodeGenerationTests.o \ $(OBJDIR)/LexerTests.o \ $(OBJDIR)/ParserTests.o \ @@ -252,6 +180,10 @@ $(LDRESP): $(LDDEPS) | $(TARGETDIR) $(OBJDIRS) $(SILENT) echo $^ > $@ endif +$(OBJDIR)/ASTInterpreterTests.o: ASTInterpreterTests.cpp $(GCH) $(MAKEFILE) | $(OBJDIR)/. + @echo $(notdir $<) + $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" + $(OBJDIR)/CodeGenerationTests.o: CodeGenerationTests.cpp $(GCH) $(MAKEFILE) | $(OBJDIR)/. @echo $(notdir $<) $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" diff --git a/JSImpl/test/Test.vcxproj b/JSImpl/test/Test.vcxproj index 3abf38f..c33f333 100644 --- a/JSImpl/test/Test.vcxproj +++ b/JSImpl/test/Test.vcxproj @@ -5,18 +5,10 @@ <Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{45DC8C7C-3113-8E0D-DAFF-7310C6150A0F}</ProjectGuid>
@@ -33,13 +25,6 @@ <PlatformToolset>v142</PlatformToolset>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <VCProjectVersion>16.0</VCProjectVersion>
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
- <DebugSymbols>true</DebugSymbols>
- </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<VCProjectVersion>16.0</VCProjectVersion>
<ConfigurationType>Application</ConfigurationType>
@@ -47,28 +32,15 @@ <PlatformToolset>v142</PlatformToolset>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <VCProjectVersion>16.0</VCProjectVersion>
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
- <DebugSymbols>true</DebugSymbols>
- </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>..\build\bin\Debug\</OutDir>
@@ -77,13 +49,6 @@ <TargetExt>.exe</TargetExt>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <OutDir>..\build\bin\Debug\</OutDir>
- <IntDir>..\build\obj\Debug\x64\Debug\Test\</IntDir>
- <TargetName>Test</TargetName>
- <TargetExt>.exe</TargetExt>
- <LinkIncremental>true</LinkIncremental>
- </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>..\build\bin\Release\</OutDir>
<IntDir>..\build\obj\Release\Release\Test\</IntDir>
@@ -91,13 +56,6 @@ <TargetExt>.exe</TargetExt>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <OutDir>..\build\bin\Release\</OutDir>
- <IntDir>..\build\obj\Release\x64\Release\Test\</IntDir>
- <TargetName>Test</TargetName>
- <TargetExt>.exe</TargetExt>
- <LinkIncremental>false</LinkIncremental>
- </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
@@ -112,7 +70,7 @@ <PrecompiledHeader></PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
- <LanguageStandard>stdcpp14</LanguageStandard>
+ <LanguageStandard>stdcpp17</LanguageStandard>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<ProgramDataBaseFileName>$(IntDir)Test.compile.pdb</ProgramDataBaseFileName>
<DiagnosticsFormat>Caret</DiagnosticsFormat>
@@ -130,39 +88,6 @@ <EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>googletest\googletest\include;googletest\googlemock\include;..;..\..\spasm\src;..\..\spasm\src\asm;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <PrecompiledHeader></PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
- <LanguageStandard>stdcpp14</LanguageStandard>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <ProgramDataBaseFileName>$(IntDir)Test.compile.pdb</ProgramDataBaseFileName>
- <DiagnosticsFormat>Caret</DiagnosticsFormat>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>googletest\googletest\include;googletest\googlemock\include;..;..\..\spasm\src;..\..\spasm\src\asm;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)Test.pdb</ProgramDatabaseFile>
- <AdditionalLibraryDirectories>;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <OutputFile>$(OutDir)Test.exe</OutputFile>
- <EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
@@ -177,41 +102,7 @@ <PrecompiledHeader></PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
- <LanguageStandard>stdcpp14</LanguageStandard>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <ProgramDataBaseFileName>$(IntDir)Test.compile.pdb</ProgramDataBaseFileName>
- <DiagnosticsFormat>Caret</DiagnosticsFormat>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>googletest\googletest\include;googletest\googlemock\include;..;..\..\spasm\src;..\..\spasm\src\asm;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)Test.pdb</ProgramDatabaseFile>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <OutputFile>$(OutDir)Test.exe</OutputFile>
- <EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>googletest\googletest\include;googletest\googlemock\include;..;..\..\spasm\src;..\..\spasm\src\asm;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <StringPooling>true</StringPooling>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <PrecompiledHeader></PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
- <LanguageStandard>stdcpp14</LanguageStandard>
+ <LanguageStandard>stdcpp17</LanguageStandard>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ProgramDataBaseFileName>$(IntDir)Test.compile.pdb</ProgramDataBaseFileName>
<DiagnosticsFormat>Caret</DiagnosticsFormat>
@@ -229,10 +120,11 @@ <AdditionalLibraryDirectories>;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<OutputFile>$(OutDir)Test.exe</OutputFile>
<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
- <TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="ASTInterpreterTests.cpp">
+ </ClCompile>
<ClCompile Include="LexerTests.cpp">
</ClCompile>
<ClCompile Include="CodeGenerationTests.cpp">
diff --git a/JSImpl/test/Test.vcxproj.filters b/JSImpl/test/Test.vcxproj.filters index 412f2b7..50fcfb0 100644 --- a/JSImpl/test/Test.vcxproj.filters +++ b/JSImpl/test/Test.vcxproj.filters @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
+ <ClCompile Include="ASTInterpreterTests.cpp" />
<ClCompile Include="LexerTests.cpp" />
<ClCompile Include="CodeGenerationTests.cpp" />
<ClCompile Include="ParserTests.cpp" />
diff --git a/JSImpl/test/gmock.make b/JSImpl/test/gmock.make index 73e4eac..37d54df 100644 --- a/JSImpl/test/gmock.make +++ b/JSImpl/test/gmock.make @@ -51,9 +51,9 @@ ifeq ($(config),debug) ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g - ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -std=c++14 + ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -std=c++17 ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g - ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -std=c++14 + ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -std=c++17 ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) ALL_LDFLAGS += $(LDFLAGS) LIBDEPS += @@ -84,9 +84,9 @@ ifeq ($(config),release) ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 - ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -std=c++14 + ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -std=c++17 ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 - ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -std=c++14 + ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -std=c++17 ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) ALL_LDFLAGS += $(LDFLAGS) LIBDEPS += @@ -108,72 +108,6 @@ ifeq ($(config),release) endef endif -ifeq ($(config),debug64) - OBJDIR = ../build/obj/Debug/x64/Debug/gmock - TARGETDIR = ../build/bin/Debug - TARGET = $(TARGETDIR)/libgmock.a - DEFINES += -D_SCL_SECURE_NO_WARNINGS - INCLUDES += -I"googletest/googlemock" -I"googletest/googlemock/include" -I"googletest/googletest/include" - ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) - ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 - ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 - ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 -std=c++14 - ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 - ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 -std=c++14 - ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) - ALL_LDFLAGS += $(LDFLAGS) -m64 - LIBDEPS += - LDDEPS += - LDRESP = - LIBS += $(LDDEPS) - EXTERNAL_LIBS += - LINKOBJS = $(OBJECTS) - LINKCMD = $(AR) -rcs $(TARGET) - OBJRESP = - OBJECTS := \ - $(OBJDIR)/googletest/googlemock/src/gmock-all.o \ - - define PREBUILDCMDS - endef - define PRELINKCMDS - endef - define POSTBUILDCMDS - endef -endif - -ifeq ($(config),release64) - OBJDIR = ../build/obj/Release/x64/Release/gmock - TARGETDIR = ../build/bin/Release - TARGET = $(TARGETDIR)/libgmock.a - DEFINES += -D_SCL_SECURE_NO_WARNINGS - INCLUDES += -I"googletest/googlemock" -I"googletest/googlemock/include" -I"googletest/googletest/include" - ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) - ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 - ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 - ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 -std=c++14 - ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 - ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 -std=c++14 - ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) - ALL_LDFLAGS += $(LDFLAGS) -m64 - LIBDEPS += - LDDEPS += - LDRESP = - LIBS += $(LDDEPS) - EXTERNAL_LIBS += - LINKOBJS = $(OBJECTS) - LINKCMD = $(AR) -rcs $(TARGET) - OBJRESP = - OBJECTS := \ - $(OBJDIR)/googletest/googlemock/src/gmock-all.o \ - - define PREBUILDCMDS - endef - define PRELINKCMDS - endef - define POSTBUILDCMDS - endef -endif - OBJDIRS := \ $(OBJDIR) \ $(OBJDIR)/googletest/googlemock/src \ diff --git a/JSImpl/test/gmock.vcxproj b/JSImpl/test/gmock.vcxproj index 5a4490e..44afba9 100644 --- a/JSImpl/test/gmock.vcxproj +++ b/JSImpl/test/gmock.vcxproj @@ -5,18 +5,10 @@ <Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{B686840F-229B-ACC0-EB1C-502057F0A8F1}</ProjectGuid>
@@ -33,13 +25,6 @@ <PlatformToolset>v142</PlatformToolset>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <VCProjectVersion>16.0</VCProjectVersion>
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
- <DebugSymbols>true</DebugSymbols>
- </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<VCProjectVersion>16.0</VCProjectVersion>
<ConfigurationType>StaticLibrary</ConfigurationType>
@@ -47,28 +32,15 @@ <PlatformToolset>v142</PlatformToolset>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <VCProjectVersion>16.0</VCProjectVersion>
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
- <DebugSymbols>true</DebugSymbols>
- </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>..\build\bin\Debug\</OutDir>
@@ -76,24 +48,12 @@ <TargetName>gmock</TargetName>
<TargetExt>.lib</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <OutDir>..\build\bin\Debug\</OutDir>
- <IntDir>..\build\obj\Debug\x64\Debug\gmock\</IntDir>
- <TargetName>gmock</TargetName>
- <TargetExt>.lib</TargetExt>
- </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>..\build\bin\Release\</OutDir>
<IntDir>..\build\obj\Release\Release\gmock\</IntDir>
<TargetName>gmock</TargetName>
<TargetExt>.lib</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <OutDir>..\build\bin\Release\</OutDir>
- <IntDir>..\build\obj\Release\x64\Release\gmock\</IntDir>
- <TargetName>gmock</TargetName>
- <TargetExt>.lib</TargetExt>
- </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
@@ -108,39 +68,7 @@ <PrecompiledHeader></PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
- <LanguageStandard>stdcpp14</LanguageStandard>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <ProgramDataBaseFileName>$(OutDir)gmock.pdb</ProgramDataBaseFileName>
- <DiagnosticsFormat>Caret</DiagnosticsFormat>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>googletest\googlemock;googletest\googlemock\include;googletest\googletest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Lib>
- <OutputFile>$(OutDir)gmock.lib</OutputFile>
- </Lib>
- <Link>
- <SubSystem>Windows</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)gmock.pdb</ProgramDatabaseFile>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>googletest\googlemock;googletest\googlemock\include;googletest\googletest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <PrecompiledHeader></PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
- <LanguageStandard>stdcpp14</LanguageStandard>
+ <LanguageStandard>stdcpp17</LanguageStandard>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<ProgramDataBaseFileName>$(OutDir)gmock.pdb</ProgramDataBaseFileName>
<DiagnosticsFormat>Caret</DiagnosticsFormat>
@@ -151,7 +79,6 @@ </ResourceCompile>
<Lib>
<OutputFile>$(OutDir)gmock.lib</OutputFile>
- <TargetMachine>MachineX64</TargetMachine>
</Lib>
<Link>
<SubSystem>Windows</SubSystem>
@@ -173,41 +100,7 @@ <PrecompiledHeader></PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
- <LanguageStandard>stdcpp14</LanguageStandard>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <ProgramDataBaseFileName>$(OutDir)gmock.pdb</ProgramDataBaseFileName>
- <DiagnosticsFormat>Caret</DiagnosticsFormat>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>googletest\googlemock;googletest\googlemock\include;googletest\googletest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Lib>
- <OutputFile>$(OutDir)gmock.lib</OutputFile>
- </Lib>
- <Link>
- <SubSystem>Windows</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)gmock.pdb</ProgramDatabaseFile>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>googletest\googlemock;googletest\googlemock\include;googletest\googletest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <StringPooling>true</StringPooling>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <PrecompiledHeader></PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
- <LanguageStandard>stdcpp14</LanguageStandard>
+ <LanguageStandard>stdcpp17</LanguageStandard>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ProgramDataBaseFileName>$(OutDir)gmock.pdb</ProgramDataBaseFileName>
<DiagnosticsFormat>Caret</DiagnosticsFormat>
@@ -218,7 +111,6 @@ </ResourceCompile>
<Lib>
<OutputFile>$(OutDir)gmock.lib</OutputFile>
- <TargetMachine>MachineX64</TargetMachine>
</Lib>
<Link>
<SubSystem>Windows</SubSystem>
diff --git a/JSImpl/test/gtest.make b/JSImpl/test/gtest.make index 44e1cb0..675ddd5 100644 --- a/JSImpl/test/gtest.make +++ b/JSImpl/test/gtest.make @@ -51,9 +51,9 @@ ifeq ($(config),debug) ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g - ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -std=c++14 + ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -std=c++17 ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g - ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -std=c++14 + ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -std=c++17 ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) ALL_LDFLAGS += $(LDFLAGS) LIBDEPS += @@ -84,9 +84,9 @@ ifeq ($(config),release) ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 - ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -std=c++14 + ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -std=c++17 ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 - ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -std=c++14 + ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -std=c++17 ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) ALL_LDFLAGS += $(LDFLAGS) LIBDEPS += @@ -108,72 +108,6 @@ ifeq ($(config),release) endef endif -ifeq ($(config),debug64) - OBJDIR = ../build/obj/Debug/x64/Debug/gtest - TARGETDIR = ../build/bin/Debug - TARGET = $(TARGETDIR)/libgtest.a - DEFINES += -D_SCL_SECURE_NO_WARNINGS - INCLUDES += -I"googletest/googletest" -I"googletest/googletest/include" - ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) - ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 - ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 - ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 -std=c++14 - ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 - ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 -std=c++14 - ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) - ALL_LDFLAGS += $(LDFLAGS) -m64 - LIBDEPS += - LDDEPS += - LDRESP = - LIBS += $(LDDEPS) - EXTERNAL_LIBS += - LINKOBJS = $(OBJECTS) - LINKCMD = $(AR) -rcs $(TARGET) - OBJRESP = - OBJECTS := \ - $(OBJDIR)/googletest/googletest/src/gtest-all.o \ - - define PREBUILDCMDS - endef - define PRELINKCMDS - endef - define POSTBUILDCMDS - endef -endif - -ifeq ($(config),release64) - OBJDIR = ../build/obj/Release/x64/Release/gtest - TARGETDIR = ../build/bin/Release - TARGET = $(TARGETDIR)/libgtest.a - DEFINES += -D_SCL_SECURE_NO_WARNINGS - INCLUDES += -I"googletest/googletest" -I"googletest/googletest/include" - ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) - ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 - ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 - ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 -std=c++14 - ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 - ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 -std=c++14 - ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) - ALL_LDFLAGS += $(LDFLAGS) -m64 - LIBDEPS += - LDDEPS += - LDRESP = - LIBS += $(LDDEPS) - EXTERNAL_LIBS += - LINKOBJS = $(OBJECTS) - LINKCMD = $(AR) -rcs $(TARGET) - OBJRESP = - OBJECTS := \ - $(OBJDIR)/googletest/googletest/src/gtest-all.o \ - - define PREBUILDCMDS - endef - define PRELINKCMDS - endef - define POSTBUILDCMDS - endef -endif - OBJDIRS := \ $(OBJDIR) \ $(OBJDIR)/googletest/googletest/src \ diff --git a/JSImpl/test/gtest.vcxproj b/JSImpl/test/gtest.vcxproj index 5e12d95..229231e 100644 --- a/JSImpl/test/gtest.vcxproj +++ b/JSImpl/test/gtest.vcxproj @@ -5,18 +5,10 @@ <Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{EC34880F-5849-B0C0-21CB-53208D9EACF1}</ProjectGuid>
@@ -33,13 +25,6 @@ <PlatformToolset>v142</PlatformToolset>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <VCProjectVersion>16.0</VCProjectVersion>
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
- <DebugSymbols>true</DebugSymbols>
- </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<VCProjectVersion>16.0</VCProjectVersion>
<ConfigurationType>StaticLibrary</ConfigurationType>
@@ -47,28 +32,15 @@ <PlatformToolset>v142</PlatformToolset>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <VCProjectVersion>16.0</VCProjectVersion>
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
- <DebugSymbols>true</DebugSymbols>
- </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>..\build\bin\Debug\</OutDir>
@@ -76,24 +48,12 @@ <TargetName>gtest</TargetName>
<TargetExt>.lib</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <OutDir>..\build\bin\Debug\</OutDir>
- <IntDir>..\build\obj\Debug\x64\Debug\gtest\</IntDir>
- <TargetName>gtest</TargetName>
- <TargetExt>.lib</TargetExt>
- </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>..\build\bin\Release\</OutDir>
<IntDir>..\build\obj\Release\Release\gtest\</IntDir>
<TargetName>gtest</TargetName>
<TargetExt>.lib</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <OutDir>..\build\bin\Release\</OutDir>
- <IntDir>..\build\obj\Release\x64\Release\gtest\</IntDir>
- <TargetName>gtest</TargetName>
- <TargetExt>.lib</TargetExt>
- </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
@@ -108,39 +68,7 @@ <PrecompiledHeader></PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
- <LanguageStandard>stdcpp14</LanguageStandard>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <ProgramDataBaseFileName>$(OutDir)gtest.pdb</ProgramDataBaseFileName>
- <DiagnosticsFormat>Caret</DiagnosticsFormat>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>googletest\googletest;googletest\googletest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Lib>
- <OutputFile>$(OutDir)gtest.lib</OutputFile>
- </Lib>
- <Link>
- <SubSystem>Windows</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)gtest.pdb</ProgramDatabaseFile>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>googletest\googletest;googletest\googletest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <PrecompiledHeader></PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
- <LanguageStandard>stdcpp14</LanguageStandard>
+ <LanguageStandard>stdcpp17</LanguageStandard>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<ProgramDataBaseFileName>$(OutDir)gtest.pdb</ProgramDataBaseFileName>
<DiagnosticsFormat>Caret</DiagnosticsFormat>
@@ -151,7 +79,6 @@ </ResourceCompile>
<Lib>
<OutputFile>$(OutDir)gtest.lib</OutputFile>
- <TargetMachine>MachineX64</TargetMachine>
</Lib>
<Link>
<SubSystem>Windows</SubSystem>
@@ -173,41 +100,7 @@ <PrecompiledHeader></PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
- <LanguageStandard>stdcpp14</LanguageStandard>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <ProgramDataBaseFileName>$(OutDir)gtest.pdb</ProgramDataBaseFileName>
- <DiagnosticsFormat>Caret</DiagnosticsFormat>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>googletest\googletest;googletest\googletest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Lib>
- <OutputFile>$(OutDir)gtest.lib</OutputFile>
- </Lib>
- <Link>
- <SubSystem>Windows</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)gtest.pdb</ProgramDatabaseFile>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>googletest\googletest;googletest\googletest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <StringPooling>true</StringPooling>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <PrecompiledHeader></PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
- <LanguageStandard>stdcpp14</LanguageStandard>
+ <LanguageStandard>stdcpp17</LanguageStandard>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ProgramDataBaseFileName>$(OutDir)gtest.pdb</ProgramDataBaseFileName>
<DiagnosticsFormat>Caret</DiagnosticsFormat>
@@ -218,7 +111,6 @@ </ResourceCompile>
<Lib>
<OutputFile>$(OutDir)gtest.lib</OutputFile>
- <TargetMachine>MachineX64</TargetMachine>
</Lib>
<Link>
<SubSystem>Windows</SubSystem>
diff --git a/JSImpl/test/gtest_main.make b/JSImpl/test/gtest_main.make index 8a0d8af..ecc5583 100644 --- a/JSImpl/test/gtest_main.make +++ b/JSImpl/test/gtest_main.make @@ -51,9 +51,9 @@ ifeq ($(config),debug) ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g - ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -std=c++14 + ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -std=c++17 ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g - ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -std=c++14 + ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -std=c++17 ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) ALL_LDFLAGS += $(LDFLAGS) LIBDEPS += @@ -84,9 +84,9 @@ ifeq ($(config),release) ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 - ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -std=c++14 + ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -std=c++17 ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 - ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -std=c++14 + ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -std=c++17 ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) ALL_LDFLAGS += $(LDFLAGS) LIBDEPS += @@ -108,72 +108,6 @@ ifeq ($(config),release) endef endif -ifeq ($(config),debug64) - OBJDIR = ../build/obj/Debug/x64/Debug/gtest_main - TARGETDIR = ../build/bin/Debug - TARGET = $(TARGETDIR)/libgtest_main.a - DEFINES += -D_SCL_SECURE_NO_WARNINGS - INCLUDES += -I"googletest/googletest" -I"googletest/googletest/include" - ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) - ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 - ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 - ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 -std=c++14 - ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 - ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 -std=c++14 - ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) - ALL_LDFLAGS += $(LDFLAGS) -m64 - LIBDEPS += - LDDEPS += - LDRESP = - LIBS += $(LDDEPS) - EXTERNAL_LIBS += - LINKOBJS = $(OBJECTS) - LINKCMD = $(AR) -rcs $(TARGET) - OBJRESP = - OBJECTS := \ - $(OBJDIR)/googletest/googletest/src/gtest_main.o \ - - define PREBUILDCMDS - endef - define PRELINKCMDS - endef - define POSTBUILDCMDS - endef -endif - -ifeq ($(config),release64) - OBJDIR = ../build/obj/Release/x64/Release/gtest_main - TARGETDIR = ../build/bin/Release - TARGET = $(TARGETDIR)/libgtest_main.a - DEFINES += -D_SCL_SECURE_NO_WARNINGS - INCLUDES += -I"googletest/googletest" -I"googletest/googletest/include" - ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) - ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 - ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 - ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 -std=c++14 - ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 - ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 -std=c++14 - ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) - ALL_LDFLAGS += $(LDFLAGS) -m64 - LIBDEPS += - LDDEPS += - LDRESP = - LIBS += $(LDDEPS) - EXTERNAL_LIBS += - LINKOBJS = $(OBJECTS) - LINKCMD = $(AR) -rcs $(TARGET) - OBJRESP = - OBJECTS := \ - $(OBJDIR)/googletest/googletest/src/gtest_main.o \ - - define PREBUILDCMDS - endef - define PRELINKCMDS - endef - define POSTBUILDCMDS - endef -endif - OBJDIRS := \ $(OBJDIR) \ $(OBJDIR)/googletest/googletest/src \ diff --git a/JSImpl/test/gtest_main.vcxproj b/JSImpl/test/gtest_main.vcxproj index aeec05d..c39b848 100644 --- a/JSImpl/test/gtest_main.vcxproj +++ b/JSImpl/test/gtest_main.vcxproj @@ -5,18 +5,10 @@ <Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{30B03E7E-1C68-80CB-856F-592771461BBC}</ProjectGuid>
@@ -33,13 +25,6 @@ <PlatformToolset>v142</PlatformToolset>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <VCProjectVersion>16.0</VCProjectVersion>
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
- <DebugSymbols>true</DebugSymbols>
- </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<VCProjectVersion>16.0</VCProjectVersion>
<ConfigurationType>StaticLibrary</ConfigurationType>
@@ -47,28 +32,15 @@ <PlatformToolset>v142</PlatformToolset>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <VCProjectVersion>16.0</VCProjectVersion>
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
- <DebugSymbols>true</DebugSymbols>
- </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>..\build\bin\Debug\</OutDir>
@@ -76,24 +48,12 @@ <TargetName>gtest_main</TargetName>
<TargetExt>.lib</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <OutDir>..\build\bin\Debug\</OutDir>
- <IntDir>..\build\obj\Debug\x64\Debug\gtest_main\</IntDir>
- <TargetName>gtest_main</TargetName>
- <TargetExt>.lib</TargetExt>
- </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>..\build\bin\Release\</OutDir>
<IntDir>..\build\obj\Release\Release\gtest_main\</IntDir>
<TargetName>gtest_main</TargetName>
<TargetExt>.lib</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <OutDir>..\build\bin\Release\</OutDir>
- <IntDir>..\build\obj\Release\x64\Release\gtest_main\</IntDir>
- <TargetName>gtest_main</TargetName>
- <TargetExt>.lib</TargetExt>
- </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
@@ -108,39 +68,7 @@ <PrecompiledHeader></PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
- <LanguageStandard>stdcpp14</LanguageStandard>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <ProgramDataBaseFileName>$(OutDir)gtest_main.pdb</ProgramDataBaseFileName>
- <DiagnosticsFormat>Caret</DiagnosticsFormat>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>googletest\googletest;googletest\googletest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Lib>
- <OutputFile>$(OutDir)gtest_main.lib</OutputFile>
- </Lib>
- <Link>
- <SubSystem>Windows</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)gtest_main.pdb</ProgramDatabaseFile>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>googletest\googletest;googletest\googletest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <PrecompiledHeader></PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
- <LanguageStandard>stdcpp14</LanguageStandard>
+ <LanguageStandard>stdcpp17</LanguageStandard>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<ProgramDataBaseFileName>$(OutDir)gtest_main.pdb</ProgramDataBaseFileName>
<DiagnosticsFormat>Caret</DiagnosticsFormat>
@@ -151,7 +79,6 @@ </ResourceCompile>
<Lib>
<OutputFile>$(OutDir)gtest_main.lib</OutputFile>
- <TargetMachine>MachineX64</TargetMachine>
</Lib>
<Link>
<SubSystem>Windows</SubSystem>
@@ -173,41 +100,7 @@ <PrecompiledHeader></PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
- <LanguageStandard>stdcpp14</LanguageStandard>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <ProgramDataBaseFileName>$(OutDir)gtest_main.pdb</ProgramDataBaseFileName>
- <DiagnosticsFormat>Caret</DiagnosticsFormat>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>googletest\googletest;googletest\googletest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Lib>
- <OutputFile>$(OutDir)gtest_main.lib</OutputFile>
- </Lib>
- <Link>
- <SubSystem>Windows</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)gtest_main.pdb</ProgramDatabaseFile>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>googletest\googletest;googletest\googletest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <StringPooling>true</StringPooling>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <PrecompiledHeader></PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
- <LanguageStandard>stdcpp14</LanguageStandard>
+ <LanguageStandard>stdcpp17</LanguageStandard>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ProgramDataBaseFileName>$(OutDir)gtest_main.pdb</ProgramDataBaseFileName>
<DiagnosticsFormat>Caret</DiagnosticsFormat>
@@ -218,7 +111,6 @@ </ResourceCompile>
<Lib>
<OutputFile>$(OutDir)gtest_main.lib</OutputFile>
- <TargetMachine>MachineX64</TargetMachine>
</Lib>
<Link>
<SubSystem>Windows</SubSystem>
|
