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

3686 Коммитов

Автор SHA1 Сообщение Дата
nboyd%atg.com bf31ffb5f8 Add archive info 2001-06-11 14:16:18 +00:00
pschwartau%netscape.com 11b72244c8 Allow user-defined exit codes: fixed bug that was preventing this from working. 2001-06-08 22:05:32 +00:00
Xiaobin.Lu%eng.Sun.com 82a75c2a2f Fix for bug 77600
r=beard, sr=brendan, a=blizzard
2001-06-07 16:20:50 +00:00
nboyd%atg.com 665e7e9e9e This adds the hasFeature method to Context and modifies
NativeDate.getYear to use
cx.hasFeature(Context.FEATURE_NON_ECMA_GET_YEAR) for the behavior check.
2001-06-07 16:09:57 +00:00
nboyd%atg.com 1e71ac75ba Clean up classloader usage to use the thread's context class loader. 2001-06-07 16:04:33 +00:00
brendan%mozilla.org 3dced335a3 Fix duplicate switch case detector bugs (83532, rogerl's patch, sr=jband, sr=brendan, a=chofmann). 2001-06-06 23:28:29 +00:00
pschwartau%netscape.com 1108eb2b5f Thanks to rginda, a better fix for the previous issue - 2001-06-06 22:15:13 +00:00
pschwartau%netscape.com b72d3721bf Improvement on last patch: make distinction between HTML vs. console failure output. 2001-06-06 16:52:20 +00:00
valeski%netscape.com 5892765fc6 r=chak, sr=vidur, a=tor. 82000. removing unused arg from nsICategoryManager. 2001-06-05 21:25:57 +00:00
pschwartau%netscape.com 8cc759fb23 Initial add. 2001-06-05 20:56:40 +00:00
pschwartau%netscape.com 80f20e863c Making test a little more demanding - 2001-06-05 20:56:07 +00:00
nboyd%atg.com fb69c14ae4 Patches from Igor:
-----
The patch adds to NativeArray.put a check for (this == start) so the
length field or a dense array element would not be updated if this !=
start. The following script exposes the problem:


function Test() { }

var array = new Array(0, 0); // Trigger dense mode
Test.prototype = array;

var test = new Test();

array[0] = 1;
test[0] = 2;

print(array[0]); // Should print 1, not 2
-----
When initially I switched NativeDate to use IdScritable, I made
toGMTString just an alias to toUTCString. Later I realized that it could
cause troubles if someone would check Date.prototype.toGMTString.name to
get "toUTCString" so I made the code to allocate a separated IdFunction
to toUTCString. Now when I read ecma 3 appendixes I see that the initial
behavior is what actually Ecma 3 requires. Here is an extract from B.2.6:

The Function object that is the initial value of
Date.prototype.toGMTString is the same Function
object that is the initial value of Date.prototype.toUTCString.

Sometimes doing nothing is the best solution...

The attached patch fixes that and inlines many 1-3 lines functions as
optimization that java compilers typically do not want to do...
2001-06-05 17:39:58 +00:00
pschwartau%netscape.com 971aeaeabb Initial add. 2001-06-05 01:28:04 +00:00
pschwartau%netscape.com f553a16ec4 Added two new sections to the test. 2001-06-05 01:26:59 +00:00
jband%netscape.com 2544c71288 fix bug 84020 - don't override the context global, bug 83367 - add deferred Release of natives of wrappednatives to avoid nesting into js_AllocGCThing during JS gc, and bug 82274 - fix a little leak (patch from dbradley). sr=jst r=dbradley a=drivers 2001-06-05 00:59:53 +00:00
jband%netscape.com ea41e651fd fix bug 78428 by making sure to use the lesser of the freeslot or nslots value when marking slots. This is necessary because objects can now be in an initial state where the freeslots is a larger number than the nslots - and the actual number of slots in the array. sr=brendan r=beard a=drivers 2001-06-05 00:47:56 +00:00
jband%netscape.com 6de619c0b1 fix bug 82034 by making wrapped Java objects be not JS natives again but with their own slot accessors. This should bring JS -> Java communication back to life. sr=brendan r=beard a=drivers 2001-06-05 00:39:13 +00:00
cls%seawood.org 2d4ce763e3 Handle cygwin & mks uname output on win32.
Bug #72154 r=pschwartau@netscape.com a=asa@mozilla.org
2001-06-05 00:08:21 +00:00
nboyd%atg.com 8214f675ca The patch applies the following optimization to TokenStream:
1. Keyword search via Java Hahstable is replaced by explicit "switch"
code generated by idswitch tool. It not only speed up keyword search and
eliminates all Integer objects created to hold keyword tokens and
corresponding Hahstable structures, but it also reduces code size due to
very poor array initialization support in JVM.

2. It replaces the isXDigit method by xDigitToInt that either converts
its argument to 0..15 or returns -1 if it is not a hex digit and updates
the method usage accordingly The patch updates NativeGlobal.js_unescape
to reflect this usage change.
2001-06-04 13:59:30 +00:00
nboyd%atg.com 1f68a2a9d8 Have doc reference nested apidocs. 2001-06-04 13:58:51 +00:00
nboyd%atg.com 65691a4f92 Add skip for bug 83051 2001-06-04 13:55:22 +00:00
pschwartau%netscape.com 63594bdfb4 Intial add. Regression test for bug 83532. 2001-06-01 23:56:58 +00:00
nboyd%atg.com 9249a305b5 Add new CounterTest example. 2001-06-01 15:26:45 +00:00
jband%netscape.com e86547342e NOT PART OF ANY BUILD - adding a test case for use in demonstrating a crash to be fixed 2001-05-31 18:13:26 +00:00
nboyd%atg.com 69580206c7 Patch from Igor:
In the attached patch I added documentation, did some inlining in the
get method implementation to gain some speed and overrode defineProperty
so it plays better with id-based properties.
2001-05-31 14:44:21 +00:00
pschwartau%netscape.com 064cfddeff Improving the error-reporting mechanism to include bug number and status lines. 2001-05-31 00:17:45 +00:00
pschwartau%netscape.com 6137d538b5 In this test, it's important to reportCompare() the other cases before the last case is attempted. Do not store results in an array. 2001-05-30 23:29:29 +00:00
pschwartau%netscape.com 72612b689d Initial add. Regression test for bug 83293. 2001-05-30 22:10:37 +00:00
nboyd%atg.com 1be6c5fc8f For backwards compatibility keep an old method name used by
Batik and possibly others.
2001-05-30 17:29:42 +00:00
pschwartau%netscape.com bc9dcf60de Correcting error in InLeapYear() function. 2001-05-29 16:27:45 +00:00
pschwartau%netscape.com 2d07cee32a Correcting mistake in InLeapYear() function. 2001-05-29 16:22:23 +00:00
pschwartau%netscape.com 071bfdca3c Correcting mistake in InLeapYear() function. 2001-05-29 16:13:56 +00:00
pschwartau%netscape.com 660421114a Correcting a mistake in InLeapYear() function. 2001-05-29 16:10:58 +00:00
nboyd%atg.com 481aa41f03 Add new FAQ, remove obsolete one. 2001-05-29 15:11:17 +00:00
nboyd%atg.com 8b34980fb3 Patches from Igor:
-----
The patch fixes a bug in getIds method where the assignment "result =
tmp" was missed, adds the public method activateIdMap(int maxId) to
IdScriptable and changes setAttributes method not to allow setting of
attributes that are less restrictive then ones returned by
getIdDefaultAttributes. That was supposed to be the case and the patch
makes it explicit.
-----
The patch makes BaseFunction.setImmunePrototypeProperty public so it can
be called from other packages (regexp).
-----
The patch switches NativeRegExp and NativeRegExpCtor to use
IdScriptable. It also changes code in a few places to passes Context and
RegExpImpl directly instead of using Context.getCurrentContext().

The patch also fixes a bug when

for (var i in RegExp) { print(i); }

would not include $1..$9 in the output in violation with Ecma. It was
caused by not overriding ScriptableObject.getIds in
NativeRegExpCtor.
2001-05-29 14:07:49 +00:00
beard%netscape.com ab5da9f316 Added mozilla/js/rhino/src/org/mozilla/javascript/BaseFunction.java source file. 2001-05-29 13:48:46 +00:00
pschwartau%netscape.com 23f4943fd8 Minor whitespace fix. 2001-05-28 22:47:14 +00:00
pschwartau%netscape.com 708ad8da18 Initial add. 2001-05-28 22:46:31 +00:00
nboyd%atg.com d589083a1e Patches from Igor:
-----
The patch changes NativeCall to use IdScriptable. This is done mostly
for uniformity with other Native* classes plus it would allow to call
NativeCall.init directly and make NativeCall package private.
-----
The patch changes NativeScript to use id-based properties. Due to
inheritance from NativeFunction, id support requires to take into
account the fact that there are instance ids available from
BaseFunction. This is the reason to use "int prototypeIdShift" instead
of "boolean prototypeFlag" so it can store instance id offset.

The patch updates ScriptRuntime.callOrNewSpecial to check against
IdFunction and not FunctionObject for the Script exec method where it
also add finally clause to make sure that Context.exit would always be
called after Context.enter in the evalScript method.
-----
After converting NativeScript and NativeFunction to use IdScriptable,
they get scope argument directly as a parameter of execMethod call, so
cx.ctorScope is not used any more. The patch removes code to set/unset
cx.ctorScope.
-----
[This patch depends on conversion of NativeScript and NativeCall to use
IdScriptable and the patch to remove access of ctorScope from
FunctionObject]

The patch changes Context.initStandardObjects to call NativeCall.init
and NativeScript.init directly plus it unrolls the lazily initialization
loop. Due to rather poor support of an array initialization in Java byte
code, it actually decreases code size while eliminating are creation of
array object. The patch also removes ctorScope field as unused.
-----
The patch makes sure that ids used by NativeGlobal are visible only in
the object instance that initializes global scope and removes some junk
white space at line ends.
-----
To use the idswitch tool to generate map for strings that can not be
part of Id_ Java identifier like $*, I added code to the tool to look
for "// #string=...#" in the id definition line. The attached README
file also contains some documentation about the tool and should go to
idswitch directory.

The patch was made from toolsrc/org/mozilla/javascript/tools via:
cvs diff -u > idswitch_patch
2001-05-25 13:24:17 +00:00
brendan%mozilla.org 769e09a93e - Add a generation number to JSDHashTable that counts entryStore changes due
to grows, shrinks, and compresses.  This helps JS_DHashTableOperate callers
  who hold returned entry pointers to validate those pointers and avoid having
  to re-lookup an entry by its key.
- Balance that addition by removing JSDHashTable.sizeMask, which is induced by
  JSDHashTable.sizeLog2 at the cost of two typically single-cycle instructions.
- Use JSDHashTable.generation in jsobj.c to avoid unsafely dereferencing an
  entry pointer held across calls to JSClass.resolve from js_LookupProperty,
  which may recur and add entries to cx->resolving, growing that table and
  invalidating entry pointers held by earlier js_LookupProperty activations.
(bug 78121, r=jst@netscape.com, sr=jband@netscape.com, a=asa@mozilla.org)
2001-05-25 03:05:38 +00:00
nboyd%atg.com c23c5d3729 Patches from Igor:
----
The patch changes Notification to extend from BaseFunction and adjusts
Context, FunctionObject and NativeScript accordingly.
----
The patch changes BaseFunction.jsConstructor to use the scope argument
passed to execMethod instead of using cx.ctorScope. This argument is
null in this case because when calling execMethod IdFunction.construct
does not set cx.ctorScope because scope is passed to execMethod as argument.
2001-05-24 13:38:12 +00:00
pschwartau%netscape.com 4c787095dc Adding attribution to Mike Epstein, creator of this test. 2001-05-23 23:01:08 +00:00
pschwartau%netscape.com bd8d3a3346 Initial add. Regression test for bug 82306. 2001-05-23 22:47:48 +00:00
brendan%mozilla.org 3ce3840561 Fix failure to round up in chunked realloc test in AddCharsToURI (82306, r=rginda, sr=scc). 2001-05-23 06:49:19 +00:00
brendan%mozilla.org 80d36b42b2 Add intern help message, caught by epstein@tellme.com (not part of build). 2001-05-23 06:13:13 +00:00
brendan%mozilla.org 8952a0a28f Lazily pin the less likely atoms when resolving standard class names (77861, r=jst, sr=jband). 2001-05-23 04:02:06 +00:00
jband%netscape.com 1f119bd32a fix bug 82220. enumeration of Components.interfaces should only include scriptable interfaces. r=vidur sr=jst 2001-05-23 00:12:04 +00:00
rginda%netscape.com 3fac831047 create a dummy stack frame before calling out to the new-script-hook. The dummy frame prevents the script from being affected by any GC the hook may trigger. See bug 77636. author=shaver, r=me, sr=brendan 2001-05-22 23:57:37 +00:00
brendan%mozilla.org e46d5f7fc4 Warning abatement (r=polarbear, sr=lumpy). 2001-05-22 23:25:18 +00:00
nboyd%atg.com 0aa0daf081 This patch renames in IdFunction the methodName field into functionName
and ads getFunctionName method to match NativeFunction.
2001-05-22 12:51:21 +00:00
nboyd%atg.com a388953fef This patch fixes the bug when global With object was set to With
prototype and not With constructor, makes id for constructor property
visible only in a prototype instance and removes the unused scopeInit
function.
2001-05-22 12:51:02 +00:00
nboyd%atg.com 357263c927 The patch adds new class org.mozilla.javascript.BaseFunction as a base
for classes implementing the Function interface and switch
IdFunction.java to use it. The code in BaseFunction to serve as
Function.prototype is not used yet. The patch modifies NativeCall so it
can be used against BaseFunction.

The patch was made from org/mozilla directory via
diff -uN javascript.0 javascript > BaseFunction_patch
2001-05-22 12:50:26 +00:00
scc%mozilla.org ced4be648e ok, but make this local bustage fix into a global one 2001-05-22 08:43:30 +00:00
scc%mozilla.org 63395b4d88 Fixing AIX/BeOS bustage. The statically determined length of the string was |0|, and on these ports, that was erroneously considered a candidate for conversion to a pointer, which made selection of the appropriate constructor for |nsDependentString| ambiguous ... go figure. 2001-05-22 08:02:58 +00:00
scc%mozilla.org c9eeb0d1ec Fixing AIX/BeOS bustage. The statically determined length of the string was |0|, and on these ports, that was erroneously considered a candidate for conversion to a pointer, which made selection of the appropriate constructor for |nsDependentString| ambiguous ... go figure. 2001-05-22 07:25:25 +00:00
jband%netscape.com 90b7fefa54 - Fix bug 81341. Force creation of a WrappedJS around the JSObject of
aWrappedNative when doing aggregation. r=dradley sr=jst.
- Fix bug 81877. Avoid infinite recursion when reporting threadsafety
error. r=perterv,dradley sr=jst.
- Fix bug 81882. Use JS_AddNamedRootRT in XPCWrappedNative::AddRef to avoid
the unnecessary cost of creating an XPCCallContext in this frequently called
method. r=dbaron,dbradley sr=jst.
2001-05-21 22:45:14 +00:00
nboyd%atg.com e4294421c9 This patch changes NativeError.java to store message and name properties
in fields of the object itself instead of using the standard property
hashtable in ScriptableObject.java. This saves 3 object instances per
NativeError (2 slot entries and hashtable array itself) and given the
fact that NativeGlobal defines a few permanent Error instances, it is
visible saving even after taking into account code size increase.

The change also gives a good test of IdScriptable implementation.

-----

This patch introduces the uniform decompile method for NativeFunction
and IdFunction with the signature:

public String decompile(Context cx, int indent, boolean justbody)

instead of NativeFunction.decompile(int indent, boolean toplevel,
boolean justbody) and IdScriptable.toStringForScript(Context cx) and
replaces the special treatment of NativeJavaMethod in
NativeFunction.jsFunction_toString by overriding decompile in
NativeJavaMethod

-----

This patch adds getFunctionName to NativeFunction to return function
name and replaces few places with jsGet_name usage by getFunctionName

The patch was made via
diff -ru javascript.0 javascript > name_patch
from org/mozilla directory
2001-05-21 15:04:54 +00:00
rginda%netscape.com 8a96b5310f - not built -
add enumerateScripts() method to jsdIDebugger service
don't create a new debugger context if the user trys to call on[ForRuntime]() multiple times
2001-05-21 07:18:10 +00:00
rginda%netscape.com faa84321f8 - not built -
add onForRuntime() method to jsdIDebuggerService to let native code turn on the deubgger (on() can only be called from js)
register an app-start observer so we can turn on the debugger at startup if "js.debugger.autostart" pref is true.
r=peterv, bug 81840
2001-05-21 06:00:12 +00:00
nboyd%atg.com 35caf7c2bb Subject:
Rhino: behavior update for IdScriptable subclasses
        Date:
             Fri, 18 May 2001 11:45:00 +0200
       From:
             Igor Bukanov <igor.bukanov@windriver.com>
 Organization:
             Wind River
         To:
             Norris Boyd <nboyd@atg.com>




The attached patch introduces separation between id-base properties in
prototype instances and the rest of objects so it is possible to
allocate some ids for each instance and the rest only for prototype. The
patch adds to each descendants of IdScriptable a special prototypeFlag
which set to true only if object serves as a global prototype and all
methods that check/return ids first check for that flag. (This is the
reason for the patch size: diff is not very well in dealing with
indentation changes.)

In this way ids for prototype properties are completely hidden from
potential subclasses and there is no need to define methods like
getMaximumId in most cases, only if some ids present in each instance,
IdScriptable.maxInstanceId should be overridden to return max id present
in each instance.

The patch also replaces 2 boolean fields in IdScriptable by bit masks in
the setupFlag field.
2001-05-19 17:39:50 +00:00
jst%netscape.com 77aeecc056 scc checking in from jst's account. bug #75220: sr=jst, rs=brendan. renaming |nsPromiseC?Concatenation| to |nsDependentC?Concatenation|; |nsPromiseC?Substring| to |nsDependentC?Substring|; |nsLiteralC?String| and |nsLocalC?String| to |nsDependentC?String|, as these new names better reflect clients obligations to instances. 2001-05-19 11:27:30 +00:00
jband%netscape.com a698fad77c fix bug 49017. This extends our mapping of idl [function] interfaces so that they will try to treat the JSObject as a callable function (as before), but if the JSObject is *not* a function object then xpconnect will fall back to the non-[function] behaviour of trying to lookup a named function on the JSObject and then call that. r=jst sr=brendan,vidur,jst,(and everyone else I guess) 2001-05-18 23:35:03 +00:00
jband%netscape.com 040526f65b fix bug 81542. Reorder interface methods so that they do not break compatibility with previously deployed plugins that work with previous versions of our software. The error was that I moved some around at all rather than just adding them to the end of the interfaces! Also, I added back in one method and marked it deprecated. r=dbradley sr=jst 2001-05-18 23:30:28 +00:00
jband%netscape.com 15b0e60bb7 fix bug 81436. Some Solaris compilers screwup symbol resolution if there is a file scope var that is also declared as extern. So we'll just make it not declare these two static (thses are not names that is going to conflict with anything!) r=timeless rs=jband 2001-05-18 23:24:19 +00:00
pschwartau%netscape.com d52ddf6b10 Improve code by using the apply method of Object.prototype.toString. 2001-05-18 23:20:25 +00:00
nboyd%atg.com 81543cd446 Fix problem in the following mail:
Subject:
             Embedding Rhino in an Applet
 Resent-Date:
             Thu, 17 May 2001 14:53:05 -0700 (PDT)
 Resent-From:
             mozilla-jseng@mozilla.org
        Date:
             Thu, 17 May 2001 16:39:14 -0700
        From:
             "Chester Kustarz II" <chester@monkey.org>
 Organization:
             monkey.org
          To:
             mozilla-jseng@mozilla.org
  Newsgroups:
             netscape.public.mozilla.jseng




Hello, I am trying to find a scripting language with an interpreter that I
can embed in an applet in order to run test scripts inside the applet. I
have already tried TCL-based Jacl and they do not support running inside an
applet. I then downloaded the Rhino/JS interpreter but am having trouble
getting it to run inside the browser (IE 5.5). Here is the exception I am
getting:

com.ms.security.SecurityExceptionEx[org/mozilla/javascript/ScriptRuntime.<cl
init>]: Reflective access to class java.lang.Thread prohibited.
 at com/ms/security/permissions/ReflectionPermission.check
 at com/ms/security/PolicyEngine.deepCheck
 at com/ms/security/PolicyEngine.checkPermission
 at com/ms/security/StandardSecurityManager.chk
 at com/ms/security/StandardSecurityManager.checkMemberAccess
 at java/lang/Class.checkMemberAccess
 at java/lang/Class.getDeclaredMethod
 at org/mozilla/javascript/ScriptRuntime.<clinit>
 at org/mozilla/javascript/ScriptableObject.getExclusionList
 at org/mozilla/javascript/ScriptableObject.defineClass
 at org/mozilla/javascript/Context.initStandardObjects
 at org/mozilla/javascript/Context.initStandardObjects
 at RhinoShellApplet.init
 at com/ms/applet/AppletPanel.securedCall0
 at com/ms/applet/AppletPanel.securedCall
 at com/ms/applet/AppletPanel.processSentEvent
 at com/ms/applet/AppletPanel.processSentEvent
 at com/ms/applet/AppletPanel.run
 at java/lang/Thread.run
com.ms.security.SecurityExceptionEx[org/mozilla/javascript/Context.initStand
ardObjects]: Unable to access system property:
org.mozilla.javascript.JavaAdapter
 at com/ms/security/permissions/PropertyPermission.check
 at com/ms/security/PolicyEngine.shallowCheck
 at com/ms/security/PolicyEngine.checkCallersPermission
 at com/ms/security/StandardSecurityManager.chk
 at com/ms/security/StandardSecurityManager.checkPropertyAccess
 at java/lang/System.getProperty
 at org/mozilla/javascript/Context.initStandardObjects
 at org/mozilla/javascript/Context.initStandardObjects
 at RhinoShellApplet.init
 at com/ms/applet/AppletPanel.securedCall0
 at com/ms/applet/AppletPanel.securedCall
 at com/ms/applet/AppletPanel.processSentEvent
 at com/ms/applet/AppletPanel.processSentEvent
 at com/ms/applet/AppletPanel.run
 at java/lang/Thread.run
2001-05-18 15:31:49 +00:00
rogerl%netscape.com 0569433dd3 Fix bug #76054. sr=brendan, r=beard. Generate lower case tags for all the
string tagify'ing helper functions like 'big()' etc. to be XHTML compliant.
2001-05-17 21:37:33 +00:00
nboyd%atg.com 26ebaa0c66 Fix bug 80322. 2001-05-17 19:02:55 +00:00
pschwartau%netscape.com 33c326091d Skipping two new tests with large switch statements. See bug 81086. 2001-05-17 18:52:43 +00:00
nboyd%atg.com f269df764c Mail gateway info. 2001-05-17 18:36:59 +00:00
jband%netscape.com c787e7883d fix bug 81117. allow unsecure access to creating xpconnect wrappers around nsXPCException objects and expose the 'code' property. This saves us from cryptic errors in the JSConsole and DOMExceptions that don't work. r=mstoltz sr=jst 2001-05-17 18:25:06 +00:00
nboyd%atg.com 9214262d1e Just remove commented-out "final". 2001-05-17 17:29:19 +00:00
beard%netscape.com 931e7db74c bug #77856, r/sr=brendan. 2001-05-17 05:45:51 +00:00
beard%netscape.com 342ec29546 bug #77247, r/sr=brendan 2001-05-17 05:42:18 +00:00
vidur%netscape.com 9cbca7b906 Reverting bogus assert. r/sr=brendan,jband 2001-05-17 04:55:49 +00:00
brendan%mozilla.org a10d5eb5aa Unified resolve recursion damping (70358) and resolve-from-js_SetProperty (72354), r/sr=jband,jst,shaver. 2001-05-17 01:43:58 +00:00
brendan%mozilla.org 768db649d4 STORE_NUMBER's final param must be a jsdouble; fix INTEGER_OPs (81245, r=rogerl, sr=jband). 2001-05-17 01:40:32 +00:00
pschwartau%netscape.com 2f26b642b4 Whitespace cleanup. 2001-05-16 22:45:11 +00:00
brendan%mozilla.org 69dc0b2e55 Fix ChangeTable and how it's called (74883, r=gordon, sr=waterson, mcafee approved). 2001-05-16 21:41:52 +00:00
pschwartau%netscape.com 5c77296fee Initial add. Regression test for bug 76054 in SpiderMonkey and bug 78706 in Rhino. 2001-05-16 19:01:42 +00:00
nboyd%atg.com e4c32e2c7b Fix bug 78706 2001-05-16 14:07:00 +00:00
Xiaobin.Lu%eng.Sun.com f56cbe2af5 r=timeless sr=shaver
bug 72807 "c++ style comment warning"
2001-05-16 02:24:44 +00:00
beard%netscape.com 57509c3b22 Removed:
ScopeInitializer.java
2001-05-16 01:10:19 +00:00
nboyd%atg.com 937f24e4f6 2 additional issues:
1. In that patch I forgot to remove "import org.mozilla.classfile.*" and
simply catch Exception in newInvokerMaster which is not a good practice.
The attached patch FunctionObject_patch fixes that and removes other
unused imports.

2. In org.mozilla.classfile.DefiningClassLoader defineClass method first
tries to call via ClassManager the defineClass method in a class loader
that loaded DefiningClassLoader itself. But this would define new
classes in that class loader so they would not be subject of the garbage
collection until a classloader that loads DefiningClassLoader would go
away even if a DefiningClassLoader instance is gone. The
DefiningClassLoader_patch removes that and simply calls super.defineClass.

The patch also change the order of class search in loadClass so the
loader first looks for a class among its defined classes and only after
that in parent loaders.

Regards, Igor
2001-05-16 00:24:37 +00:00
pschwartau%netscape.com 8cd2f18bd6 Initial add. Regression test for bug 74474. 2001-05-15 22:01:39 +00:00
pschwartau%netscape.com 6f0798186c Renaming this file as regress-74474-001.js 2001-05-15 22:00:42 +00:00
brendan%mozilla.org 38fa3fed08 Add optional JSDHashTableOps.initEntry hook, spruce up comments (74883, r=waterson, sr=shaver). 2001-05-15 21:07:10 +00:00
sfraser%netscape.com 55b0ea662e Testing, NOT PART OF ANYTHING 2001-05-15 20:57:01 +00:00
rginda%netscape.com 067d9585e8 bug 76050, use the same module name across the module. Fix senna bustage. r=cls 2001-05-15 20:40:43 +00:00
rginda%netscape.com 9950211597 bug 76050, fix REQUIRES for jsd unix makefile. r=cls 2001-05-15 20:39:35 +00:00
rginda%netscape.com 0bcd7aac66 bug 76050, build js/jsd from toplevel makefile so we're sure we've got an xpidl compiler. r=cls 2001-05-15 20:38:26 +00:00
brendan%mozilla.org 1f8f87f711 Re-init pinned atoms after 1=>0=>1 contexts-in-runtime transition (80619, sr=jband&shaver). 2001-05-15 19:39:16 +00:00
jband%netscape.com d1b40ba84e remove commented out code 2001-05-15 19:15:30 +00:00
nboyd%atg.com f7417f7060 2 additional issues:
1. In that patch I forgot to remove "import org.mozilla.classfile.*" and
simply catch Exception in newInvokerMaster which is not a good practice.
The attached patch FunctionObject_patch fixes that and removes other
unused imports.

2. In org.mozilla.classfile.DefiningClassLoader defineClass method first
tries to call via ClassManager the defineClass method in a class loader
that loaded DefiningClassLoader itself. But this would define new
classes in that class loader so they would not be subject of the garbage
collection until a classloader that loads DefiningClassLoader would go
away even if a DefiningClassLoader instance is gone. The
DefiningClassLoader_patch removes that and simply calls super.defineClass.

The patch also change the order of class search in loadClass so the
loader first looks for a class among its defined classes and only after
that in parent loaders.

Regards, Igor
2001-05-15 16:58:08 +00:00
beard%netscape.com 389c07ab3f Removed: src/org/mozilla/javascript/optimizer/JavaScriptClassLoader.java Added: src/org/mozilla/javascript/optimizer/InvokerImpl.java src/org/mozilla/classfile/DefiningClassLoader.java 2001-05-15 15:41:44 +00:00
nboyd%atg.com 1f98cf7a77 New file, mostly moved from org.mozilla.javascript.optimizer.JavaScriptClassLoader 2001-05-15 13:12:43 +00:00
nboyd%atg.com 0068a15b8a Norris Boyd wrote:
> Igor Bukanov wrote:
>
>
>>Norris Boyd wrote:
>>
>>
>>>The intention was to keep classfile and JavaAdapter optional. Those
>>>dependencies crept in. We can use Invoker optionally--perhaps I should do
>>>some performance numbers to see if it's worth it.
>>>
>>I implemented that patch, it splits Invoker.java into Invoker.java and
>>its implementation in optimizer/InvokerImpl.java The reason to put it
>>into optimizer package is that Invoker is very similar in spirit to
>>NativeScript: it generates classes to speed up access and in this way
>>there is no need to have separated option not to use: one can simply
>>remove optimizer all together.
>>
>
> Yes, that sounds great.
>
>
>>
>>I noticed during implementation that JavaAdapter.DefiningClassLoader and
>>optimizer/JavaScriptClassLoader contains the same code, so maybe they
>>can be moved to org.mozilla.classfile package under one name?
>>
>
> Yes, that sounds like a good change too. Thanks for noticing that.


The update is pretty messy: it touches FunctionObject which I changed to
remove the special treatment of NativeWith in the previous patch, and it
also add/removes files.

Here is a description:
DefiningClassLoader.java should go to org/mozilla/classfile. It is the
same code that was in omj/optimizer/JavaScriptClassLoader.java with
class rename and adding public attribute and correspondingly
omj.optimizer/JavaScriptClassLoader.java should be removed. I guess it
would be nice to preserve logs/history in CVS during the move.

InvokerImpl.java should go to omj/optimizer. It is mostly what
omj.Invoker was.

invoker_changes_patch was generated via
cvs diff -u Invoker.java JavaAdapter.java optimizer/Codegen.java
and contains changes against the current CVS

FunctionObject_invoker_patch was generated via
diff -u ../../mozilla.1/javascript/FunctionObject.java FunctionObject.java
and contains changes against that With patch.

Igor
2001-05-15 13:10:38 +00:00
rginda%netscape.com b5b65abbac fix to help senna tinderbox find PRClist 2001-05-15 07:55:34 +00:00
rginda%netscape.com 28c2019557 fix ports bustage 2001-05-15 07:42:58 +00:00
rginda%netscape.com c652047340 disable js debugger until I can figure out what's going on with shrike 2001-05-15 07:07:36 +00:00
rginda%netscape.com cb7748f0f6 bug 76050, js debugger unix make system changes, r=cls 2001-05-15 05:48:08 +00:00
nboyd%atg.com 928693eace The attached patch makes NativeWith to use IdFunction for its
constructor, removes the special treatment of the With object from
IdScriptable and FunctionObject, adds to IdFunction the
initAsConstructor method similar in spirit to
FunctionObject.addAsConstructor (it is called now from IdScriptable and
NativeWith) and replaces in Context.java lazy initialization of
NativeWith by direct call of NativeWith.scopeInit.
2001-05-15 01:17:51 +00:00
pschwartau%netscape.com fe98044ab1 Whitespace cleanup - 2001-05-15 00:08:27 +00:00
rginda%netscape.com 61cec05b74 - not built -
add required libraries to unix make
2001-05-14 21:59:01 +00:00
beard%netscape.com 0e8873338f Added idswitch tool sources. 2001-05-14 06:52:39 +00:00
beard%netscape.com 541d6af0f6 Added IdFunctionMaster.java to keep Mac build working. 2001-05-14 06:48:07 +00:00
rginda%netscape.com aecc360194 - not built -
check for valid PC in ClearBreakpoint
Lock script subsystem while clearing all breakpoints
2001-05-13 21:08:06 +00:00
rginda%netscape.com 0e5a548593 - not built -
Convert JS_SetTrap closure to a jsval so it works like a GC thing.
2001-05-13 21:07:03 +00:00
nboyd%atg.com 8ef49d0abb Hi, Norris!
The attached patch moves the IdFunction.Master interface to the
separated file IdFunctionMaster and eliminates getParentScope from the
interface: it is simpler to set scope explicitly.

The patch assumes the changes in IdFunction.java from the previous patch
  and were produced via:

diff -uP javascript.2000-05-10 javascript

Regards, Igor
2001-05-12 13:15:39 +00:00
pschwartau%netscape.com 1f94226bce Making the test driver work correctly on the Mac. 2001-05-12 03:52:20 +00:00
jband%netscape.com 25a343b15a bug 80062. Various post xpcdom branch landing fixes. r=dbradley sr=jst 2001-05-12 02:56:47 +00:00
pschwartau%netscape.com dc3fe1cb8e Updated JS_GetImplementationVersion() to date of latest JS release (67111). 2001-05-11 20:05:34 +00:00
nboyd%atg.com 8961afa95f Hi, Norris!
The attached patch allows subclasses of IdScriptable to override
hasIdValur/deleteIdValue and uses lazy initialization for idMapData
array to avoid its creation when an IdScriptable descendant does not
have any functions. The patch also touches NativeMath.java to replace in
its scopeInit method
        super.scopeInit(cx, scope, sealed);
by
        activateIdMap(cx, sealed);
This is the only reason NativeMath needs to call
IdScriptable.scopeInit() which is intended for creation
constructor/prototype pair.

Regards, Igor
2001-05-11 17:41:00 +00:00
jband%netscape.com 7e2cafba02 fix bug 79907.r=rginda sr=jst 2001-05-10 09:45:28 +00:00
shaver%mozilla.org e72a7d355a 76659: make JSRegExps use JSClass.mark instead of GCThing locking, sr=brendan, r=rogerl 2001-05-10 08:05:45 +00:00
cls%seawood.org bf99833526 Do not attempt to compile lock_SunOS.s on Solaris Intel. (Native compiler only)
Bug #79598
2001-05-10 06:40:58 +00:00
pschwartau%netscape.com c5f4a706f1 Initial add. Regression test for bug 72773. 2001-05-09 21:57:15 +00:00
nboyd%atg.com 55d31be0bf Update implementation version, make non-final. 2001-05-09 17:57:05 +00:00
pschwartau%netscape.com 69a4f7d331 Added a comment - 2001-05-09 17:21:57 +00:00
nboyd%atg.com 2c7ba42b18 Add idswitch package. 2001-05-09 17:12:07 +00:00
nboyd%atg.com daaef1caa3 Add new skip while we await a bug fix. 2001-05-09 15:46:41 +00:00
nboyd%atg.com 44b04487cb More rational handling of count. 2001-05-09 14:01:38 +00:00
nboyd%atg.com 16a01c6105 Fix 79568. 2001-05-09 13:59:29 +00:00
pschwartau%netscape.com abb88c635e Correction to testcase per Brendan - 2001-05-08 23:37:56 +00:00
beard%netscape.com cdc467d85a Removed ListenerCollection.java, added ListenerArray.java. 2001-05-08 22:56:43 +00:00
beard%netscape.com d34d7267e4 Officially retiring all sources in mozilla/js/rhino/org, in favor of sources in mozilla/js/rhino/src & mozilla/js/rhino/toolsrc. 2001-05-08 22:50:01 +00:00
beard%netscape.com ace78ee37e Officially retiring all sources in mozilla/js/rhino/org, in favor of sources in mozilla/js/rhino/src & mozilla/js/rhino/toolsrc. 2001-05-08 22:28:17 +00:00
jband%netscape.com 857134131a fix linux startup assertion due to null PRLock. Trying to cleanup the xpcdom landing! r=dbaron 2001-05-08 21:40:00 +00:00
dbaron%fas.harvard.edu 01fb925375 Attempt to fix AIX and OS/2 bustage by changing nsAReadableString (which is const) to nsAString. r=jband 2001-05-08 20:54:53 +00:00
dbaron%fas.harvard.edu 7241928fef Fix gcc 2.7.2.3 bustage (conditional with enumerated values from different anonymous enums). r=jband 2001-05-08 19:11:51 +00:00
jst%netscape.com ea706038cf Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com. 2001-05-08 17:42:36 +00:00
nboyd%atg.com 66b3d8aae3 Change use of deprecated method. 2001-05-08 13:51:18 +00:00
nboyd%atg.com 991a880e56 Commit missing messages for new idswitch tool. 2001-05-08 13:42:56 +00:00
nboyd%atg.com 49ee5104a9 Subject:
Rhino: optimization for NativeFunction.java
        Date:
             Mon, 07 May 2001 14:19:59 +0200
       From:
             Igor Bukanov <igor.bukanov@windriver.com>
 Organization:
             Wind River
         To:
             Norris Boyd <nboyd@atg.com>

Hi, Norris!

This is the first of 3 patches that are completly independent from each
other.

Currently in NativeFunction its name stored as the first element in the
names array. But this lead to creation of a single element array for
each FunctionObject and for each script function that does not have
arguments or variables. The attached patch splits NativeFunction names
into simple functionName and argNames arrays and adjust code elsewhere
accordingly. This patch can increase memory footprint for anonymous
script functions without arguments because it adds additional field to
each NativeFunction, but I do not think this is a case to worry about.

Regards, Igor
2001-05-08 13:40:22 +00:00
nboyd%atg.com bd685b66b2 Subject: Rhino: execMethod/methodArity cleanup.
Date: Mon, 07 May 2001 14:25:34 +0200
From: Igor Bukanov <igor.bukanov@windriver.com>
Organization: Wind River
To: Norris Boyd <nboyd@atg.com>

The current code that implements execMethod/methodArity for IdFunction
support returns an arbitrary value for id that is not known. This is not
very good behavior because it may hide bugs in the id support and it
also does not allow to distinguish ids that are used for function  from
ids used for properties like String.length.

To fix this I changed semantic of the methodArity method to return -1
for an unknown/non-method id and added code to throw an exception for
bad ids. This change requires to adjust all NativeSomething objects that
use IdScriptabl and after a release all such interface changes would be
no go, but is not a release yet, right?

I also eliminated the "IdFunction f" argument from
IdFunction.Master.methodArity and the tagId field from IdFunction. When
I wrote  the initial code for IdFunction.java, I added that just to be
able to use same id number in a class that implements IdFunction.Master
and its descendants via checking idTag. But that does not work in
general because IdScriptable can use id for non-function fields as well
so to avoid id clashes another way should be used. For example, if
someone would like to extend NativeMath to support more functionality,
he can use:

class Math2: extends NativeMath {
     private static idBase;

     {
         if (idBase == 0) idBase = super.getMaximumId();
     }

      public int methodArity(int methodId) {
          switch (methodId - idBase) {
             case Id_foo: return 2;
             case Id_bar: return 3;
         }
         return super.methodArity(methodId);
     }

      public Object execMethod
          (int methodId, IdFunction f,
           Context cx, Scriptable scope, Scriptable thisObj, Object[] args)
          throws JavaScriptException
      {
          switch (methodId - idBase) {
             case Id_foo: return ...;
             case Id_bar: return ...;
         }
          return super.execMethod(methodId, f, cx, scope, thisObj, args);
     }

      protected int getMaximumId() { return idBase + MAX_ID; }

      protected String getIdName(int id) {
          switch (id - idBase) {
             case Id_foo: return "for";
             case Id_bar: return "bar";
         }
         return super.getIdName(id);
     }
     ...
     private static final int
         Id_foo = 1,
         Id_bar = 2,
         MAX_ID = 2;

etc.


Note that a simpler solution to make MAX_ID field public in NativeMath
and write in Math2:
     private static final int
         Id_foo = NativeMath.MAX_ID + 1,
         Id_bar = NativeMath.MAX_ID + 2,
         MAX_ID = NativeMath.MAX_ID + 2;

does not work because in this way adding any new id to NativeMath would
break binary compatibility with Math2.
2001-05-08 13:36:16 +00:00
nboyd%atg.com 9129bdc5d6 Subject:
Rhino: fix for race conditions in listeners code in Context.java
        Date:
             Mon, 07 May 2001 14:22:57 +0200
       From:
             Igor Bukanov <igor.bukanov@windriver.com>
 Organization:
             Wind River
         To:
             Norris Boyd <nboyd@atg.com>

The current code for listeners and contextListeners in Context.java is
not race condition free. If contextListeners Vector would be modified
during context event firing loops, the code can produce
index-out-of-bounds exception. The problem with listeners array is more
subbtle and comes from the fact that ListenerCollection.java uses code like:
         for(Enumeration enum = getAllListeners();enum.hasMoreElements();) {
             Object listener = enum.nextElement();
             if(iface.isInstance(listener)) {
                 array.addElement(listener);
             }
         }
where getAllListeners() uses Vector.elements to get element enumeration.
But to work with such enumeration in a thread safe way, one has to
synchronized against Vector, otherwise between enum.hasMoreElements()
and enum.nextElement() the last element can be removed.

Initially I thought to fix ListenerCollection and use it for
contextListeners as well, but then I realized that in its current form
ListenerCollection is very inefficient (it produces too many objects
just to get simple array to fire events), so I wrote ListenerArray.java
and use it in Context.java. It makes life simpler and shrinks code as well.
2001-05-08 13:33:43 +00:00
brendan%mozilla.org 841f7a55dd - Fix bug 79054, AB-BA deadlock between rt->setSlotLock and one or more claimed scopes (r=shaver, sr=jband)
js_SetProtoOrParent should always have used a condvar in addition to a lock.
- Fix bug 79129, assert-botch in js_AllocSlot (r/sr=jband, sr=shaver)
  JS_INITIAL_NSLOTS is the minimum number of slots, js_FreeSlot guarantees it.
2001-05-08 01:31:02 +00:00
brendan%mozilla.org 1cc8066f79 Deoptimize JSOP_TABLESWITCH to JSOP_LOOKUPSWITCH upon first duplicate case label (74474, r=rogerl, sr=shaver). 2001-05-08 01:21:01 +00:00
pschwartau%netscape.com 8618e4b55b Minor changes. 2001-05-07 21:43:38 +00:00
pschwartau%netscape.com 8c5c09ac84 Initial add. Testcase by Brendan from bug 72884. 2001-05-07 20:30:59 +00:00
pschwartau%netscape.com 0b7f770e10 Initial add. A testcase for the switch statement. 2001-05-07 14:31:00 +00:00
pschwartau%netscape.com 4b7e03b8ac Initial add. Regression test for bug 79129. 2001-05-07 05:35:06 +00:00
nboyd%atg.com e4bf1b6548 Fix problems noted in following mail:
Subject:
        rhino bug(s)
   Date:
        Mon, 30 Apr 2001 23:07:00 -0700
   From:
        Mike Dixon <MDixon@placeware.com>
     To:
        nboyd@atg.com




hi.  i'm a happy rhino user, and just stumbled across what looks like a
pretty basic bug in the property stuff on ScriptableObject...  (i'm running
1.5, but it looks like this code hasn't changed in CVS.)  since it looks
like you're actively developing (even though it's been a while since
1.5...) i figured you might be interested -- apologies if i missed a more
formal bug reporting process...

the symptom was that i got a "Hashtable internal error" thrown from
getSlotToSet.  reading the code, here's what i think could happen:

- create a new object (slots.length is initially 5)
- add 3 properties
- delete those 3 properties

(now count == 0, and slots[i] == REMOVED for 3 values of i)

- add 2 more properties

now assume that you're unlucky, and that these two hash to different values
than the first three; now you have 2 elements of slots[] containing real
slots, and the other three containing REMOVED.

now what happens when you try to create another slot?  getSlotToSet is only
willing to put something in a null slot[], and you haven't got one, so you
get the internal error.

writing this message encouraged me to try to write a test case to reproduce
it, and in fact it's trivial:

   js> x={}; x.a=x.b=x.c=1; delete x.a; delete x.b; delete x.c; x.d=x.e=1
   1
   js> x.whatever=1
(boom)

by the way, while reading the code i also noticed what looks like another,
less consequential bug: addSlot increments count before deciding to grow
the table, which is done with a recursive call, which will cause count to
be incremented again -- right?  as far as i can tell, setting count too big
will only cause it to grow the table a little early next time, so it
doesn't really matter, but it looks wrong.

                                                        .mike.
2001-05-06 23:56:34 +00:00
pschwartau%netscape.com 1d761239c9 Minor style changes. 2001-05-06 18:07:12 +00:00
nboyd%atg.com a426bf2e85 New updates from Igor. 2001-05-05 18:25:00 +00:00
pschwartau%netscape.com ff8e5de2ea More getter and setter tests. These are non-ECMA and not implemented in Rhino. 2001-05-05 17:27:12 +00:00
pschwartau%netscape.com ac008beb56 Initial add. 2001-05-05 17:24:07 +00:00
kandrot%netscape.com afdac97c93 Check in for Ron Guilmette. r=shaver, sr=waterson. For intl r=nhotta. Changes for NS_IMPL_NSGETMODULE. bug #46775. 2001-05-05 05:33:37 +00:00
brendan%mozilla.org 67c2a11713 Fix DEBUG-only bytecode stack input/output tracing, patch from Steven C. Cole <scole@planet-nospam-web.com>. 2001-05-05 01:04:19 +00:00
rginda%netscape.com 3b4afaffe7 - not built -
updating windows build goop
2001-05-04 23:44:07 +00:00
rginda%netscape.com beede1f605 part two of fix for bug 77081 r=rogerl, sr=brendan 2001-05-04 23:03:11 +00:00
beard%netscape.com 9c797b19b6 Allow building with javac from JDK 1.1.8. 2001-05-04 22:41:12 +00:00
rginda%netscape.com 7b9bae9390 - not built -
remove jsdIContext and jsdIThreadstate interfaces
add TYPE_BOOLEAN to jsdIValue
update callback signatures to reflect the removal of jsdIContext and jsdIThreadstate
add errorHook and throwHook attributes to jsdIDebuggerService
2001-05-04 22:16:27 +00:00
rginda%netscape.com e63e15d4e8 - not built -
remove jsdContext and jsdThreadstate objects
2001-05-04 22:14:37 +00:00
rginda%netscape.com 219d06b740 - not built -
remove jsdThreadState and jsdContext objects.
consolidate ExecutionHook and BreakpointHook callbacks
remove return value checking from all methods (xpconnect does this for us.)
2001-05-04 22:14:04 +00:00
rginda%netscape.com 85a251ea0c - not built -
remove HAVE_PATCH_FROM_77081 not that 77081 is checked in.
2001-05-04 21:57:43 +00:00
rginda%netscape.com b2835efa22 fix for 77081, r=rogerl, sr=brendan. 2001-05-04 21:48:48 +00:00
rginda%netscape.com f951c3a3e9 fix for bug 76574, r=rogerl, sr=brendan. 2001-05-04 21:34:21 +00:00
rginda%netscape.com 4fdba8a9ea fix for bug 77807, r=rogerl, sr=brendan 2001-05-04 21:31:48 +00:00
peterv%netscape.com 5f1945a60d Define EXPORT_JS_API. r=rginda, r=beard, sr=brendan. 2001-05-04 21:30:55 +00:00
nboyd%atg.com 3d11fc509c Make the debugger's main class be Main.java to match convention. 2001-05-04 15:22:10 +00:00
nboyd%atg.com a89f7ff632 Re-apply changes since repository copy. 2001-05-04 15:20:26 +00:00
peterv%netscape.com 2f35172dca Get the JS debugger building on Mac. Not part of the build. 2001-05-02 22:15:28 +00:00
peterv%netscape.com 8014d291a7 Get the JS debugger building on Mac. Not part of the build. 2001-05-02 22:08:11 +00:00
pschwartau%netscape.com 6fac4f1902 Minor change to status message. 2001-05-02 18:15:26 +00:00
pschwartau%netscape.com f5e98e5aa1 Initial add. Regression test for bug 74474. 2001-05-02 00:27:29 +00:00
pschwartau%netscape.com edfd7284cc Initial add. Regression test for bug 31316. 2001-05-01 23:35:15 +00:00
pschwartau%netscape.com fbbc46f334 Initial add. Regression test for bug 76683. 2001-05-01 21:57:10 +00:00
rginda%netscape.com 8810f8447e - not built -
add invalidate() method to jsdIScript
rework jsdIScriptHook interface
2001-05-01 21:37:24 +00:00
rginda%netscape.com 1092c0297b - not built -
add debug instance counter for jsdScript
add mValid flag to jsdScript
2001-05-01 21:35:06 +00:00
rginda%netscape.com ff2e6466f4 - not built -
validate integrity of jsdScript data to guard against calling into a destroyed script.
queue up script deletes that happen during the JS GC cycle, call them when GC finishes (bug 76979.)
don't NS_IF_ADDREF objects that we get using *::FromPtr()
add jsdScript::Invalidate()
2001-05-01 21:33:43 +00:00
beard%netscape.com e58e72baa7 Now builds two sub-projects, jscore.mcp, jstools.mcp and merges the resulting jar files into js.jar. This uses the new source tree organization. 2001-05-01 17:24:48 +00:00
beard%netscape.com 9499e65b11 Builds org.mozilla.javascript.tools.* classes. 2001-05-01 17:19:16 +00:00
beard%netscape.com 3f651fabb5 Builds core org.mozilla.* classes. 2001-05-01 17:18:14 +00:00
pschwartau%netscape.com 16f2897f99 Initial add. Regression test for bug 78156. 2001-04-30 22:54:09 +00:00
cls%seawood.org 00f28396a9 Set EXPORT_LIBRARY=1 in all pertinent Makefile.ins. Allows us to build the final link list as we traverse the tree. Bug #46775 2001-04-28 19:48:12 +00:00
beard%netscape.com 29d9c8b87e Reverted back to old directory structure. 2001-04-27 22:57:30 +00:00
beard%netscape.com 5a22dc57e8 Restore revision history. 2001-04-27 19:45:52 +00:00
beard%netscape.com ad25062b57 Restore revision history. 2001-04-27 19:37:39 +00:00
beard%netscape.com 7475f14841 Restore revision history. 2001-04-27 18:57:38 +00:00
pschwartau%netscape.com a20cfaa7a1 Minor whitespace cleanup. 2001-04-26 20:49:14 +00:00
pschwartau%netscape.com 1097cf1b6d Minor change: improving variable names for greater clarity - 2001-04-26 00:18:09 +00:00
pschwartau%netscape.com ab41e1cf3a Minor improvement: in a shell file, keep the scope of i, j as local as possible - 2001-04-26 00:09:56 +00:00
beard%netscape.com 3f57dc791f Reconstructed using new rhino/src and rhino/toolsrc directory organization. 2001-04-25 22:32:20 +00:00
rginda%netscape.com c6126f91b8 - not built -
add GetService() member
2001-04-25 21:55:20 +00:00
rginda%netscape.com 6597a26d94 - not built -
register for gc callbacks
explicitly create a singleton factory
only call OnScriptLoaded() if |creating| is true
2001-04-25 21:54:59 +00:00
rginda%netscape.com 8aa3a5289f - not built -
move from pc as a ulong to pc as an object wrapped around a uword (jsdIPC)
rename init() to on() on jsdIService
move lineToPc and pcToLine from jsdIThreadState to jsdIScript (where they belong)
add setBreakpoint(), clearBreakpoint(), and clearAllBreakpoints() to jsdIScript
add off(), clearAllBreakpoints(), and breakpointHook attribute to jsdIService
add creatorURL, creatorLine, constructorURL, constructorLine, and value attribut
es to jsdIObject
2001-04-25 18:29:51 +00:00
rginda%netscape.com 93bbcdcd2a - not built -
move from pc as a ulong to pc as an object wrapped around a uword
relocate jsdService constructor to jsd_xpp.cpp in order to initialize the global
 service
2001-04-25 18:22:49 +00:00
rginda%netscape.com 6873c08bca - not built -
add global service for the breakpoint callback
add breakpoint callback
move c callbacks to top of source
add creatorURL, creatorLine, constructorURL, constructorLine, and value attribut
es to jsdObject
move from pc as a ulong to pc as an object wrapped around a uword
move lineToPc and pcToLine from ThreadState to Script (where it belongs)
add setBreakpoint(), clearBreakpoint(), and clearAllBreakpoints() to jsdScript
relocate jsdService constructor from jsd_xpp.h in order to initialize the global
 service
rename init() to on() on jsdService
add off(), clearAllBreakpoints(), and breakpointHook attribute to jsdService
2001-04-25 18:20:47 +00:00
nboyd%atg.com 96688e7cd8 Finish javadoc fix. 2001-04-25 17:11:34 +00:00
nboyd%atg.com fead2a0852 Fix javadoc with new directory structure. 2001-04-25 14:36:15 +00:00
nboyd%atg.com 32d98dbdc2 UPdate name of debugger main class. 2001-04-25 13:46:46 +00:00
nboyd%atg.com ee9e0cc866 Fix javadoc generation. 2001-04-25 00:24:18 +00:00
rginda%netscape.com 26eb74854e - not built -
turn off jsd_EvaluateUCScriptInStackFrame until 77081 gets checked in.
2001-04-24 23:53:59 +00:00
rginda%netscape.com 180a87ba2f - not built -
patch from peterv.  We can't use js_* in this module because they're libjs' private stash.  I got away with it on Linux somehow, but not on mac, and probably not on windows.  jsd_EvaluateScriptInStackFrame now uses JS_EvaluateInStackFrame, instead of doing the inflation itself and calling JS_EvaluateUCInStackFrame.
2001-04-24 23:02:58 +00:00
nboyd%atg.com a895548450 Make the default just build core. 2001-04-24 21:06:34 +00:00
nboyd%atg.com f80a784ecb Move files to rhino/toolsrc. 2001-04-24 20:43:37 +00:00
nboyd%atg.com 1944203c68 Move files to rhino/toolsrc 2001-04-24 20:42:14 +00:00
nboyd%atg.com 823e33c1e7 Move files to rhino/src. 2001-04-24 20:39:47 +00:00
nboyd%atg.com ef919d6f1e Somehow removed these right after I added them. 2001-04-24 20:36:58 +00:00
nboyd%atg.com 711c087f8e Massive reconfiguration of the cvs directory structure:
mozilla/js/rhino/org is now distributed between
mozilla/js/rhino/src and mozilla/js/rhino/toolsrc.
The build.xml has been split in three.
Docs now live in the project directory.

These changes mean that the cvs directories mirror the distribution and thus a distribution
will build the same way as a cvs build.
2001-04-24 20:31:31 +00:00
nboyd%atg.com e97e80635e Break dependency between core and tools. 2001-04-24 18:08:46 +00:00
nboyd%atg.com b6331020dc Igor's latest patches, with some regression fixes. 2001-04-24 12:57:45 +00:00
nboyd%atg.com adbdcd8987 Fix test: can only look for FunctionDeclaration syntax.
15.3.4.2 Function.prototype.toString ( )
An implementation-dependent representation of the function is returned. This representation has the syntax of a
FunctionDeclaration. Note in particular that the use and placement of white space, line terminators, and semicolons
within the representation string is implementation-dependent.
2001-04-24 12:55:25 +00:00
pschwartau%netscape.com f186a11a57 Avoid a name conflict; getClass() is already used in js/src/liveconnect/jsj_JavaClass.c 2001-04-24 01:30:53 +00:00
rginda%netscape.com 7ad3aa34ca - not built -
add line attribute to jsdIStackFrame
remove isFuction from jsdIValue
add TYPE_UNKNOWN to jsType "enumeration" so we don't fail hard if we can't figure out the type.
add hook type "enumeration" to jsdIExecutionHook
2001-04-23 19:15:55 +00:00
rginda%netscape.com 4f9f64987a - not built -
add line attribute to jsdStackFrame
add pcToLine and lineToPc methods to jsdStackFrame
remove isFunction attribute from jsdValue (already covered by jsType attribute)
add propertyCount attribute to jsdValue so you can get the property cound without forcing a bunch of property wrappers to be created (as in GetProperties())
2001-04-23 19:12:56 +00:00
shaver%mozilla.org 66a4e17055 not built: fix compilation error due to jschar/PRUnichar mismatch 2001-04-21 15:11:02 +00:00
rginda%netscape.com 36dba3f8d3 - not built -
implement jsdIProperty
2001-04-21 07:21:27 +00:00
brendan%mozilla.org 1773c29088 Restore reviewed code that should have been in the last checkin (76976, r=beard, sr=shaver, a=blizzard). 2001-04-21 04:37:01 +00:00
nboyd%atg.com 8584f9aa43 Convert to IdScriptable form.
Patch from Igor.
2001-04-20 14:29:56 +00:00
pschwartau%netscape.com 892a6cc261 Minor change; see Brendan's comment at 2001-04-19 12:00 in Bugzilla bug 76634. 2001-04-20 04:57:51 +00:00
rginda%netscape.com 9fffd13836 - not build -
basic methods for jsdIObject and jsdIProperty
tweak string params
most methods for jsdIScript jsdIStackFrame, jsdIThreadState, and jsdIValue
add hack methods enterNestedEventLoop and exitNestedEventLoop.  These should be moved to another interface before long.
2001-04-20 04:08:47 +00:00
rginda%netscape.com 646299b0ad - not built -
add private data to JSDContexts and JSDScripts, add JSD_EvaluateUCScriptInStackFrame
fix comment for JSD_GetValueProperty
2001-04-20 04:03:21 +00:00
rginda%netscape.com a544240950 - not built -
add private data to JSDContexts and JSDScripts, add JSD_EvaluateUCScriptInStackFrame
2001-04-20 03:59:43 +00:00
rginda%netscape.com eed107cd2c - not built -
declare jsdObject, jsdProperty, jsdStackFrame, jsdThreadState, and jsdValue
2001-04-20 03:57:28 +00:00
rginda%netscape.com 8a92caa7e5 - not built -
mmm.
skeleton jsdIObject, jsdIProperty
string tweaking
lock / unlock script sytem for JSDScript calls
imeplement jsdIStackFrame, jsdIThreadState, and jsdIValue
hacked in EnterNestedEventLoop and ExitNestedEventLoop
2001-04-20 03:54:05 +00:00
rginda%netscape.com 6fccd0404a - not built -
indentation fix
2001-04-20 03:48:03 +00:00
rginda%netscape.com 2fe479c4df - not built -
add *_EvaluateUCScriptInStackFrame
2001-04-20 03:47:09 +00:00
rginda%netscape.com 71a01a1849 - not built -
add private data to JSDScripts, fix unsigned vs signed warning
2001-04-20 03:45:39 +00:00
rginda%netscape.com 3c642c3b37 - not built -
quiet unix missing initializer warnings
add private data to JSDContexxt
2001-04-20 03:44:25 +00:00
rginda%netscape.com 9ddbba17f0 -not built-
adding private data to JSDContext, add jsd_EvaluateUCScriptInStackFrame
2001-04-20 03:43:07 +00:00
rginda%netscape.com 354d761018 - not built -
include <ctype.h> for toupper
2001-04-20 03:41:10 +00:00
brendan%mozilla.org f8defeec04 Restore ECMA-required Function.prototype.toString while keeping toSource/uneval fix for bug 73760 (76634, r=beard, sr=shaver, a=asa). 2001-04-19 21:57:25 +00:00
brendan%mozilla.org 28427e3770 Fix regexp object (scope) vs GC deadlock (76233, r=beard, sr=shaver, a=asa). 2001-04-19 21:15:40 +00:00
brendan%mozilla.org 09cab04692 Fix __kernel_standard prototype to match recent addition of int *err final out-param (8112, r=shaver, sr=me, prototype not used by Mozilla or embedding builds). 2001-04-19 21:05:52 +00:00
pschwartau%netscape.com 6d221b98ab Getter/setter tests are non-ECMA. Moving them from ecma_3 directory to js1_5 directory. 2001-04-19 19:09:32 +00:00
beard%netscape.com 426dfab4d7 loadClassName: use current class loader to find classes, before calling Class.forName(). 2001-04-19 17:31:34 +00:00
nboyd%atg.com 5199af3051 Latest patches from Igor. 2001-04-19 12:52:39 +00:00
pschwartau%netscape.com c3db8a47c0 "for (i in myArray)" produces unintentional side effects if a test modifies Array.prototype or Object.prototype. Use for (i=0; __; i++) instead. 2001-04-18 22:33:31 +00:00
beard%netscape.com e183541072 Removed hard tabs, removed unnecessary cast, (Scriptable)null. 2001-04-18 20:50:58 +00:00
beard%netscape.com 9d02c9eb11 fix for bug #8112, sr=brendan, r=beard 2001-04-18 03:38:58 +00:00
beard%netscape.com 9f1ea34458 fix for bug #60018 (prevent dangling JSContext), sr=brendan, r=edburns 2001-04-18 03:17:30 +00:00
beard%netscape.com 5de19d97ce Added UTCUtil library. [not part of build] 2001-04-18 02:44:01 +00:00
beard%netscape.com 6ea19da1fa Fix for bug #26516, load Java lazily. sr=brendan, r=edburns 2001-04-18 02:22:13 +00:00
pschwartau%netscape.com 093eb06477 Getter/setter tests are non-ECMA. Moving them from ecma_3 directory to js1_5 directory. 2001-04-17 23:56:57 +00:00
pschwartau%netscape.com b4f95d7a38 Getter/setter tests are non-ECMA. Moving them to js1_5 directory 2001-04-17 23:54:17 +00:00
nboyd%atg.com 1f40b84b6c Hi, Norris!
I attach optimization patch for NativeDate that makes all js... methods
private, removes passing of unnecessary parameters and replaces
checkInstance by realThis call with false as the third parameter.


Regards, Igor

Hi, Norris!

Here is another small optimization for NativeDate in DayFromMonth method
where it replaces arrays by few ifs.

Regards, Igor
2001-04-17 13:54:45 +00:00
rginda%netscape.com 5b9389c467 moving xpcom wrapper from extensions/venkman/src/ and idl/ to here. 2001-04-17 08:50:41 +00:00
brendan%mozilla.org b9f0126b31 Avoid recursive death *and* don't crash on null proto pointer (75239, r/sr=jband, r=itaj sherman <MobDotCom@hotmail.com>). 2001-04-17 07:34:39 +00:00
jband%netscape.com 3937ca299c fix bug 76102. Only vend weak references from the root of a wrappedJS wrapper chain. r=dbaron sr=brendan 2001-04-17 07:22:52 +00:00
brendan%mozilla.org 00e6bf0cdc Over-engineer byte-order macro generation to catch most PDP-endian situations (65230, r=rogerl, not part of Mozilla-the-browser-suite build). 2001-04-17 07:12:38 +00:00
nboyd%atg.com 39f51f6c80 Subject:
Rhino: patch for IdScriptable.java and question about useDynamicScope
        Date:
             Mon, 16 Apr 2001 17:55:19 +0200
       From:
             Igor Bukanov <igor.bukanov@windriver.com>
 Organization:
             Wind River
         To:
             Norris Boyd <nboyd@atg.com>




Hi, Norris!

Here is a patch to IdScriptable.java that fixes sealed semantic and
makes Something.prototype.constructor to behave just as having DONTENUM
attribute, not DONTENUM|READONLY|PERMANENT. It also renames
seal_function to sealFunctions.

I also have a following question. I added nextInstanceCheck to
IdScriptable.java and its usage in realThis in NativeDate to emulate
code from FunctionObject where it looks up prototype in search for
NativeSomething instance if useDynamicScope is true. But could you
describe why it is necessary? I can understand why doing something like

var proto = new Date();
function Test() { }
Test.prototype = proto;
var test = new Test();
print(test.getDay()); // same as proto.getDay()

would be useful in ceratain situations, but what it has to do with
shared scopes?

Regards, Igor
2001-04-16 19:29:48 +00:00
rginda%netscape.com c7b6faefda -- not built --
unix make fixes
unix "missing initializer" warnings
2001-04-14 18:57:00 +00:00
beard%netscape.com b85b5e504f Fix for bug #49130, a=phil 2001-04-14 17:18:14 +00:00
brendan%mozilla.org ef5f23f75e Use parent, if non-null, as scope chain with which to find default proto from Class.prototype, in js_{New,Construct}Object (75975, sr=jband&jst). 2001-04-14 07:34:58 +00:00
beard%netscape.com 5583150c3d Remove bogus access paths. r/sr=sfraser 2001-04-14 00:16:29 +00:00
beard%netscape.com 6b8a7db136 Fix for bug #74476: pass the actual date to PRMJ_DSTOffset() rather than 0. 2001-04-14 00:07:53 +00:00
brendan%mozilla.org 14a268aa85 Don't zap atom state on last destroy-context in a runtime if interned strings are held by atoms, and/or rooted objects reach atoms -- there may be a new-first-context in the future (72043, r=jband, sr=shaver). 2001-04-13 08:06:15 +00:00
brendan%mozilla.org 93fdf9a5c7 Better GC-deadlock avoidance (75141, r=shaver, sr=jband). 2001-04-12 01:52:30 +00:00