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

4973 Коммитов

Автор SHA1 Сообщение Дата
pschwartau%netscape.com 7c49f4f637 Adding more cases to test. 2003-03-15 02:25:25 +00:00
dougt%netscape.com be629223b6 Create a new xpcom obsolete library (and component library).
Moved nsFileSpec and related classes into this obsolete library.
  Moved nsRegistry and related libreg functionality into the obsolete library.

Updated many callers using the obsolete nsFile spec to use nsIFile and Necko to do file IO.

Combined the following DLLs (source -> dest)
  uriloader -> docshell
  shistory -> docshell
  jsurl -> jsdom
  gkview -> gklayout

Moved nsAdapterEnumerator out of xpcom/ds and into mailnews, since they're the only consumer

Modifed the xpt_link tool so that you can specify a �only include� cid list that can mask CID�s that you are not interested in.

Added build options:
Prevent the building of xpinstall (--disable-xpinstall)
Prevent the building js component loader (--disable-jsloader)
A build option to only build a single profile (--enable-single-profile)
A build flag to only built the required xpfe components (--disable-xpfe-components).

Removal or hiding of unused functions and classes including nsEscape*, nsDequeIterator, nsRecyclingAllocatorImpl, nsDiscriminatedUnion, nsOpaqueKey, nsCRT::strlen, NS_NewCommandLineService

Bug 194240, r/sr = darin, alec.
2003-03-15 01:04:32 +00:00
pschwartau%netscape.com 8d96a3f128 Improving comments. 2003-03-15 00:07:50 +00:00
pschwartau%netscape.com 90d2dfed6c Adding more cases inspired by bug 197451. 2003-03-14 23:55:37 +00:00
pschwartau%netscape.com a472ff1b66 Initial add. Regression test for bug 196290, testing left-associativity of the + operator (cf. ECMA-262 Ed.3 Section 11.6.1) 2003-03-14 20:40:05 +00:00
igor%mir2.org 52b3708d95 1. When generating various support methods like script main, function constructor etc., use classFile.startMethod instead of startNewMethod since the later is intended for generation of main code for script/function.
2. Do not use trivialInit optimization for scripts since the following changes makes generation of initScript function mandatory.
2003-03-14 10:05:01 +00:00
brendan%mozilla.org 39782a17cf Implement SCOPE_IS_SEALED, JS_SealObject, JS_UnsealObject, etc. to support
sealed standard object graphs, as well as to pave the way for optimizations
to object literals (94693, r=shaver).
2003-03-14 05:24:58 +00:00
igor%mir2.org c40f2bfc54 Inlinning of generateRegExpLiterals into generateInit for simple code 2003-03-13 22:50:04 +00:00
pschwartau%netscape.com 4e67571c1e Improving comments. 2003-03-13 22:07:02 +00:00
igor%mir2.org 203b0ffbd9 I changes ClassFileField to store its attribute as simple short fields to avoid allocation of short[4] array for each field. 2003-03-13 14:03:03 +00:00
igor%mir2.org bc7b9d73d8 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 514bf87a5c 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 ec5530c862 Making class public 2003-03-13 07:52:07 +00:00
beard%netscape.com 1b28e1ddc8 Fix for bug #53593, sr=brendan, r=beard 2003-03-13 05:37:07 +00:00
brendan%mozilla.org 8e26074947 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 212330bdec 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 b9470cc0fa 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 86efd82e8c 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 c157c1a306 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 29e29639fb 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 bb0cf4e75a 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 30a59ec178 Introduction of Codegen.mainCodegen to hold the main generator object and layout cosmetics. 2003-03-11 10:01:32 +00:00
igor%mir2.org 546ec4d6df 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 6d4df4405d 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 574c6113ee Adding mingw support to js.
Bug #134113 r=brendan
2003-03-11 03:27:07 +00:00
seawood%netscape.com a5e02eb145 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 9be8d46c8f 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 d64c42ff29 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 51de1c8d84 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 1acdc5f2f0 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 2b78de78b8 Fix dependency problems with local targets.
Bug #196633 r=jrgm
2003-03-10 05:16:06 +00:00
brendan%mozilla.org 22565d8287 [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 4ab83a8fe1 backout changes for bug 196461, due to startup crash on win32 2003-03-09 05:57:23 +00:00
brendan%mozilla.org b439b1a0dc 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 d18d8ada60 Adding mingw makefile changes.
Bug #134113 r=bryner
2003-03-08 05:57:15 +00:00
brendan%mozilla.org 62fba60f00 Reorder static and const to match tradition; reomve DEBUG_brendan cruft. 2003-03-08 01:28:02 +00:00
cls%seawood.org ab74b36ce8 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 98edb0ac2e 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 4540bdf06a 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 2cd2169849 removing NS_MT_SUPPORTED define. b=186494, r=dougt, r=seawood 2003-03-05 23:30:22 +00:00
dougt%netscape.com 614a918cfe backing out js changes which may have caused tbox test failures 2003-03-05 05:05:39 +00:00
timeless%mozdev.org 7f71c61b64 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 6e628b6d77 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 39dbbb0550 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 8fae9df403 Quick followup to patch for 174341. 2003-03-04 00:01:21 +00:00
brendan%mozilla.org cc1dc19ce7 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 623d1973c8 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 31791d19d9 Fix typo in old comment. 2003-02-28 07:18:40 +00:00
brendan%mozilla.org 1e352e85b2 Constipation of (JS|PL)DHashTableOps (195298, r/sr=shaver/alecf). 2003-02-28 07:17:59 +00:00
timeless%mozdev.org 0a2cabcc99 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 7066f96f7c 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 71041a5d9d - 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 241d155290 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 287257cbff 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 1469be17fa #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 6532fe8fd7 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 ad9bf969b8 Fix misspelling in comment. 2003-02-26 01:29:55 +00:00
igor%mir2.org c63cb1b35a 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 8ebcc7f9af 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 0a64597f5d Overzealous -removed a paren 2003-02-25 05:59:50 +00:00
mkaply%us.ibm.com a2191ffb63 IRIX bustage - for anyone blaming this code in the future, checkin was Bug 146873 by mstoltz 2003-02-25 05:58:21 +00:00
timeless%mozdev.org f10c419ca0 Bug 131275 JS_AddRoot could provide a default root name if you define NAME_ALL_GC_ROOTS
r=brendan
2003-02-25 03:29:24 +00:00
mstoltz%netscape.com 2bfa6872e3 Bug 146873 - Check JS Enabled status before calling from java into JS. r=jst, sr=heikki. 2003-02-25 01:37:47 +00:00
pschwartau%netscape.com e21696802d Oops; back out last change. No sense in try...catch if the code you're trying isn't hidden inside an eval string! 2003-02-24 22:33:01 +00:00
timeless%mozdev.org f4a0e93b73 Bug 140031 Change jstypes.h to use __declspec instead of _declspec
r=rogerl
2003-02-24 21:37:54 +00:00
timeless%mozdev.org be9d7943c8 Bug 75405 js benchmarks need strict mode cleaning
patch by petejc@collab.net r=rogerl
2003-02-24 21:37:37 +00:00
timeless%mozdev.org b69587d555 Bug 186937 JSLL_UCMP missing from !JS_HAVE_LONG_LONG builds
patch by scole@planetweb.com r=brendan
2003-02-24 21:37:23 +00:00
pschwartau%netscape.com 2cafb4191a Add a try...catch around the recursion test to catch 'too much recursion' exceptions. They are OK; we are only testing against crashes in this test. 2003-02-24 20:04:07 +00:00
timeless%mozdev.org 3ccf0b82f8 Bug 188398 JavaScript Engine doesn't work well for dates after 2038 on Windows
r=rogerl
2003-02-24 19:20:24 +00:00
timeless%mozdev.org c28fa28007 Bug 134728 mozJSComponentLoader::UnloadAll => JSCLAutoContext::JSCLAutoContext Getting service @mozilla.org/js/xpc/ContextStack;1 on shutdown.
r=dbradley sr=brendan
2003-02-23 07:03:11 +00:00
seawood%netscape.com b4a4a67418 Use va_copy if available for VARARGS_ASSIGN
Bug #187180 r=blizzard sr=brendan
2003-02-23 06:59:39 +00:00
brendan%mozilla.org 95dfc6ea7a Cleanup GC_CALLBACK blunder (190813 followup, r=shaver). 2003-02-22 22:56:57 +00:00
pschwartau%netscape.com a8968c2f6c Initial add. Regression test for bug 194364. 2003-02-21 22:07:21 +00:00
brendan%mozilla.org ed3b6934e7 Fix from pthomas@suse.de (Philipp Thomas) for 64-bit conflict between ptrdiff_t and JS_BIT/JSUint32 (r=shaver, a=dbaron). 2003-02-20 22:23:03 +00:00
igor%mir2.org e12bd87db4 Parsing changes: for regular expression literals construct a tree node with regular expression number during parsing instead of generating a special subtree that is converted to such node during tree transformation. 2003-02-20 13:11:21 +00:00
igor%mir2.org dc46d02971 Praising changes: remove direct access to VariableTable in ScriptOrFnNode and instead provide methods to access its functionality. In this way VariableTable can be changed without affecting the rest of code. 2003-02-20 09:18:12 +00:00
igor%mir2.org 1af98b56aa More parser internal changes: move all logic to initialize variable table to ScriptOrFnNode.finishParsing and its overrides in FunctionNode/OptFunctionNode so it will be constructed during parsing to avoid checks for function types in NodeTransformer. 2003-02-19 23:50:42 +00:00
mkaply%us.ibm.com bf12ff6ebd #193611
r=rginda, sr=brendan, a=dbaron
Set the MAX_INTERP_LEVEL for OS/2 to something lower than 1000 (250)
2003-02-19 21:19:54 +00:00
dbradley%netscape.com ab8218412c Bug 192281 - Error calling IDispatch.setCallback on active-x control. This patch turns on wrapping of JS objects by an IDispatch interface. All changes are outside of Mozilla build. r=adamlock, sr=jst, a=dbaron 2003-02-19 15:19:22 +00:00
igor%mir2.org 69801b0254 During parsing collect all nested function in script or function directly into array in ScriptOrFnNode. In this way there is no need to walk over tree to find nested functions during tree transformation since the function nodes are available directly. 2003-02-19 14:50:30 +00:00
igor%mir2.org 449d35d64e Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=193700 :
Attempts to access/modify properties of null or undefined are explicitly checked to include in error messages the property name so it would be possible on error in x.y.z to know if it is x or y that was undefined or null.

Inspired by suggestion from Russell Gold.
2003-02-19 08:51:51 +00:00
pschwartau%netscape.com deef919aa1 Correcting a typo in the test that had made it pass vacuously. 2003-02-19 01:51:38 +00:00
pschwartau%netscape.com 12215231ec Correcting a typo in the test that had made it pass vacuously. 2003-02-19 01:43:27 +00:00
brendan%mozilla.org 71291cca0b Hack around OBJ_ENUMERATE design flaw that requires the property iterator object to root its parent slot (193393, r=shaver, a=asa). 2003-02-18 20:08:21 +00:00
igor%mir2.org f015d87d5f Allow to set null for sourceName, encodedSource and originalSource 2003-02-18 00:52:34 +00:00
pschwartau%netscape.com df61a41e48 Initial add. Regression test for bug 193555. 2003-02-17 23:08:59 +00:00
pschwartau%netscape.com 49881f43c6 Initial add. Regression test for bug 193418. 2003-02-17 22:24:26 +00:00
igor%mir2.org 3f0b27bbf6 Store number of locals as a field in ScriptOrFnNode and not as int node property. 2003-02-17 17:41:04 +00:00
igor%mir2.org 93721f0a59 Store function array inside ScriptOrFnNode as field, not as a node property. 2003-02-17 17:39:26 +00:00
igor%mir2.org fc20f85a8f Pass ScriptOrFnNode explicitly to function expecting script or function top node and fix OptTransformer problem where it marked nested functions of function as suitable for direct call optimization which was caused by removal of parameter name subtree in FunctionNode. 2003-02-17 17:34:20 +00:00
dbradley%netscape.com 66ac07c418 Bug 140852 (160602) - String(819187200000) == '8191871:0000' in xpcshell, browser. r=seawood, a=brendan 2003-02-17 13:02:08 +00:00
igor%mir2.org e6090539e4 Introduction of ScriptOrFnNode as a Node to represent scripts and a base class for FunctionNode so it can be used to store variable tables, line information, regular expressions etc. instead of using special Node properties. 2003-02-17 08:51:00 +00:00
igor%mir2.org 50ba7d1f8c Removal of a separated tree walking phase in NodeTransformer to collect variables as this is done now during parsing 2003-02-17 00:10:24 +00:00
igor%mir2.org 7ed732d3bf Adjusted to refer to 1.5R4 as the last release 2003-02-17 00:06:06 +00:00
igor%mir2.org ef2778d047 Fixing links 2003-02-17 00:05:27 +00:00
igor%mir2.org b3bb2de24a Remove code duplication when reporting syntax errors in NodeTransformer, ToekStream, IRFactory and Parser and add a method to create FunctionNode to Interpreter/Codegen to remove the need to have OptIRFactory. 2003-02-16 20:28:56 +00:00
igor%mir2.org 6d98f1ebc6 *** empty log message *** 2003-02-16 20:28:55 +00:00
locka%iol.ie 0e62eb4e6e Fix blacklist/whitelist registry code in COM connect. b=193256 r=dbradley sr=alecf a=dbaron 2003-02-16 19:50:14 +00:00
igor%mir2.org 714bc85d53 Creating and filling VariableTable directly during parsing phase and then accessing it in NodeTransformer. It still does not remove the need to have a separated walk through the tree for variables but now it only checks for function name / variable name clashes.
And http://bugzilla.mozilla.org/show_bug.cgi?id=193555 is now fixed as well.
2003-02-16 11:34:54 +00:00
igor%mir2.org c62a606a26 Do explicit parsing of function expression statements so a correct function type will be passed to IRFactory during node creation and fix incorrect code generation when FEATURE_MEMBER_EXPR_AS_FUNCTION_NAME is true.
I also added explicit flags to Parser: languageVersion and allowMemberExprAsFunctionName and set them from Context. In this way Parser can be used without Context which is useful for debugging.
2003-02-15 23:30:02 +00:00