gecko/js
Igor Bukanov 24b01abf6b 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
2012-02-20 11:58:00 +01:00
..
ductwork/debugger Remove jsobj.h from installed headers, bug 690943. r=luke 2011-10-04 07:06:54 -07:00
examples No bug: Bring jorendb up to date with current state of Debugger object. r=NPOB,jorendorff 2011-12-09 14:12:36 -08:00
ipc bug 736978 - remove JS_FinalizeStub. r=:billm 2012-03-19 15:27:58 +01:00
jsd Backed out changeset 0124795a8cbb (bug 711895) due to i10n build bustage. r=me. 2012-03-21 21:46:27 -07:00
public Backout changeset ea6be5f60c42 (bug 722946) for breaking Windows builds 2012-03-14 14:29:58 -04:00
src bug 737624 - memory-only encoding/decoding of scripts and functions. r=:luke 2012-02-20 11:58:00 +01:00
xpconnect bug 737624 - memory-only encoding/decoding of scripts and functions. r=:luke 2012-02-20 11:58:00 +01:00