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

4959 Коммитов

Автор SHA1 Сообщение Дата
timeless%mozdev.org 0acb5ea8ca Bug 140031 Change jstypes.h to use __declspec instead of _declspec
r=rogerl
2003-02-24 21:37:54 +00:00
timeless%mozdev.org 08a077d57d 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 0e996b7cf4 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 67070c0aad 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 8facc552af 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 4d48249ffe 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 7f752bf63b 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 9c387e3aa5 Cleanup GC_CALLBACK blunder (190813 followup, r=shaver). 2003-02-22 22:56:57 +00:00
pschwartau%netscape.com 75d9c50f73 Initial add. Regression test for bug 194364. 2003-02-21 22:07:21 +00:00
brendan%mozilla.org ed7dbec5c1 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 a8e6f7c025 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 406437f686 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 3f34720cd5 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 a77ccce713 #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 74be079a50 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 3a43240845 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 ae7bb2620d 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 081f5e3864 Correcting a typo in the test that had made it pass vacuously. 2003-02-19 01:51:38 +00:00
pschwartau%netscape.com 0b4ad224e7 Correcting a typo in the test that had made it pass vacuously. 2003-02-19 01:43:27 +00:00
brendan%mozilla.org 9fd257d039 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 2b5b9f76d8 Allow to set null for sourceName, encodedSource and originalSource 2003-02-18 00:52:34 +00:00
pschwartau%netscape.com 54518d9c36 Initial add. Regression test for bug 193555. 2003-02-17 23:08:59 +00:00
pschwartau%netscape.com c2b61e9dfb Initial add. Regression test for bug 193418. 2003-02-17 22:24:26 +00:00
igor%mir2.org 511c2e945f 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 7c4d921fe0 Store function array inside ScriptOrFnNode as field, not as a node property. 2003-02-17 17:39:26 +00:00
igor%mir2.org 3abddeba71 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 92aa9a24b8 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 5a9259c0aa 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 2e981e4365 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 ca4e80328a Adjusted to refer to 1.5R4 as the last release 2003-02-17 00:06:06 +00:00
igor%mir2.org 32a501abe2 Fixing links 2003-02-17 00:05:27 +00:00
igor%mir2.org 19e12f45e4 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 9ad003b9a0 *** empty log message *** 2003-02-16 20:28:55 +00:00
locka%iol.ie b864237a15 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 bed15cd944 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 56c3f65ac9 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
igor%mir2.org 2c7161713c VariableTable changes toward removal of a separated NodeTransformer pass over the parser tree for variable initialization: the code to support a table of optimized variables for functions in the optimizer is moved to optimizer/OptFunctionNode and VariableTable holds only parameters/variables names now. It allowed to simplify VariableTable initialization in NodeTransformer. 2003-02-15 21:35:58 +00:00
igor%mir2.org 75697022cf Remove synchronization on Context instances as Context should only be accessed from one thread. 2003-02-15 21:23:54 +00:00
igor%mir2.org c914122b03 Decoupling JavaAdapter from ClassRepository logic: JavaAdapter.createAdapterClass is replaced by JavaAdapter.createAdapterCode which just generates byte array with the adapter class file code and Codegen then passes this array to ClassRepository to save the class if necessary. In this way if repository do not need to load classes, adapter class will not be loaded at all. 2003-02-15 17:47:13 +00:00
igor%mir2.org de021ba69a ClassNameHelper cleanup:
1. It is not passed as a parameter to Interpreter/Codegen, instead Codegen access it directly when necessary.

2. ClassNameHelper.reset method is removed as inherently thread unsafe and data that should be used during compilation of single script is stored in Codegen itself.

3. Instead of a special DefaultClassRepository null is used to indicate that generated classes should not be stored and JavaAdapter is modified to take ClassRepository as a parameter, not ClassNameHelper.
2003-02-15 14:21:33 +00:00
igor%mir2.org cb81ad7f8d When parsing function parameters, collect all parameters names into array instead of generating a separated syntax subtree for them. 2003-02-15 13:54:22 +00:00
igor%mir2.org d32dddbf0c Remove the last argument "args" from generateInit as it is never used. 2003-02-15 13:05:38 +00:00
igor%mir2.org c386a1cc35 Make Optimizer class a package private and turn most of its methods into private ones. 2003-02-15 12:56:21 +00:00
igor%mir2.org 9f52d081d9 I changed PreorderNodeIterator so a pattern for its usage will be:
PreorderNodeIterator iter = new PreorderNodeIterator();
for (iter.start(tree); !iter.done(); iter.next()) {
    Node node = iter.getCurrent();
    ...
}

instead of

PreorderNodeIterator iter = tree.getPreorderIterator();
Node node;
while ((node = iter.nextNode()) != null) {
}

to allow for more flexible usage and added PreorderNodeIterator.nextSkipSubtree to skip iteration of the last visited node subtree which allows to have simple code  in Optimizer.buildStatementList when iterating over statements.
2003-02-15 12:47:45 +00:00
igor%mir2.org ade76dc700 Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=193418 :
The bug caused by a missed check in StmtNodeIterator.nextNode for a possible null result of findFirstInterestingNode inside the search loop which made search to stop preliminary with non-empty stack.

The changes fixe this and integrate StmtNodeIterator into
Optimizer.buildStatementList as StmtNodeIterator was used only by
buildStatementList and the new version is simpler.
2003-02-15 10:33:31 +00:00
igor%mir2.org 2660547dee Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=191276 :
The reason for the bug was that omj/optimizer/Optimizer.java when optimizing code for this[name] (see GETELEM switch, line 665) assumed a number context for GETELEM index node unconditionally which is wrong.

The fix uses number context only if [] argument is known for sure to be a number.
2003-02-14 23:56:34 +00:00
igor%mir2.org ca577aa247 Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=192288 :
The bug was caused by a double call to Codegen.addNumberConstant, the first
time correctly from Codegen.visitLiteral and the second time wrongfully from
the loop in emitConstantDudeInitializers where loop index should be used
instead of calling addNumberConstant. As addNumberConstant would return the
same index for same numbers, the bug surfaces only with NaN as
addNumberConstant does not recognizes already added NaN. The bug also visible
only with optimization set to 1 or higher since only then constant folding can
produce NaN literal.

The fix removes the second call to addNumberConstant and uses
ScriptRuntime.NaNobj for NaNs.
2003-02-14 23:53:32 +00:00
igor%mir2.org ef55bade16 Make ScriptRuntime.NaN, ScriptRuntime.NaNobj and ScriptRuntime.negativeZero static final again as now a workaround for MS JVM uses Double.longBitsToDouble to get the necessary values. 2003-02-14 23:51:28 +00:00
igor%mir2.org d42d684b62 I made Context.codeBug public so optimizer can use it. 2003-02-14 23:47:11 +00:00
igor%mir2.org 485f42581c Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=192105 :
The reason for the bug is that emitDirectConstructor generates code to call
setPrototype twice instead of setPrototype/setParentScope pair during new JS
object construction. The fix replaces that setup by a single call to
BaseFunction.createObject which is used by Interpreter as well.
2003-02-14 22:38:49 +00:00
pschwartau%netscape.com a89b24e960 Removing skip since bug 191633 has been fixed. 2003-02-14 22:37:21 +00:00
igor%mir2.org 65842b334f Optimization: In OptFunctionNode.getDirectCallParameterSignature use static strings for common cases of 0, 1 and 2 direct parameters. 2003-02-14 22:36:58 +00:00
igor%mir2.org 788b2b2adf Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=191633 :
Replace tail recursion in TokenStream.getToken by a loop.
2003-02-14 20:20:46 +00:00
igor%mir2.org b1de655726 Mostly cosmetics: use consistent layout for case statements and add additional {} block around main code in TokenStream.getToken() so the following patch to fix http://bugzilla.mozilla.org/show_bug.cgi?id=191633 will be small. 2003-02-14 20:19:07 +00:00
igor%mir2.org 8d78476dde Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=191668 :
Integration of LineBuffer into TokenStream code which now uses a special buffer for unreading of several chars to follow SM more closely. In this way there is no problem with a possible backtracking of 3 chars on failed attempt to match <!-- at the last minus.

TokenStream is also modified to accept a string with a source directly which avoids the need to construct intermediate StringReader in Context and allows to remove DebugReader class which is replaced by a simple function to read all Reader data into string.
2003-02-14 17:09:19 +00:00
igor%mir2.org 16f9ecfd66 Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=192226 :
Codegen.visitRegularCall should not try to apply the simple call optimization
when firstArgDone is true indicating directly called function. The patch also
replaces generation of code to call new Object[0] by loading the
ScripRuntime.emptyArgs field.
2003-02-14 16:55:40 +00:00
igor%mir2.org 55fc9c878b Use x instanceof Type checks in place of x.getClass() = TypeClass as instanceof is significantly faster then calling getClass. 2003-02-14 16:53:14 +00:00
locka%iol.ie 9108ceef0c Fix use of IObjectSafety, cleanup nsAxSecurityPolicy.js & subscribe to hosting flag pref changes, using medium settings as the default. b=191758 r=dbradley@netscape.com sr=alecf@netscape.com a=asa@mozilla.org 2003-02-13 12:17:21 +00:00
igor%mir2.org 58a609ac23 Patch from Steven Beal fixing a bug due to my changes:
I just noticed that the changes introduced with
v1.29 of Main.java broke the ability to do hot
reloads of scripts.  To be more explicit, the script
is actually reloaded but the source in the debugger
is not updated to reflect the newly loaded code.
...
Attached is a patch that restores the original behavior.
The refactorings are preserved but the handling of
previously loaded SourceInfo objects is restored and the
check for previously loaded ScriptItem instances
removed.
2003-02-13 03:01:09 +00:00
rginda%netscape.com 9d2d14c1ae syncing with the latest apidoc from /webtools/apidoc 2003-02-12 08:25:15 +00:00
nboyd%atg.com 01d701f40f Remove language about "release candidate" now that we have a final. 2003-02-11 15:04:12 +00:00
nboyd%atg.com a14de23839 Update for final release 2003-02-11 01:50:26 +00:00
pschwartau%netscape.com 9b8ebff7f5 Skip new test that uses SpiderMonkey's toSource() functionality (non-ECMA). 2003-02-11 00:24:33 +00:00
pschwartau%netscape.com 02a3ab1ed8 Initial add. Regression test for bug 192465. 2003-02-11 00:13:45 +00:00
nboyd%atg.com ccf0277131 Update release date. 2003-02-10 15:36:42 +00:00
pschwartau%netscape.com 578cd2a470 Re-indexing the repeat_str() function to output N copies of the given string instead of N+1. 2003-02-09 00:52:21 +00:00
pschwartau%netscape.com 40baf980cc Initial add. Regression test for bug 192414. 2003-02-09 00:39:46 +00:00
pschwartau%netscape.com 9ffd003285 Initial add. Regression test for bug 192288. 2003-02-07 22:52:05 +00:00
pschwartau%netscape.com 1fdeabca14 Initial add. Regression test for bug 192226. 2003-02-07 22:26:15 +00:00
igor%mir2.org c5d1277e24 More info on new security interfaces 2003-02-07 20:44:47 +00:00
timeless%mozdev.org fdd98cf2ed Bug 191675 JS Shell (1.3.1+) Quit() calls exit() without cleaning up.
r=rogerl
2003-02-07 03:51:59 +00:00
timeless%mozdev.org 89f3a5e056 Bug 107002 Makefile.ref doesn't build on rh7.1 with readline
r=rogerl
2003-02-07 03:10:59 +00:00
pschwartau%netscape.com a3137029fb Initial add. Regression test for bug 192105. 2003-02-06 19:17:07 +00:00
dbradley%netscape.com e858034c7a Bug 190813 - Browser hangs indefinitely on above URL. r=shaver, a=dbaron 2003-02-06 14:54:59 +00:00
pschwartau%netscape.com fe3732ac6e Initial add. Regression test for bug 191668. 2003-02-03 20:35:00 +00:00
pschwartau%netscape.com f19901978d Skip this regression test until bug 191633 is fixed; failure output is enormous - 2003-02-03 20:12:27 +00:00
pschwartau%netscape.com 61802a48b1 Initial add. Regression test for bug 191633. 2003-02-03 20:08:27 +00:00
nboyd%atg.com 0e45793abd fix bug 106831 2003-02-03 01:17:44 +00:00
pschwartau%netscape.com f83cf74f28 Initial add. Regression test for bug 191479. 2003-01-31 20:30:33 +00:00
pschwartau%netscape.com 021c3fa7a6 Initial add. Regression test for bug 191276. 2003-01-30 19:10:35 +00:00
locka%iol.ie 1023aaea93 Fix ClassIsListed which returns wrong value when registry key is missing. b=191131 r=dbradley@netscape.com sr=darin@netscape.com a=asa@mozilla.org 2003-01-30 13:22:01 +00:00
pschwartau%netscape.com 5a1321d1da We've decided to follow Perl, rather than ECMA, and allow unescaped braces in regexp patterns, evan if they are not part of a quantifier. See bug 190685. 2003-01-30 02:25:51 +00:00
darin%netscape.com 8632233c45 final patch for bug 190326 "crash in nsJARChannel.cpp when launching calendar"
r=dougt sr=alecf a=asa
2003-01-29 06:47:55 +00:00
pschwartau%netscape.com 3448608123 Adding a missing escape to the regexp pattern to make it ECMA-correct. 2003-01-28 01:14:15 +00:00
rogerl%netscape.com 62d53e10d0 Fixing bug #190685, re-allowing '{' as un-quantifier literal. 2003-01-27 21:13:15 +00:00
igor%mir2.org 314a1c1c1f Added log for more fixed bugs 2003-01-27 20:04:13 +00:00
igor%mir2.org 615d6d6623 Do not call setSelectedIndex on frame JList if there are no frames. 2003-01-26 18:33:30 +00:00
igor%mir2.org ae4b000c3f Added documentation strings for runCommnad and spawn is changed to pass empty argument array instead of null if function arguments are not specified to avoid a null pointer exception in InterpretedFunction.call 2003-01-26 18:28:26 +00:00
igor%mir2.org 7129e5491a Documentation about runCommand in shell 2003-01-26 18:01:43 +00:00
igor%mir2.org 7b5c64a220 Added runCommand to execute external processes 2003-01-26 15:43:50 +00:00
igor%mir2.org 47d2d76ac2 Added list of resolved Bugzilla reports 2003-01-26 14:30:47 +00:00
pschwartau%netscape.com af6689a84a Commenting out sections containing (?< or (?(condition). Perl supports these operators, but ECMAScript does not. 2003-01-23 20:56:08 +00:00
pschwartau%netscape.com 600b47262e Trivial comment fix. 2003-01-23 20:22:19 +00:00
pschwartau%netscape.com bf4b23fd55 Removing an erroneous section. According to the spec, can't have more than 2 consecutive |?| quantifers in a regexp. 2003-01-23 20:08:39 +00:00
pschwartau%netscape.com b943be23ed Whitespace cleanup. 2003-01-23 20:03:12 +00:00
rogerl%netscape.com 517e75d112 Fixed bug #189898, replace not working with string argument. Also added
error checking for bad quantifiers (see bug 188206)
2003-01-22 18:55:41 +00:00
rginda%netscape.com 045999da85 - venkman only -
bug 189563, initialize hookresult to prevent warnings
2003-01-22 05:42:35 +00:00
pschwartau%netscape.com eaccbeb610 Initial add. Regression test inspired by bug 188206. 2003-01-22 02:34:45 +00:00
pschwartau%netscape.com 37c6a110c6 Initial add. Regression test for bug 189898. 2003-01-21 21:23:20 +00:00
igor%mir2.org 3b9a6fe0ef Patch from Christopher Oliver to fix http://bugzilla.mozilla.org/show_bug.cgi?id=189183 2003-01-20 15:09:45 +00:00
igor%mir2.org 03a23cff39 Small fixes in links 2003-01-17 16:40:45 +00:00
brendan%mozilla.org b8d97d8b8c Defend against bad EndMuxedDocument calls, and assert in the underlying {JS,PL}_DHashTableRawRemove that entry is live (188744, r=jrgm, sr=ben). 2003-01-17 10:01:50 +00:00
nboyd%atg.com 72250520e9 UPdate to rc 3 2003-01-16 20:29:43 +00:00
igor%mir2.org 44acf1e60b Note about scripting of classes from any class loader 2003-01-16 17:22:40 +00:00
nboyd%atg.com e6bc4eccae Add implmentation version date. 2003-01-16 14:24:03 +00:00
dougt%netscape.com 6508e0713e move nsTraceMalloc out of XPCOM. Factory out stackwalking code into new files. 189221 r=chak, 186585 r=blythe sr=dbaron. Most of this patch was contributed by seawood. 2003-01-15 20:40:06 +00:00
igor%mir2.org d8492658bb Committing patch from Steven Beal:
Have you considered adding a "Go" method to Main.java with
public visibility (same behavior as pressing the "Go" button in the debugger UI).

This would be a big help in a system where the debugger has been
embedded.  Being able to close the debugger and ensure that any
breakpoints were removed and any blocked threads notified would
be a nice feature.  Without this, closing the debugger can either
a) halt the application or b) destroy the debugger leaving blocked
threads in a permanent wait state.  Note that the debugger is
not actually destroyed in this case because the waiting threads
prevent it from being wholly GCed.
2003-01-15 10:42:56 +00:00
nboyd%atg.com 7418e4b7de Update to R4. 2003-01-14 16:42:16 +00:00
igor%mir2.org 71741a82b8 Fixing mnemonics shortcuts for Debug menu 2003-01-14 14:44:46 +00:00
igor%mir2.org b9e26a25cb From Steaven Beal:
This looks like a simple case of using the Hashtable key
instead of the value...

    public void clearAllBreakpoints() {
        // Igor - Use of keys() is inappropriate here.  It produces
        // a ClassCastException on the assignment below.  The
        // keys are String instances, not SourceInfo instances...
        //
        //Enumeration e = sourceNames.keys();
        Enumeration e = sourceNames.elements();
	...
    }
2003-01-14 11:24:47 +00:00
dbaron%dbaron.org 88c249d811 Most of the changes needed for Mozilla to build with gcc's -pedantic-errors option. b=175423 r=seawood sr=bryner 2003-01-13 23:15:42 +00:00
pschwartau%netscape.com e4c62ce9fd Updating JS_GetImplementationVersion() to date of latest JS release (67111). 2003-01-11 02:05:00 +00:00
pschwartau%netscape.com 341e636b84 Removing skip since bug 83051 has been fixed. 2003-01-09 03:13:12 +00:00
pschwartau%netscape.com de3afd2b83 Improving comment. 2003-01-08 23:03:17 +00:00
pschwartau%netscape.com b78063ef86 Adding a comment. 2003-01-08 23:01:43 +00:00
pschwartau%netscape.com c3f7fa879c Correcting testcase and adding more illustrative cases. 2003-01-08 22:51:02 +00:00
dbaron%dbaron.org 3ea0dc57d4 Bug 178643: Remove uses of NS_INIT_ISUPPORTS, since it is no longer needed. r=timeless sr=jag 2003-01-08 21:07:51 +00:00
pschwartau%netscape.com fa54cbe4a0 Adding comment. 2003-01-08 00:41:01 +00:00
brendan%mozilla.org 4131c7c96c Don't hold the GC lock when calling the GC callback (186592, r=shaver). 2003-01-07 21:56:52 +00:00
pschwartau%netscape.com 480b81c6de Initial add. Regression test for bug 187133. 2003-01-06 22:18:34 +00:00
timeless%mozdev.org 9327ce7216 Bug 187529 jsd init's a jscontext and doesn't release it (caught by res->input leak)
r=rginda sr=bryner
2003-01-04 22:47:44 +00:00
dbradley%netscape.com 311c9ba0ac Bug 184491 - Security Manager blocks invoking methods on some IDispatch based objects. r=adamlock, sr=jst 2003-01-03 15:48:20 +00:00
seawood%netscape.com 16e7da2837 nobrainer changes while thinking about mingw support
Bug #134113 r=dmose
2003-01-03 08:58:59 +00:00
nboyd%atg.com 9134e7185d Update for RC2 2003-01-01 20:17:17 +00:00
igor%mir2.org b0dd32ca85 Deprecating ClassOutput in favor of ClassRepository and Context methods to access ClassNameHelper functionality in favor of directly calling ClassNameHelper methods. For that I changed ClassNameHelper from interface to abstract class and added ClassNameHelper.get(Context cx) method to get name helper object that is used for the given Context object. 2002-12-31 18:21:32 +00:00
igor%mir2.org 34427cc0a9 Allow application to customize class loader used for loading generated code.
For that I added new method createClasssLoader to Context, which by default returns new instance of DefiningClassLoader and changed the code to use this method instead of creating DefiningClassLoader directly. I moved DefiningClassLoader to org.mozilla.javascript package so core Rhino classes would not depend on org.mozilla.classfile package. I also changed SecurityController.createClasssLoader to take additional parentLoader argument to explicitly specify which class loader should be parent for generated code.
2002-12-31 09:42:42 +00:00
igor%mir2.org 0499c96033 Eliminating calls to Thread.getContextClassLoader().
From my mail to Norris Boyd:

When considering http://bugzilla.mozilla.org/show_bug.cgi?id=166530 I realized that my 2 years old suggestion to use Thread.getContextClassLoader() in org.mozilla.classfile.DefiningClassLoader was wrong, as it does not follow class loader chain pattern Rhino embeddings can use. Moreover, it is wrong to use Thread.getContextClassLoader() when searching for Rhino classes as if Rhino is available via the system class loader and an application uses its copy from another loader, Thread.getContextClassLoader() would return incompatible class while simple Class.forName() would do proper job of loading the requested class from a loader of Class.forName() caller.

The only place where Thread.getContextClassLoader() can be useful is when searching for classes in NativeJavaPackage, but even there with a new option to use Package with an explicit class loader argument it is not necessary as one can write in a script
Packages(java.lang.Thread.contextClassLoader) to get necessary behavior.
2002-12-30 18:22:58 +00:00
igor%mir2.org c1bd6caf06 Replace ScriptRuntime#main(String scriptClassName, String[] args) by ScriptRuntime#main(Class scriptClass, String[] args) and to optimizer.Codegen#generateMain code to generate call to Class.forName before calling ScriptRuntime#main. In this way script byte code can access Class object if generated script is loaded via different class loader then Rhino classes. 2002-12-30 06:49:10 +00:00
igor%mir2.org 5cb276ce94 When checking for a nested class, try to load it from class loader for the parent class, not from the loader for Rhino classes. 2002-12-30 00:50:57 +00:00
igor%mir2.org 25a4f559fd Move code to try to load a class from getPkgProperty to the separated findClass method and add catching of SecurityException there. 2002-12-30 00:49:11 +00:00
igor%mir2.org 6c08e83f5d Change FunctionObject to extends BaseFunction, not NativeFunction as the later is more tailored for function representing JavaScript code. 2002-12-30 00:43:33 +00:00
igor%mir2.org 7aa9281947 To map a class name to the corresponding Class instance from the adapter code generate code to call Class.forName instead of calling ScriptRuntime.loadClassName so a class loader for the generated code will be used to access the Class instance, not the loader for the Rhino classes. 2002-12-29 20:21:06 +00:00
igor%mir2.org 1f5d46210d In createInvoker I replaced classLoader.loadClass by classLoader.linkClass to remove catching ClassNotFoundException 2002-12-29 10:52:10 +00:00
igor%mir2.org d90d743307 Fixing design flaw in SecurityController:
The new SecurityController in its current form does not allow to define more then one generated class class in the same class loader effectively preventing to use optimizer which needs to define classes that refer each other and should be defined in the same loader.

To fix this I replaced the defineClass method in SecurityController by
    public GeneratedClassLoader createClassLoader(Object securityDomain);
which returns instance of the new GeneratedClassLoader interface which can be used to define several classes. I also made DefiningClassLoader to implement this interface to simplify code in JavaAdapter.java and optimizer/Codegen.java.
2002-12-28 05:37:43 +00:00
seawood%netscape.com d5efcdfb6d Start installing GRE libraries & components into a separate dist/gre directory as part of the default build.
Bug #186241 r=dougt
2002-12-28 01:15:07 +00:00
igor%mir2.org 4c56bf59de Preparations for 1.5R4 release 2002-12-24 01:34:45 +00:00
igor%mir2.org 7183ecda1e Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=184107
Always put function expression statements into initial activation object ignoring the with statement to follow SpiderMonkey
2002-12-23 15:01:53 +00:00
igor%mir2.org 453a0563cf Mostly cosmetics: use consistent naming for new API for function object initialization. 2002-12-23 14:56:58 +00:00
igor%mir2.org 508aa98e62 Eliminate double creation of Function objects representing nested functions in scripts/functions and use ScriptRutime.putFunction to bind function objects with activation scope. 2002-12-22 22:39:10 +00:00
igor%mir2.org 13ec8a642c Use Context.enter() try { } finally { Context.exit() } instead of try { Context.enter() } finally { Context.exit() } as Context.exit should only be called if Context.enter() returns successfully. 2002-12-22 19:12:50 +00:00
igor%mir2.org 0815885549 Move code to put functions as properties of activation object to ScriptRuntime.putFunction so it can reused by optimizer. 2002-12-22 19:08:52 +00:00
igor%mir2.org dc573f11eb Do not put "anonymous" into BaseFunction.functionName for functions created via new Function. Instead NativeFunction.getFunctionName() returns "anonymous" for function name for such functions which allows to assume that BaseFunction.functionName always holds real name. 2002-12-22 19:06:26 +00:00
igor%mir2.org f0e7977473 I replaced exception handlers for InstantiationException and friends during Class/Constructor.newInstance calls to construct NativeFunction/NativeScript instances via single catch (Exception ex) as the handlers rethrow exceptions as RuntimeException in any case. As it reduces OptRuntime.newOptFunction to few lines, its single usage in Codegen is inlined. 2002-12-22 02:51:16 +00:00
igor%mir2.org 89e660e85e I removed constants denoting _QUICK bytecodes as valid bytecode can not contain them. To catch possible bugs with passing invalid opcode I also replaced extra, opcodeCount and stackChange arrays by functions with switch statements that throws IllegalArgumentException on bad opcode. It also has an advantage of reducing class file size due to lack of support in JVM for efficient array initialization. 2002-12-22 02:42:40 +00:00
igor%mir2.org ac9e2f79e3 I removed dependency of Parser.decompile on NativeFunction. Now Parser.decompile takes as argument a tree structure describing encoded source for script or function and their nested functions. In case of interpreter the tree is built from interpreter runtime data while the optimizer puts a static function to construct tree into the class file representing compiled script or function. This function is called via reflection.
The change removes the need to have instances of NativeFunction representing nested functions constructed before they are needed as a part of script execution.
2002-12-21 12:43:55 +00:00
brendan%mozilla.org e0e5f44e58 Fixed so overriding Function.prototype.toSource doesn't mess up F.p.toString output, which should decompile the function, including nested function expressions (178389, r=shaver). 2002-12-21 02:14:53 +00:00
igor%mir2.org 3cf3b9f6e4 I removed code to add EmptyArray field to generated field in Codegen.generateInit as it was redundant to ScriptRuntime.emptyArgs 2002-12-20 16:14:51 +00:00
igor%mir2.org 56e0e5ae51 In Codegen.visitFunction I replaced code generating call to createFunctionObject that would use reflection to instantiate function object by a direct calling of function constructor and a separated call to function initialization in OptRuntime.setupFunction. 2002-12-20 12:21:35 +00:00
igor%mir2.org ecb7dc469e I removed debug_level and debug_srcName fields as they are never used. 2002-12-20 12:12:41 +00:00
igor%mir2.org da6403bcf0 I moved optimizer related code to initialize a function from ScriptRuntime to optimizer/OptRuntime and replaced common code to initialize function prototype and scope in few places by ScriptRuntime.initFunction 2002-12-19 19:48:55 +00:00