Opened 8 years ago
Last modified 8 years ago
#3708 closed enhancement
[PATCH] SpiderMonkey 38 Upgrade — at Version 7
Reported by: | leper | Owned by: | leper |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 21 |
Component: | Core engine | Keywords: | patch |
Cc: | Yves | Patch: |
Description (last modified by )
SpiderMonkey 38 was released some time ago, and it brings some improvements like eg better ES6 support.
I've started working on the upgrade and it compiles without problems right now, but there is still 1 test failures (which is to be expected and cannot easily be fixed since the function we relied on was removed). Some review, testing and suggestions would be nice.
There is a commit for each upstream change that required a change in our code, or did not fit in any of those. The last commit contains some TODOs.
The debug api was removed and JS_SetFunctionCallback
which could have been used for our needs was also removed in SM37 (hinting at both the JS Debugger and the tracelogger).
Given the high number of changes needed and for easier testing/reviewing the code is in the sm38 branch of my github repo.
https://github.com/leper/0ad/tree/sm38 (Note that this will be rebased (both on top of 0ad/0ad and interactively).)
Change History (7)
comment:1 by , 8 years ago
Description: | modified (diff) |
---|
comment:2 by , 8 years ago
comment:7 by , 8 years ago
Description: | modified (diff) |
---|
Is any more review needed here? And do we want that in before A20?
I've looked through all the commits separately and couldn't find many issues, well done! It was quite convenient that you have split up the changes into different commits so well.
General - Issues/TODOs/Comments:
Some comments to specific changes
0f5b2e57 Remove workaround.
564131b5 TODOs.
9d6a7823 JS_GetStringCharsAndLength was removed, use JS_Get{Latin1,TwoByte}StringCharsAndLength instead
I doubt it makes a big difference for performance with move constructors, but maybe a little and it looks a bit better style-wise for me.
takes a char16_t* parameter. I've spent some time digging through the SpiderMonkey code and figured out that it actually "deflates" them automatically, which is very good because we can take advantage of the improved strings for property names without having to worry about that.
aa596b92 Remove workaround for crash when using multiple ctxts per runtime
c22317ca The GC API changed ...
92fe1422 The JS_LookupProperty{,ById} API was removed.
95834e9d Cleanup, can be dropped or moved elsewhere.
288af6f3 JS_NewObject -> JS_NewPlainObject.
02ea3451 Some JSClass stubs were removed, and the pointers are nullable.
8dec5d5a Update ObjectToIDMap to the ESR38 version.
a03f7fc1 The old debug api was removed.