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

4759 Коммитов

Автор SHA1 Сообщение Дата
dbradley%netscape.com 5481eb216c Added makefile.in to prepare for nmake going away. This is built separately, not part of the mozilla build process. 2002-07-29 20:47:02 +00:00
brendan%mozilla.org d4bcf5a798 Finally fix 137000, which requires working around an MSVC ISO-C violation ('identical COMDAT folding', 151066, r=brendan/jrgm, sr=bryner/shaver, a=asa). 2002-07-24 01:48:40 +00:00
rogerl%netscape.com c437701852 Changed decimal escape handling to backward compatible rather than ECMA3
conforming. (Bug#158159)
2002-07-23 21:38:03 +00:00
brendan%mozilla.org 60cd7dd216 Don't return 1 cast to JSProperty* for a property found in a non-LiveConnect prototype object (155740, r=rogerl, sr=jband, a=chofmann/blizzard/scc). 2002-07-19 22:00:03 +00:00
pschwartau%netscape.com 255ceec550 Initial add. Regression test for bug 141078. 2002-07-18 18:36:44 +00:00
seawood%netscape.com 7924fa60a6 Remove DARWIN define from osx builds as it cripples the feature set provided by OSX headers.
Bug #154232 r=wtc sr=scc a=scc
2002-07-18 04:09:30 +00:00
pschwartau%netscape.com 21bef9048a Skip testcase for bug 157652. Will not fix this in Rhino; the OOM error is reasonable. 2002-07-17 18:20:58 +00:00
pschwartau%netscape.com c86a38c3f2 Changing summary text. 2002-07-16 21:35:30 +00:00
pschwartau%netscape.com 42d131f79e Initial add. Regression test for bug 157652. 2002-07-16 21:23:58 +00:00
igor%mir2.org 7f84dd1785 Serialization fixes to correctly restore members and related fields in NativeJavaClass. 2002-07-16 21:17:09 +00:00
igor%mir2.org 05d4e426a8 Fixing the bug 157196: custom serialization of ScriptableObject not to save deleted/empty slot. 2002-07-16 21:15:51 +00:00
igor%mir2.org b0651090a1 Checking for 1.2 version in toString for objects and arrays is replaced by calling cx.hasFeature(Context.FEATURE_TO_STRING_AS_SOURCE) to allow to control toString from applications without switching on other JS 1.2 features. 2002-07-16 17:42:18 +00:00
igor%mir2.org 31a00f4fbb I removed startString/getString and their support code as TokenStream uses its own buffer and fixed the bug 151337 which was cause by incorrect getLine 2002-07-16 17:37:46 +00:00
pschwartau%netscape.com fe4ff91e5e Initial add. Regression test for bug 58274. 2002-07-15 23:20:15 +00:00
pschwartau%netscape.com cef0524103 Initial add. Testing identifiers with double-byte names; see bug 58274. 2002-07-15 23:15:52 +00:00
igor%mir2.org 339b48088d I changed TokenStream to use internal buffer in place of LineBuffer#startString/getString to store currently read characters for identifiers, strings and numbers. For the price of yet another character coping it allows to simplify code logic especially regarding interaction with LineBuffer.
I also fixed http://bugzilla.mozilla.org/show_bug.cgi?id=157509
2002-07-15 18:49:42 +00:00
pschwartau%netscape.com b6e224c759 Correcting two sections of test. 2002-07-15 17:28:05 +00:00
pschwartau%netscape.com 3d0481ed1e Expanding a comment for one section in greater detail. 2002-07-15 17:04:38 +00:00
pschwartau%netscape.com 7e7822fb4b Initial add. Regression test for bug 157509. 2002-07-15 15:22:35 +00:00
pschwartau%netscape.com 21c78d339e Comment edit. 2002-07-15 15:07:33 +00:00
pschwartau%netscape.com 3b26b79276 Added revision date + comment clean-up. 2002-07-15 15:06:37 +00:00
pschwartau%netscape.com b8851070cb Correcting an error in the test. See bug 155291. 2002-07-15 00:40:14 +00:00
pschwartau%netscape.com 780a512ba9 Correcting errors in test. See bug 155289. 2002-07-15 00:29:37 +00:00
pschwartau%netscape.com 23870b9b8b Correcting errors in the test. See bug 155289. 2002-07-15 00:04:22 +00:00
pschwartau%netscape.com 2f46a99fde Correcting errors in the test. See bug 155289. 2002-07-14 23:57:03 +00:00
pschwartau%netscape.com 5b02e625d1 Correcting an error in one section of the test. See bug 155285. 2002-07-14 23:42:23 +00:00
pschwartau%netscape.com 5841696264 Rhino has also decided to conform with SpiderMonkey on this test. Adding early return for Rhino as well. 2002-07-14 22:34:50 +00:00
pschwartau%netscape.com 7ed81a0ccd Rhino has also decided to conform with SpiderMonkey on this test. Removing early return for Rhino. 2002-07-14 22:23:52 +00:00
rginda%netscape.com 08debd5039 bug 155838, "Infinite loop caused by strange code", r=peterv, sr=brendan, a=roc+moz@cs.cmu.edu
don't leave gDeadScripts pointing at garbage.  May or may not fix the problem at hand, but is an improvement in either case.
2002-07-12 21:28:29 +00:00
igor%mir2.org 212dbaa899 Call to InterpretedFunction.construct is inlined to avoid argument array allocation. 2002-07-12 19:40:49 +00:00
igor%mir2.org 0f91e59231 Creation and initialization of new object in BaseFunction.construct is moved to a separated function createObject to simplify inlining of InterpretedFunction.construct in Interpreter 2002-07-12 19:39:57 +00:00
igor%mir2.org 290f7f1a46 Added ObjToIntMap.intern() 2002-07-12 19:37:20 +00:00
brendan%mozilla.org e7e1409de9 Emulate IE6 by making RegExp.prototype match the empty string (156355, r=rogerl, sr=shaver, a=dbaron). 2002-07-12 04:54:57 +00:00
igor%mir2.org ede2d28ac2 When calling interpreted functions from Interpreter.interpret, pass current stack arrays to the callee to avoid creation of temporary argument arrays and wrapping double numbers into Double objects. 2002-07-11 21:17:34 +00:00
igor%mir2.org 52990d1b21 Optimizing encode/decode not to allocate temporary buffers if the result equals the original string 2002-07-11 21:10:36 +00:00
igor%mir2.org 6dd42762fe Optimizing NativeGlobal.js_escape, ScriptRuntime.escapeString not to create StringBuffer if there are no character to escape in the initial string. Workaround for JDK 1.1 compiler bug in the initialization of ScriptRuntime.ComparableClass. 2002-07-11 18:45:16 +00:00
igor%mir2.org 40b7178ec8 Fixing 136893: for(i in undefined), for(i in null) do not throw TypeError but treated as for(i in {}) 2002-07-11 18:39:24 +00:00
pschwartau%netscape.com bf47977f38 Initial add. Based on examples from ECMA-262 Ed.3 spec, Section 15.10.2 2002-07-10 23:09:48 +00:00
igor%mir2.org 35a869988d With Roger's <rogerl@netscape.com> new RegExp implementation Rhino passes:
js1_2/regexp/regress-9141.js
ecma_3/String/regress-104375.js
2002-07-10 22:14:48 +00:00
pschwartau%netscape.com 2d8a1cdbe2 Skip testcase for bug 152646. Will not fix this in Rhino; too much of a corner case. 2002-07-10 21:03:07 +00:00
igor%mir2.org bb0f73fb5d No more skiping of ecma/LexicalConventions/7.7.3.js, it works as DToA converts numbers to strings properly 2002-07-10 20:00:25 +00:00
brendan%mozilla.org e1fef918e9 Fix GC_MARK_DEBUG (DEBUG only, r/sr=dbaron). 2002-07-10 03:01:32 +00:00
rogerl%netscape.com aa1f6e4345 Fixes for bugs #155285 - Array.join(undefined) should use ','
#155289 - String.prototype.XXX.length has some wrong values
 #155291 - RegExp properties should be DontEnum
Plus fix for matching against RegEXp captures with undefined value.
2002-07-09 22:28:52 +00:00
igor%mir2.org a14335e198 Examples now uses try {} finally { Context.exit(); } to release Context even in case of errors 2002-07-09 17:49:16 +00:00
brendan%mozilla.org 3218d3f4c0 Null-check prop before dropping it (156354, r=khanson, sr=shaver). 2002-07-09 02:24:51 +00:00
brendan%mozilla.org 0465e3ac35 Eliminate broken old pre-ECMA switch case compile-time evaluation (144834, r=khanson, sr=shaver). 2002-07-09 02:15:49 +00:00
pschwartau%netscape.com cf83c07391 Trivial whitespace edit. 2002-07-09 00:48:13 +00:00
pschwartau%netscape.com 084f3c1133 Initial add. Regression test for bug 152646. 2002-07-09 00:43:15 +00:00
pschwartau%netscape.com 3dcadf4f0d Fixing mistake. Can't call printStatus(), etc. in js1_2 test directory, because js1_2/shell.js doesn't contain them. 2002-07-09 00:29:41 +00:00
timeless%mac.com e5366b1424 Bug 125411 [NuBus] Mac installer crashes with a type 12 error (SleepQInstall)
r=dmose sr=jst
2002-07-08 07:26:41 +00:00
pschwartau%netscape.com b1277f0b9b Initial add. Testing JS RegExp engine against results from Perl 5. 2002-07-08 04:03:11 +00:00
pschwartau%netscape.com 451a024ce1 Correcting the year in the copyright. 2002-07-08 03:58:27 +00:00
pschwartau%netscape.com d6131a082b Adding reference to bug 85721. 2002-07-08 03:36:34 +00:00
pschwartau%netscape.com 59653be598 Initial add. Testing JS RegExp engine against results from Perl 5. 2002-07-08 03:27:21 +00:00
pschwartau%netscape.com b3ec7432cd Initial add. Regression test for bug 144834. 2002-07-06 03:44:58 +00:00
igor%mir2.org 3815049c3a New security implementation. 2002-07-04 21:40:12 +00:00
timeless%mac.com bea9f48808 Bug 155466 clean up test consumers to correctly use NS_ShutdownXPCOM
r=dmose, sr=scc, moa: dougt, dbradley, gagan, harish, akk
2002-07-04 14:29:25 +00:00
brendan%mozilla.org d916599fd0 rogerl's fix to conform to ECMA by not enumerating regexp instance properties (155291, r=khanson, sr=brendan). 2002-07-03 21:07:53 +00:00
brendan%mozilla.org a1c47e682a rogerl's patch to fix some ECMA arity glitches (155289, r=khanson, sr=brendan). 2002-07-03 21:03:02 +00:00
brendan%mozilla.org 29b860201d khanson's fix for Function.prototype.apply.length ECMA glitch (145779, r=rogerl, sr=brendan). 2002-07-03 21:00:15 +00:00
rogerl%netscape.com 7d4a750bfb Bug #155285. Array.join(undefined) should use ',' - ECMA compatibility.
r=scole, sr=brendan.
2002-07-03 07:22:14 +00:00
timeless%mac.com 3d26b5e6ce Bug 154737 String(NaN) crashes JS Engine if JS_THREADSAFE is set
r=dbradley sr=brendan
2002-07-03 02:14:51 +00:00
seawood%netscape.com 8f6f1756ce Add CPP_THROW_NEW macro to the build system. This macro should be used when defining a local |operator new| function. It will be set to an empty throw function by default on all platforms except mac CW builds. This will allow us to not crash on systems that expect |operator new| to throw an exception by default and will suppress compiler warnings about how |operator new| should throw an exception instead of returning NULL.
Bug 149032 r=timeless sr=scc
2002-07-02 20:25:30 +00:00
rogerl%netscape.com 6ebd2105e5 Bug #154338, r=khanson,sr=jag. Misuse of string length field, when string
was dependent, extracted bad value for subsequent memory request.
2002-07-02 18:14:01 +00:00
pschwartau%netscape.com 054d1f4723 Adding new section authored by martin.honnen@t-online.de from bug 150859. 2002-07-02 01:24:34 +00:00
rogerl%netscape.com 355e24f593 Fixed matching of un-matched paren contents (e.g. /(a)\1/("x") ). 2002-06-28 23:04:55 +00:00
pschwartau%netscape.com 36bbd1ba30 Correcting grammar in comment. 2002-06-26 19:16:53 +00:00
pschwartau%netscape.com b237aabe74 Initial add. Regression test for bug 154338. 2002-06-26 19:04:00 +00:00
jst%netscape.com e694c1308f Fixing bug 129622. Make comparing an XPConnect wrapped native object to a number (<, >, ==, ...) in JS always return falase. r=dbradley@netscape.com, sr=jband@netscape.com 2002-06-25 22:14:58 +00:00
timeless%mac.com 8e11200b25 Bug 125411 [NuBus] Mac installer crashes with a type 12 error (SleepQInstall)
r=sfraser sr=beard
thanks to tim@maroney.org (see bug 138156)
2002-06-25 19:39:08 +00:00
pschwartau%netscape.com caebe93d57 Adjusting FAST constant upward again, so that test can pass in Rhino. 100 ms seems like a reasonable value. 2002-06-24 22:14:48 +00:00
khanson%netscape.com 424d7ac75c patch 88484 for bug 14044. checks for out of memory conditon in jsdtoa.c. sr=brendan, r=khanson 2002-06-24 06:14:02 +00:00
rogerl%netscape.com 9508cae65d Fixed whitespace testing. Fixed bug 122167 - $nn handling in replace. 2002-06-22 19:38:02 +00:00
rogerl%netscape.com 486171d5d2 Bug #112626 - setting RegExp static field 'input', making sure the paren
capture substring contents aren't gc'd. r=rginda, sr=brendan.
2002-06-21 18:38:45 +00:00
rogerl%netscape.com 27af23800b Fixing bug 153223; - 'flat' input may be null. 'isWhiteSpace' does not
return true for non-break spaces, use 'isSpaceChar' instead. Bytes are
signed so needed to extract char values more carefully.
2002-06-21 18:19:25 +00:00
pschwartau%netscape.com 166064cd6f Removing 6 skips. All pass now that the new Rhino RegExp engine has been checked in. 2002-06-20 22:31:47 +00:00
pschwartau%netscape.com 5341aaf026 Adjusting FAST constant upward so that test can pass in Rhino - 2002-06-20 20:53:10 +00:00
rginda%netscape.com b6b105c441 fix build bustage, NS_IF_RELEASE the raw pointer, not the COM pointer. 2002-06-19 22:40:19 +00:00
rogerl%netscape.com 8d4b102f83 New RegExp engine implementation. 2002-06-19 21:57:57 +00:00
rginda%netscape.com f239119376 Bug 151803, "Debugger is leaking JSDValues", r=peterv, sr=jst
Stop caching jsdIValues, it doesn't seem to be worth the lookup cost.  This has the side effect of plugging the leak, as described in the bug.
also...
* Convert a few raw pointers to nsCOMPtrs
* Fix a bug where removing the last filter did not null out the list head,
causing a crash the next time filters were used.
* Track live jsdStackFrames, so we can invalidate them all when execution
continues.  Without this, only the top frame is properly invalidated, and any
other frame accessed after a continue will do Bad Things.
* Add some debugging prints to GetInitAtService, which seems to be failing at
random times.
2002-06-19 21:56:23 +00:00
pschwartau%netscape.com 5b796ea735 Correcting Section 1 to test execution as well as compilation of function. 2002-06-19 00:23:43 +00:00
pschwartau%netscape.com 6e555f8ca4 Adding extra comments - 2002-06-19 00:13:04 +00:00
pschwartau%netscape.com 1784694c25 Initial add. Regression test for bug 146596. 2002-06-19 00:02:29 +00:00
nboyd%atg.com 33086d8fc5 Patch from morten@nvg.org :
I keep getting syntax errors with no line numbers as well.

That happens when I use Context.compileReader(..) to compile the script. The
DefaultErrorReporter will throw an exception with only the message and not the
line it happened on.

It is of course easy to workaround using your own error reporter, but I've
attached a patch to add on the line and source name so the DefaultErrorReporter
gives the similar output as EcmaError if that is wanted.
2002-06-17 00:49:47 +00:00
nboyd%atg.com a9bd55a1ce Update last qualified release statement. 2002-06-16 23:51:15 +00:00
dougt%netscape.com 252ea143d4 Fixes 48888 - xpcom flat file backend. r=dp@netscape.com sr=waterson@netscape.com 2002-06-14 21:33:05 +00:00
igor%mir2.org fa1b6e8b1b Added get/setJavaPrimitiveWrap to WrapFactory to get/set if instances of String, Number should be wrapped or not. 2002-06-12 19:11:50 +00:00
brendan%mozilla.org e017f61f6a Back out last change pending debug build (see crash bug 151066). 2002-06-12 08:31:43 +00:00
brendan%mozilla.org 2718cddb25 Report uncaught errors-as-exceptions from outermost JS_Compile*Function* API calls, just as for JS_Compile*Script* (150584, r=rginda, sr=jst). 2002-06-12 08:04:28 +00:00
igor%mir2.org 09a13f7ec3 Removal of unused code for explicit JSObject support:
> Norris Boyd wrote:
>
> Igor Bukaniv wrote:
> >
> > I am curios, why there is a need to have a special JSObject support in Rhino? Was it used for anything? The implementation in the ICEbrowser does not use it as in rare cases where conversion from JSObject to/from JS type may be needed (like calling JSObject.getWindow from a script), it seems that WrapHandler (or similar modifications to pre Rhino 1.5R2 sources) and Wrapper are enough to cover all the cases.
> Yes, we should probably just remove the JSObject code. We added it early on when Rhino was first written and we thought we might need JSObject compatibility with the JS + Java implementation in Navigator 4.x. That's not important now, so we should just remove this code (which likely doesn't work at this point anyway).
2002-06-12 05:32:35 +00:00
brendan%mozilla.org 106a6b8172 For the file input case, roll our own fgets replacement to handle NULs in files (148800, r=rogerl, sr=shaver). 2002-06-11 21:32:54 +00:00
brendan%mozilla.org 5840ea523a Drop non-ECMA f.a-for-arg/var-a-in-active-f support (137000, r=khanson, sr=shaver). 2002-06-11 20:43:50 +00:00
nboyd%atg.com 0e81293d62 Add to log of changes. 2002-06-10 17:44:44 +00:00
nboyd%atg.com f597bef5b2 Add new API class WrapFactory. 2002-06-10 14:28:37 +00:00
nboyd%atg.com 79cf50094d Update javadoc. 2002-06-10 14:27:43 +00:00
nboyd%atg.com 77686394b4 Add PrimitiveWrapHandler example. 2002-06-10 14:23:32 +00:00
nboyd%atg.com cdfc8a39a9 Add example of the use of a WrapFactory. 2002-06-10 14:19:09 +00:00
nboyd%atg.com bc8e896198 Fix javadoc. 2002-06-10 14:09:26 +00:00
igor%mir2.org 8e3b79791f Deprecating NativeJavaObject.wrap and using Context.getWrapFactory().wrap() instead. 2002-06-09 15:58:15 +00:00
igor%mir2.org e91fcea61e More comments 2002-06-09 15:57:03 +00:00
igor%mir2.org a8942006ea Documentation: points to watch when upgrading to WrapFactory 2002-06-09 15:56:12 +00:00
igor%mir2.org 44bf267c33 Fixing broken logic in emulating custom WrapFactory via deprecated WrapHandler:
the code should not call setWrapFactory with null argument, but use new WrapFactory to restore default behaviour
2002-06-09 15:54:30 +00:00
igor%mir2.org f5b045f5e5 Introducing the WrapFactory class that should be used in place of the deprecated WrapHandler interface. 2002-06-09 09:23:00 +00:00
mcafee%netscape.com 15974838f5 Splitting liveconnect off from the java module, new module is called liveconnect, similar to what was done for xpconnect (145347). r=blythe, sr=alecf, a=asa 2002-06-08 06:59:53 +00:00
pschwartau%netscape.com 023788708d Adding new sections authored by john@statesoftware.com from bug 150032. 2002-06-08 04:26:18 +00:00
alecf%netscape.com f0263ddf07 fix for bug 101761 - REQUIRES update - remove all REQUIRES that are no longer necessary.. r=cls, a=asa (build-only changes) 2002-06-06 20:28:14 +00:00
nboyd%atg.com 3e7f7632a9 Fix for bug 149285: Complier does not report the correct line number on
SyntaxError:Invalid assignment left-hand side.
2002-06-06 15:01:57 +00:00
igor%mir2.org 27af2c5e8a Replacing check for unescaped characters in encode/decode from searching in a string to doing switch. It provides a noticeable speedup during encoding/decoding of long strings where almost all characters should be encoded. 2002-06-05 20:40:57 +00:00
brendan%mozilla.org d613f5a321 Ensure a live keyHash *after* multiplying by the irrational (146907, r=dbaron, sr=shaver). 2002-06-05 00:47:38 +00:00
pschwartau%netscape.com 9c8befbfa3 Cosmetic whitespace cleanup. 2002-06-04 19:51:59 +00:00
rogerl%netscape.com b42c0eab50 Corrected tests to match ECMA - unmatched paren contents need to have the
value 'undefined' rather than an empty string.
2002-06-04 18:51:05 +00:00
nboyd%atg.com a9022fa595 Fix ClassCastException. 2002-06-04 18:37:21 +00:00
brendan%mozilla.org b9fa0b8b2b Respect addProperty failure (148899, r=khanson, sr=shaver). 2002-06-04 18:13:55 +00:00
pschwartau%netscape.com 77f663fa05 Initial add; regression test for bug 137000. 2002-06-04 02:19:48 +00:00
dbradley%netscape.com db781dd0c8 Fixes XPCONNECT_STANDALONE bustage - see bug 121438 for details 2002-05-31 13:51:08 +00:00
nboyd%atg.com 8026a2bd2f Fix bug found by felix.meschberger@day.com:
given the following object :

----------------------------------------------
function SomeObject() {}
SomeObject.prototype.exec = function() {
  var local = this.someField;
}
----------------------------------------------

i create an 'instance', set a field and call the exec method :

----------------------------------------------
var someField = "global field value";
var anInstance = new SomeObject();
anInstance.someField = "instance field value";
anInstance.exec();
----------------------------------------------

then the local variable 'local' in the exec() method is assigned the value
of the global 'someField' variable instead of the instance field value.

the problem seems to be in the ScriptRuntime.callOrNewSpecial() method,
which is called, because the parser treats the name 'exec' specially. in
this method the exec() method gets called with

   return call(cx, fun, thisArg, args, scope);

where the 'thisArg' parameter really is the global this value instead of
the dynamic this value, which is in the jsThis variable and which would be
the one needed...

is it legitimate to replace the above call in callOrNewSpecial() with the
following line :

   return call(cx, fun, jsThis, args, scope);

this seems to only happen for methods named 'exec', which are identified as
special in the NodeTransformer.isSpecialCallName() method.

any help is appreciated. thank you very much for your time.

kind regards,
felix
2002-05-30 13:41:16 +00:00
khanson%netscape.com 64051a587d patch to speed up array.sort of strings by 40% r=brendan, sr=shaver 2002-05-27 05:53:57 +00:00
brendan%mozilla.org 2906c7c1f9 Don't emit JSOP_DEF{VAR,CONST} unless at top-level or in a heavyweight function (146596, r=jband, sr=shaver). 2002-05-26 00:33:23 +00:00
shaver%mozilla.org 775b446db5 146210: Add Date.now to mirror JS_Now in script. r=rginda, sr=brendan. 2002-05-24 01:55:15 +00:00
igor%mir2.org b1f6b58c02 Back-indent the interpreter main loop to ease code following 2002-05-22 18:42:40 +00:00
igor%mir2.org a036547bcd Fixing bug 145791: apply and call with null and undefined arguments behaves as required and Function.prototype.apply.length returns 2. 2002-05-22 16:46:28 +00:00
pschwartau%netscape.com bdd941dd4c Removing this test. It has been superseded by test ecma_3/Function/15.3.4.3-1.js 2002-05-22 06:01:09 +00:00
pschwartau%netscape.com a59b7eb621 Initial add. Tests language conformance to EMCA-262 Edition 3 Section 15.3.4.4 2002-05-22 05:54:58 +00:00
pschwartau%netscape.com 2672c28320 Initial add. Tests language conformance to EMCA-262 Edition 3, Section 15.3.4.3 2002-05-22 05:54:21 +00:00
dbaron%fas.harvard.edu bc04016187 Fix Mac bustage from brendan's checkin. 2002-05-22 00:53:12 +00:00
brendan%mozilla.org cf77ba4f01 Don't fail to call OBJ_CHECK_ACCESS for o.__proto__ = x, with enough mode bits to say what's happening (143369, r=shaver, sr=jst). 2002-05-22 00:06:40 +00:00
igor%mir2.org 7317a7e130 Making HTML tag helper functions to convert thisObj to string to match SpiderMonkey and user expectations (was reported by Steven Beal <steven.beal@peregrine.com>) 2002-05-21 22:00:08 +00:00
igor%mir2.org 6f9f5d5e21 Optimization in toInt32/toUint32/toUint16 for common case of integer argument. 2002-05-21 20:18:15 +00:00
igor%mir2.org 3e5edd8a09 Added indexOf and lastIndexOf 2002-05-21 20:14:10 +00:00
igor%mir2.org 76a770d612 In getElements return ScriptRuntime.emptyArgs when array length is 0 2002-05-21 20:13:30 +00:00
pschwartau%netscape.com 9fda21bdc2 Initial add. Regression test for bug 145779. 2002-05-20 20:37:43 +00:00
bratell%lysator.liu.se ab59c40931 Bug 85267 - clear internal jsdtoa caches when closing down the js engine. Patch by steve.taylor@ndsuk.com r=khanson@netscape.com, sr=brendan@mozilla.org 2002-05-20 20:07:48 +00:00
igor%mir2.org 1b4079d0c1 From the email:
The attached patch adds support for debugging eval and Function code transparently. It changes omj.NativeGlobal and omj.BaseFunction to embed  line number of origin of eval and Function scripts into source name and pass 1 as base line for script code. In this way a debugger implementation can treat eval and Function code in the same way as scripts loaded from some url while giving more information about error location in case of an error in eval code as the error source would contain both line number of eval origin and line number in eval code itself.
I chose to embed line numbers via patterns like

sourcefile#<line-number>(eval)
sourcefile#<line-number>(Function)

just to be able to to pass the constructed name to URL constructor if the original sourcefile is a valid URL but it is pretty arbitrary.
2002-05-20 11:40:17 +00:00
bratell%lysator.liu.se c62b9f6f33 Followup to checkin for bug 120992. It asserted in an edge case which this fixes. r=mozbot 2002-05-18 17:33:37 +00:00
bratell%lysator.liu.se 5b26b0e44a Bug 120992 - avoid expensive locking when converting numbers to strings. Now we look once for the whole operation instead of over and over again any time we access a shared structure. r=khanson@netscape.com, sr=brendan@mozilla.org. 2002-05-18 06:21:49 +00:00
nboyd%atg.com 683f0b4ca7 Fix bug:
I have noticed that attempting to call a java method like this:

public void foo(String foo, Serializable bar)
{
	// un-important details
}

from script using foo("foo", "bar"); fails because the second argument
is not deemed coercable to Serializable.  A preliminary look at the
coercion code shows that no check is made in this case with
isAssignableFrom().
The to type is only tested against StringClass and ObjectClass (non
primitive case).
(See NativeJavaObject.getConversionWeight())
2002-05-18 01:57:52 +00:00
jst%netscape.com 7fd4ba4193 Checking in jband's fix for bug 143853. Make sure to refresh the cached prototype JSObject when a context is reinitialized and a global object is reused between pages in a window. r=dbradley@netscape.com, sr=jst@netscape.com 2002-05-17 22:36:54 +00:00
igor%mir2.org 3b94c8d2f9 In evalSpecial do not allocate int[] buffer Context.getSourcePositionFromStack if line number is already known 2002-05-16 04:18:56 +00:00
igor%mir2.org a559e378b3 In jsConstructor use single StringBuffer to build function source 2002-05-16 04:17:04 +00:00
igor%mir2.org 06f223b799 Check in generateFunctionICode for own source to pass to debugger to cover new Function(...) case where top level function is not part of surrounding script 2002-05-15 21:27:46 +00:00
brendan%mozilla.org 0c1c916895 Checking in khanson@netscape.com's patch fixing GMT offset day-overflow (65671, r=mccabe, sr=jband). 2002-05-15 19:44:34 +00:00
dougt%netscape.com e96df2ad1b Fixes mozilla/strings requiring unfrozen nsCRT class. patch by scc, r=dougt, sr=jag, b=136756 2002-05-15 18:55:21 +00:00
seawood%netscape.com 2b773ceb9e Because js uses static data structures and is linked into other shared libraries, js must be built as a shared library.
Thanks to Colin Blake <colin@theblakes.com> for the original patch.
Bug #127442 r=bryner
2002-05-15 01:37:07 +00:00
rginda%netscape.com 991fcbd8b6 add PERL_BIN and PERL_ARGS 2002-05-14 01:44:01 +00:00
rginda%netscape.com 822e0bd6cd initial add of js api documentation source 2002-05-14 01:39:03 +00:00
igor%mir2.org a56ed683ab Elimination of FileWindow.breakpoints and Main.breakpointsMap as reference to SourceInfo provides all necessary information 2002-05-11 18:28:44 +00:00
igor%mir2.org 35997ed96a Removing itsFirstLine and itsEndLine from InterpreterData and replacing in DebuggableScript getFirstLine, getEndLine and getIntructionLines by getLineNumbers as Debugger imlementation can get all the necessary information from single call to getLineNumbers 2002-05-11 16:15:50 +00:00
igor%mir2.org 11cd032a9c Implementing DebuggableScript.getInstructionLines via scanning icode array for line number icode tokens thus removing the need to call Context.setGeneratingDebug(true) to get brekable lines in the script. 2002-05-10 21:33:51 +00:00
igor%mir2.org b15d8e908f From email about moving breakpoint support away from Rhino core:
I attach the patch to move away setting/quering for breakpoints from the Rhino core to application as a debugger implementation can check if a particular line has a breakpoint or not. The changes to omj/tools/debugger takes more then few lines I initially thought but they are mostly caused by refactoring to implement different view to set/query breakpoints.

The patch replaces getLineNumbers, placeBreakpoint and removeBreakpoint in DebuggableScript by getFirstLine, getEndLine and getInstructionLines where the last function fills a boolean array to indicate which script lines can ever occur in DebugFrame.onLineChange. These are read-only functions so InterpeterData are never mdofied by the debugger.

omj/tools/debugger/Main uses this information to check whether it is possible to place breakpoint at a particular line, and if possible, it sets to true entry at the boolean breakpoint array. In this way testing for break in onLineChange is simple and fast as it just needs to check if breakpoint array holds true at the given line number position.
2002-05-10 16:17:33 +00:00
darin%netscape.com f43dfb75ba fixes bug 142870 "nsIFile should use UCS-2 instead of UTF-8"
r=dougt sr=alecf
2002-05-07 23:07:19 +00:00
brendan%mozilla.org c4a43f27fb Avoid toSource bloat in e.stack; fix related crash due to unrooted errObject in js_ErrorToException (139316, r=rginda, sr=shaver). 2002-05-07 08:34:51 +00:00
brendan%mozilla.org 22c610ed1f Fix old bogus static dollarStr thread-safety bug (142651, r=jband, sr=shaver). 2002-05-07 08:29:39 +00:00
bryner%netscape.com 92a1bec8eb Adding the functions JS_LockGCThingRT and JS_UnlockGCThingRT, which are variants that only require a JSRuntime, not a JSContext. Converted some internal callers to use the new interface. Bug 141356, patch from shaver, r=bryner, sr=brendan. 2002-05-04 05:28:09 +00:00
pschwartau%netscape.com f759b5fa79 Initial add. Regression test for bug 140974. 2002-05-04 01:13:40 +00:00
igor%mir2.org 417ef274c7 Replace when possible usage of API available only since JDK 1.2 by their JDK 1.1 analogous or by classes available in the Rhino core to make port to JDK 1.1 easier. 2002-05-03 19:42:36 +00:00
darin%netscape.com 367fdf02e3 fixes build bustage with --enable-xpctools
patch=dmose r/sr=darin
2002-05-03 19:04:14 +00:00
igor%mir2.org 514db9985d Store only single instance of any string in InterpreterData.itsStringTable and remove itsStringTableIndex and itsDoubleTableIndex from InterpreterData as they are used only during code generation 2002-05-02 21:19:43 +00:00
igor%mir2.org a7a9d2d975 Allow to put null keys to ObjToIntMap and optimize Iterator not to search through key array tail after processing the last key. 2002-05-02 21:15:33 +00:00
igor%mir2.org 52fa3848f7 In remove set int key value to 0 so a new key with the same slot would get initial 0 after put(int, Object) 2002-05-02 21:11:05 +00:00
brendan%mozilla.org 66c0e18306 Fix js_SetProtoOrParent to handle non-native and native-but-incompatible-class-change proto-setting scenarios (140164, r=khanson, sr=jband). 2002-05-02 20:59:35 +00:00
nboyd%atg.com f458de53ca Fix broken link 2002-05-01 19:21:51 +00:00
nboyd%atg.com 1cb36d8f93 Now pass 104077. 2002-05-01 16:47:25 +00:00
igor%mir2.org 8da10d64be Allow in UintMap for any key to hold int and object values simultaneously, as the old code could only detect that the key is allowed to hold an object value only if there are no other keys with int values. In the new version, if the key is present, it always has both int and object values, but they default to 0 or int if not specified in put. It is effectively the old behavior when the map contained at least one int key, but at least it is documented. 2002-05-01 14:10:41 +00:00
brendan%mozilla.org 7be636bf86 Don't 'constant-fold' if(false)var foo=42 into nothing (140974, r=khanson, sr=shaver). 2002-04-30 23:28:34 +00:00
igor%mir2.org f8f19e8815 LabelTable cleanup:
1. Targeting of labels with 0x80000000 biscuits is moved from LabelTable to ClassFileWriter as this is classfile specific and is not necessary in Interpreter.
2. LabelTable allows for pc > Short.MAX_VALUE as this restriction is classfile specific. The only requirement is for jump offsets to stay within short range.
3. LabelTable is made private member of Interpreter and ClassFileWriter instead of being classes' superclass to avoid API leakage that forced optimizer.Codegen to declare few utility methods public as they got the same signature as LabelTable methods visible throw Interpreter inheritance.
2002-04-29 19:21:57 +00:00
igor%mir2.org a5f83f7e8c I replaced java.util.Enumeration type for result and arguments of ScriptRuntime.initEnum/ScriptRuntime.nextEnum by Object to allow for greater flexibility in for (...in...) implementation. 2002-04-29 17:31:11 +00:00
nboyd%atg.com 36d969697c Remove skip for bug 120194 2002-04-29 00:58:40 +00:00
nboyd%atg.com d11c722d61 Patch from Igor to fix 120194 2002-04-29 00:56:30 +00:00
igor%mir2.org 1faf10a430 Do not call acquireLabel/addLabelFixup/markLabel if label is not stored in parse tree and can be resolved immediately after node subtree generation (see new addForwardsGoto and resolveForwardGoto methods) 2002-04-28 15:17:24 +00:00
igor%mir2.org 47bb60c12d Do not allocate Label object and instead store label's PC and fixups in itsFixupTable and itsFixupTable arrays 2002-04-27 12:27:14 +00:00
igor%mir2.org 933b6749a9 Hiding details of omj.LabelTable implementation behind new getLabelPC, addLabelFixup, fixLabelGotos and clearLabels methods and making all its fields private. 2002-04-27 09:13:28 +00:00
darin%netscape.com 1b1677bbe9 fixes bug 129279 "nsIFile unicode/utf8/ascii task"
r=dougt sr=alecf
2002-04-27 05:33:09 +00:00
igor%mir2.org 189226474a Refactoring interpreter initialization to follow code more easily 2002-04-26 23:18:08 +00:00
igor%mir2.org 7247d7ca26 Tab removal 2002-04-26 23:14:50 +00:00
rginda%netscape.com 2c9073f1d9 - 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 058f6ca146 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 3053edad20 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 ec12686c50 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 793ec7fc00 Reverse of Patch 66477 for bug #121744. Bug #131348, r=shaver, sr=brendan. 2002-04-25 20:33:33 +00:00
igor%mir2.org c9141d85fe Links update 2002-04-25 06:46:47 +00:00
khanson%netscape.com 90406f1bc8 fixes memory leak in jsdtoa.c bug 138666, sr=brendan, r=khanson 2002-04-24 23:36:48 +00:00
igor%mir2.org 65c51ba40f 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 bd97bc5dc4 Initial version 2002-04-24 07:44:52 +00:00
igor%mir2.org 0fd57cc8e2 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 d85e3c8435 Updating the debugger to reflect changes in Rhino debug API. 2002-04-22 20:47:51 +00:00
igor%mir2.org 293ec8ac77 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 c78edeb78c Implement support for new Package(<classLoader>) 2002-04-21 01:50:43 +00:00
igor%mir2.org 96c9c4a60b 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 77589e0e41 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 d42b1b1fd4 Add make -j support to win32 gmake builds.
Bug #132848 r=bryner
2002-04-19 02:42:28 +00:00
igor%mir2.org 5427ff0d5c 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 4aafc80db4 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 5864247424 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 d4ef7bfe3b 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 08993401bb Initial add. Regression test for bug 137181. 2002-04-12 21:06:15 +00:00
pschwartau%netscape.com f18c60f449 Updating status messages to the current format. 2002-04-12 20:23:33 +00:00
igor%mir2.org e1154dafa5 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 e7fdceb967 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 3c91dde9aa 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 9bf7b0e6f1 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 1e49ea41c0 Use hasProperty rather than getProperty to avoid creation of lazily evaluated properties. 2002-04-11 12:54:16 +00:00
igor%mir2.org 354ee5233e 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 71afae2570 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 3d43412c32 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 fd9b58841f Improving comment. 2002-04-10 22:50:42 +00:00
pschwartau%netscape.com 9d0d4a659f 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 8343e0fb57 Adding a utility function to detect the Rhino shell. 2002-04-10 22:39:16 +00:00
pschwartau%netscape.com f27befc910 Initial add. Regression test for bug 131348. 2002-04-10 22:18:32 +00:00
igor%mir2.org 88bcb4f92f Removal of unused maxInstanceId (I forgot to do it during 1.20 update) 2002-04-09 23:24:19 +00:00
igor%mir2.org 253c7cebaa 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 673dbcff62 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 8f5b38e80d Elimination of InterpreterData.idFunction as it duplicate InterpreterData.itsFunctionType != 0 2002-04-09 18:19:01 +00:00
igor%mir2.org 4ab08db897 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 aabbade474 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 42355af8e6 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 83d7d7e110 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 d62ef0ee4f 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 dcac9d0876 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 56b957f998 This was for the very old implementation. Nothing there is relevant now 2002-04-06 14:34:56 +00:00
igor%mir2.org f2d97cbe19 Uodate with info on Break on Function Enter/Exit options 2002-04-06 14:18:32 +00:00
igor%mir2.org 00116f3a2b 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 1dda1f5858 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 ac14ac5b17 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 4a185839fe Makefiles no longer supported: use Ant. 2002-04-06 01:56:50 +00:00
bnesse%netscape.com ec282b702d 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 f4f4393ee1 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 b14677c338 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 e8fd73f4c2 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 8aa9c1dd37 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 83a2e18673 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 fb7f569021 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 e2d6c3d8cb 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 4917abf95f 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 b9a731f3e4 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 98f248d2b4 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 c0b1c69421 Correcting mistake in location of JS2 debug shell on Windows. 2002-03-30 00:35:16 +00:00
pschwartau%netscape.com 73fca3dc3e Added another big function to compile, from duplicate bug 133897. 2002-03-29 15:46:09 +00:00
sfraser%netscape.com 743a369ae1 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 5b760bc860 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 a1ae6c2317 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 35cbdc6efc Removing an extraneous line. 2002-03-25 23:51:06 +00:00
pschwartau%netscape.com 5d694a5ed1 Initial add. Regression test for bug 130451. 2002-03-25 23:41:56 +00:00
pschwartau%netscape.com 9816f5bce4 Adding a tail recursion test by Georgi Guninski 2002-03-25 00:25:45 +00:00
nboyd%atg.com 61ba56204b Add missing support for multiple -implements classes 2002-03-24 22:37:57 +00:00
dbaron%fas.harvard.edu 92aa754e0a 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 01eeb522fc 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 53d569f2c5 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 cce1791273 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 df16547f85 Fixing a typo. 2002-03-23 01:50:16 +00:00
khanson%netscape.com 91b597dd3f 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 24f34e254a Updating JS_GetImplementationVersion() to date of latest JS release (67111). 2002-03-22 20:43:47 +00:00
jband%netscape.com b61e6438ca 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 4ea1dd7590 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 4c803332db 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 ca148e6fd1 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 f3f0d5ad56 Fix eval code cases on 132217 2002-03-21 17:26:55 +00:00
brendan%mozilla.org 17a77e1708 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 1769c7a05e Fix bug 132217. 2002-03-21 01:44:54 +00:00
igor%mir2.org 5bd7d96787 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 925eef10c4 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 6099f1ab53 Deleted an extraneous line; improved readablity. 2002-03-20 19:13:36 +00:00
khanson%netscape.com 1f44b97b02 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 7ff54ed3bf 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 a8d2f2a22f Initial add. Regression test for bug 131964. 2002-03-20 00:23:22 +00:00
brendan%mozilla.org 9dab2ee0b0 Fix ChangeScopeTable gross dimensioning bug (131904, r=scole&khanson, sr=jband, a=asa). 2002-03-19 23:25:17 +00:00
brendan%mozilla.org 31b58dd43b 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 fc883176bf Bug 106386 rid source of misspellings
r=db48x sr=blake a=asa
2002-03-19 04:30:17 +00:00
igor%mir2.org cabfb135bd 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 038c198df2 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 2637565e90 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 f1d162f291 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 866ed959ce Initial add. Regression test for bug 131510. 2002-03-17 05:24:01 +00:00
igor%mir2.org 9e6193086a 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 74f8146547 Added .cvsignore to ignore generated sources 2002-03-16 23:34:23 +00:00
igor%mir2.org 506b614b74 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 8c5dc028c6 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 0da9eebc4b 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 36fed32112 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 2a7c647e4e 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 5d1fd149ce 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 af8cfb85ac 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 afcecf88fe 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 1ddd32348d Added two new cases where the result is all zeros. 2002-03-15 05:15:57 +00:00
jband%netscape.com 9415313268 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 be23a9b2f9 bug #130711, r=khanson, sr=brendan, a=asa, memory leak in JS_dtoa 2002-03-15 00:11:44 +00:00
brendan%mozilla.org 69ec40fdd0 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 9cf2b94e8e 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 08b7ea01bd 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 3a4b35934d 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 d8e97aa480 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 c641143618 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 688bec4a30 Turn on debug info in class files by default. 2002-03-13 19:34:23 +00:00
nboyd%atg.com 10a799dcbf 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 b8604537e0 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 aaba13d85c Rename catchStack to tryStack and allocate it only when required 2002-03-12 22:02:55 +00:00
igor%mir2.org bf335ecd74 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 85f61aea80 Missing JSFunction API (129545, r=shaver, sr=jband, a=asa). 2002-03-12 21:58:27 +00:00
brendan%mozilla.org 080a1d8904 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 8acf0e7dc0 Replacing original licensing text from C version of this file. 2002-03-11 23:11:55 +00:00
jband%netscape.com 45fbcd08b5 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 6f913df624 Avoid MSVC bogo-warning. 2002-03-09 00:55:26 +00:00
brendan%mozilla.org 8e40c41dd2 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 2130c204f2 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 05677fad63 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 b6d310bdda 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 026dda9f95 fixes bug 124042 "support internationalized URIs" r=dougt, sr=alecf, a=asa 2002-03-06 07:48:55 +00:00
pschwartau%netscape.com 7bf950d691 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 f2db0feaec Initial add. Regression test for bug 127557. 2002-03-06 05:14:58 +00:00
brendan%mozilla.org 283927254c 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 8d87f23bdb Universal config file for Darwin. 2002-03-05 15:52:37 +00:00
beard%netscape.com f99920681d fix for bug #59686, a=asa@mozilla.org, r=rogerl, sr=shaver. 2002-03-05 15:09:05 +00:00
shaver%mozilla.org 8e595ac5fd 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 fd47a2b589 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 470281580d Needed for Mac OS X 10.1.3 / Darwin 5.3 2002-03-04 16:14:41 +00:00
pschwartau%netscape.com 90a17d03d6 Initial add. Regression test for bug 122076. 2002-03-04 04:11:47 +00:00
nboyd%atg.com d608b0d326 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 8c62b9c3cc 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 b91fdf7b4a 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 93fb7da7ba 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 5c50a97069 Skip new test that uses the Error.stack property of SpiderMonkey. 2002-03-01 21:58:23 +00:00
pschwartau%netscape.com cae89f0931 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 3b2af78a32 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 95713a1ba6 Improved regexp reporting for Rhino by imitating SpiderMonkey's Array.toSource() method. 2002-02-27 18:36:46 +00:00
rginda%netscape.com 615e1e1682 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 56974c5103 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 e807b080fd 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 1fd0440412 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 bd48843259 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 92a2d6d41d 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 d3e5bf2b36 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 e310922980 Comment change only, quick followup to last humongous checkin. 2002-02-23 04:44:40 +00:00
brendan%mozilla.org 3d6bf5b3f4 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 52765a23f3 Adding two more cases to test. Improving readability. 2002-02-23 01:14:51 +00:00
nboyd%atg.com c6a13d37b2 Missed one codepath in previous fix for 126722. This should complete the fix. 2002-02-22 17:40:32 +00:00
nboyd%atg.com d0fab0f0f7 Fix bug 126722 2002-02-21 15:53:50 +00:00
pschwartau%netscape.com 8bd647f85c Initial add. 2002-02-20 19:07:08 +00:00
jband%netscape.com 0c9917b955 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 5f0ee796ec 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 6fd6c3f44f r=thesteve, sr=brendan, bug @119909 - crashing RegExp with > 10 backrefs. 2002-02-20 05:43:26 +00:00
dbradley%netscape.com f4fbed4e14 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 3ad88a5a1a 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 474411362e Skipping new testcase until bug 126317 is fixed. 2002-02-19 01:53:39 +00:00
brendan%mozilla.org 866338ff8e 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 9ba6a7adbd Adding more cases and improving comments. 2002-02-18 23:59:15 +00:00
jband%netscape.com 65e43ae322 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 f673b27a76 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 a42a6941bd Fixing a typo in the comments 2002-02-18 23:29:54 +00:00
seawood%netscape.com 52cc4f6707 Removing unneeded LIBS setting. LIBS isn't used to link libraries. 2002-02-18 23:19:49 +00:00
pschwartau%netscape.com 82dc1161ae Initial add. 2002-02-18 22:03:46 +00:00
nboyd%atg.com 65958a6e3e Fix more broken links. 2002-02-18 16:25:26 +00:00