Commit Graph

4826 Commits

Author SHA1 Message Date
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