3933 Commits

Author SHA1 Message Date
rginda%netscape.com
48eb12277f - not built -
remove java references, add jsd_xpc.cpp note, explain jsdb.


git-svn-id: svn://10.0.0.236/trunk@104254 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-30 08:52:04 +00:00
rginda%netscape.com
7d5c7774c2 move REQUIRES line above include config.mak, to fix bustage
git-svn-id: svn://10.0.0.236/trunk@104252 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-30 07:10:21 +00:00
rginda%netscape.com
97747926e4 fixing REQUIRES bustage
git-svn-id: svn://10.0.0.236/trunk@104250 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-30 06:28:38 +00:00
brendan%mozilla.org
2f43b8afc7 Check in patch for bug 94580, thanks to Bernard Alleysson <balleysson@bigfoot.com> for researching and writing it (r=me, sr=shaver).
git-svn-id: svn://10.0.0.236/trunk@104229 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-29 21:30:26 +00:00
nboyd%atg.com
e8be7137ca Patch from Igor:
As profiler data show, the execution time of the nextNode and replaceCurrent
methods in PreorderNodeIterator contribute quite significantly to the total
time to run Context.compileReader.

replaceCurrent is slow because it calls Node.replaceChild which have to
iterate through all previous siblings to find the nearest to the current.
But it is easy to avoid this search by caching the previous sibling of the
current while iterating over the node tree in nextNode.

nextNode slowness is attributed to the usage of java.lang.Stack which is
expensive due to its synchronized methods. In the attched patch I replaced
it by the explicit array management.

It allows to cut Context.compileReader time by 5%-30% when processing
20K-3MB sources assembled form JS files in the test suite.


git-svn-id: svn://10.0.0.236/trunk@104228 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-29 20:55:36 +00:00
nboyd%atg.com
a7f3b38f8f More javadoc
git-svn-id: svn://10.0.0.236/trunk@104227 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-29 20:55:03 +00:00
nboyd%atg.com
1fa382f3bb Move serialization classes to separate package.
git-svn-id: svn://10.0.0.236/trunk@104226 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-29 20:54:08 +00:00
nboyd%atg.com
3a21e84698 Move serialization classes to new package.
git-svn-id: svn://10.0.0.236/trunk@104225 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-29 20:50:59 +00:00
nboyd%atg.com
30f9aac1cb Move serialization files to separate package.
git-svn-id: svn://10.0.0.236/trunk@104224 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-29 20:50:18 +00:00
jaggernaut%netscape.com
51e0dc7a6c Bug 100476: Convert uses of member functions ToNewUnicode, ToNewCString and ToNewUTF8String to their global versions and remove support from nsCString and nsString. r=dbaron, rs=scc
git-svn-id: svn://10.0.0.236/trunk@104212 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-29 08:28:41 +00:00
bryner%netscape.com
cd62b14ed9 Fixing xpctools build on win32. r=cls.
git-svn-id: svn://10.0.0.236/trunk@104210 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-29 06:24:41 +00:00
dbradley%netscape.com
48879a26b5 Items moved to bugzilla or have already been addressed
git-svn-id: svn://10.0.0.236/trunk@104173 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-29 00:13:34 +00:00
dbradley%netscape.com
c66456bb8f Bug 97967 - leak of nsLocalFile on failure. Patch by dbaron, r=dbradley, sr=jband
git-svn-id: svn://10.0.0.236/trunk@104135 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 21:49:00 +00:00
gerv%gerv.net
13afb6d0f9 Relicensing Round 1, Take 2. Most C-like NPL files -> NPL/GPL/LGPL. Bug 98089.
git-svn-id: svn://10.0.0.236/trunk@104119 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 20:14:13 +00:00
pschwartau%netscape.com
b1f2be029f Initial add. Regression test for bug 101964.
git-svn-id: svn://10.0.0.236/trunk@104086 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 04:50:52 +00:00
nboyd%atg.com
df4f20ed0a Remove obsolete comment about serialization.
git-svn-id: svn://10.0.0.236/trunk@103945 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 15:14:24 +00:00
nboyd%atg.com
a0e5534fcf Add new serialization API classes.
git-svn-id: svn://10.0.0.236/trunk@103944 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 14:59:59 +00:00
shaver%mozilla.org
4b9d50f0ba Bug 94506: parameter named "arguments" is not accessible in JavaScript method.
Now we check for the magic "arguments" name after var-and-arg slot
optimizations. r=rogerl, sr=brendan


git-svn-id: svn://10.0.0.236/trunk@103943 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 14:52:14 +00:00
nboyd%atg.com
e2b9cf8160 Add docs for serialization.
git-svn-id: svn://10.0.0.236/trunk@103942 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 14:51:20 +00:00
nboyd%atg.com
5ead7f3139 Remove obsolete files (perhaps re-added by mistake?)
git-svn-id: svn://10.0.0.236/trunk@103941 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 12:59:30 +00:00
nboyd%atg.com
b2b147ed4a Patches from Igor:
Note form omj/Parser.java:

* OPT source info collection is a potential performance bottleneck;
* Source wraps a java.lang.StringBuffer, which is synchronized.  It
* might be faster to implement Source with its own char buffer and
* toString method.

It is indeed a bottleneck under JDK 1.1. When I replaced StringBuffer
by a char array (see the attached patch), execution time of
Context.compileReader decreased by 15%: to test I combined a few test
cases to get a 3MB JS source and then measured time to process it by
Context.compileReader in the interpreter mode.

Under JDK 1.3 the difference is less then 1%, but still using the explicit
string buffer saves memory. When converting StringBuffer to String Sun JDK
shares the internal char array in StringBuffer with new String, but in the
Parser case typically the capacity of this buffer is bigger then the actual
string length, so this unused space in source strings is wasted in the
interpreter mode that keeps these strings in InterpreterData.

Regards, Igor

========
I implemented that member expression as function name syntactic sugar to
support scripts using this MS extension. This is only available when
Context.hasFeature(Context.FEATURE_MEMBER_EXPR_AS_FUNCTION_NAME)
returns true to allow the deviation from the standard only when required.

The patch effectively transforms 'function <memberExpr>(...)...' to
'<memberExpr> = function(...)...' when <memberExpr> is not simple
identifier. I am not sure that MS implementation does exactly this
but hopefully it is sufficiently general to cover MS cases.

(The patch assumes that source_change.patch is already applied)

Regards, Igor


git-svn-id: svn://10.0.0.236/trunk@103940 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 12:51:42 +00:00
nboyd%atg.com
bcf0073005 Patch from Igor:
I implemented that member expression as function name syntactic sugar to support
scripts using this MS extension. This is only available when
Context.hasFeature(Context.FEATURE_MEMBER_EXPR_AS_FUNCTION_NAME)
returns true to allow the deviation from the standard only when required.

The patch effectively transforms 'function <memberExpr>(...)...' to
'<memberExpr> = function(...)...' when <memberExpr> is not simple identifier.
I am not sure that MS implementation does exactly this but hopefully it is
sufficiently general to cover MS cases.

(The patch assumes that source_change.patch is already applied)

Regards, Igor


git-svn-id: svn://10.0.0.236/trunk@103939 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 12:50:14 +00:00
brendan%mozilla.org
81ba8bd9b7 Don't report uncaught exceptions unless returning to native code (97646, r=jband, sr=shaver).
git-svn-id: svn://10.0.0.236/trunk@103924 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 05:04:45 +00:00
nboyd%atg.com
10c183d386 Add support for serialization and deserialization.
git-svn-id: svn://10.0.0.236/trunk@103916 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 02:33:51 +00:00
dbradley%netscape.com
852b750761 Bug 94859 silence compiler warning about unused variable r=rginda, sr=jband
git-svn-id: svn://10.0.0.236/trunk@103806 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 04:11:54 +00:00
pschwartau%netscape.com
ea654dfd73 Adding comments from contributor.
git-svn-id: svn://10.0.0.236/trunk@103787 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 01:15:14 +00:00
pschwartau%netscape.com
1036074531 Correcting some typos.
git-svn-id: svn://10.0.0.236/trunk@103780 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 00:58:35 +00:00
pschwartau%netscape.com
0a5a3fe028 Initial add. Regression test for bug 101488.
git-svn-id: svn://10.0.0.236/trunk@103773 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-26 00:32:11 +00:00
nboyd%atg.com
40a7e95769 Patch from Igor:
Currently omj/TokenStream and omj/optimizer/Optimizer.java both contain
code to convert number value to a wrapper object of smallest size. The
attached patch moves this wrapping to Node constructor to avoid code
duplication and eliminate special treatment of exact integers in
Optimizer.java.


The constant folding code in omj/optimizer/Optimizer.java currently always
replaces x * 1, x - 0 by simply x which does not force the toNumber convertion,
which is visible, for example, via typeof. For example, when running at
optimization level 2, the following

function f() {
    return "0" * 1;
}

print(typeof(f()));

prints "string" instead of expected "number".

The const_fold.patch fixes this via replacing x*1 by (+x) to force number convertion.

It assumes that the patch with number wrapping changes is in place.


git-svn-id: svn://10.0.0.236/trunk@103716 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-25 14:09:22 +00:00
nboyd%atg.com
f4a7b928b8 Currently omj/TokenStream and omj/optimizer/Optimizer.java both contain code to
convert number value to a wrapper object of smallest size. The attached patch
moves this wrapping to Node constructor to avoid code duplication and eliminate
special treatment of exact integers in Optimizer.java.


git-svn-id: svn://10.0.0.236/trunk@103715 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-25 14:08:08 +00:00
brendan%mozilla.org
d5ee6f816f Report uncaught exceptions from all JS_Compile* APIs (97646, sr=jband&shaver).
git-svn-id: svn://10.0.0.236/trunk@103707 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-25 06:43:33 +00:00
dbradley%netscape.com
203b5a336d patch from bug 99838 - Changes to remove xpconnects dependency on DOM r=jband, sr=jst
git-svn-id: svn://10.0.0.236/trunk@103654 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-24 22:57:47 +00:00
dbradley%netscape.com
df570f5b2c added files: mozilla/js/src/xpconnect/idl/nsIXPCScriptNotify.idl
git-svn-id: svn://10.0.0.236/trunk@103651 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-24 22:53:00 +00:00
dbradley%netscape.com
3223174017 patch from bug 99838 - Changes to remove xpconnects dependency on DOM r=jband, sr=jst
git-svn-id: svn://10.0.0.236/trunk@103649 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-24 22:48:35 +00:00
nboyd%atg.com
facb322141 Remove obsolete class.
git-svn-id: svn://10.0.0.236/trunk@103591 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-23 20:01:43 +00:00
nboyd%atg.com
b38ceec6e9 Fix bug:
Hello Norris

The script should return 0, Rhino returns NaN

Steven

<script>
var trial = parseInt("0)");
alert(trial);
</script>


git-svn-id: svn://10.0.0.236/trunk@103590 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-23 20:01:31 +00:00
nboyd%atg.com
81ac2e3232 Patch from Igor:
Currently omj/optimizer/Codegen.java uses special classes ConstantList
and ConstantDude to store the list of static constants in the generated
class. It seems that using a simple double[] array with a constant
counter and checking via "(int)number == number" for constant types not
only eliminates these 2 classes but makes the whole code simple, see
the attached patch.

The patch also modifies nodeIsConvertToObjectOfNumber to return not a
Number, but the number node itself that is used to extract double
value directly via Node.getDouble() call. I changed it to allow  to
store values of number literals in nodes without using wrapper object.


git-svn-id: svn://10.0.0.236/trunk@103589 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-23 20:00:26 +00:00
nboyd%atg.com
42097520f6 Patch from Igor:
Replacing usage of ShallowNodeIterator to loop throw node children by
explicit calls to Node.getFirstChild()/ Node.getNextSibling()) with
comments when the node children list is modified while iterating
through it.

It avoids creation of ShallowNodeIterator objects and eliminates the
need to have ShallowNodeIterator class.


git-svn-id: svn://10.0.0.236/trunk@103588 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-23 19:58:38 +00:00
cls%seawood.org
2ac62745b5 Use default EXPORTS rules instead of installing headers by hand.
Bug #98371 sr=alecf


git-svn-id: svn://10.0.0.236/trunk@103567 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-23 03:34:32 +00:00
jband%netscape.com
7e37012cad I'm tired of this warning: '*/' found outside of comment. This was much discussed. But no one ever bothered to actually check in the trivial fix. r=rginda rs=jband.
git-svn-id: svn://10.0.0.236/trunk@103556 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-22 17:42:36 +00:00
rginda%netscape.com
22a97b8a46 - venkman only -
bug 100943, changes needed to build jsd on os/2
patch by Dainis Jonitis, r=mkaply,rginda


git-svn-id: svn://10.0.0.236/trunk@103530 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-22 01:39:24 +00:00
pschwartau%netscape.com
9fd36cca92 Make formatArray() work in Rhino. Improve getState() by checking for more whitespace characters.
git-svn-id: svn://10.0.0.236/trunk@103488 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 22:44:46 +00:00
timeless%mac.com
bab5dc4c87 Bug 100873 JS Hard Codes JS_HAVE_LONG_LONG to the detriment of FreeBSD
r=cls sr=shaver


git-svn-id: svn://10.0.0.236/trunk@103448 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 14:09:54 +00:00
jband%netscape.com
f20e03b41b fix bug 100222. Fix crash by only releasing other objects in xpcwrappedjs dtor if xpconnect has not yet shutdown. r=dbradley sr=jst.
git-svn-id: svn://10.0.0.236/trunk@103247 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 00:51:38 +00:00
gerv%gerv.net
ae1d5501a1 Oops.
git-svn-id: svn://10.0.0.236/trunk@103236 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 00:02:59 +00:00
scc%mozilla.org
2281a4d137 bug #98089: ripped new license
git-svn-id: svn://10.0.0.236/trunk@103230 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 22:39:41 +00:00
nboyd%atg.com
aa2c5f6644 Patch from Igor:
Currently Rhino source has quite a few places with code like (String)node.getDatum()
 or ((Number)node.getDatum()).doubleValue(). The patch changes this usage to call
node.getString() or node.getDouble().

It also adds new constructors to Node to accept int or double values in addition to
Object datum to replace new Node(token, new Integer(x)) by Node(token, x) etc. It
may allow in future not to create a wrapper object for int or double datum to speed
up parsing.


git-svn-id: svn://10.0.0.236/trunk@103201 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 17:01:46 +00:00
jband%netscape.com
09fde32fce fix bug 100260. xpconnect should not hold a weak reference to a classinfo object after the xpcwrappednativeproto that was holding a strong ref is destroyed. sr=jst, r=dbradley,markh.
git-svn-id: svn://10.0.0.236/trunk@103184 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 06:22:17 +00:00
rogerl%netscape.com
a01fa23e32 Fix bug #98306, ParseAtom crash for "/[/]/" r=jst, r/sr=be.
git-svn-id: svn://10.0.0.236/trunk@103121 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 22:36:14 +00:00
jaggernaut%netscape.com
8a87c13848 One module per line for REQUIRES. r=/sr=alecf
git-svn-id: svn://10.0.0.236/trunk@103116 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 22:01:13 +00:00