Граф коммитов

90251 Коммитов

Автор SHA1 Сообщение Дата
waldemar%netscape.com 32ba476b7b Fixes from October 1 ECMA meeting 2001-10-17 03:57:06 +00:00
waldemar%netscape.com ca9cb1a4f4 Test of writable actions 2001-10-17 03:55:46 +00:00
waldemar%netscape.com 5874bbb78e Updated for new syntax 2001-10-17 03:55:25 +00:00
brendan%mozilla.org 43a911aeb6 Fixes for bug 80981 (``Need extended jump bytecode to avoid "script too large"
errors, etc.''):

We now ReportStatementTooLarge only if
- a jump offset overflows 32 bits, signed;
- there are 2**32 or more span dependencies in a script;
- a backpatch chain link is more than (2**30 - 1) bytecodes long;
- a source note's distance from the last note, or from script main entry
  point, is > 0x7fffff bytes.

Narrative of the patch, by file:

- js.c
  The js_SrcNoteName array of const char * is now a js_SrcNoteSpec array of
  "specifiers", structs that include a const char *name member.  Also, due to
  span-dependent jumps at the ends of basic blocks where the decompiler knows
  the basic block length, but not the jump format, we need an offset operand
  for SRC_COND, SRC_IF_ELSE, and SRC_WHILE (to tell the distance from the
  branch bytecode after the condition expression to the span-dependent jump).

- jsarena.[ch]
  JS arenas are used mainly for last-in-first-out allocation with _en masse_
  release to the malloc pool (or, optionally, to a private freelist).  But
  the code generator needs to allocate and grow (by doubling, to avoid O(n^2)
  growth) allocations that hold bytecode, source notes, and span-dependency
  records.  This exception to LIFO allocation works by claiming an entire
  arena from the pool and realloc'ing it, as soon as the allocation size
  reaches the pool's default arena size.  Call such an allocation a "large
  single allocation".

  This patch adds a new arena API, JS_ArenaFreeAllocation, which can be used
  to free a large single allocation.  If called with an allocation that's not
  a large single allocation, it will nevertheless attempt to retract the arena
  containing that allocation, if the allocation is last within its arena.
  Thus JS_ArenaFreeAllocation adds a non-LIFO "free" special case to match the
  non-LIFO "grow" special case already implemented under JS_ARENA_GROW for
  large single allocations.

  The code generator still benefits via this extension to arenas, over purely
  manual malloc/realloc/free, by virtue of _en masse_ free (JS_ARENA_RELEASE
  after code generation has completed, successfully or not).

  To avoid searching for the previous arena, in order to update its next
  member upon reallocation of the arena containing a large single allocation,
  the oversized arena has a back-pointer to that next member stored (but not
  as allocable space within the arena) in a (JSArena **) footer at its end.

- jscntxt.c
  I've observed for many scripts that the bytes of source notes and bytecode
  are of comparable lengths, but only now am I fixing the default arena size
  for cx->notePool to match the size for cx->codePool (1024 instead of 256).

- jsemit.c
  Span-dependent instructions in JS bytecode consist of the jump (JOF_JUMP)
  and switch (JOF_LOOKUPSWITCH, JOF_TABLESWITCH) format opcodes, subdivided
  into unconditional (gotos and gosubs), and conditional jumps or branches
  (which pop a value, test it, and jump depending on its value).  Most jumps
  have just one immediate operand, a signed offset from the jump opcode's pc
  to the target bytecode.  The lookup and table switch opcodes may contain
  many jump offsets.

  This patch adds "X" counterparts to the opcodes/formats (X is suffixed, btw,
  to prefer JSOP_ORX and thereby to avoid colliding on the JSOP_XOR name for
  the extended form of the JSOP_OR branch opcode).  The unextended or short
  formats have 16-bit signed immediate offset operands, the extended or long
  formats have 32-bit signed immediates.  The span-dependency problem consists
  of selecting as few long instructions as possible, or about as few -- since
  jumps can span other jumps, extending one jump may cause another to need to
  be extended.

  Most JS scripts are short, so need no extended jumps.  We optimize for this
  case by generating short jumps until we know a long jump is needed.  After
  that point, we keep generating short jumps, but each jump's 16-bit immediate
  offset operand is actually an unsigned index into cg->spanDeps, an array of
  JSSpanDep structs.  Each struct tells the top offset in the script of the
  opcode, the "before" offset of the jump (which will be the same as top for
  simplex jumps, but which will index further into the bytecode array for a
  non-initial jump offset in a lookup or table switch), the after "offset"
  adjusted during span-dependent instruction selection (initially the same
  value as the "before" offset), and the jump target (more below).

  Since we generate cg->spanDeps lazily, from within js_SetJumpOffset, we must
  ensure that all bytecode generated so far can be inspected to discover where
  the jump offset immediate operands lie within CG_CODE(cg).  But the bonus is
  that we generate span-dependency records sorted by their offsets, so we can
  binary-search when trying to find a JSSpanDep for a given bytecode offset,
  or the nearest JSSpanDep at or above a given pc.

  To avoid limiting scripts to 64K jumps, if the cg->spanDeps index overflows
  65534, we store SPANDEP_INDEX_HUGE in the jump's immediate operand.  This
  tells us that we need to binary-search for the cg->spanDeps entry by the
  jump opcode's bytecode offset (sd->before).

  Jump targets need to be maintained in a data structure that lets us look
  up an already-known target by its address (jumps may have a common target),
  and that also lets us update the addresses (script-relative, a.k.a. absolute
  offsets) of targets that come after a jump target (for when a jump below
  that target needs to be extended).  We use an AVL tree, implemented using
  recursion, but with some tricky optimizations to its height-balancing code
  (see http://www.enteract.com/~bradapp/ftp/src/libs/C++/AvlTrees.html).

  A final wrinkle: backpatch chains are linked by jump-to-jump offsets with
  positive sign, even though they link "backward" (i.e., toward lower bytecode
  address).  We don't want to waste space and search time in the AVL tree for
  such temporary backpatch deltas, so we use a single-bit wildcard scheme to
  tag true JSJumpTarget pointers and encode untagged, signed (positive) deltas
  in JSSpanDep.target pointers, depending on whether the JSSpanDep has a known
  target, or is still awaiting backpatching.

  Note that backpatch chains would present a problem for BuildSpanDepTable,
  which inspects bytecode to build cg->spanDeps on demand, when the first
  short jump offset overflows.  To solve this temporary problem, we emit a
  proxy bytecode (JSOP_BACKPATCH; JSOP_BACKPATCH_PUSH for jumps that push a
  result on the interpreter's stack, namely JSOP_GOSUB; or JSOP_BACKPATCH_POP
  for branch ops) whose nuses/ndefs counts help keep the stack balanced, but
  whose opcode format distinguishes its backpatch delta immediate operand from
  a normal jump offset.

  The cg->spanDeps array and JSJumpTarget structs are allocated from the
  cx->tempPool arena-pool.  This created a LIFO vs. non-LIFO conflict: there
  were two places under the TOK_SWITCH case in js_EmitTree that used tempPool
  to allocate and release a chunk of memory, during whose lifetime JSSpanDep
  and/or JSJumpTarget structs might also be allocated from tempPool -- the
  ensuing release would prove disastrous.  These bitmap and table temporaries
  are now allocated from the malloc heap.

- jsinterp.c
  Straightforward cloning and JUMP => JUMPX mutating of the jump and switch
  format bytecode cases.

- jsobj.c
  Silence warnings about %p used without (void *) casts.

- jsopcode.c
  Massive and scary decompiler whackage to cope with extended jumps, using
  source note offsets to help find jumps whose format (short or long) can't
  be discovered from properties of prior instructions in the script.

  One cute hack here: long || and && expressions are broken up to wrap before
  the 80th column, with the operator at the end of each non-terminal line.

- jsopcode.h, jsopcode.tbl
  The new extended jump opcodes, formats, and fundamental parameterization
  macros.  Also, more comments.

- jsparse.c
  Random and probably only aesthetic fix to avoid decorating a foo[i]++ or
  --foo[i] parse tree node with JSOP_SETCALL, wrongly (only foo(i)++ or
  --foo(i), or the other post- or prefix form operator, should have such an
  opcode decoration on its parse tree).

- jsscript.h
  Random macro naming sanity: use trailing _ rather than leading _ for macro
  local variables in order to avoid invading the standard C global namespace.
2001-10-17 03:16:48 +00:00
blizzard%redhat.com 45d8560e3a Work with versions of bash older than version 2. Not part of the default build. Bug #104768. 2001-10-17 02:57:00 +00:00
hyatt%netscape.com 47ad649f65 Fix for 97805, r=sfraser, sr=waterson, also fixing event prioritization problems on Win32, r=jag, sr=brendan 2001-10-17 02:14:43 +00:00
jst%netscape.com d0755aca24 Fixing most of bug 62536. Adding support for the properties scrollTop, scrollLeft, scrollHeight, scrollWidth, clientHeight, clientWidth and the method scrollIntoView() to elements for compatibility with IE. Patch by Fabian <hidday@geocities.com> and myself, r=peterv@netscape.com, sr=jband@netscape.com 2001-10-17 01:17:47 +00:00
beard%netscape.com 65550796b3 [Not part of build] Reset versions to 1.0d1. 2001-10-17 01:16:48 +00:00
beard%netscape.com be2b9d873b [not part of build] Removed redundant bundle loading code, #if DEBUG kprintf, etc. 2001-10-17 01:16:13 +00:00
wtc%netscape.com 5e12d69244 Rewrote #ifndef #else #endif by the equivalent #ifdef #else #endif. 2001-10-17 01:10:16 +00:00
kmcclusk%netscape.com d850dc2072 Scroll browser window to top-left if anchor can not be found (quirks only) bug 80784. r=kin@netscape.com sr=attinasi@netscape.com 2001-10-17 01:06:19 +00:00
law%netscape.com 7a0407bd6d Fixes for bugs:
74445  - Add call to DdeUnaccessData (r=pchen, sr=blake)
103849 - Use ::IsIconic to check if window is minimized before restoring (r=matt, sr=blake)
2001-10-17 00:42:12 +00:00
av%netscape.com aea8ff1235 Correction to the fix to bug 104940 (r=peterl, sr=waterson) -- memory leak avoided 2001-10-17 00:39:21 +00:00
law%netscape.com 80c2660ddf Fix for bug 104910; change default for Don't ask me this again checkbox on Quick Launch dialog; r=pchen, sr=blake 2001-10-17 00:36:10 +00:00
blakeross%telocity.com b18a266f92 Removing unused file. 2001-10-17 00:32:35 +00:00
pierre%netscape.com 2e03c268a6 91665 "Dump Style Contexts doesn't work anymore". Fixed nsStyleContext::List(). r=attinasi/sr=hyatt 2001-10-17 00:25:26 +00:00
blakeross%telocity.com e8b64b123c Removing unused file. 2001-10-17 00:21:06 +00:00
seawood%netscape.com ef9d13eec9 Backing out previous change as it's screwing up --disable-auto-deps builds.
Bug #105005
2001-10-17 00:14:25 +00:00
pierre%netscape.com e032fbb506 97052 "getComputedStyle returns default value for border width when there is no border". GetBorderWidthFor() now returns 0 if NS_STYLE_BORDER_STYLE_NONE. r=bzbarsky / sr=jst 2001-10-17 00:05:05 +00:00
pierre%netscape.com bc48aefa5a 97534 "classic: after changing text color, text [labels] in dialogs/chrome also changed in color". Added GetDocumentColorPreferences() and call it when we set the container (chrome/content) on the presContext. r=dbaron / sr=hyatt 2001-10-16 23:59:25 +00:00
wtc%netscape.com 9444a2e927 Bugzilla bug 105154: fixed a timing problem in OS/2's implementation of
condition variables.  Thanks to Aaron Read <aaronr@us.ibm.com> for the
patch.  r=wtc.
2001-10-16 23:54:24 +00:00
seawood%netscape.com 00402d8f86 Check for makefiles before running make to avoid needless errors. sr=alecf 2001-10-16 23:44:12 +00:00
dougt%netscape.com 004836dcaf Allows a QI from nsIServiceManager to nsIServiceManagerObsolete. b=105136, r=beard, sr=darin 2001-10-16 23:39:20 +00:00
seawood%netscape.com b70efcb81c Removing modules/plugin/tools/mpdk at av's request.
Bug #104941
2001-10-16 23:38:40 +00:00
wtc%netscape.com 574373b35d We don't assert on invalid arguments now. 2001-10-16 23:36:44 +00:00
tao%netscape.com 54985f4317 bug 72496: How to get all platform files w/o downloading 3 Browsers?
r=ssu,sr=dveditz
2001-10-16 23:36:03 +00:00
dougt%netscape.com cf7a0ceb11 Improvements to GetWindowsFolder. bug 104962, r=dveditz@netscape.com, sr=darin@netscape.com 2001-10-16 23:33:08 +00:00
beard%netscape.com 768a355fc3 [Not part of build] Removed extraneous targets, simplified access paths. 2001-10-16 23:32:50 +00:00
wtc%netscape.com c5c3f04f07 Bugzilla bug 104269: allow one to specify an includedir or dist_includedir
that doesn't end in "/nspr".  This patch is due to cls.  r=wtc.
The only problem with this solution is that the default value for
--includedir shown in the --help output is wrong.
Modified files: configure.in configure config/autoconf.mk.in
2001-10-16 23:31:02 +00:00
beard%netscape.com 472bc130d9 [not part of build] Removed dependencies on MRJNetworking, which is unavailable in OS X. 2001-10-16 23:29:54 +00:00
beard%netscape.com f5feeee95c [not part of build] Added MRJPlugin::GetService() static methods. Added support for using both new service manager, and obsolete service manager, for backwards compatibility. 2001-10-16 23:29:15 +00:00
beard%netscape.com c9693f89ad [not part of build] Added MRJPlugin::GetService() static methods. 2001-10-16 23:27:47 +00:00
beard%netscape.com 15e79d1a76 [not part of build] Removed all uses of raw nsIServiceManager, in favor of MRJPlugin::GetService(). 2001-10-16 23:27:15 +00:00
aaronl%netscape.com 1324edad85 Bug 57192. Alt+Down for combo boxes in HTML. r=rods, sr=waterson 2001-10-16 23:00:12 +00:00
matt%netscape.com 96a6390760 Adding context menu with search. Bug 15176. r=law sr=hyatt 2001-10-16 22:56:52 +00:00
ftang%netscape.com 865da56c12 add new files to the build. Not part of the build yet. Won't impact the tree.
fix bug 23363 r=brade sr=sfraser
2001-10-16 22:32:39 +00:00
ftang%netscape.com d8c39a53c5 fix bug 97176. delay loading of fontEncoding.properties untill we need it. Build in some common pair
r=rbs sr=waterson
2001-10-16 22:29:29 +00:00
alecf%netscape.com 2d04144d8a argh, add this file back to prevent further fizilla bustage 2001-10-16 22:23:45 +00:00
av%netscape.com aa21f2b10d Fixing bug 104866 -- null chech before using nsCRT::strlen avoiding crash, r=nhotta, sr=waterson 2001-10-16 22:14:52 +00:00
av%netscape.com 6514b53592 Fixing bug 104940 -- ignore plugins that do not show mime type, r=peterl, sr=waterson 2001-10-16 22:12:27 +00:00
jaggernaut%netscape.com ce6e434d2a More REQUIRES clean-up. 2001-10-16 22:08:55 +00:00
alecf%netscape.com a40cc51be8 ack, what is this doing calling shutdown? :(
shutdown is gone
2001-10-16 21:54:11 +00:00
waterson%netscape.com 5f0c673be2 Bug 104328. Re-use fast code from nsIRDFContainerUtils to implement nsRDFContainer::IndexOf; fix infinite loop in nsRDFContainerUtils::IndexOf. Patch from tingley@sundell.net, r=waterson, sr=shaver. 2001-10-16 21:52:01 +00:00
cmanske%netscape.com df108f7ac9 Don't add new attribute if value is empty in Composer Advanced Edit dialog, r=96906, r=brade, sr=hewitt 2001-10-16 21:51:12 +00:00
cmanske%netscape.com 47723a28f3 Cleaned up imageMap objects in Composer Image Dialog, b=94749, r=brade, sr=kin 2001-10-16 21:45:37 +00:00
kin%netscape.com 802527fb80 Fix for bug 97674: Parts of Mail composition/Composer window left blank after deleting text
If a paint event is received while refresh is disabled,
DispatchEvent() will now call UpdateView() to add the
area specified by the paint event, to the dirty region of
the view. This will insure that the area will get painted
properly when refresh is enabled.

r=kmcclusk@netscape.com  sr=sfraser@netscape.com
2001-10-16 21:41:42 +00:00
alecf%netscape.com 2f533416b2 remove everything from this dir, no longer part of build 2001-10-16 21:38:36 +00:00
cmanske%netscape.com 97a673d531 Fixed not clearing 'value' menulist when 'name' was changed in Composer Advanced Edit dialog, b=100653, r=brade, sr=kin 2001-10-16 21:36:52 +00:00
wtc%netscape.com 2d83f3464c Removed memmove.c, snprintf.c, and strerror.c from CSRCS and added a
comment explaining why.
2001-10-16 21:32:16 +00:00
sspitzer%netscape.com b60d6df7c4 fix for #105126. define a default height for the thread pane when using the
normal 3 pane layout.  without a default, the splitter between the thread pane and the
message pane jumps when we switch folders, which looks bad and causes a repaint,
which is bad for folder loading performance.  r=cavin, sr=bienvenu
2001-10-16 21:28:34 +00:00