1
0
forked from 0ad/0ad
Commit Graph

14205 Commits

Author SHA1 Message Date
c02a7e1a7b SpiderMonkey 31 upgrade
This upgrade also introduces exact stack rooting (see to the wiki:
JSRootingGuide) and fixes problems with moving GC. This allows us to
enable generational garbage collection (GGC).
Measurements a few months ago have shown a performance improvement of a
non-visual replay of around 13.5%. This probably varies quite a bit, but
it should be somewhere between 5-20%. Memory usage has also been
improved. Check the forum thread for details.

Thanks to everyone from the team who helped with this directly or
indirectly (review, finding and fixing issues, the required C++11
upgrade, the new autobuilder etc.)! Also thanks to the SpiderMonkey
developers who helped on the #jsapi channel or elsewhere!

Fixes #2462, #2415, #2428, #2684, #1374
Refs #2973, #2669

This was SVN commit r16214.
2015-01-24 14:46:52 +00:00
b9e46f386b Disable online reporting of profiler data.
Nobody ever looks at the data, and it takes up a lot of server disk
space. The feature should probably be restored in the future once we've
fixed all the obvious performance problems, since a wider range of data
lets us search for system-dependent issues (e.g. some GL drivers are
particularly slow with particular features), but it's not worthwhile
now.

This was SVN commit r16213.
2015-01-24 14:29:05 +00:00
236f67d45f Petra: fix defensive garrison by using GarrisonArrowClasses + several small fixes
This was SVN commit r16212.
2015-01-24 13:28:17 +00:00
f1f36232d8 fix limit changer when stating limit = 0
This was SVN commit r16211.
2015-01-24 12:03:31 +00:00
8f0ace2658 Make Android %ls/%hs workaround work on secure_crt as well as wsecure_crt.
Refs #2996.

This was SVN commit r16210.
2015-01-24 00:22:12 +00:00
4d4ddb5978 Add workaround for Android libc++ swprintf bug.
Based on patch by BogDan. Refs #2996.

This was SVN commit r16209.
2015-01-24 00:20:15 +00:00
8ca674d461 cppformat: Fix Android build.
The NDK only exposes the BSD-style strerror_r, not the GNU-style, so
select the appropriate code path.

This was SVN commit r16208.
2015-01-23 21:15:48 +00:00
2e01b157d6 Fix build error in GLES configurations
This was SVN commit r16207.
2015-01-23 20:54:14 +00:00
c9dee72667 GLES doesn't have glDisable(GL_TEXTURE_2D).
Patch by BogDan. Refs #2996.

This was SVN commit r16206.
2015-01-23 20:40:02 +00:00
8a39ea5543 Avoid misaligned pointer dereferences, which can fail on ARM.
Based on patch by BogDan. Refs #2996.

This was SVN commit r16205.
2015-01-23 20:39:40 +00:00
c9c80a9d94 SDL_SetWindowGammaRamp fails on Android, so don't bother using it.
Based on patch by BogDan. Refs #2996.

This was SVN commit r16204.
2015-01-23 20:39:02 +00:00
ad3e330861 Workaround for limitations of Android's vswprintf implementation.
Based on patch by BogDan. Refs #2996.

This was SVN commit r16203.
2015-01-23 20:38:13 +00:00
b64ff8d09a Remove Android hack to autoload a map.
Patch by BogDan. Refs #2996.

This was SVN commit r16202.
2015-01-23 20:36:52 +00:00
a2efd97476 fix js error
This was SVN commit r16201.
2015-01-23 17:34:46 +00:00
adcd9191a6 Updates Windows installer config for 65cc47f6c0
This was SVN commit r16200.
2015-01-23 03:38:02 +00:00
65cc47f6c0 Deletes unused bundled MSVC runtime libs for old 2005 and 2008 versions.
Removes VC80 manifest info.

This was SVN commit r16199.
2015-01-23 03:21:48 +00:00
5fa3318bbf Adds premake build vs2013 workspace, since that's now our only supported version, and removes workspaces for old unsupported versions.
Rebuilds premake win32 binary with VC++ 2013.

This was SVN commit r16195.
2015-01-23 01:46:28 +00:00
f3f2717c66 Fix tests on 32-bit builds.
This was SVN commit r16193.
2015-01-22 21:13:09 +00:00
f350a24c73 Disable "assignment operator could not be generated" warning globally on Windows, since it's never useful.
This was SVN commit r16192.
2015-01-22 21:09:33 +00:00
d7926eb612 Add basic tests for %s/%hs/%ls in sprintf_s, swprintf_s.
This was SVN commit r16191.
2015-01-22 20:39:53 +00:00
ef2a358f87 Remove sys_vswprintf.
The implementation on Windows was gross. The only user was CLogger,
which no longer uses it.

Also fix vswprintf_s to handle truncated output correctly (by returning
"") on Linux, now that CLogger is no longer relying on the buggy
behaviour.

This was SVN commit r16190.
2015-01-22 20:39:28 +00:00
afa492f473 Preprocessor: Avoid using "%.*hs" in log format string, since cppformat doesn't support it.
This was SVN commit r16189.
2015-01-22 20:38:16 +00:00
568c415d0a Convert wchar_t*/wstring arguments to UTF-8 strings in CLogger messages.
This was SVN commit r16188.
2015-01-22 20:37:38 +00:00
e02d7ad949 Automatically replace %hs/%ls with %s in CLogger format strings.
Everything is char* now, so we don't need to mess around with different
string types.

Done with:

  ag -ls 'LOG(MESSAGE|MESSAGERENDER|WARNING|ERROR)' source | xargs perl
-pi -e'1 while
s/(LOG(MESSAGE|MESSAGERENDER|WARNING|ERROR).*)%[hl]s/$1%s/g'

This was SVN commit r16187.
2015-01-22 20:36:24 +00:00
38a8e2e0d6 Automatically convert most path.string().c_str() to path.string8()
Done with:

  ag -l 'LOG.*string\(\).c_str\(\)' source | xargs perl -pi -e'1 while
s/(LOG.*string)\(\)\.c_str\(\)/${1}8()/g'

This was SVN commit r16186.
2015-01-22 20:35:17 +00:00
b90bc147c9 Add Path::string8 (which returns a UTF-8 encoded std::string).
This saves the hassle of writing utf8_from_wstring(path.string()) in
places like log messages, and can be extended to better handle
non-ISO-8859-1 paths on Linux.

This was SVN commit r16185.
2015-01-22 20:33:11 +00:00
e9a33b71ae Manually fix the less trivial CLogger format strings.
This was SVN commit r16184.
2015-01-22 20:32:06 +00:00
49e2ecea63 Automatically convert all CLogger format strings from wchar_t* to char*.
Done with:

  ag -ls 'LOG(MESSAGE|MESSAGERENDER|WARNING|ERROR)' source | xargs sed
-i 's/LOG\(MESSAGE\|MESSAGERENDER\|WARNING\|ERROR\)(L/LOG\1(/g'

This was SVN commit r16183.
2015-01-22 20:31:30 +00:00
dcf5a2667f CLogger: Use cppformat instead of sys_vswprintf.
sys_vswprintf relies on platform-specific printf implementations, which
vary widely between platforms (in handling of truncation, return values,
use of %s/%S/%hs/%ls for mixing char and wchar_t strings, etc) and are
therefore a pain.

Use cppformat's fmt::sprintf instead, which has very similar syntax to
sprintf but is more C++ish and is portable.

Also, wchar_t is stupid, so use char* strings (which are expected to be
UTF-8) in CLogger. This creates a bit of a pain with changing all
callers to convert to char* strings, but that's their fault for not
using UTF-8 already.

Refs #3011.

This was SVN commit r16182.
2015-01-22 20:30:05 +00:00
ca7b890e16 cppformat: Add basic tests for the functionality we use.
This was SVN commit r16181.
2015-01-22 20:28:57 +00:00
47b9a043b2 cppformat: Permit NULL arguments for %s.
Throwing exception on NULL is a bit extreme, and unhelpful when it
happens in rarely-tested error paths. Printing "(null)" is safer and
provides compatibility with glibc sprintf.

This was SVN commit r16180.
2015-01-22 20:27:58 +00:00
9c8798b592 cppformat: Remove support for CUSTOM types.
These cause a lot of type-safety trouble - unsupported types passed into
fmt::sprintf (like CStr or enums) will be accepted at compile time, but
trigger an exception at runtime. Remove them, so we'll get either an
implicit conversion to a supported type, or a compile-time error.

This was SVN commit r16179.
2015-01-22 20:27:34 +00:00
8875ae9cdf cppformat: Fix compatibility with our build system on Windows.
This was SVN commit r16178.
2015-01-22 20:26:58 +00:00
f16407f6e9 cppformat: Fix -Wundef build warnings from GCC.
This was SVN commit r16177.
2015-01-22 20:26:32 +00:00
f96593a9f3 Import cppformat v0.11.0
Refs #3011.

This was SVN commit r16176.
2015-01-22 20:25:10 +00:00
f8bfe3eafb Clean up redundancies in templates for the Visibility component, refs #2913
This was SVN commit r16175.
2015-01-22 17:23:25 +00:00
ad1adbe027 Implement the Rotary Mill aura for Celtic factions. Patch by niektb, fixes #2900.
Also remove the placeholder technology and the rotary mill generic
Celtic template, and rename the rotary mill portrait. Refs #2619.

This was SVN commit r16174.
2015-01-22 10:16:26 +00:00
1857c33602 Remove use of __attribute__ that breaks the Windows build. Refs #2522.
This was SVN commit r16172.
2015-01-21 22:37:25 +00:00
b5b9c0f2ae Improve template code style for the Decay component.
This was SVN commit r16171.
2015-01-21 21:45:05 +00:00
b65dcaba48 Prevent observers from using the team chat. Patch by trompetin17, fixes #2879.
This was SVN commit r16170.
2015-01-21 21:18:55 +00:00
76120d888b Add some tinygettext changes from SuperTuxKart. Refs #2522.
Move some data to RO. Pass some parameters as references.
Taken from https://github.com/Grumbel/tinygettext/issues/3.

This was SVN commit r16169.
2015-01-21 21:17:45 +00:00
aeb18239c3 Update tinygettext to upstream commit ca0f3ff640. Refs #2522.
Keeps our addition of precompiled.h (fd3d335265), win32/dirent,
4c9d99ff68, de6823d23f, and 8fc14655b5.

This was SVN commit r16168.
2015-01-21 20:37:37 +00:00
df3222a073 Petra: improve choice of target when attacking, to prevent cases where most units would follow the same target
This was SVN commit r16167.
2015-01-20 18:31:57 +00:00
852cd11305 Improve the performance of the GetLosVisibility function by using the cache (currently used for mirages only) whenever possible.
This was SVN commit r16166.
2015-01-20 16:29:50 +00:00
7a48606471 GLES compatibility for particle shader
This needs to use the model-view matrix, not model-view-projection (the
transform uniform), else the axes won't be unit vectors and the particle
sizes will be wrong. But GLES doesn't have the pre-defined matrices, so
pass it in explicitly.

This was SVN commit r16165.
2015-01-19 21:44:53 +00:00
e1e163b3f7 Improve ogl_WarnIfError() to report the file/line where the error was detected
This was SVN commit r16164.
2015-01-19 20:06:16 +00:00
b74e853144 Fix typo which caused GLES errors
This was SVN commit r16163.
2015-01-19 20:04:46 +00:00
4554ed676e continue to display research overlay after victory, fixes #2983
This was SVN commit r16161.
2015-01-18 16:55:52 +00:00
09bbc9c35c Enable C++11 by default.
Don't generate workspaces and remove checks for unsupported compier/IDE
version$

Refs #2669

This was SVN commit r16160.
2015-01-18 13:44:03 +00:00
10f90fd8cf Petra: fix missing line in 0a5089c841
This was SVN commit r16159.
2015-01-18 10:28:30 +00:00