Itms
db5d4bb5f1
SpiderMonkey-related changes in preparation for the upgrade to SpiderMonkey 45, refs #4893 .
...
- Remove JSVAL_ZERO and JSVAL_NULL
https://bugzilla.mozilla.org/show_bug.cgi?id=1177825
- Remove *_TO_JSVAL https://bugzilla.mozilla.org/show_bug.cgi?id=1177892
- Drop support for parent object in the deserializer
https://bugzilla.mozilla.org/show_bug.cgi?id=1136345 ,
https://bugzilla.mozilla.org/show_bug.cgi?id=805052
- Correctly use boolean values in JS::RuntimeOptionsRef
- Use JS_FN instead of JS_FS: in future versions, JS_FS is not public
because it isn't supposed to be used in JSAPI code
- Allow to select flags for global objects, and correctly mark progress
bars in the loading screen as not readonly+permanent
- Remove empty JSI_props in IGUIObject
Reviewed By: wraitii, elexis
Differential Revision: https://code.wildfiregames.com/D1716
This was SVN commit r22052.
2019-01-13 16:37:41 +00:00
elexis
1b44946078
Replace deprecated jsval with JS::Value.
...
Remove unused SGUIBaseSettings and GUI comment.
Fix indentation of a macro, refs D794.
Differential Revision: https://code.wildfiregames.com/D838
Review by: leper.
Itms came up with the same patch for the SpiderMonkey 45 update
independently.
This was SVN commit r20062.
2017-08-28 10:27:36 +00:00
leper
9defd11440
Pass ScriptInterface as a const ref where possible.
...
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D739
This was SVN commit r20028.
2017-08-24 00:32:42 +00:00
Itms
a27dc31b0e
Remove some obsolete backref logic from the deserializer. It was introduced in earlier versions of the SpiderMonkey API.
...
Name some variables more logically in one test.
Fixes #4244
This was SVN commit r18993.
2016-11-24 14:47:49 +00:00
elexis
417c84870c
Actually remove trailing tabs from source/.
...
This was SVN commit r18991.
2016-11-23 14:09:58 +00:00
elexis
6149dd3841
Actually remove trailing whitespace for non-header files as well.
...
This was SVN commit r18989.
2016-11-23 13:02:58 +00:00
elexis
b18f74da44
Remove trailing whitespace and whitespace in empty lines of source/ except source/third_party/.
...
This was SVN commit r18987.
2016-11-23 11:18:37 +00:00
Itms
caef42084d
Add missing JSAutoRequest calls. (hopefully all of them have been spotted now)
...
Patch by echotangoecho, refs #4053
This was SVN commit r18730.
2016-09-18 09:34:45 +00:00
Itms
8284cc4302
SpiderMonkey 38 upgrade: 35/35
...
Some comments for the next SpiderMonkey upgrade. That's all folks, fixes
#3708
This was SVN commit r18689.
2016-09-02 16:55:13 +00:00
Itms
2a33c4476f
SpiderMonkey 38 upgrade: 34/35
...
Use the C++ API for Maps. Patch by leper.
Addresses https://bugzilla.mozilla.org/show_bug.cgi?id=1121332
This was SVN commit r18688.
2016-09-02 16:54:00 +00:00
Itms
9b794593db
SpiderMonkey 38 upgrade: 32/35
...
JS_GetStringCharsAndLength was removed, use
JS_Get{Latin1,TwoByte}StringCharsAndLength instead.
Actually handle strings in both the Latin1 and TwoByte cases since we
need to.
This saves some space when serializing and also when running as they are
stored that way in the vm.
Also handle the error case.
Patch by leper.
For more information:
https://blog.mozilla.org/javascript/2014/07/21/slimmer-and-faster-javascript-strings-in-firefox/
Addresses https://bugzilla.mozilla.org/show_bug.cgi?id=1037869
This was SVN commit r18686.
2016-09-02 16:51:09 +00:00
Itms
ffd4207c30
SpiderMonkey 38 upgrade: 24/35
...
Work around upstream API breakage by moving from a define to a const
member and not using the namespace explicitly.
This is caused by https://bugzilla.mozilla.org/show_bug.cgi?id=896116
and this patch by leper was submitted at
https://bugzilla.mozilla.org/show_bug.cgi?id=1236373
This was SVN commit r18678.
2016-09-02 16:40:01 +00:00
Itms
ef6d1c77c8
SpiderMonkey 38 upgrade: 23/35
...
JS_GetArrayBufferData now takes an AutoCheckCannotGC parameter. Patch by
leper.
Addresses https://bugzilla.mozilla.org/show_bug.cgi?id=1061288
This was SVN commit r18677.
2016-09-02 16:38:31 +00:00
Itms
2db0fb27ae
SpiderMonkey 38 upgrade: 21/35
...
The naming conventions for typed array types changed. Patch by leper.
Addresses https://bugzilla.mozilla.org/show_bug.cgi?id=1021790
This was SVN commit r18675.
2016-09-02 16:36:40 +00:00
Itms
ef764d5d64
SpiderMonkey 38 upgrade: 15/35
...
Temporary workaround dropping of parent parameter from JS_NewObject* by
switching to JS_NewObjectWithGivenProto.
We should just drop support for serializing the parent since upstream is
dropping the parent parameter from all those functions.
Patch by leper.
Addresses https://bugzilla.mozilla.org/show_bug.cgi?id=1136906 and
https://bugzilla.mozilla.org/show_bug.cgi?id=1136345
This was SVN commit r18669.
2016-09-02 16:30:35 +00:00
Itms
8d15411abf
SpiderMonkey 38 upgrade: 13/35
...
Update JS_NewObject to JS_NewPlainObject, with new parameters. Patch by
leper.
Addresses https://bugzilla.mozilla.org/show_bug.cgi?id=1136906 and
https://bugzilla.mozilla.org/show_bug.cgi?id=1125356
This was SVN commit r18667.
2016-09-02 16:28:17 +00:00
Itms
b01300c222
SpiderMonkey 38 upgrade: 11/35
...
Renamed JS_CallHeapFooTracer to JS_CallFooTracer. Patch by leper.
Addresses https://bugzilla.mozilla.org/show_bug.cgi?id=1052388
This was SVN commit r18665.
2016-09-02 16:25:42 +00:00
Itms
761abd587e
SpiderMonkey 38 upgrade: 10/35
...
Use operator= instead of .set(). Patch by leper.
Addresses https://bugzilla.mozilla.org/show_bug.cgi?id=1128110
This was SVN commit r18664.
2016-09-02 16:24:46 +00:00
Itms
c7c3ef9f92
SpiderMonkey 38 upgrade: 09/35
...
Use .toFoo() instead of JSVAL_TO_FOO. Patch by leper.
Addresses https://bugzilla.mozilla.org/show_bug.cgi?id=952650
This was SVN commit r18663.
2016-09-02 16:23:44 +00:00
Itms
72ca6c5f80
Style cleanup by leper, preparing the SpiderMonkey update. Refs #3708
...
This was SVN commit r18579.
2016-08-02 16:12:11 +00:00
sanderd17
4ea49f374a
Disable serialization of the AI when no AI players are present. Disable serialization of cached AI templates overall. Improve serialization of repetitive vectors and templatenames. Refs #3834
...
This was SVN commit r18121.
2016-05-02 09:26:07 +00:00
leper
fb92761c92
Use explicit types instead of auto.
...
This was SVN commit r17642.
2016-01-13 00:42:55 +00:00
leper
f4898c18d8
SpiderMonkey 38 removes the JS_LookupProperty{,ById} API. Refs #3708 .
...
Use JS_GetProperty{,ById} instead.
Ensure that we break if someone tries to serialize a getter by using
something similar to what we used pre 47a03c3397 .
https://bugzilla.mozilla.org/show_bug.cgi?id=1094176
This was SVN commit r17633.
2016-01-11 20:03:33 +00:00
leper
775f856421
Use .assign instead of operator=.
...
This was SVN commit r17631.
2016-01-11 20:03:28 +00:00
leper
332096e4ed
SpiderMonkey 38 removes JS_AllocateArrayBufferContents.
...
Users required the returned buffer to be passable to free(), so replace
it by malloc().
https://bugzilla.mozilla.org/show_bug.cgi?id=1037358
This was SVN commit r17511.
2015-12-19 02:49:46 +00:00
leper
2239fe338c
The jschar typedef is removed in SpiderMonkey 38.
...
Since it already is char16_t in 31 replace it by that.
https://bugzilla.mozilla.org/show_bug.cgi?id=1063962
This was SVN commit r17506.
2015-12-19 01:29:55 +00:00
leper
69ab2bae5b
Some ctors were made explicit in SpiderMonkey 38, so call them where needed.
...
https://bugzilla.mozilla.org/show_bug.cgi?id=1013663
This was SVN commit r17505.
2015-12-19 01:13:56 +00:00
Itms
2f6f0bd477
Serialize everything that is needed by UpdateVisibilityData instead of assuming everything as dirty.
...
Fixes #3271 .
This was SVN commit r17223.
2015-11-11 12:15:57 +00:00
historic_bruno
c0b4e78801
Fixes stream serialization bug on OS X 10.8 and older, which caused instant OOS in multiplayer games, fixes #3108 .
...
Fixes test failures on OS X 10.7 and older, refs #3109
This was SVN commit r17133.
2015-10-15 03:31:30 +00:00
Itms
dcf8e66aca
Update the goal serialization for 03d2c5e40b. Fixes #3425 .
...
This was SVN commit r17068.
2015-09-24 17:13:39 +00:00
leper
2aef62d65f
Handle backrefs properly for maps and sets. Fixes #3374 .
...
Allocate the tag for the backreference before deserializing the content,
to match the order of serializing.
This was SVN commit r16959.
2015-08-30 04:51:16 +00:00
leper
36c6b50944
Revert emplace for associative containers. Fixes #3366 .
...
GCC < 4.8.0 does not support emplace for those.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44436 .
This was SVN commit r16922.
2015-08-19 03:32:47 +00:00
leper
8bfe16cac8
Use in-place construction.
...
This was SVN commit r16894.
2015-07-29 23:44:17 +00:00
Itms
e1a34eb4ea
Handle (de)serialization of the AI pathfinder.
...
This was SVN commit r16815.
2015-06-24 20:24:58 +00:00
Itms
6581796103
New long-range pathfinder.
...
Based on Philip's work located at
http://git.wildfiregames.com/gitweb/?p=0ad.git;a=shortlog;h=refs/heads/projects/philip/pathfinder
Includes code by wraitii, sanderd17 and kanetaka.
An updated version of docs/pathfinder.pdf describing the changes in
detail will be committed ASAP.
Running update-workspaces is needed after this change.
Fixes #1756 .
Fixes #930 , #1259 , #2908 , #2960 , #3097
Refs #1200 , #1914 , #1942 , #2568 , #2132 , #2563
This was SVN commit r16751.
2015-06-12 18:58:24 +00:00
historic_bruno
f6f4f83784
Fixes instant multiplayer crash on OS X Lion (10.7). libc++ had a bug where it set eofbit on reading the last character in a stringstream, we compare gcount with the expected length as a workaround to detect real eofs. Fixes #3109 .
...
This was SVN commit r16714.
2015-06-04 05:11:47 +00:00
leper
c93c1c92eb
Replace std::auto_ptr uses by std::unique_ptr since the former is deprecated.
...
This was SVN commit r16674.
2015-05-25 01:23:27 +00:00
leper
b8a20c958c
Do not serialize properties for Sets. Serialization tests for Map and Set.
...
This was SVN commit r16620.
2015-05-04 01:41:09 +00:00
leper
a9afa61a7b
Serialization support for ES6 Sets.
...
This was SVN commit r16608.
2015-05-01 23:04:28 +00:00
Ykkrosh
bb9de80dd4
Convert CConsole to take UTF-8 strings.
...
This avoids vswprintf failures when printing non-ASCII char* strings
from CLogger into the console.
Also convert ScriptInterface::ToString to return UTF-8, to avoid some
utf8_from_wstring calls.
Also remove some unused and redundant CConsole functions.
This was SVN commit r16333.
2015-02-14 01:49:34 +00:00
Itms
bd7b07cc80
Make the visibility cache a bit more clever, by making LoS tiles as dirty separately for each player.
...
It is necessary to rely on shared los masks, else some visibility
updates will be missing.
Refs #2913 , see this ticket for a performance graph.
This was SVN commit r16328.
2015-02-12 23:22:29 +00:00
Yves
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
Ykkrosh
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
Ykkrosh
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
Ykkrosh
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
Yves
f5336c42b8
Adds Serialization support for ES6 Maps.
...
Also includes the patch from Sanderd17 to use Maps and Sets for the
Timer components. Sets can't be serialized yet, but in this case they
don't require serialization.
Refs #2475
This was SVN commit r15770.
2014-09-20 17:14:53 +00:00
Yves
efb889b79a
Exact stack rooting for WriteStructuredClone and functions that use it.
...
Refs #2415
This was SVN commit r15607.
2014-08-03 19:32:39 +00:00
Yves
169174824f
Exact stack rooting for ScriptInterface::ToString.
...
I had to change a few other functions to take JS::MutableHandleValue
because JS::Stringify takes a JS::MutableHandleValue as input parameter.
That seems a bit strange because it should not change that value.
I assume it has historical reasons.
Refs #2415
Refs #2462
This was SVN commit r15605.
2014-08-03 17:29:49 +00:00
Yves
5c07a25ddc
More exact stack rooting (CallFunction object).
...
Changes CallFunction and CallFunctionVoid to use a HandleValue as object
parameter. Also changes some JS serialization/deserialization functions
to only support the JSAPI rooted types (drop support for CScriptVal and
CScriptValRooted there). Some other functions got changed too because
they were closely related.
Refs #2415
Refs #2462
This was SVN commit r15592.
2014-07-31 19:18:40 +00:00
Yves
e9e05f4efc
Second (main) commit for the SpiderMonkey upgrade.
...
This commit contains all the required changes to our source files and
build scripts (hopefully).
A next commit will remove the old stuff of SpiderMonkey 1.8.5.
Spcial thanks to:
- H4writer who helped a lot mainly with the performance issues we
had/have, but also with other problems or questions.
- Leper for the review.
- Historic_bruno for implementing the build scripts on Mac OS X and
testing on the Mac.
- The people from the #jsapi channel and from
mozilla.dev.tech.js-engine who answered a lot of questions and helped
solving problems.
- All the other people who helped
Refs #1886
Fixes #2442
Fixes #2416
This was SVN commit r14877.
2014-03-28 20:26:32 +00:00