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

4486 Коммитов

Автор SHA1 Сообщение Дата
igor%mir2.org d8b73f2048 Tab removal 2002-04-26 23:14:50 +00:00
rginda%netscape.com 6d9b0eac20 - venkman only -
bug 139883, "ErrorHookProc can be tricked into thinking it never finished running", r=peterv
fixes bad early return in jsds_ErrorHookProc
test for correct max params (12, not 8) in CreatePPLineMap
use nsnull instead of 0 for null pointer return value
2002-04-26 20:57:35 +00:00
igor%mir2.org e497d2b898 I changed VariableTable to store arbitrary Object as variable data to avoid allocation of LocalVariable in the interpreter mode as in this case only the variable name is used and it can be stored directly. It allows to remove omj.LocalVariable and omj.optimizer.OptVariableTable for the cost of having omc.JavaVariable which omj.optimizer.OptLocalVariable implement to pass to omc.ClassFileWriter debug information about the variable. 2002-04-26 08:01:29 +00:00
jband%netscape.com 8c580862e8 fix bug 139243. Remove reference count based rooting of JS objects of wrapped natives and replace it with GC-time marking. This is a pretty good DOM performance win. r=dbradley sr=jst. 2002-04-26 06:08:35 +00:00
brendan%mozilla.org d4e55c2951 Purge the deflated string cache entry, if any, before finalizing external strings (140070, r=jband, sr=shaver). 2002-04-25 22:55:03 +00:00
khanson%netscape.com dd8c0773df Reverse of Patch 66477 for bug #121744. Bug #131348, r=shaver, sr=brendan. 2002-04-25 20:33:33 +00:00
igor%mir2.org 4de1175e71 Links update 2002-04-25 06:46:47 +00:00
khanson%netscape.com d817cc069a fixes memory leak in jsdtoa.c bug 138666, sr=brendan, r=khanson 2002-04-24 23:36:48 +00:00
igor%mir2.org 0877a53dd0 I replaced Vector by ObjArray when it was used from the single thread and similarly replaced Hashatble by ObjToIntMap when it was used from the single thread to mark keys presence ignoring values. It avoids unnecessary synchronization and save memory. To simplify the replacement I added to ObjArray and ObjToIntMap few utility methods. 2002-04-24 21:37:36 +00:00
igor%mir2.org 45b366e32d Initial version 2002-04-24 07:44:52 +00:00
igor%mir2.org 10cadaaf81 Serialization change: implement only Serializable with custom readObject/writeObject instead of Externalizable not to invent own versioning support. 2002-04-23 22:39:25 +00:00
igor%mir2.org fe448dc961 Updating the debugger to reflect changes in Rhino debug API. 2002-04-22 20:47:51 +00:00
igor%mir2.org 1d93746ffc Debugger interface changes:
1. Replacing omj.debug.Debugger.enterFrame() by omj.debug.Debugger.getFrame() and omj.debug.DebugFrame.onEnter() to allow to return null from omj.debug.Debugger.getFrame to enable full optimization with debugger set if it is not interested in monitoring a particular frame

2. Changing type for the source argument in omj.debug.Debugger.handleCompilationDone from StringBuffer to String as Debugger instances should not be able to modify source even by chance.
2002-04-22 20:46:43 +00:00
nboyd%atg.com d3bdf13043 Implement support for new Package(<classLoader>) 2002-04-21 01:50:43 +00:00
igor%mir2.org da6a3546f0 Removing one more time creating of bogus activation for InterpretedScript added with the previous change 2002-04-19 20:58:03 +00:00
igor%mir2.org 394848a46d Making interpreter bytecode independent from Context.isGeneratingDebug so debugger can handle scripts compiled without Context.isGeneratingDebug: if itsNeedsActivation is false with debugger present, Interpreter.interpret creates activation scope and check in variable queries/assignments if they should be made against activation object and not stack[VAR_SHIFT+...] array. 2002-04-19 07:19:07 +00:00
seawood%netscape.com 97531eb92c Add make -j support to win32 gmake builds.
Bug #132848 r=bryner
2002-04-19 02:42:28 +00:00
igor%mir2.org 794d568298 Fixing bug 137181 so after delete arguments[i], arguments[i] and corresponding function parameter in activation are not shared:
The patch uses the special NOT_FOUND value to flag deleted indexes. It also
make sure that original array object passed to Function.call is not modified,
as all changes goes to cloned copy. It is not necessary for the fix, but it is
the only place in the current Rhino that can alter Object[] array passed to
Function.call and I think it is better to remove this exceptional case.
2002-04-16 07:28:40 +00:00
igor%mir2.org ab6d7edc2f In setAttributes(int,...) mask out unused attributes bits in the same as setAttributes(String,...) does 2002-04-16 07:24:50 +00:00
igor%mir2.org 65e2a91173 Replace VariableTable.getVariable(name) != null by VariableTable.hasVariable(name) and use ObjToIntMap in place of Hashtable 2002-04-14 21:32:19 +00:00
igor%mir2.org b85e4660f0 Make all fields in VariableTable private and use access API to get them in optimizer/OptVariableTable to allow to change VariableTable implementation without changing its usage 2002-04-14 21:29:35 +00:00
pschwartau%netscape.com c6332db1ed Initial add. Regression test for bug 137181. 2002-04-12 21:06:15 +00:00
pschwartau%netscape.com d10245bf7e Updating status messages to the current format. 2002-04-12 20:23:33 +00:00
igor%mir2.org f5de7691ed As Christopher Oliver <coliver@mminternet.com> pointed out, in many execution paths calls to Scriptable.put follows corresponding Scriptable.has with the same name/id, and although the put method implementations in ScriptableObject and IdScriptable use cache for a previously accessed name to avoid expensive name lookups, the corresponding has implementation do use the cache.
These changes add the cache optimization to the has methods and remove cache update from the put methods under the assumption that newly assigned properties would not be used immediately.
2002-04-11 21:59:45 +00:00
igor%mir2.org 050ea5f4cf As the scope parameter for the bind and getBase methods should never be null, make sure they trigger NullPointerException on "scope == null" to detect bad API usage earlier. 2002-04-11 21:36:31 +00:00
pschwartau%netscape.com 621ae10832 Adding an early return for Rhino; we only want to run this test in SpiderMonkey for now. 2002-04-11 16:11:53 +00:00
nboyd%atg.com 69e288aec4 Fix for following problem:
hi Norris,

in our product, which makes heavy use of Rhino, we have many Java Objects
we wrap with ECMAScript wrappers, which extend the ScriptableObject class
and implement the Wrapper interface. Those wrappers automagically wrap the
native Java object with the help of a WrapHandler implementation.

we now ran into a problem :

we have a java class with two overloaded static methods like this :
     public class Test {
         public static String create(File f) {}
         public static String create(Custom c) {}
     }

The Custom class exists as a native Java implementation like
     public class Custom {}

and a accompanying ECMAScript wrapper like
     public class CustomWrapper
        extends ScriptableObject
        implements Wrapper {}

in our ECMAScripts we make the wrapper class known as a host object along
the lines of
     defineClass("CustomWrapper");
and can then use the object as a normal ECMAScript host object. no big deal
and working great.

but : the code
     var s = Test.creat( new Custom( "xyz") );
fails with the information, that the methods are ambiguous, which of course
they are not.

Looking at the code of NativeJavaMethod.findFunction() and the helpers in
NativeJavaObject it seems, that the fact of the Custom host object being a
Wrapper is not taken into account. in an easy fix of
NativeJavaMethod.findFunction(), i simply replace all arguments, which are
Wrapper imlpementation by the wrapped object. this solves my problem, but
of course i'm not sure on side effects.

i attach the testcase as well as the fixed NativeJavaMethod class in the
jar file. to run the test with and without the fix, extract the jar and do
     ant test

please let me know, what you think of this.

regards and thanks, f.

Felix Meschberger
2002-04-11 12:56:24 +00:00
nboyd%atg.com 887959238b Use hasProperty rather than getProperty to avoid creation of lazily evaluated properties. 2002-04-11 12:54:16 +00:00
igor%mir2.org f689d29f4a Move code to finalize activation setup from ScriptRuntime to NativeCall not to depend in ScriptRuntime on internals of NativeCall 2002-04-11 09:15:44 +00:00
igor%mir2.org e555ebca97 Removal of "|| caller.originalArgs == null" in the get method as caller.originalArgs is always != null 2002-04-11 09:12:45 +00:00
pschwartau%netscape.com 774ab94e93 Adding an early return for SpiderMonkey; we only want to run this test in Rhino. 2002-04-10 22:52:26 +00:00
pschwartau%netscape.com 301e5af1d6 Improving comment. 2002-04-10 22:50:42 +00:00
pschwartau%netscape.com ce07e9f072 Improving Rhino detection by using the new inRhino() function in the utility file shell.js 2002-04-10 22:44:14 +00:00
pschwartau%netscape.com 23d222431f Adding a utility function to detect the Rhino shell. 2002-04-10 22:39:16 +00:00
pschwartau%netscape.com a2459dc77d Initial add. Regression test for bug 131348. 2002-04-10 22:18:32 +00:00
igor%mir2.org f296bcee63 Removal of unused maxInstanceId (I forgot to do it during 1.20 update) 2002-04-09 23:24:19 +00:00
igor%mir2.org 4c1b0e1195 Inherit from IdScriptable to save memory on hash table structures for callee, caller and length properties and speedup arguments initialization. 2002-04-09 21:00:54 +00:00
igor%mir2.org 6169deaa3c Do not alias UniqueTag.NULL_VALUE as IdScriptable.NULL_TAG and use it directly 2002-04-09 20:58:27 +00:00
igor%mir2.org b3d3b12044 Elimination of InterpreterData.idFunction as it duplicate InterpreterData.itsFunctionType != 0 2002-04-09 18:19:01 +00:00
igor%mir2.org 548e050b50 Use int instead of byte for type of FunctionNode.itsFunctionType to have less (byte) casts. 2002-04-09 18:16:48 +00:00
igor%mir2.org 5bb1c2ac17 In Interpreter.interpret move initialization of debug frame after the setup of nested functions so they are visible to debugger on debug frame creation 2002-04-08 21:52:10 +00:00
nboyd%atg.com a81c4b5ada Hi Norris,
I think there's a small problem with Igor's changes.  The modifed Interpreter.java
seems to create unnecessary activation objects for InterpretedScripts.  You can
see this in the debugger (local variables are present even for top level scripts).
I believe the attached change will fix the problem.

Regards,

Chris
2002-04-08 15:54:57 +00:00
igor%mir2.org ed22f7158e Proprty access cleanup: use ScriptableObject.get/set/hasProperty to get/set/query properties on the prototype chain in ScriptRuntime to avoid code duplication 2002-04-08 08:19:21 +00:00
igor%mir2.org 6bbac51c73 In NativeObject.toSource and NativeArray.toStringHelper methods set cx.iterating to null when done to prevent Hashtable with potentially ever growing internal buffers to lay around. Use ObjToIntMap instead of Hashtable for cx.iterating, it servers the same purpose as using JDK 1.2 HashSet, but without breaking 1.1 compatibility. 2002-04-08 08:15:23 +00:00
igor%mir2.org 760e4b4196 Clear jiles warning:
VariableModel.java:220:30:220:40: Caution: This try block cannot throw a "checked exception" (JLS section 14.7) that can be caught here. You may have intended to catch a RuntimeException instead of an Exception.
2002-04-06 17:33:33 +00:00
igor%mir2.org 3b5657f132 This was for the very old implementation. Nothing there is relevant now 2002-04-06 14:34:56 +00:00
igor%mir2.org 8975e9eb32 Uodate with info on Break on Function Enter/Exit options 2002-04-06 14:18:32 +00:00
igor%mir2.org c31e40fc89 From the email about debug API changes:
Changes to omj.tools.debugger are mostly due to renames and refactoring, the new code is limited to ContextData class which contains simplified version of the code for DebugFrame stack from the current DebuggableEngineImplementation and FrameHelper class implementing DebugFrame.
2002-04-06 13:57:24 +00:00
igor%mir2.org b3d321243c From the email about debug API changes:
...
The idea is to make Debugger responsible for creation of DebugFrame in
Interpreter.interpret which gives simple way for a Debugger implementation to
observe function enter/exit while completely removing the need to have code
for debug frame stack in the Rhino core as the Debugger implementation can
easily support this on its own when necessary. So I suggest to have:

public interface Debugger { ... }

and

public interface DebugFrame { ... }

which eliminates omj.InterpreterFrame and as DebuggableEngine shrinks down to
3 methods set/getDebugger and getDebuggerContextData, I simply moved them to
Context. The 3rd method is useful to refer to per Context debug data from a
Debugger implementation, but it can be removed as well as the same effect can
be achieved via Context.set/getThreadLocal.
2002-04-06 13:54:48 +00:00
igor%mir2.org a070528256 When re-throwing exception in Interpreter.interpret, always use original caught exception object, not exception it wraps as in the case of WrappedException instances 2002-04-06 05:58:23 +00:00
nboyd%atg.com ecd8a089b7 Makefiles no longer supported: use Ant. 2002-04-06 01:56:50 +00:00
bnesse%netscape.com 56adb62c30 Fix for smoketest blocker 135697. Bump up version on the compiler test to force JS to be compiled with opt level 2. a=leaf. 2002-04-05 19:06:29 +00:00
brendan%mozilla.org 3f8594ea0e Forgot to #ifdef JS_THREADSAFE last change (no effect on Mozilla build; fixes broken standalone/single-threaded JS builds, sanity-sr=shaver). 2002-04-04 18:02:59 +00:00
brendan%mozilla.org e424e842c6 Followup fix to synchronize with a nt-last-destroy-context racing GC when unpinning pinned atoms (133773, r=shaver, sr=jband, a=rjesup). 2002-04-03 20:38:39 +00:00
nboyd%atg.com dab3f9ac65 Added support for a DebuggableObject interface that can be implemented for
non-ScriptableObject implementations of Scriptable.

I checked in fixes for the problems of serializing objects with FunctionObjects or
GetterSlots. With Foo.class in the current directory, I can now do:

[rhino] java -classpath 'build/rhino1_5R4pre/js.jar;.' org.mozilla.javascript.tools.shell.Main
Rhino 1.5 release 4 0000 00 00 (in progress)
js> defineClass("Foo")
js> f = new Foo
[object Foo]
js> print(f.counter)
0
js> print(f.counter)
1
js> serialize(f, "f.ser")
js> quit()
[rhino] java -classpath 'build/rhino1_5R4pre/js.jar;.' org.mozilla.javascript.tools.shell.Main
Rhino 1.5 release 4 0000 00 00 (in progress)
js> f = deserialize("f.ser")
[object Foo]
js> f.counter
2
js> f.counter
3
2002-04-03 01:55:50 +00:00
nboyd%atg.com 8fc68d6900 Fixed problem with -opt 9:
Hi Norris,

I encountered the following exception with the below script in compiled
mode with RhinoLatest.zip:

java.lang.NullPointerException
 at
org.mozilla.javascript.optimizer.Codegen.visitCall(Codegen.java:1790)
 at
org.mozilla.javascript.optimizer.Codegen.generateCodeFromNode(Codegen.java:567)

 at
org.mozilla.javascript.optimizer.Codegen.visitReturn(Codegen.java:2283)
 at
org.mozilla.javascript.optimizer.Codegen.generateCodeFromNode(Codegen.java:592)

 at
org.mozilla.javascript.optimizer.Codegen.generateCodeFromNode(Codegen.java:546)

 at
org.mozilla.javascript.optimizer.Codegen.generateCodeFromNode(Codegen.java:546)

 at
org.mozilla.javascript.optimizer.Codegen.generateCodeFromNode(Codegen.java:546)

 at
org.mozilla.javascript.optimizer.Codegen.generateCode(Codegen.java:497)
 at
org.mozilla.javascript.optimizer.Codegen.generateFunctionInits(Codegen.java:1292)

 at
org.mozilla.javascript.optimizer.Codegen.generateInit(Codegen.java:1186)

 at
org.mozilla.javascript.optimizer.Codegen.generateCode(Codegen.java:481)
 at org.mozilla.javascript.optimizer.Codegen.compile(Codegen.java:88)
 at org.mozilla.javascript.Context.compile(Context.java:1965)
 at org.mozilla.javascript.Context.compile(Context.java:1874)
 at org.mozilla.javascript.Context.compileReader(Context.java:895)
 at org.mozilla.javascript.Context.evaluateReader(Context.java:813)
 at
org.mozilla.javascript.tools.shell.Main.evaluateReader(Main.java:318)
 at org.mozilla.javascript.tools.shell.Main.processFile(Main.java:309)
 at org.mozilla.javascript.tools.shell.Main.processSource(Main.java:248)

 at org.mozilla.javascript.tools.shell.Main.exec(Main.java:95)
 at org.mozilla.javascript.tools.shell.Main.main(Main.java:68)
Exception in thread "main"

function tak(x, y, z, k) {
    if (!(y < x)) {
        return k(z);
    } else {
        return tak(x - 1,
                   y,
                   z,
                   function(v1) {
            return tak(y - 1,
                       z,
                       x,
                       function(v2) {
                return tak(z - 1,
                           x,
                           y,
                           function(v3) {
                    return tak(v1, v2, v3, k);
                });
            });
        });
    }
}

function cpstak(x, y, z) {
    return tak(x, y, z, function(a) {return a;});
}

//;;; call: (cpstak 18 12 6)

//(run-benchmark "CPSTAK" (lambda () (cpstak 18 12 6)))

var start = new Date();
var res = cpstak(18, 12, 6);
var end = new Date();
print(res +": elapsed: " + (end - start));
2002-04-03 01:20:27 +00:00
beard%netscape.com 8f9516a234 Fixes an installer crash on pre-PCI PowerMacs, bug # 125411. sr=sfraser, r=sdagley, a=asa 2002-04-02 23:27:55 +00:00
colin%theblakes.com 9b779d9dd5 Do not define MODULE_NAME for components which are shareable even in
static builds.
b=134650 r=cls sr=dveditz a=asa
2002-04-02 13:36:56 +00:00
seawood%netscape.com 090c63d423 More cruft removal. Remove platform.h xp_debug.h xpassert.h & xp_trace.h from the build.
Replace currently unused references to XP_ASSERT with one of NS_ASSERTION & friends.
Bug #38061 r=bryner sr=alecf a=tor/drivers a=putterman/adt
2002-04-02 07:57:02 +00:00
brendan%mozilla.org 0555817eef Fix next-to-last vs. last context GC race, plus ClaimScope vs. js_DestroyContext race; removed js_ForceGC from the FRIEND JS API (133773, sr=jband&shaver, a=asa). 2002-04-02 04:23:21 +00:00
nboyd%atg.com 750bfdb52c Patch from Chris Oliver:
Hi Norris,

Can you check in the attached Main.java which works around a problem with using
JTreeTable in JDK 1.4.

Thanks,

Chris
2002-04-01 22:12:11 +00:00
seawood%netscape.com 2d941f53cc Do not set EXPORT_LIBRARY for libs that we do _not_ want in the static link list.
Bug #134012 r=rjesup sr=dveditz a=leaf
2002-03-30 01:46:52 +00:00
pschwartau%netscape.com 70dfff7f09 Correcting mistake in location of JS2 debug shell on Windows. 2002-03-30 00:35:16 +00:00
pschwartau%netscape.com 66b70399fe Added another big function to compile, from duplicate bug 133897. 2002-03-29 15:46:09 +00:00
sfraser%netscape.com 85b2719aac Bug 133412: Changes to allow for upgrading to CodeWarrior Pro 7.2 tools -- depending on the tools version, remove the clamp on the optimization level, since the optimizer bug is fixed. r=sdagley, sr=scc, a=asa 2002-03-27 04:10:46 +00:00
nboyd%atg.com b9766e8169 Changes from Christopher Oliver:
Hi Norris,

Would you mind checking in the attached changes to the debugger. The
attached files include the following changes:

1) Use ScriptableObject.getAllIds to obtain an object's properties (if
the object extends ScriptableObject).  This makes non-enumerable
properties visible in the debugger for ScriptableObject's.
2) Made the coding style more consistent with the rest of Rhino.
3) Better support for displaying and stepping through eval-ed code.

As Igor suggested to me once, it might be a good idea to define a new
interface to similarly support debugging host objects that don't extend
ScriptableObject, something like the following:

public interface Debuggable extends Scriptable {
    public Object[] getAllIds();
}

The debugger could check for this interface and if a host object chose
to implement it, the debugger would be able to display its
non-enumerable properties.

Chris
2002-03-26 23:02:43 +00:00
cathleen%netscape.com 99fa3efa4e fix linux static build installer. bug 128507, bug 130995, bug 130998 r=seawood sr=dveditz a=asa (verbal) 2002-03-26 00:53:30 +00:00
pschwartau%netscape.com 3460c97c56 Removing an extraneous line. 2002-03-25 23:51:06 +00:00
pschwartau%netscape.com 10ade298db Initial add. Regression test for bug 130451. 2002-03-25 23:41:56 +00:00
pschwartau%netscape.com b150cad06d Adding a tail recursion test by Georgi Guninski 2002-03-25 00:25:45 +00:00
nboyd%atg.com 4b432d7521 Add missing support for multiple -implements classes 2002-03-24 22:37:57 +00:00
dbaron%fas.harvard.edu 6cdcd7ef3a Convert users of nsAReadable[C]String and nsAWritable[C]String typedefs to [const] nsA[C]String. b=131899 r=scc sr=jag a=asa 2002-03-24 00:16:18 +00:00
igor%mir2.org 5024940d53 In Interpreter.interpret THROW/JTHROW switch cases do not use result variable to hold temporary values to throw, use locally declared "Object exception" for that as result should only be used for value of Interpreter.interpret 2002-03-23 20:51:05 +00:00
brendan%mozilla.org ac2c08044b Fix JSOP_DEFFUN to define functions in global code permanently, and not permanently in eval code (131964, r=khanson, sr=shaver, a=scc). 2002-03-23 17:34:24 +00:00
brendan%mozilla.org 74c88d8460 Cope with OOM creating rt->atomState.table (131246, r=scole@planetweb.com, sr=jband, a=scc, thanks to scole for finding these OOM recovery bugs). 2002-03-23 07:38:08 +00:00
pschwartau%netscape.com 8260547943 Fixing a typo. 2002-03-23 01:50:16 +00:00
khanson%netscape.com 51645833cc patch #75132 changes for bug#132230 (str_unescape and js_str_escape in jsstr.c ignore OOM errors) Written by Steven Cole, sr=bendan, r=khanson, a=asa. Handles an out of memory conditions more gracefully. 2002-03-22 21:24:46 +00:00
pschwartau%netscape.com 4cf8850876 Updating JS_GetImplementationVersion() to date of latest JS release (67111). 2002-03-22 20:43:47 +00:00
jband%netscape.com 6ce09c1621 fix bug 132713. Use the iid for nsIException to detect exceptions rather than nsIXPCException. This allows for better error reporting of natively implemented exceptions. r=dbradley sr=jst a=scc. 2002-03-22 19:14:57 +00:00
igor%mir2.org b47432fc67 Merge tryStack with sDbl, changing layout of stack arrays in Interpreter.interpret to variables|temporaries|try stack|stack and add itsMaxVars and itsMaxFrameArray to InterpreterData to simplify stack arrays setup and make possible implementation of stack reuse simple. 2002-03-22 18:51:33 +00:00
dougt%netscape.com 40642fc34c 130405. Makes the xpcom glue library usable. Updates XPCOM Samples. Adds requires lines to a few implict string/category consumers sr=alecf, sr=brendan@mozilla.org a=asa@mozilla.org 2002-03-21 23:43:21 +00:00
jband%netscape.com 16d78379aa fix bug 125084. Add support for empty arrays in nsIVariant. This is expressed as atype id rather than as a regular array with no elements. Includes changes to xpconnect to support mapping to empty JSArrays, xpconnect tests, and SOAP. Patches are from jcorwin@us.ibm.com and rayw@netscape.com. r=jband sr=brendan a=asa 2002-03-21 23:21:54 +00:00
nboyd%atg.com 6b14bb8383 Fix eval code cases on 132217 2002-03-21 17:26:55 +00:00
brendan%mozilla.org c2ee1d2afb Fix js_FinalizeStringRT so it doesn't depend on a dependent string's base, which may already be finalized (132088, r=scole, sr=shaver, a=asa). 2002-03-21 09:06:00 +00:00
nboyd%atg.com 7f70eb708f Fix bug 132217. 2002-03-21 01:44:54 +00:00
igor%mir2.org 052726b68e From my email:
I think recent Christopher suggestions about tail call elimination is worth
to consider, as it would allow to cut invocation cost of script functions
quite nicely in many cases. Plus I am thinking of not creating Object[] array
to pass arguments to callee if it is another interpreted function as it can
directly access the caller stack. But first I decided to make some
preparation work to simplify an implementation of these features later. The
attached patch includes:

1. Moving all code to setup scope from
InterpretedFunction.call/InterpretedFunction.call to Interpreter.interpret so
the call method simply calls Interpreter.interpret. It would make tail call
elimination code much simple. I also hope this simplifies changes Christopher
needs for the continuations support (but I have strong reservation about
possibility to implement it corectly).

2. Moving all declaration of temporary variables used only during processing
of the single ICODE to the case blocks.

3. Interpreter loop termination only in RETURN icodes, not when pc exceeds
icode size, so there is no need to check for this condition on each icode.
(Scripts are handled via the special END_ICODE token).
2002-03-20 20:00:32 +00:00
pschwartau%netscape.com ca2670e317 Fixing a blunder in Section 4, and changing from brackets to braces for ECMA attribute. 2002-03-20 19:24:08 +00:00
pschwartau%netscape.com 096af14c9a Deleted an extraneous line; improved readablity. 2002-03-20 19:13:36 +00:00
khanson%netscape.com 5bf172e81d Patch 74900 for bug #131817 (OOM in AllocSrcNote causes crash in js_NewSrcNote). The patch was contributed by Steven Cole (scole@planetweb.com), sr=brendan, r=khanson, a=scc 2002-03-20 05:45:12 +00:00
brendan%mozilla.org 94a74d7db5 Defend against early OOM when finishing JSDHashTables (131815, r=scole, sr=jband, a=asa). 2002-03-20 02:22:50 +00:00
pschwartau%netscape.com 9845964018 Initial add. Regression test for bug 131964. 2002-03-20 00:23:22 +00:00
brendan%mozilla.org a0f36bedac Fix ChangeScopeTable gross dimensioning bug (131904, r=scole&khanson, sr=jband, a=asa). 2002-03-19 23:25:17 +00:00
brendan%mozilla.org cdad9798f3 Fix 'var arguments;' in a function by specializing to JSOP_ARGUMENTS properly (131510, r=khanson, sr=jband, a=asa). 2002-03-19 22:51:48 +00:00
timeless%mac.com dec943eb10 Bug 106386 rid source of misspellings
r=db48x sr=blake a=asa
2002-03-19 04:30:17 +00:00
igor%mir2.org f3b1270e05 IdScriptable.maxInstanceId/IdScriptable.activateIdMap is replaced by getMaxId/setMaxId to have more flexible and simple id map initialization. 2002-03-18 01:26:01 +00:00
igor%mir2.org 94f37d49ae Code to setup/restore security domain is moved to single place in Interpreter.interpret to make checking for correctness easy. 2002-03-17 20:10:31 +00:00
igor%mir2.org fcad2bdee8 cosmetics: change layout of Interpreter.interpret main switch from
switch (...)
    case LABEL:
        code
to
switch (...)
case LABEL:
    code

to has less problems with fitting to 80-character lines
2002-03-17 18:40:11 +00:00
brendan%mozilla.org 0c6a6e0115 Forgot to check this in yesterday: fix all engine-defined getters and setters to have no slot [to be JSPROP_SHARED] (130970, r/sr=shaver&jband, a=asa). 2002-03-17 11:01:34 +00:00
pschwartau%netscape.com 0b1e425b90 Initial add. Regression test for bug 131510. 2002-03-17 05:24:01 +00:00
igor%mir2.org 712ea8149c Activate support for getting token names if debugging interpreter icode, not only when debugging parsing trees. Not to depend in TokenStream on Interpreter, printICode debug flag is moved to Context, as with printTrees definition.
Fixing debug printing of icode which are not defined in TokenStream
2002-03-17 03:34:43 +00:00
igor%mir2.org d262e89e9f Added .cvsignore to ignore generated sources 2002-03-16 23:34:23 +00:00
igor%mir2.org 42891fc50d Fixing serialization problem reported by Todd Trimmer (babyduck@usa.com):
...

>I did some tinkering and found there are pure java.lang.Object
>instantiations deep inside all the "standard objects" added to the
>ImporterTopLevel with Context.initStandardObject(). This is what is keeping
>it from serializing.

This is due to presence of Scriptable.NOT_FOUND and IdScriptable.NULL_VALUE tags in the data to serialize.

I replaced the type for the tags from Object to UniqueTag which is serializable ad knows how to make restored tags the same objects as Scriptable.NOT_FOUND and IdScriptable.NULL_VALUE.

Similarly Undefined was made serializable and to restore to Undefined.instance upon reading.
2002-03-16 23:31:04 +00:00
brendan%mozilla.org 9402b61613 Null test to handle recovery from OOM under js_NewContext reported by scole@planetweb.com (r/sr=jband, a=me). 2002-03-16 23:19:35 +00:00
nboyd%atg.com 48465ddb68 Patch from Christopher Olivier:
While looking into optimizing the modifications I've
made, I noticed that one of the bottlenecks seemed to be calls to the Java
instanceof operator, particularly if the class argument to instanceof isn't
final. Based on this observation I tweaked ScriptRuntime.java to attempt to avoid
some of the many "instanceof Scriptable" calls in it (which I've attached). In
particular I optimized the comparison operators for the case where the arguments
are Number's. This seems to provide some significant performance improvement in
many cases particularly in compiled mode.  See below (note the tests were
performed with today's rhinoLatest.zip code patched with the attached
ScriptRuntime.java and didn't include any of my other modifications).
2002-03-16 19:33:46 +00:00
brendan%mozilla.org 1e126a67d9 Restore non-bogus assertion removed in last rev, and fix the case that tripped it in js_ChangeScopeProperty, by not removing [and maybe freeing sprop->slot] before re-adding sprop; also fix all engine-defined getters and setters to have no slot [to be JSPROP_SHARED] (130970, r/sr=shaver&jband, a=asa). 2002-03-16 04:51:29 +00:00
rginda%netscape.com f7bdb90b75 bug 129519, "JS_GetPropertyDesc gives up too easily", r=jband, sr=shaver, a=bren
dan
Reflect new JSPD_* defines, make jsd_GetValueProperty degrade gracefully instead of fail outright when we run into a problem fetching the property value.
2002-03-16 01:58:36 +00:00
rginda%netscape.com 5ab837c899 bug 129519, "JS_GetPropertyDesc gives up too easily", r=jband, sr=shaver, a=bren
dan
Make JS_GetPropertyDesc degrade gracefully instead of fail outright when we run
into a problem fetching the property value.
2002-03-16 01:56:19 +00:00
igor%mir2.org 89206ab364 1. Implementing Externalizable interface in ObjToIntMap and UintMap to allow for efficient storage of internal hash table data. For ObjToIntMap it allows to restore correctly cached values of object's hash codes and do not store internal DELETED mark.
2. ObjToIntMap.clear and UintMap.clear now do not discard internal buffers, but clears references to external objects to match behavior of Java Vector.clear and Hashtable.clear.
2002-03-15 07:13:33 +00:00
khanson%netscape.com e67d7ec049 bug #130991 (Out-of-Memory in jsshell causes assertion failure in jsobj.c) patch by Brendan, sr=jband, r=khanson, a=asa 2002-03-15 06:22:00 +00:00
pschwartau%netscape.com ca999dce75 Added two new cases where the result is all zeros. 2002-03-15 05:15:57 +00:00
jband%netscape.com 78b2988012 fix bug 130139. We are iterating an array of pointers not an array of objects. r=dbradley sr=brendan a=asa. 2002-03-15 04:10:25 +00:00
khanson%netscape.com be5d94c4a1 bug #130711, r=khanson, sr=brendan, a=asa, memory leak in JS_dtoa 2002-03-15 00:11:44 +00:00
brendan%mozilla.org 40ba9a0a2a Remove bogus assertion, tripped by js_ChangeScopePropertyAttrs calling js_AddScopeProperty (130970, r=shaver, sr=jband, a=shaver). 2002-03-14 21:59:16 +00:00
brendan%mozilla.org 6f45f575a4 Fix JS/PL_DHashTableEnumerate to compress or shrink the table after enumeration using the same logic as ADD and REMOVE use (120953, r=dbaron, sr=shaver, a=asa). 2002-03-14 21:55:08 +00:00
timeless%mac.com 0a6eb6a388 Bug 61314 Makefile rules for "jsmath.o" and "jsmathtemp.o" cause stale object files, obscure bugs
patch by mang@subcarrier.org r=rogerl sr=brendan a=asa
2002-03-14 21:41:09 +00:00
igor%mir2.org e6d6980a29 ObjToIntMap was added to map Objects to int in a memory wise way and VariableTable was modified to use ObjToIntMap for itsVariableNames 2002-03-14 20:37:15 +00:00
brendan%mozilla.org 62bc0d659b No strict warnings without the strict option, and other js1.5/mozilla1.0 tidying (129972, r=shaver, sr=jband, a=asa). 2002-03-14 00:14:48 +00:00
brendan%mozilla.org d3a05a01eb Fix Array.prototype.sort to follow ECMA and win perf by not (re-)defining length on the 'this' object (130451, r=shaver, sr=jband, a=asa). 2002-03-14 00:10:31 +00:00
nboyd%atg.com b0dabdc3df Turn on debug info in class files by default. 2002-03-13 19:34:23 +00:00
nboyd%atg.com e584b07f01 Fix problem reported in newsgroup:
If I have a Java class with a normal method that throws an exception, Rhino
(1.5pre4) will let JavaScript catch the exception. If the Java class has a
getter method, Rhino will NOT let JavaScript catch the exception. Very
disturbing.

Here's a console dump to show you what I'm talking about:

D:\jsSandbox>cat GIJoe.java
public class GIJoe
{
        // Getter
        public static int getYoJoe()
                throws Exception
        {
                throw new Exception("Please catch me!");
        }

        // Normal
        public static int rebel()
                throws Exception
        {
                throw new Exception("Please catch me too!");
        }
}
D:\jsSandbox>javac GIJoe.java

D:\jsSandbox>cat gi.js
var gi = new Packages.GIJoe();

try
{
        var i = gi.rebel();
        java.lang.System.err.println("rebel(): uncaught");
}
catch(e1)
{
        java.lang.System.err.println("rebel(): caught");
}


try
{
        var i = gi.yoJoe;
        java.lang.System.err.println("yoJoe: uncaught");
}
catch(e2)
{
        java.lang.System.err.println("yoJoe: caught");
}


D:\jsSandbox>java -cp .;e:\javas\rhino1_5R4pre\js.jar
org.mozilla.javascript.too
ls.shell.Main
js> load("gi.js");
rebel(): caught
java.lang.Exception: Please catch me!
org.mozilla.javascript.WrappedException: WrappedException of Please catch
me!
        at org.mozilla.javascript.JavaMembers.get(JavaMembers.java:105)
        at
org.mozilla.javascript.NativeJavaObject.get(NativeJavaObject.java:93)

        at
org.mozilla.javascript.ScriptRuntime.getProp(ScriptRuntime.java:691)
        at
org.mozilla.javascript.Interpreter.interpret(Interpreter.java:1591)
        at
org.mozilla.javascript.InterpretedScript.call(InterpretedScript.java:
63)
        at
org.mozilla.javascript.InterpretedScript.exec(InterpretedScript.java:
54)
        at org.mozilla.javascript.Context.evaluateReader(Context.java:741)
        at
org.mozilla.javascript.tools.shell.Main.evaluateReader(Main.java:347)

        at
org.mozilla.javascript.tools.shell.Main.processSource(Main.java:336)
        at org.mozilla.javascript.tools.shell.Global.load(Global.java:169)
        at java.lang.reflect.Method.invoke(Native Method)
        at
org.mozilla.javascript.FunctionObject.callVarargs(FunctionObject.java
:586)
        at
org.mozilla.javascript.FunctionObject.call(FunctionObject.java:460)
        at
org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1216)
        at
org.mozilla.javascript.Interpreter.interpret(Interpreter.java:1679)
        at
org.mozilla.javascript.InterpretedScript.call(InterpretedScript.java:
63)
        at
org.mozilla.javascript.InterpretedScript.exec(InterpretedScript.java:
54)
        at org.mozilla.javascript.Context.evaluateReader(Context.java:741)
        at
org.mozilla.javascript.tools.shell.Main.evaluateReader(Main.java:347)

        at
org.mozilla.javascript.tools.shell.Main.processSource(Main.java:284)
        at org.mozilla.javascript.tools.shell.Main.exec(Main.java:146)
        at org.mozilla.javascript.tools.shell.Main.main(Main.java:74)
js>



Due to a lack of an "uncaught" statement in the output, we see that the
exception from GIJoe::getYoJoe() was indeed thrown, but not caught by the
JavaScript.

Do any nightly builds past 1.5pre4 address this issue?


Todd Trimmer
2002-03-13 13:33:40 +00:00
brendan%mozilla.org 05d2d349ce khanson@netscape.com's patch to switch from QuickSort to heap-sort, plus a crucial ECMA-purity/property-tree-perf fix to InitArrayObject (to SET rather than DEFINE; bug 99120, r=waldemar, sr=shaver&brendan, a=asa). 2002-03-13 01:50:13 +00:00
igor%mir2.org f5b8fd5697 Rename catchStack to tryStack and allocate it only when required 2002-03-12 22:02:55 +00:00
igor%mir2.org 5e73d7338f Move definitions of interpreter bytecode specific tokens like BREAKPOINT or INTNUMBER to Interpreter.java.
Use switch instead of string array to return token names not to depend on token oder.
2002-03-12 22:00:56 +00:00
brendan%mozilla.org 21978efea8 Missing JSFunction API (129545, r=shaver, sr=jband, a=asa). 2002-03-12 21:58:27 +00:00
brendan%mozilla.org 5074f6ebd1 Don't forget to lock obj in js_AddNativeProperty and js_ChangeNativePropertyAttrs (130137, r=jband, sr=shaver, a=roc+moz). 2002-03-12 07:17:30 +00:00
gerv%gerv.net f66a83002c Replacing original licensing text from C version of this file. 2002-03-11 23:11:55 +00:00
jband%netscape.com cb6ae8ad3e fix bug 129697. Don't leave a dangling (to crash later) JS root if JS_NewObject fails while creating a wrapped native. r=beard sr=jst a=asa (for trunk and 0.9.9 branch). 2002-03-09 03:01:44 +00:00
brendan%mozilla.org 75a8745d3d Avoid MSVC bogo-warning. 2002-03-09 00:55:26 +00:00
brendan%mozilla.org efe08cd95c Fix longstanding bug where watchpoints didn't work with JSPROP_SETTER (127243, r=rginda, sr=shaver, a=dbaron). 2002-03-08 22:46:13 +00:00
beard%netscape.com cb2b8b58fb Fix for bug #123920, prevents reentering the JS engine during Java object JS wrapper finalization, by deferring calls into Java at the end of the garbage collection cycle and storing the wrappers in a linked list, which gets processed by a GC callback.
r=jband, sr=brendan, a=asa
2002-03-08 22:37:40 +00:00
seawood%netscape.com d97d6d301f This patch replaces the bogus USE_AUTOCONF ifdef + platform ifdef tests with a
simple HAVE_LOCALTIME_R test.  -DHAVE_LOCALTIME_R has been added to the
js/src/config/<platform>.mks as necessary.
bug #128556 r=brendan sr=shaver a=asa
2002-03-08 01:42:32 +00:00
rginda%netscape.com 36a0ec70a8 bug 128057, r=brendan, sr=shaver, a=asa
check for JS_GetPropertyDesc failure in JS_GetPropertyDescArray
2002-03-06 22:12:38 +00:00
darin%netscape.com f1a6738b6c fixes bug 124042 "support internationalized URIs" r=dougt, sr=alecf, a=asa 2002-03-06 07:48:55 +00:00
pschwartau%netscape.com aa69c199eb Skip new test that uses the clone() function in SpiderMonkey's js.c file 2002-03-06 05:34:22 +00:00
pschwartau%netscape.com 9ee868f523 Initial add. Regression test for bug 127557. 2002-03-06 05:14:58 +00:00
brendan%mozilla.org 4047cc7888 Not part of build, for the js testsuite only: add clone shell function to clone a function object (for 127557 regression testing, a=shaver). 2002-03-06 04:45:32 +00:00
beard%netscape.com e56ba03add Universal config file for Darwin. 2002-03-05 15:52:37 +00:00
beard%netscape.com 3dbc5b854c fix for bug #59686, a=asa@mozilla.org, r=rogerl, sr=shaver. 2002-03-05 15:09:05 +00:00
shaver%mozilla.org dac4fdf779 Bug 106864: xptcall support for the ARM platform, and mild jsnum.h arm-define
tweaks. Patches from Mark Crichton <crichton@gimp.org>, Russell King
<rmk@arm.linux.org>, Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>.
r=brendan on jsnum.h, sr=shaver, a=asa for trunk and branch.
2002-03-05 06:35:50 +00:00
nisheeth%netscape.com 8872795d15 Fix for bug 125465. r=jag, sr=jband, a=asa. Add AString, ACString, and AUTF8String support to XPCOM's variant data type. Also, add forward declarations of AString and ACString to nsrootidl.idl. 2002-03-05 02:22:02 +00:00
beard%netscape.com 50d5d72d66 Needed for Mac OS X 10.1.3 / Darwin 5.3 2002-03-04 16:14:41 +00:00
pschwartau%netscape.com 62884a5780 Initial add. Regression test for bug 122076. 2002-03-04 04:11:47 +00:00
nboyd%atg.com b0a4347b88 Enter context if need be; JavaAdapters may have callbacks on threads unassociated
with contexts.
2002-03-03 16:16:07 +00:00
brendan%mozilla.org be783ec091 Runaway recursion safety for Exception and js_ErrorToException.
The latter no longer calls the former via js_ConstructObject, to
minimize failure opportunities when converting an error into an
exception.  Also, the 'stack' property of exception objects
faithfully preserves Unicode in function names and decompiled
actual argument sources.

Also, fun_xdrObject was reversing property order when encoding;
fixed to maximize property tree compression gain.

Also^2, js_ConstructObject was not handling success+not-found
return from FindConstructor.

bug 127136, r=rginda, sr=shaver, a=chofmann
2002-03-03 00:59:16 +00:00
brendan%mozilla.org 4f6d566527 Fix topcrash regression from bug 62164: keep track of duplicate kids below the root ply of the property tree, so we can fix up each dup's parent link (128258, r=shaver, sr=jband, a=asa). 2002-03-01 23:29:54 +00:00
brendan%mozilla.org 32d76a128b Fix call_enumerate to reflect compiler-created properties from function to its call object (127557, r=jband, sr=shaver, a=asa). 2002-03-01 23:25:34 +00:00
pschwartau%netscape.com ccbe9ac802 Skip new test that uses the Error.stack property of SpiderMonkey. 2002-03-01 21:58:23 +00:00
pschwartau%netscape.com ad883cb710 Initial add. Testing the Error.stack property of SpiderMonkey. This is an ECMA extension. 2002-03-01 21:50:18 +00:00
brendan%mozilla.org 8ecde6229e Fix GC_MARK_DEBUG #ifdef'd code (not part of default build; r=polarbear, sr=shaver, a=dbaron). 2002-03-01 05:22:26 +00:00
pschwartau%netscape.com 10d321f38d Improved regexp reporting for Rhino by imitating SpiderMonkey's Array.toSource() method. 2002-02-27 18:36:46 +00:00
rginda%netscape.com f120347fbe part of bug 109652, "Venkman needs to profile" r=peterv,r=a=shaver
add profiling support.
2002-02-27 09:24:14 +00:00
rginda%netscape.com 72469311ce part of bug 109652, "Venkman needs to profile"
sr=brendan, r=peterv, a=shaver
add JS_Now to the jsapi, and JS_GetScriptVersion to jsdbgapi
2002-02-27 09:17:21 +00:00
sfraser%netscape.com 2f1de24dbc Fixing Mac bustage; add a bunch of casts between PRUnichar* and jschar* (why isn't jschar a wchar_t?). r=nisheeth 2002-02-26 03:01:03 +00:00
nisheeth%netscape.com 46db685f9a Fix for bug 84186. r=dbradley, jag. sr=jband. Added support for CStrings, UTF8String, and AStrings to XPIDL. Also added the -t cmd line flag to XPIDL and XPTLINK that allows us to generate output for a specific XPT version. The XPT version number is being upped from 1.1 to 1.2 with this checkin. 2002-02-26 01:41:42 +00:00
igor%mir2.org 5c5912869d Use ClassFileWriter.toByteArray to get class file bytes in place of calling ClassFileWriter with ByteArrayStream argument 2002-02-24 19:18:44 +00:00
igor%mir2.org d4c437f2c0 1. Added toByteArray to get class file as a byte array. Implementation first calculates the resulting array size to minimize number of allocations.
2. Set DEBUG to true to activate usage checks
2002-02-24 19:15:19 +00:00
brendan%mozilla.org bcc02f397b Fix stale comment about duplicate formal params (a=drivers, comment-only followup to 62164's big patch). 2002-02-24 00:26:57 +00:00
brendan%mozilla.org 032c9bde1f Comment change only, quick followup to last humongous checkin. 2002-02-23 04:44:40 +00:00
brendan%mozilla.org 57483a3082 Major footprint/perf win: share property state using a tree whose root represents empty scopes, and whose non-root nodes represent scopes with properties added in order from the root to that node; to use double hashing to map these tree-paths for per-scope property lookup; and avoid locking where possible through immutability and mostly-benign&rare race tolerance (62164, r=shaver, sr=jband). 2002-02-23 03:49:27 +00:00
pschwartau%netscape.com 46e46a7d7e Adding two more cases to test. Improving readability. 2002-02-23 01:14:51 +00:00
nboyd%atg.com a12ac7748a Missed one codepath in previous fix for 126722. This should complete the fix. 2002-02-22 17:40:32 +00:00
nboyd%atg.com 50423a21d4 Fix bug 126722 2002-02-21 15:53:50 +00:00
pschwartau%netscape.com f124320735 Initial add. 2002-02-20 19:07:08 +00:00
jband%netscape.com 78dddf0f3b fix bug 126333. reduce shutdown leakage by releaseing Components object members. r=dbradley sr=alecf 2002-02-20 07:03:27 +00:00
rginda%netscape.com 24f2a77101 bug 126365, "add options and private support to jsdIContext", sr=jst, r=jband
add jsdIContext::options and ::privateData attributes
2002-02-20 05:45:57 +00:00
rogerl%netscape.com e2486ebfbe r=thesteve, sr=brendan, bug @119909 - crashing RegExp with > 10 backrefs. 2002-02-20 05:43:26 +00:00
dbradley%netscape.com 5372835bdb Bug 119382 - attribute nsIIDPtr IID considered harmful - This patch makes it an error to declare an attribute named IID or a method named getIID. r=jband, sr=jst 2002-02-19 14:48:00 +00:00
dbradley%netscape.com db81563416 Bug 121938 - XPCWrappedJS::GetNewORUsed does not look for inherited interfaces when matching interfaces. r=jband, sr=jst 2002-02-19 11:24:21 +00:00
pschwartau%netscape.com 3e71defef2 Skipping new testcase until bug 126317 is fixed. 2002-02-19 01:53:39 +00:00
brendan%mozilla.org 33746feb4c Fix bad old js_ValueToInt32 to have an int-jsval fast path, to avoid f.p. inaccuracy (126159, r=shaver, sr=jband). 2002-02-19 00:02:29 +00:00
pschwartau%netscape.com 40e5db5cab Adding more cases and improving comments. 2002-02-18 23:59:15 +00:00
jband%netscape.com 17e692e072 bug 123770. extend xpconnect to use dynamic 'additional' interface info managers to support dynamic type info. Also, abstract out the Components.interfaces object and make the items use a bit less memory. r=dbradley sr=vidur 2002-02-18 23:47:30 +00:00
brendan%mozilla.org f2dabe8b2c Followup fix for ECMA-262 15.10.6.2 step 6, plus warning fixes (76717, r/sr=shaver&jband). 2002-02-18 23:43:28 +00:00
pschwartau%netscape.com 5ee730d78f Fixing a typo in the comments 2002-02-18 23:29:54 +00:00
seawood%netscape.com 3ae0856e3e Removing unneeded LIBS setting. LIBS isn't used to link libraries. 2002-02-18 23:19:49 +00:00
pschwartau%netscape.com c00503d664 Initial add. 2002-02-18 22:03:46 +00:00
nboyd%atg.com 8c072564d0 Fix more broken links. 2002-02-18 16:25:26 +00:00
nboyd%atg.com 9445831f73 Fix broken link. 2002-02-18 15:20:39 +00:00
rginda%netscape.com adb60f229e bug 124717, need to wrap JSVAL_NULL for eval result, instead of just returning it unwrapped. 2002-02-16 10:53:52 +00:00
pschwartau%netscape.com b3c944d7dd Hard-coding the expected value for Error.length in Rhino vs. SpiderMonkey 2002-02-15 06:31:41 +00:00
jband%netscape.com 1ef661eab1 fix bug 125430. Unbust Components.returnCode by not setting the JSPROP_READONLY bit on the read/write property. r=bzbarsky sr=jst 2002-02-15 03:33:37 +00:00
dbradley%netscape.com 90a78e1012 Bug 121526 - Need to expose the security info pointer from the nsIXPConnectWrappedNative interface. r=jst, sr=jband 2002-02-15 03:11:15 +00:00
rginda%netscape.com 0aa1a25c67 fix uninitialized return value in jsd_IsStackFrameNative 2002-02-14 22:39:09 +00:00
pschwartau%netscape.com 81652b18be Adding a comment. 2002-02-14 20:42:44 +00:00
pschwartau%netscape.com f535290dc8 Add skip for new RegExp performance test. Bug 125562 (Rhino), bug 85721 (SpiderMonkey). 2002-02-14 20:37:40 +00:00
rogerl%netscape.com 9946283506 Fixed expected output from case 1. (sr=pschwartau) 2002-02-14 19:21:13 +00:00
pschwartau%netscape.com 05feea4a8c Correcting an error 2002-02-14 19:11:15 +00:00
pschwartau%netscape.com cc83c0c18f Initial add. Regression test for bug 85721. 2002-02-14 19:06:59 +00:00
rginda%netscape.com 34dcbc87a7 bug 124474, "add native frame support to jsd"
sr=shaver, r=jband
add JSD_IsStackFrameNative, IsStackFrameDebugger, and IsStackFrameConstructing
add similar attributes to jsdIStackFrame
tweak return values in jsds_FilterHook
don't include dummy stack frames in threadstates

bug 110387, "Crash on exiting venkman"
check to see if the debugger was turned off before going through with an unPause.
2002-02-14 07:57:30 +00:00
rginda%netscape.com 5d58b5146e bug 124474, "JS_IsNativeFrame should return !fp->script"
also includes typo fix from bug 124474
sr=shaver, r=jband
2002-02-14 07:52:02 +00:00
brendan%mozilla.org aba15fbd2d Construct error objects to consolidate their default property setting; this entails adding JS_ConstructObjectWithArguments (123177, r=rginda, sr=shaver). 2002-02-14 07:25:34 +00:00
jband%netscape.com 7a83c28af1 add regression test for bug 125430. NOT PART OF THE BUILD 2002-02-14 06:01:54 +00:00
nboyd%atg.com 2543003c2a Add skips for new tests. 2002-02-14 02:05:38 +00:00
dbradley%netscape.com 41da93a53b Bug 124251 - Fix for some DOMStrings leaking when using -mail. r=dbaron, sr=jst 2002-02-14 00:12:44 +00:00
nboyd%atg.com ef0947a309 Fix build problem in batik:
[javac] Compiling 1427 source files to /data/gump/xml-batik/classes
 [javac] /data/gump/xml-batik/sources/org/apache/batik/script/rhino/EventTargetWrapper.java:81:
coerceType(java.lang.Class,java.lang.Object,boolean)
in org.mozilla.javascript.NativeJavaObject cannot be applied to
(java.lang.Class,java.lang.Object)
2002-02-13 03:07:31 +00:00
igor%mir2.org 3c6a4b6df9 Making final for performance reasons 2002-02-13 01:41:11 +00:00
rogerl%netscape.com 3cafa8d101 Fixing bug #103351 - using undefined as RegExp value for String.replace.
r=khanson, sr=brendan
2002-02-12 19:12:42 +00:00
ccarlen%netscape.com 0d871a1552 Bug 115334 - Removing .mcp files which are obsolete after XML conversion. r=jj/sr=sfraser 2002-02-12 15:41:41 +00:00
nboyd%atg.com 9cdc547eaa Add new Context method "toType" to convert to a specified Java type 2002-02-12 14:30:27 +00:00
nboyd%atg.com 797571ad23 Fix 124900 2002-02-12 14:29:30 +00:00
brendan%mozilla.org 1e4bb807d7 Hack special frame flags into fp when compiling under JS_Evaluate*InStackFrame, so useless expressions don't get optimized away (92087, r=rginda, sr=jband). 2002-02-12 07:44:48 +00:00
pschwartau%netscape.com 2ee1c98e70 Initial add. Testing functions with duplicate formal parameter names. 2002-02-12 01:35:05 +00:00
pschwartau%netscape.com 1ba9a7f2b0 Added two new cases to the test. 2002-02-11 23:02:32 +00:00
pschwartau%netscape.com 4121f4550e Improving readability of summary. 2002-02-11 22:04:16 +00:00
pschwartau%netscape.com 464d31511c Fixing a typo. 2002-02-11 20:13:59 +00:00
pschwartau%netscape.com 480fe35fe1 Initial add. Testing functions with duplicate formal parameter names. 2002-02-11 19:39:12 +00:00
igor%mir2.org b20f228b29 cosmetics: end-of-line whitespace removal 2002-02-11 01:33:23 +00:00
igor%mir2.org 142bcdb900 tabs -> spaces 2002-02-11 00:02:14 +00:00
igor%mir2.org dd9357bec7 Avoid unnecessary calls to Context.getContext() by passing Context directly as an argument 2002-02-10 21:10:35 +00:00
igor%mir2.org 582b069550 Always use try/finally to wrap Context.exit 2002-02-10 21:09:42 +00:00
brendan%mozilla.org 3375f6f6f0 Add exception object stack property, string valued; clean up NULL/VOID mixup, missing OOM test, etc. (123177, r=rginda, sr=shaver). 2002-02-09 06:28:58 +00:00
pschwartau%netscape.com 8a7c41db48 Added five new cases to test number values between uint32 upper-bound and long upper-bound. 2002-02-09 00:18:12 +00:00
brendan%mozilla.org fa54cd9d8a Remove bad old regexp object locking across huge, deadlock-prone, so-not-critical sections (123930, r=rogerl, sr=jband&shaver). 2002-02-09 00:14:31 +00:00
brendan%mozilla.org a219a25636 Fix recently-uncovered ECMA violation: lastIndex must use double storage (124339, r=rogerl, sr=shaver). 2002-02-08 23:59:49 +00:00
pschwartau%netscape.com 94b0eb9c73 Improving readability. 2002-02-08 23:22:59 +00:00
pschwartau%netscape.com 64d729ccb2 Improving readability. 2002-02-08 21:42:55 +00:00
brendan%mozilla.org a22a44116b Make regexp.lastIndex threadsafe by multiplexing it by thread-id in each r.e. (76717, r=rogerl, sr=shaver). 2002-02-08 02:46:03 +00:00
brendan%mozilla.org a911b05d03 Avoid all gc <> obj-lock deadlocks by letting the gc run lock-free, safe since all requests are suspended or ended when the gc runs (114712, r=shaver, sr=jband). 2002-02-08 01:55:30 +00:00
nboyd%atg.com 7eff00208f * Avoid creating a ClassNameHelper when turning caching off.
* When turning debug generation on, don't change opt level from -1 to 0.
2002-02-07 17:54:57 +00:00
rginda%netscape.com 7fccaa5b34 bug 121039, "Need a way to unwrap jsdIValues", r=jband, sr=jst
adds jsdIValue::getWrappedValue() and jsdIService::wrapValue() methods to provid
e js scripts a way to convert between jsdIValues and "real" js values.
Also includes fix to not call breakpoint hook while paused, and changes jsdIFilt
er::glob attribute to jsdIFilter::globalObject, to match jsdIContext::globalObject
2002-02-07 00:59:55 +00:00
brendan%mozilla.org 2edcffaaed Quick followup to last checkin -- warning fixes (d'oh!) 2002-02-06 07:56:29 +00:00
brendan%mozilla.org 2653cdfd3a Fix call and new expression parsenode beginning line number, where the arglist is on another line from the function or constructor, to avoid a bogus assertion in UPDATE_LINENO_NOTES, which is now replaced by better comments and an avoided gratuitous store to cg->currentLine (123371, r=rginda, sr=shaver). 2002-02-06 07:39:20 +00:00
brendan%mozilla.org 2c41247d14 Fix failure to check for JS_InitClass failure, reported by Eric Brueggemann <eric_brueggemann@yahoo.com>, r=shaver, sr=mozbot. 2002-02-06 07:01:37 +00:00
nboyd%atg.com d7f0af7c79 Have ClassNameHelper object be allocated lazily 2002-02-05 13:47:16 +00:00
nboyd%atg.com dc8951753b Don't hold a static reference to a ClassLoader that will prevent JavaAdapter classes
from being unloaded.
2002-02-05 13:37:50 +00:00
jband%netscape.com dcbd4a1a96 Add better support to xpconnect for converting between variants and arrays. bug 120881. r=dbradley sr=vidur. Trivial fix for case where we were hitting an assert at xpcom shutdown. bug 121536. r=dbradley rs=vidur. 2002-02-05 06:45:08 +00:00
jst%netscape.com cb926125b8 Fixing bug 116834. Making element.innerHTML='...<script>...</script>...' not execute the script, this makes mozilla compatible with IE wrt innerHTML and execution of scripts. r=bzbarsky@mit.edu, sr=rpotts@netscape.com 2002-02-05 05:53:56 +00:00
pschwartau%netscape.com 57f17cedc4 Initial add. Regression test for bug 123437. 2002-02-05 01:44:52 +00:00
nboyd%atg.com dbc9ade56d Clean up formatting. 2002-02-04 18:58:03 +00:00
nboyd%atg.com 80650f2d25 Change version to 1.5R4pre. 2002-02-04 15:26:31 +00:00
jband%netscape.com f0115acfab unbust XPCONNECT_STANDALONE build. No change to default build. bug 121438. rs=jband. 2002-02-03 20:05:22 +00:00
pschwartau%netscape.com 687f3f451e Initial add. Regression test for bug 123002. 2002-02-02 02:03:43 +00:00
seawood%netscape.com 8f2816f49f Do not place the .res file inthe srcdir 2002-02-01 04:50:32 +00:00
igor%mir2.org febdace285 Use heapsort instead of qsort for Array.sort to follow JS for reasons described in http://bugzilla.mozilla.org/show_bug.cgi?id=99120 2002-01-31 10:08:17 +00:00
brendan%mozilla.org fdf6f6bfee Fix for(i in null) and for(i in undefined) to error per ECMA, rather than iterating zero times (121744, r=khanson, sr=shaver). 2002-01-31 07:30:05 +00:00
rginda%netscape.com 905acd6402 changing a string constant, comenting out a DEBUG_rginda
use more descriptive url when compiling prettyprint changes
2002-01-31 00:37:28 +00:00
pschwartau%netscape.com 5c88e87eeb Initial add. Regression test for bug 121744. 2002-01-30 21:57:28 +00:00
sfraser%netscape.com d133d4956f Making the nsModuleComponentInfo data const; bug 74803. r=dp, sr=waterson 2002-01-30 21:14:20 +00:00
rginda%netscape.com 2ab45af255 quiet bogus "potentially unused" warnings, see bug 121178, sr=brendan 2002-01-30 08:37:57 +00:00
igor%mir2.org 03c7c86042 Stricter enter/exit: enter performs sanity checks on supplied Context and the exit requires previous enter. 2002-01-29 22:58:22 +00:00
dougt%netscape.com c50ca402ad 1. Converts callers of nsIComponentManagerObsolete to use
nsIComponentRegistrar.

2. Converts callers of nsComponentManager::AutoRegister to use
nsIComponentRegistrar's autoRegistrar method.

3. Add nsIComponentRegistrar implmentation to nsComponentManagerImpl.

4. Rearrange nsComponentManager.cpp so that related methods are in the same
place.

5. Added a C-style function NS_GetComponentRegistrar so that getting the
registrar is easier in some places.

6. Added a nsISimpleEnumerator interface on PLDHashTableEnumeratorImpl.  in
this way, the same base class can support both old style and new style
enumerations.

7. Fixed a nasty bug where unregistring factories will leave the contract id
hash with a dangling pointer.  Now, when unregister is called we search the
contract id hash for entries which have the given doomned cid and remove them.


Bug 115853.  r=dp@netscape.com, sr=rpotts@netscape.com
2002-01-29 21:22:13 +00:00
igor%mir2.org 7ca511bab3 Few Native* classes are made package private and final. They had been public only for implementation reasons. 2002-01-29 18:40:13 +00:00
igor%mir2.org 86947ddec0 Use ScriptRuntime.toString(double) to convert double to string. Easier to follow version of getElem/setElem 2002-01-29 09:44:24 +00:00
rginda%netscape.com 9626570b63 bug 121318, sr=brendan,r=jst, "Venkman should disable the target window when stopped at a breakpoint".
implement the jsdIContext interface.
create only one jsdValue wrapper per unique jsval.
add executionContext property to jsdIStackFrame.
add enumerateContexts to jsdIDebuggerService.
add jsdIContextEnumerator interface.
2002-01-29 08:32:23 +00:00
rginda%netscape.com 0e7a4d620e fixing os/2 bustage, false vs PR_FALSE mixup 2002-01-29 07:20:59 +00:00
rginda%netscape.com 33fccb8187 bug 121178, r=jst,sr=brendan, "jsdIStackFrame::eval signature needs to be changed"
return exception from jsdService::Eval if one occurs.
2002-01-29 06:15:58 +00:00
rginda%netscape.com ecdf07d4a4 bug 121192, sr=brendan,r=jst, "Add proper errorHook and debugHook to jsdIDebuggerService"
adds jsdIDebugHook interface, change the meaning of jsdIErrorHook.
error hook is called when an error occurs, and is given information about the error report.
debug hook is called when/if the error hook returns false, and is given information about the ececution state.
2002-01-29 05:56:02 +00:00
nboyd%atg.com 044c888b5f Update implementation version. 2002-01-28 00:52:12 +00:00
brendan%mozilla.org 1d1d042dce Checking in rogerl's fix for double-reports of compile-time errors (120197, r=brendan, sr=shaver). 2002-01-27 04:42:37 +00:00
nboyd%atg.com a2254d8379 Clean up formatting. 2002-01-26 20:07:49 +00:00