Commit Graph

4913 Commits

Author SHA1 Message Date
igor%mir2.org
ddc73696f3 I replaced explicit encoding of int, long and short values into byte arrays by new utility methods putInt16, putInt32, putInt64 2003-03-13 13:59:02 +00:00
igor%mir2.org
e1320b934c 1.More checks are added for bad usage of ClassFileWriter methods.
2. Hashtable is replaced by ObjToIntMap or UintMap to minimize memory usage.

3. Converting of strings to utf8 encoding is coded  explicitly to avoid overhead  of creating many objects.
2003-03-13 09:31:01 +00:00
igor%mir2.org
67b44fd9d9 Making class public 2003-03-13 07:52:07 +00:00
beard%netscape.com
8ded18bc1b Fix for bug #53593, sr=brendan, r=beard 2003-03-13 05:37:07 +00:00
brendan%mozilla.org
dd545c2cb9 Fix JS_[GS]etContextThread return type; add JSCLASS_NEW_RESOLVE_GETS_START (196966, r=shaver). 2003-03-12 20:29:16 +00:00
dbradley%netscape.com
3b01ed08a0 bug 196241 - Refactors script evaluation pre and post logic into a class. r=timeless, sr=brendan 2003-03-12 20:26:21 +00:00
dbradley%netscape.com
f24cadaaaa bug 188229 - [AxPlugin] Security policy should be per-domain configurable r=adamlock, sr=alecf NOTE: these changes are not part of the regular build. 2003-03-12 20:05:54 +00:00
dbradley%netscape.com
612926a718 Bug 194043 - Refactor exception logic between IDispatch and XPConnect. r=adamlock@netscape.com, sr=jst@netscape.com 2003-03-12 15:21:06 +00:00
igor%mir2.org
bcd8181007 Removal of generation of non-operational dup/pop when creating function objects for function statements. 2003-03-12 09:39:16 +00:00
brendan%mozilla.org
67444da79d Give JSScope a proper flags member, without increasing its size (part of 196097, r=shaver). 2003-03-11 20:30:55 +00:00
igor%mir2.org
3bbdba7f56 Fixing a regression in Codegen.transform which effectively disabled direct call optimization: FunctionNode.FUNCTION_STATEMENT should be compared against fn.getFunctionType(), not fn.getType() 2003-03-11 17:17:57 +00:00
igor%mir2.org
90ebda38fe Introduction of Codegen.mainCodegen to hold the main generator object and layout cosmetics. 2003-03-11 10:01:32 +00:00
igor%mir2.org
47a9d77f0f Use (size + 31) >> 5, not (size >> 5) + 1 as a size for int array buffer so in the case when size % 32 == 0 array would not hold a never used tail element. 2003-03-11 09:59:39 +00:00
igor%mir2.org
134f5d732f 1. Consistently use Context.inFunction and Context.fnCurrent instead of calling instanceof/cast for OptFunctionNode on Context.scriptOrFn
2. Removal of Codegen.superClassSlashName field since Codegen.superSlashName since it is never used as a part of a signature and ClassFileWriter converts . into / in type name automatically.
2003-03-11 07:25:13 +00:00
cls%seawood.org
5738ef26f0 Adding mingw support to js.
Bug #134113 r=brendan
2003-03-11 03:27:07 +00:00
seawood%netscape.com
a115192b1a Remove unneeded local win32 jsinterop.obj target that's causing dependency issuees.
Thanks to John Morrison <jrgm@netscape.com> for the patch.
Bug #196633 r=cls sr=brendan
2003-03-11 00:13:44 +00:00
igor%mir2.org
26a9318291 Since NodeTransformer.transform(tree) never replaces tree, change its signature to return void which allows to eliminate ScriptOrFnNode.replaceFunctionNode. 2003-03-10 20:26:58 +00:00
igor%mir2.org
c0145a6724 Simplification of optimized node transformer: search for direct call optimization targets in Codegen.transform before constructing ObjTransformer instance to avoid additional checks for top-level script in ObjTransformer.transform 2003-03-10 20:24:06 +00:00
igor%mir2.org
bc0b7a93d9 Added API to make array read only, after which any attempt to modify it will trigger RuntimeException 2003-03-10 20:19:22 +00:00
igor%mir2.org
9d6bb8957e 1. Removal of unused fields and methods:
Codegen.java:
-    private int ordinal;
-    private short scriptRuntimeIndex;
-    private short debug_pcLocal;
-    private short debugStopSubRetLocal;

OptFunctionNode.java
-    private ObjArray itsDirectCallTargets;
-    void addDirectCallTarget(FunctionNode target) {
-    ObjArray getDirectCallTargets() {

2. Better naming and method moves in Codegen.java for better readability
2003-03-10 17:46:32 +00:00
seawood%netscape.com
06d44dbda8 Fix dependency problems with local targets.
Bug #196633 r=jrgm
2003-03-10 05:16:06 +00:00
brendan%mozilla.org
6ef9f45d83 [Second check-in attempt; last night's was backed out, but I claim it was because of bad dependencies or timestamp problems in the Win32 builds. /be] Add cx->lastAtom, a long overdue addition to the per-context GC root set (196461, r=shaver). 2003-03-09 18:16:27 +00:00
jrgm%netscape.com
b14fbf087b backout changes for bug 196461, due to startup crash on win32 2003-03-09 05:57:23 +00:00
brendan%mozilla.org
73a99565bc Add cx->lastAtom, a long overdue addition to the per-context GC root set (196461, r=shaver). 2003-03-09 03:12:56 +00:00
cls%seawood.org
d1479589a2 Adding mingw makefile changes.
Bug #134113 r=bryner
2003-03-08 05:57:15 +00:00
brendan%mozilla.org
ae0c4d3804 Reorder static and const to match tradition; reomve DEBUG_brendan cruft. 2003-03-08 01:28:02 +00:00
cls%seawood.org
d1079607df XP code changes required for mingw landing.
Add NS_STDCALL macros for functions that require stdcall declarations.
Add NS_STDCALL_FUNCPROTO macro for stdcall function prototype typedefs.
Bug #134113 r=dougt sr=dbaron
2003-03-07 06:07:56 +00:00
brendan%mozilla.org
dcad0d8960 Infrastructure for bug 92773, r=shaver@mozilla.org:
- call the JSRuntime's checkObjectAccess callback, if configured, for each
  get or set that invokes a user-defined function (a user-defined function is
  a scripted or native function object, not a native JSPropertyOp C function).
  The value passed as an in-out parameter in *vp is the function object, so
  the callback could, e.g., clone function objects and configure them with
  different parent objects, if that helped import them into a trust domain.
- Fix a long-standing bug that broke the deprecated, old-style, and rarely-
  used top-level getter/setter function declaration form:

    getter function f()  { return ++x; }
    setter function f(y) { return x = y; }

  We want js_CheckRedeclaration to complain only if a permanent getter is
  being redefined by another getter, likewise for a setter -- but not when
  (as above) a setter is being added to a top-level object for the same id
  as a pre-existing getter (or vice versa).
2003-03-06 19:45:18 +00:00
igor%mir2.org
1b6885bd21 Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=196017 :
Use Thread.getContextClassLoader() as the last resort when searching for classes.
2003-03-06 09:29:00 +00:00
dougt%netscape.com
c5ac287dab removing NS_MT_SUPPORTED define. b=186494, r=dougt, r=seawood 2003-03-05 23:30:22 +00:00
dougt%netscape.com
d707cba238 backing out js changes which may have caused tbox test failures 2003-03-05 05:05:39 +00:00
timeless%mozdev.org
727e7a086b Bug 195289 Enable people to use DumpJSStack and friends from nondebug builds if they list themselves as xpc_hackers
r=dbradley sr=jst
2003-03-05 03:12:04 +00:00
brendan%mozilla.org
25e042cd77 Infrastructure for bug 92773, r=shaver@mozilla.org:
- call the JSRuntime's checkObjectAccess callback, if configured, for each
  get or set that invokes a user-defined function (a user-defined function is
  a scripted or native function object, not a native JSPropertyOp C function).
  The value passed as an in-out parameter in *vp is the function object, so
  the callback could, e.g., clone function objects and configure them with
  different parent objects, if that helped import them into a trust domain.
- Fix a long-standing bug that broke the deprecated, old-style, and rarely-
  used top-level getter/setter function declaration form:

    getter function f()  { return ++x; }
    setter function f(y) { return x = y; }

  We want js_CheckRedeclaration to complain only if a permanent getter is
  being redefined by another getter, likewise for a setter -- but not when
  (as above) a setter is being added to a top-level object for the same id
  as a pre-existing getter (or vice versa).
2003-03-05 01:33:19 +00:00
igor%mir2.org
c6efcf460c Integration of VariableTable into ScriptOrFnNode to avoid the need to have a separated wrapper class around ObjArray/ObjToIntMap 2003-03-04 15:10:20 +00:00
brendan%mozilla.org
cf97227e83 Quick followup to patch for 174341. 2003-03-04 00:01:21 +00:00
brendan%mozilla.org
020aef7d75 My take on a patch and great idea from igor@icesoft.com (Igor Bukanov) for bug 195385, r=shaver. 2003-03-01 06:39:51 +00:00
timeless%mozdev.org
df64a519af Bug 136264 HTMLCollection Object wrapped by XPConnect has members whose names shadow each other
r=jst sr=jst
2003-02-28 19:07:51 +00:00
brendan%mozilla.org
68cef095fc Fix typo in old comment. 2003-02-28 07:18:40 +00:00
brendan%mozilla.org
6e0c7cdde4 Constipation of (JS|PL)DHashTableOps (195298, r/sr=shaver/alecf). 2003-02-28 07:17:59 +00:00
timeless%mozdev.org
d11119926a Bug 136260 ChromeWindow Object wrapped by XPConnect has members whose names shadow each other
r=jst sr=jst
2003-02-28 02:34:01 +00:00
pschwartau%netscape.com
a953b34fcf Adding an early return to this test, due to problems on Linux RedHat8. See bug 174341 comment 24 and following. 2003-02-28 00:33:44 +00:00
brendan%mozilla.org
4f5a98cd5c - Move left-associative binary tree flattening from the post-order position
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.
2003-02-27 23:04:46 +00:00
pschwartau%netscape.com
2f97a8c92b Get JS standalone building with Makefile.ref on Mac OSX (195134, r=cls). Not part of browser build. 2003-02-27 21:52:13 +00:00
brendan%mozilla.org
1d7a5aa298 Checking in heap-sort speedup from Igor Bukanov <igor@icesoft.no> (bug 181828, r=me). 2003-02-27 01:43:44 +00:00
mkaply%us.ibm.com
7b82e8d993 #156505
r=dbradley, sr=brendan
If you ask for input, you should fflush after the fprintf
2003-02-26 15:22:03 +00:00
brendan%mozilla.org
7915c3d008 Optimize the foo = '' + bar; case in js_ConcatStrings to do foo = bar -- patch from Tim Lundeen <tlundeen@webcrossing.com>, r=me. 2003-02-26 01:49:32 +00:00
brendan%mozilla.org
c68f6d3980 Fix misspelling in comment. 2003-02-26 01:29:55 +00:00
igor%mir2.org
11d0e9760b Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=96270 :
proper implementation of Scriptable.has in ImporterTopLevel and NativeJavaPackages
2003-02-25 09:17:43 +00:00
igor%mir2.org
fd3dee4c56 Fix http://bugzilla.mozilla.org/show_bug.cgi?id=194364:
no assignment of function expression statements to script result
2003-02-25 09:15:08 +00:00
mkaply%us.ibm.com
907ef1cd66 Overzealous -removed a paren 2003-02-25 05:59:50 +00:00