mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
.cosmetics
git-svn-id: svn://ultimatepp.org/upp/trunk@14075 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
76f1f988f0
commit
22386da38f
14 changed files with 63 additions and 48 deletions
|
|
@ -8,7 +8,7 @@ namespace Upp {
|
|||
#define LTIMING(x) // RTIMING(x)
|
||||
#define LHITCOUNT(x) // RHITCOUNT(x)
|
||||
|
||||
#ifdef COMPILER_MINGW
|
||||
#ifdef MINGW_TLS_PATCH
|
||||
FastMingwTls<bool> CoWork::Pool::finlock;
|
||||
FastMingwTls<int> CoWork::worker_index = -1;
|
||||
FastMingwTls<CoWork *> CoWork::current;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public:
|
|||
Pool();
|
||||
~Pool();
|
||||
|
||||
#ifdef COMPILER_MINGW
|
||||
#ifdef MINGW_TLS_PATCH
|
||||
static FastMingwTls<bool> finlock;
|
||||
#else
|
||||
static thread_local bool finlock;
|
||||
|
|
@ -43,7 +43,7 @@ public:
|
|||
|
||||
static Pool& GetPool();
|
||||
|
||||
#ifdef COMPILER_MINGW
|
||||
#ifdef MINGW_TLS_PATCH
|
||||
static FastMingwTls<int> worker_index;
|
||||
static FastMingwTls<CoWork *> current;
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ Color DarkThemeCached(Color c)
|
|||
}
|
||||
}
|
||||
}
|
||||
#ifdef COMPILER_MINGW
|
||||
#ifdef MINGW_TLS_PATCH
|
||||
tcache;
|
||||
static FastMingwTls<Cache *> tls_cache = &tcache;
|
||||
Cache& cache = *tls_cache;
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ void EndianSwap(int *v, size_t count) ENDIAN_SWAP
|
|||
void EndianSwap(int64 *v, size_t count) ENDIAN_SWAP
|
||||
void EndianSwap(uint64 *v, size_t count) ENDIAN_SWAP
|
||||
|
||||
#ifdef COMPILER_MINGW
|
||||
#ifdef MINGW_TLS_PATCH
|
||||
|
||||
static int fast_mingw_tlsndx = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -318,8 +318,9 @@ int SignificantBits64(uint64 x)
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef COMPILER_MINGW
|
||||
#if defined(COMPILER_MINGW) && !defined(COMPILER_CLANG)
|
||||
|
||||
#define MINGW_TLS_PATCH
|
||||
// This is hopefully a temporary fix for abysmal MINGW thread_local implementation
|
||||
// ALSO IMPORTANT: There are some mingw/lld issues that prevent TLS stuff to be used in inlines
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ static void sSeed(uint64 *s)
|
|||
force_inline
|
||||
static uint64 *sState()
|
||||
{
|
||||
#ifdef COMPILER_MINGW
|
||||
#ifdef MINGW_TLS_PATCH
|
||||
static FastMingwTls<uint64 *> s;
|
||||
#else
|
||||
thread_local uint64 *s;
|
||||
|
|
|
|||
|
|
@ -197,11 +197,15 @@ int64 usecs(int64 prev)
|
|||
return std::chrono::duration_cast<std::chrono::microseconds>(p2.time_since_epoch()).count() - prev;
|
||||
}
|
||||
|
||||
int msecs(int from) { return GetTickCount() - (dword)from; }
|
||||
|
||||
/* // it looks like there might be a problem with std::chrono in llvm-mingw, reverting to original implementation for now
|
||||
int msecs(int prev)
|
||||
{
|
||||
auto p2 = std::chrono::steady_clock::now();
|
||||
return (int)std::chrono::duration_cast<std::chrono::milliseconds>(p2.time_since_epoch()).count() - prev;
|
||||
}
|
||||
*/
|
||||
|
||||
void TimeStop::Reset()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,6 +15,11 @@
|
|||
|
||||
#define COMPILER_GCC 1
|
||||
|
||||
#ifdef __clang__
|
||||
#define COMPILER_CLANG 1
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__WIN32) || defined(_WIN32) || defined(WIN32)
|
||||
#define COMPILER_MINGW 1
|
||||
#define PLATFORM_WIN32 1
|
||||
|
|
|
|||
|
|
@ -310,4 +310,9 @@ void operator delete(void *ptr, const std::nothrow_t&) noexcept { UPP::Memory
|
|||
void *operator new[](size_t size, const std::nothrow_t&) noexcept { void *ptr = UPP::MemoryAlloc(size); return ptr; }
|
||||
void operator delete[](void *ptr, const std::nothrow_t&) noexcept { UPP::MemoryFree(ptr); }
|
||||
|
||||
#if defined(PLATFORM_WIN32) && defined(COMPILER_CLANG)
|
||||
// this is temporary fix before llvm-mingw fixes weak references
|
||||
void __attribute__((__noreturn__)) std::__throw_bad_alloc (void) { throw bad_alloc(); }
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -326,7 +326,7 @@ void Heap::Free48(void *ptr)
|
|||
force_inline
|
||||
Heap *ThreadHeap()
|
||||
{
|
||||
#ifdef COMPILER_MINGW
|
||||
#ifdef MINGW_TLS_PATCH
|
||||
static FastMingwTls<Heap *> heap_tls;
|
||||
#else
|
||||
thread_local Heap *heap_tls;
|
||||
|
|
|
|||
|
|
@ -433,7 +433,7 @@ CharEntry GetGlyphEntry(Font font, int chr, unsigned hash)
|
|||
return e;
|
||||
}
|
||||
|
||||
#ifdef COMPILER_MINGW
|
||||
#ifdef MINGW_TLS_PATCH
|
||||
struct FontEntry {
|
||||
CommonFontInfo info;
|
||||
int64 font;
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ bool GccBuilder::BuildPackage(const String& package, Vector<String>& linkfile, V
|
|||
|
||||
sb << Join(cc, cpp_options) << " -x c++-header " << GetHostPathQ(pch_header) << " -o " << GetHostPathQ(pch_file);
|
||||
|
||||
PutConsole("PCH: " + GetFileName(pch_header));
|
||||
PutConsole("Precompiling header: " + GetFileName(pch_header));
|
||||
if(pch_slot < 0 || !Run(~sb, pch_slot, GetHostPath(pch_file), 1))
|
||||
error = true;
|
||||
Wait();
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ String MscBuilder::Pdb(String package, int slot, bool separate_pdb) const
|
|||
void DeletePCHFile(const String& pch_file)
|
||||
{
|
||||
DeleteFile(pch_file);
|
||||
PutVerbose("Deleting PCH: " + pch_file);
|
||||
PutVerbose("Deleting precompiled header: " + pch_file);
|
||||
}
|
||||
|
||||
bool MscBuilder::BuildPackage(const String& package, Vector<String>& linkfile, Vector<String>& immfile,
|
||||
|
|
@ -316,7 +316,7 @@ bool MscBuilder::BuildPackage(const String& package, Vector<String>& linkfile, V
|
|||
StringBuffer sb;
|
||||
sb << Join(cc, cpp_options) << Pdb(package, pch_slot, false) << " -Yc" << pch_common
|
||||
<< " -Tp " << GetHostPathQ(pch_header) << " -Fo" + GetHostPathQ(pch_obj);
|
||||
PutConsole("PCH: " + GetFileName(pch_header));
|
||||
PutConsole("Precompiling header: " + GetFileName(pch_header));
|
||||
if(pch_slot < 0 || !Run(~sb, pch_slot, GetHostPath(pch_obj), 1))
|
||||
error = true;
|
||||
Wait();
|
||||
|
|
|
|||
|
|
@ -239,42 +239,42 @@ END_LAYOUT
|
|||
|
||||
LAYOUT(BuildMethodsDefaultBuilderSetupLayout, 648, 500)
|
||||
ITEM(Label, dv___0, SetLabel(t_("Compiler name")).LeftPosZ(0, 104).TopPosZ(4, 19))
|
||||
ITEM(EditString, compiler, LeftPosZ(132, 56).TopPosZ(4, 19))
|
||||
ITEM(Label, dv___2, SetLabel(t_("External debugger")).LeftPosZ(200, 100).TopPosZ(4, 19))
|
||||
ITEM(EditString, debugger, HSizePosZ(296, 0).TopPosZ(4, 20))
|
||||
ITEM(Label, dv___4, SetLabel(t_("Common options")).LeftPosZ(0, 112).TopPosZ(24, 19))
|
||||
ITEM(EditString, common_options, HSizePosZ(132, 0).TopPosZ(24, 19))
|
||||
ITEM(Label, dv___6, SetLabel(t_("Common C++ options")).LeftPosZ(0, 128).TopPosZ(44, 19))
|
||||
ITEM(EditString, common_cpp_options, HSizePosZ(132, 0).TopPosZ(44, 19))
|
||||
ITEM(Label, dv___8, SetLabel(t_("Common C options")).LeftPosZ(0, 112).TopPosZ(64, 19))
|
||||
ITEM(EditString, common_c_options, HSizePosZ(132, 0).TopPosZ(64, 19))
|
||||
ITEM(Label, dv___10, SetLabel(t_("Common link options")).LeftPosZ(0, 124).TopPosZ(84, 19))
|
||||
ITEM(EditString, common_link_options, HSizePosZ(132, 0).TopPosZ(84, 19))
|
||||
ITEM(Label, dv___12, SetLabel(t_("Common fixed flags")).LeftPosZ(0, 112).TopPosZ(104, 19))
|
||||
ITEM(EditString, common_flags, HSizePosZ(132, 0).TopPosZ(104, 19))
|
||||
ITEM(Label, dv___14, SetLabel(t_("Default debug info level:")).LeftPosZ(4, 132).TopPosZ(140, 19))
|
||||
ITEM(DropList, debug_info, LeftPosZ(140, 116).TopPosZ(140, 19))
|
||||
ITEM(TextOption, debug_blitz, SetLabel(t_("Use BLITZ")).HSizePosZ(264, 276).TopPosZ(140, 19))
|
||||
ITEM(TextSwitch, debug_linkmode, SetLabel(t_("All static\nShared libs\nAll shared")).HSizePosZ(376, 20).TopPosZ(140, 19))
|
||||
ITEM(Label, dv___18, SetLabel(t_("Debug options")).LeftPosZ(0, 112).TopPosZ(168, 19))
|
||||
ITEM(EditString, debug_options, HSizePosZ(132, 0).TopPosZ(168, 19))
|
||||
ITEM(Label, dv___20, SetLabel(t_("Debug fixed flags")).LeftPosZ(0, 112).TopPosZ(188, 19))
|
||||
ITEM(EditString, debug_flags, HSizePosZ(132, 0).TopPosZ(188, 19))
|
||||
ITEM(Label, dv___22, SetLabel(t_("Debug link options")).LeftPosZ(0, 112).TopPosZ(208, 19))
|
||||
ITEM(EditString, debug_link, HSizePosZ(132, 0).TopPosZ(208, 19))
|
||||
ITEM(TextSwitch, release_linkmode, SetLabel(t_("All static\nShared libs\nAll shared")).HSizePosZ(376, 20).TopPosZ(248, 16))
|
||||
ITEM(LabelBox, dv___25, SetLabel(t_("Release mode defaults")).HSizePosZ(0, 0).TopPosZ(232, 36))
|
||||
ITEM(TextOption, release_blitz, SetLabel(t_("Use BLITZ")).LeftPosZ(8, 256).TopPosZ(248, 15))
|
||||
ITEM(Label, dv___27, SetLabel(t_("Release options")).LeftPosZ(0, 112).TopPosZ(272, 19))
|
||||
ITEM(EditString, speed_options, HSizePosZ(132, 0).TopPosZ(272, 19))
|
||||
ITEM(Label, dv___29, SetLabel(t_("Release fixed flags")).LeftPosZ(0, 112).TopPosZ(292, 19))
|
||||
ITEM(EditString, release_flags, HSizePosZ(132, 0).TopPosZ(292, 19))
|
||||
ITEM(Label, dv___31, SetLabel(t_("Release link options")).LeftPosZ(0, 112).TopPosZ(312, 19))
|
||||
ITEM(EditString, release_link, HSizePosZ(132, 0).TopPosZ(312, 19))
|
||||
ITEM(TabCtrl, paths, HSizePosZ(0, 0).VSizePosZ(360, 0))
|
||||
ITEM(TextOption, allow_pch, SetLabel(t_("Allow precompiled headers")).LeftPosZ(0, 212).TopPosZ(336, 16))
|
||||
ITEM(TextOption, disable_blitz, SetLabel(t_("Disable BLITZ")).LeftPosZ(164, 212).TopPosZ(336, 16))
|
||||
ITEM(LabelBox, dv___36, SetLabel(t_("Debug mode defaults")).HSizePosZ(0, 0).TopPosZ(128, 36))
|
||||
ITEM(EditString, compiler, LeftPosZ(132, 516).TopPosZ(4, 19))
|
||||
ITEM(Label, dv___2, SetLabel(t_("External debugger")).LeftPosZ(0, 100).TopPosZ(24, 19))
|
||||
ITEM(EditString, debugger, HSizePosZ(132, 0).TopPosZ(24, 19))
|
||||
ITEM(Label, dv___4, SetLabel(t_("Common options")).LeftPosZ(0, 112).TopPosZ(44, 19))
|
||||
ITEM(EditString, common_options, HSizePosZ(132, 0).TopPosZ(44, 19))
|
||||
ITEM(Label, dv___6, SetLabel(t_("Common C++ options")).LeftPosZ(0, 128).TopPosZ(64, 19))
|
||||
ITEM(EditString, common_cpp_options, HSizePosZ(132, 0).TopPosZ(64, 19))
|
||||
ITEM(Label, dv___8, SetLabel(t_("Common C options")).LeftPosZ(0, 112).TopPosZ(84, 19))
|
||||
ITEM(EditString, common_c_options, HSizePosZ(132, 0).TopPosZ(84, 19))
|
||||
ITEM(Label, dv___10, SetLabel(t_("Common link options")).LeftPosZ(0, 124).TopPosZ(104, 19))
|
||||
ITEM(EditString, common_link_options, HSizePosZ(132, 0).TopPosZ(104, 19))
|
||||
ITEM(Label, dv___12, SetLabel(t_("Common fixed flags")).LeftPosZ(0, 112).TopPosZ(124, 19))
|
||||
ITEM(EditString, common_flags, HSizePosZ(132, 0).TopPosZ(124, 19))
|
||||
ITEM(Label, dv___14, SetLabel(t_("Default debug info level:")).LeftPosZ(4, 132).TopPosZ(160, 19))
|
||||
ITEM(DropList, debug_info, LeftPosZ(140, 116).TopPosZ(160, 19))
|
||||
ITEM(TextOption, debug_blitz, SetLabel(t_("Use BLITZ")).HSizePosZ(264, 276).TopPosZ(160, 19))
|
||||
ITEM(TextSwitch, debug_linkmode, SetLabel(t_("All static\nShared libs\nAll shared")).HSizePosZ(376, 20).TopPosZ(160, 19))
|
||||
ITEM(Label, dv___18, SetLabel(t_("Debug options")).LeftPosZ(0, 112).TopPosZ(188, 19))
|
||||
ITEM(EditString, debug_options, HSizePosZ(132, 0).TopPosZ(188, 19))
|
||||
ITEM(Label, dv___20, SetLabel(t_("Debug fixed flags")).LeftPosZ(0, 112).TopPosZ(208, 19))
|
||||
ITEM(EditString, debug_flags, HSizePosZ(132, 0).TopPosZ(208, 19))
|
||||
ITEM(Label, dv___22, SetLabel(t_("Debug link options")).LeftPosZ(0, 112).TopPosZ(228, 19))
|
||||
ITEM(EditString, debug_link, HSizePosZ(132, 0).TopPosZ(228, 19))
|
||||
ITEM(TextSwitch, release_linkmode, SetLabel(t_("All static\nShared libs\nAll shared")).HSizePosZ(376, 20).TopPosZ(268, 16))
|
||||
ITEM(LabelBox, dv___25, SetLabel(t_("Release mode defaults")).HSizePosZ(0, 0).TopPosZ(252, 36))
|
||||
ITEM(TextOption, release_blitz, SetLabel(t_("Use BLITZ")).LeftPosZ(8, 256).TopPosZ(268, 15))
|
||||
ITEM(Label, dv___27, SetLabel(t_("Release options")).LeftPosZ(0, 112).TopPosZ(292, 19))
|
||||
ITEM(EditString, speed_options, HSizePosZ(132, 0).TopPosZ(292, 19))
|
||||
ITEM(Label, dv___29, SetLabel(t_("Release fixed flags")).LeftPosZ(0, 112).TopPosZ(312, 19))
|
||||
ITEM(EditString, release_flags, HSizePosZ(132, 0).TopPosZ(312, 19))
|
||||
ITEM(Label, dv___31, SetLabel(t_("Release link options")).LeftPosZ(0, 112).TopPosZ(332, 19))
|
||||
ITEM(EditString, release_link, HSizePosZ(132, 0).TopPosZ(332, 19))
|
||||
ITEM(TabCtrl, paths, HSizePosZ(0, 0).VSizePosZ(376, 0))
|
||||
ITEM(TextOption, allow_pch, SetLabel(t_("Allow precompiled headers")).LeftPosZ(0, 212).TopPosZ(356, 16))
|
||||
ITEM(TextOption, disable_blitz, SetLabel(t_("Disable BLITZ")).LeftPosZ(164, 212).TopPosZ(356, 16))
|
||||
ITEM(LabelBox, dv___36, SetLabel(t_("Debug mode defaults")).HSizePosZ(0, 0).TopPosZ(148, 36))
|
||||
END_LAYOUT
|
||||
|
||||
LAYOUT(ModePaneLayout, 320, 460)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue