gecko-dev/js/xpconnect/loader
Igor Bukanov fba835a226 bug 737624 - memory-only encoding/decoding of scripts and functions. r=:luke
The patch shrinks the API presented in jsxdrapi.h down to 4 functions to
encode/decode scripts and interpreted functions to/from the memory. The
newly introduced implementation header vm/Xdr.h replaces the former
JSXDRState with the template class XDRState parametrized by the enum
type with two constants, XDR_ENCODE and XDR_DECODE. This way a compiler
can fully eliminate the former runtime checks for the decoding/encoding
mode. As a drawback this required to explicitly instantiate the xdr
implementation as I do not want to put all the xdr code to header files.

The memory-only XDR allows to avoid coping filename and to-be-atomized
chars to a temporary buffer as the code can just access the buffer
directly. Another change is that new XDRScript takes as a parameter its
parent script. This allowed to avoid keeping filename in XDRState and
simplify the filename management.

Another change is the removal of JS_HAS_HDR. As CloneScript uses XDR to
copy a script, JS_HAS_XDR cannot be disabled.

--HG--
rename : js/src/jsxdrapi.cpp => js/src/vm/Xdr.cpp
extra : rebase_source : f8f1536a86b7c3fe7296a16b6677bd21664af98a
2012-02-20 11:58:00 +01:00
..
ISO8601DateUtils.jsm Bug 695345 - Bring back ISO8601DateUtils.jsm, a=akeybl 2011-12-18 18:50:13 -08:00
Makefile.in Bug 714057 - Remove uintn users from XPConnect; r=bholley+khuey 2012-01-02 19:05:19 +01:00
mozJSComponentLoader.cpp bug 737624 - memory-only encoding/decoding of scripts and functions. r=:luke 2012-02-20 11:58:00 +01:00
mozJSComponentLoader.h Bug 705188 - Use IDL for mozIJSSubScriptLoader::LoadSubScript, {xpcIJSModuleLoader,nsIXPCComponents_Utils}::Import; r=bz 2011-12-18 11:09:16 +01:00
mozJSLoaderUtils.cpp bug 737624 - memory-only encoding/decoding of scripts and functions. r=:luke 2012-02-20 11:58:00 +01:00
mozJSLoaderUtils.h bug 730221 - delegating serialization of script principals to the embedding. r=:luke,:bz 2012-02-13 14:10:04 +01:00
mozJSSubScriptLoader.cpp bug 730221 - delegating serialization of script principals to the embedding. r=:luke,:bz 2012-02-13 14:10:04 +01:00
mozJSSubScriptLoader.h Bug 705188 - Use IDL for mozIJSSubScriptLoader::LoadSubScript, {xpcIJSModuleLoader,nsIXPCComponents_Utils}::Import; r=bz 2011-12-18 11:09:16 +01:00
XPCOMUtils.jsm Bug 722254 - Add an XPCOMUtils method to generate a singleton factory. 2012-02-07 10:17:42 +01:00