From 80bc0a1e22576fbeabea7f685137256dadc343fd Mon Sep 17 00:00:00 2001 From: bill Date: Tue, 29 Nov 2022 10:15:37 +0800 Subject: [PATCH 1/2] modified: server/vector_type.hpp --- server/vector_type.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/vector_type.hpp b/server/vector_type.hpp index f817051..939af88 100644 --- a/server/vector_type.hpp +++ b/server/vector_type.hpp @@ -61,6 +61,7 @@ public: typedef std::conditional_t(), astring_view, _Ty> value_t; vector_type(const uint32_t& size) : size(size), capacity(size) { container = (_Ty*)malloc(size * sizeof(_Ty)); + // TODO: calloc for objects. } constexpr vector_type(std::initializer_list<_Ty> _l) { size = capacity = _l.size(); @@ -164,6 +165,7 @@ public: capacity = new_capacity; } } + void emplace_back(const _Ty& _val) { grow(); container[size++] = _val; From 853b1293437571cbe85dba04169e2109acf31fbe Mon Sep 17 00:00:00 2001 From: bill Date: Fri, 2 Dec 2022 21:09:59 +0800 Subject: [PATCH 2/2] Fix bugs on stored procedures and threaded GC --- build.py | 2 +- header.cxx | 12 +++++++++ msc-plugin/libaquery.vcxproj | 1 + msvs-py/msvs-py.pyproj | 21 ++++++++++------ reconstruct/storage.py | 13 +++++----- server/gc.h | 1 + server/libaquery.cpp | 4 +-- server/libaquery.h | 1 - server/server.cpp | 48 +++++++++++++++++++++++++----------- server/vector_type.hpp | 4 +-- 10 files changed, 72 insertions(+), 35 deletions(-) diff --git a/build.py b/build.py index 5ce74e8..ec59122 100644 --- a/build.py +++ b/build.py @@ -184,7 +184,7 @@ class build_manager: def __init__(self) -> None: self.method = 'make' self.cxx = '' - self.OptimizationLv = '4' # [O0, O1, O2, O3, Ofast] + self.OptimizationLv = '0' # [O0, O1, O2, O3, Ofast] self.Platform = 'amd64' self.PCH = os.environ['PCH'] if 'PCH' in os.environ else 1 self.StaticLib = 1 diff --git a/header.cxx b/header.cxx index e69de29..612b4a9 100644 --- a/header.cxx +++ b/header.cxx @@ -0,0 +1,12 @@ +#include "./server/libaquery.h" + +#ifndef __AQ_USE_THREADEDGC__ + +#include "./server/gc.h" +__AQEXPORT__(void) __AQ_Init_GC__(Context* cxt) { + GC::gc_handle = static_cast(cxt->gc); +} + +#else // __AQ_USE_THREADEDGC__ +#define __AQ_Init_GC__(x) +#endif // __AQ_USE_THREADEDGC__ diff --git a/msc-plugin/libaquery.vcxproj b/msc-plugin/libaquery.vcxproj index f0d3dd4..82162c9 100644 --- a/msc-plugin/libaquery.vcxproj +++ b/msc-plugin/libaquery.vcxproj @@ -228,6 +228,7 @@ + diff --git a/msvs-py/msvs-py.pyproj b/msvs-py/msvs-py.pyproj index 58b0511..c17a7f4 100644 --- a/msvs-py/msvs-py.pyproj +++ b/msvs-py/msvs-py.pyproj @@ -11,6 +11,9 @@ msvs-py msvs-py False + Global|PythonCore|3.9 + Standard Python launcher + True true @@ -41,16 +44,18 @@ - - - - + + + + - - - + + + + + + -