in js_FoldConstants where it was added (suboptimally: it worked, but it ran
so late that js_FoldConstants recursion was not reduced, only js_EmitTree
recursion), to NewBinary, where it avoids JSParseNode allocations up front
and reduces recursion in all parse-tree walking.
- This change enables js_FoldConstants to see a very long concatenation of
string literals as a PN_LIST node, so it can quickly concatenate without
running afoul of O(n^2) problems inherent in js_ConcatStrings applied to
two atomized strings (the old way of folding string concatenations, still
used for any pairwise string literal concatenation).
- Further optimize the first change for the second by having NewBinary set a
new pn_strcat flag (overlaying the pn_extra field) of the PN_LIST arm of
the JSParseNode.pn_u union, whenever it sees at least one string literal in
a concatenation that might be folded (whose operands might all be constants
of string or number type).
- Notes:
- only string and number constants are folded (not boolean or null
constants);
- only all-constant left-associated binary expression chains are folded,
so 2 * foo * 3 is not folded using commutativity of * over numbers, nor
is "hi" + " there" + foo folded to "hi there" + foo.
- gcc3.2 -O and objdump -x say I added 708 bytes of instructions with this
change. I tried to keep it down to what was necessary for common script;
I don't think JS needs an optimizing-compiler-strength constant folder,
and I don't think this 1K bloat is too high a price to pay for this fix.
But I'll certainly work on reducing footprint elsewhere, if I can.
- Bug 174341, r=shaver.
The target namespace on <schema> should be applied to <element> if and only if <element> is qualified. b=192972. r=rayw@netscape.com, sr=jst@netscape.com.
Fixed a few warnings.
*** NOT PART OF THE BUILD ***
"stale" account manager prefs can lead to problems with the compose window
and view navigation. thanks to smaug@jippii.fi for find the bug, and doing the fix.
r/sr=sspitzer
editor/libeditor/base/nsSelectionState.cpp
- Reworked the logic in SelAdjJoinNodes() to avoid adding aOldLeftNodeLength twice to the calculated offset when the start/end node is the parent.
editor/libeditor/html/nsHTMLDataTransfer.cpp
editor/libeditor/text/nsPlaintextDataTransfer.cpp
- Modified the InsertFromDrop() to use an nsAutoTrackDOMPoint, instead of relying on range gravity, to calculate the correct insert position after deleting the current selection.
r=jfrancis@netscape.comsr=sfraser@netscape.com
Re-order linking of mozilla-bin & viewer so that TK_LIBS, which bring in an implicit dependency upon the system zlib on Darwin, is linked in after the in-tree version of zlib.
Bug #194662 r=pavlov