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

4033 Коммитов

Автор SHA1 Сообщение Дата
dbaron%fas.harvard.edu f7b755c4e0 Prevent XPCReadableJSStringWrapper from having a null buffer handle. b=112496 r=shaver, jag sr=jst 2001-12-08 22:49:05 +00:00
pschwartau%netscape.com 60b99db82a Adding one more case to test 2001-12-08 03:29:52 +00:00
dbradley%netscape.com 944c82b990 Bug104843 - Added requires to makefile 2001-12-07 13:34:48 +00:00
seawood%netscape.com 16e4f2d4d9 Drop optimization level for select files on Irix when compiling with MIPSpro to workaround suspected compiler bug.
Thanks to Nick Blievers <nickb@adacel.com.au> for the patch.
Bug #79562 r=brendan sr=cls
2001-12-07 09:12:16 +00:00
pschwartau%netscape.com 45b92fe8f8 Added three more cases to test 2001-12-07 07:23:57 +00:00
nboyd%atg.com bbc1ee2679 Updates for Rhino1.5R3. 2001-12-06 14:53:59 +00:00
nboyd%atg.com e795599799 Update release number, date. 2001-12-06 14:33:44 +00:00
nboyd%atg.com 44b02edcc8 Change version to 1.5R3. 2001-12-06 14:27:26 +00:00
nboyd%atg.com 82fd57b5aa Hello !
I'm the maintainer of JPackage project rhino package (see
jpackage.sourceforge.net). I just found two problems for building it (version
1.52 from cvs):
- the property src.debugger is badly initialised in toolsrc/build.xml. See
patch attached for correction. Moreover, this was a real pain to make offline
building possible. I guess it's a licensing problem that prevents you
including those files in rhino sources ?
- the produced javadoc has an empty (0 sized) package-list file. Have you got
any idea why ?
-- Guillaume Rousse <rousse@ccr.jussieu.fr>
GPG key http://lis.snv.jussieu.fr/~rousse/gpgkey.html
2001-12-06 14:26:26 +00:00
rogerl%netscape.com 5586bf8bdc Bugs #100199 & 78156. r=khanson, sr=brendan. Fixing multiline matching and
pathological character class cases in regular expression handling.
2001-12-05 23:58:51 +00:00
pschwartau%netscape.com eb9c1aae74 not part of default build
bug 111365, JS standalone doesn't build on solaris.
point AS to /usr/ccs/bin/as
2001-12-05 19:32:16 +00:00
pschwartau%netscape.com c59566e1a8 not part of default build
bug 111365, JS standalone doesn't build on solaris.
point AS to /usr/ccs/bin/as
2001-12-05 00:31:55 +00:00
seawood%netscape.com c8994a7ac0 Initial landing of win32 support for autoconf builds.
Bug #58981 sr=alecf
2001-12-04 21:17:48 +00:00
pschwartau%netscape.com 922f8539d0 Adding one more case to test. 2001-12-04 00:54:00 +00:00
pschwartau%netscape.com d06c77d845 Added more cases to test; updated the license at top. 2001-12-01 03:29:24 +00:00
dbaron%fas.harvard.edu 824e7d22ca Make nsSharable[C]String writable by overriding appropriate methods. Ensure that it doesn't store null buffer handle pointer internally, and override get() on nsXPIDL[C]String for backwards-compatibility. Collapse nsSharedBufferHandle and nsFlexBufferHandle into nsSharedBufferHandle which knows its length but can't have a storage start distinct from its data start. Convert string users who were working around broken nsSharableString::Assign back to using it. b=104663, 100751, 74726 r=jag sr=scc 2001-11-28 05:22:57 +00:00
brendan%mozilla.org 25f3ad4fb3 Update all pointers to an arena that moved when it was reallocated (111557, r=shaver, sr=jband). 2001-11-27 21:27:59 +00:00
pschwartau%netscape.com a216201eba Skipping a new, big test that exceeds Java classfile size limitations 2001-11-27 04:21:28 +00:00
pschwartau%netscape.com dcf76be5c0 Initial add. Regression test for bug 111557. 2001-11-27 04:13:03 +00:00
timeless%mac.com 51a4520c4a Bugzilla Bug 107823 change nsIFile
to use 'Modified' instead of 'Modification'
r=akkana sr=brendan
2001-11-26 08:05:05 +00:00
nboyd%atg.com 6a01600cc8 JavaAdapter serialization contribution from Kemal Bayram. 2001-11-23 20:40:08 +00:00
nboyd%atg.com b52f96cd91 Hi, Norris!
In our browser we need to support scripts that use as an identifier name future reserved keywords such as interface. The scripts are rather old and perfectly legal under previous revisions of EcmaScript which does not included the list of almost every Java keyword to the future reserve.

To support this I added an option to query Context.hasFeature for FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER:

    /**
     * if hasFeature(RESERVED_KEYWORD_AS_IDENTIFIER) returns true,
     * treat future reserved keyword (see  Ecma-262, section 7.5.3) as ordinary
     * identifiers but warn about this usage
     */
    public static final int FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER = 3;

The corresponding code in TokenStream checks for it and issues just a warning when this feature is enabled.

I also think that it would be better not to return RESERVED as a token from TokenStream.getToken but report the specific syntax error immediately because it is very unclear from the error message:

js> x.interface = 1
js: "<stdin>", line 1: uncaught JavaScript exception: SyntaxError: missing name after . operator (<stdin>; line 1)
js: x.interface = 1
js: ..........^

what exactly went wrong. I can send a patch later for that.

Regards, Igor
2001-11-23 20:38:50 +00:00
nboyd%atg.com 1ce9a8feb9 Update for new failures. 2001-11-23 01:20:56 +00:00
nboyd%atg.com 4ef25a301c Hi,
I'm working on a project which uses rhino. I wanted to have finer
control over class generation and saving so I've done some patching
and clean up on the current rhino tip.

The biggest change I've made is the replacement of ClassOutput with
ClassRepository that has the single method:

    public boolean storeClass(String className, byte[] classBytes,
                           boolean isTopLevel) throws IOException;

This interface allows any arbitary storage method, such as a
Hashtable/Map. In addition it also allows you to specify whether a
class should be loaded, via returning true or false.  You can still use
ClassOutput as I've coded an internal wrapper.

With this interface it has also been possible to strip out the file
saving code from Codegen and OptClassNameHelper.  The file
saving code is now an inner class FileClassRepository in Context. As
a consequence of this  I've stripped out some methods from ClassNameHelper.
The resulting code is much more cleaner then before hand and everything
still works as per usual.

Other small additions are:
  o  Annonymous functions are now named class$1 instead of class1
  o  get/setClassName added to ClassNameHelper exposed in Context.

My final thoughts are, since all methods in ClassNameHelper except reset()
are now exposed whould n't it be much more "cleaner" to simply to some
how work around to eliminate reset() and provide getClassNameHelper()
via Context?  You could then remove the numerous ClassNameHelper shadow
methods from Context.

Likewise, FileClassRepository could be made a public class very easily
and combined with the above result in a dozen or so less public methods in
Context.

Anyway, the changes can be found on http://www.cins.co.uk/rhino.zip

Hope it is of use to some

Kemal Bayram
2001-11-22 15:48:21 +00:00
brendan%mozilla.org 106186f720 Thanks to scole@planetweb.com (Steven Cole) for fixing date_format to respect PRMJ_FormatTime's return value (102159, r=beard, sr=brendan). 2001-11-21 23:53:54 +00:00
brendan%mozilla.org 3350a394b5 Don't eagerly allocate fatlock freelist chunks; don't preallocate so much, and use a smaller global lock hashtable (109218, r=shaver/sr=jband). 2001-11-21 23:28:52 +00:00
pschwartau%netscape.com e3560ba177 Removing two tests from the skip list because they have been removed from the repository. 2001-11-21 22:16:19 +00:00
pschwartau%netscape.com 63bbacdb75 Removing test from repository. It contains very large blocks.
But because of the fix to bug 80981, these are no longer large enough
to trigger the internal error and exit code 3 that the test looked for.
2001-11-21 21:59:31 +00:00
pschwartau%netscape.com f3c83ec62e Skipping another test with a large switch() statement 2001-11-21 21:34:25 +00:00
pschwartau%netscape.com a929ee24ec Initial add. Regression test for bug 80981. 2001-11-21 21:17:31 +00:00
nboyd%atg.com 46b8e5185c Hi,
I'm working on a project which uses rhino. I wanted to have finer
control over class generation and saving so I've done some patching
and clean up on the current rhino tip.

The biggest change I've made is the replacement of ClassOutput with
ClassRepository that has the single method:

    public boolean storeClass(String className, byte[] classBytes,
                           boolean isTopLevel) throws IOException;

This interface allows any arbitary storage method, such as a
Hashtable/Map. In addition it also allows you to specify whether a
class should be loaded, via returning true or false.  You can still use
ClassOutput as I've coded an internal wrapper.

With this interface it has also been possible to strip out the file
saving code from Codegen and OptClassNameHelper.  The file
saving code is now an inner class FileClassRepository in Context. As
a consequence of this  I've stripped out some methods from ClassNameHelper.
The resulting code is much more cleaner then before hand and everything
still works as per usual.

Other small additions are:
  o  Annonymous functions are now named class$1 instead of class1
  o  get/setClassName added to ClassNameHelper exposed in Context.

My final thoughts are, since all methods in ClassNameHelper except reset()
are now exposed whould n't it be much more "cleaner" to simply to some
how work around to eliminate reset() and provide getClassNameHelper()
via Context?  You could then remove the numerous ClassNameHelper shadow
methods from Context.

Likewise, FileClassRepository could be made a public class very easily
and combined with the above result in a dozen or so less public methods in
Context.

Anyway, the changes can be found on http://www.cins.co.uk/rhino.zip

Hope it is of use to some

Kemal Bayram <rhino@cins.co.uk>
2001-11-21 17:12:57 +00:00
seawood%netscape.com 7733357d51 Rename 'install' build phase to 'libs'.
Bug #56601 r=pavlov
2001-11-21 09:49:41 +00:00
brendan%mozilla.org 9b46da979c Thanks to scole@planetweb.com, no more un-ECMA error for /* in a /**/ comment (110286, r=khanson, sr=brendan). 2001-11-20 23:35:45 +00:00
brendan%mozilla.org d2eb2bf046 Better fix than 0.9.6 minimal fix for NUL-termination assumption in replace (108832, r=shaver, sr=jband). 2001-11-20 21:26:33 +00:00
brendan%mozilla.org 5eaba7585d Don't warn or 'correct' = to == in a condition unless the right operand has greater precedence than == (106244, r=shaver, sr=jband). 2001-11-20 05:20:57 +00:00
rginda%netscape.com 43f2ce47ff bug 110903, patch=brendan, sr=shaver, r=me
Call new script hook for scripts created via xdr.
2001-11-20 02:47:41 +00:00
brendan%mozilla.org 024ffbebe7 Don't ass-u-me fp->argv => fp->fun (109635, sr=shaver/jband). 2001-11-20 02:37:01 +00:00
timeless%mac.com 060425ec59 Bugzilla Bug 110080 change !NS_SUCCEEDED(status) to NS_FAILED(status)
s/!NS_SUCCEEDED/NS_FAILED/g;s/!NS_FAILED/NS_SUCCEEDED/g;
r=dougt sr=hewitt
2001-11-19 06:45:00 +00:00
pschwartau%netscape.com 216a94f367 Initial add. Regression test for bug 110286. 2001-11-17 03:20:45 +00:00
brendan%mozilla.org 051d085765 Remove __call__ and add a callback used to check f.caller access for any function object f (109113, r=jst, sr=jband). 2001-11-16 02:56:49 +00:00
alecf%netscape.com d49a4ba867 win32 REQUIRES cleanup 2001-11-15 03:49:13 +00:00
seawood%netscape.com c7ca889121 Build libmozjs during the install phase.
Bug #104307 sr=jband
2001-11-14 04:52:55 +00:00
bzbarsky%mit.edu f2ee8260a0 Use NS_LITERAL_STRING instead of NS_ConvertASCIItoUCS2 where possible
(i.e. where the string is a literal).  Bug 104159, r=jag, sr=alecf
2001-11-14 01:33:42 +00:00
pschwartau%netscape.com 0a61967ca6 Adding another case to test. 2001-11-13 19:46:27 +00:00
brendan%mozilla.org 8b9fb46499 Avoid ClaimScope (lock-free to -full transition) in JS_GetClass and js_FinalizeObject called from the GC (109183, r=shaver, sr=jband). 2001-11-11 21:25:13 +00:00
jband%netscape.com cd8dc8ee2c not part of build. Now that null DOM strings are correctly supported we can fix the test case 2001-11-10 22:35:26 +00:00
pschwartau%netscape.com 7a9c2596f2 Fixing a typo. 2001-11-10 02:47:52 +00:00
pschwartau%netscape.com 267f1d9202 Adding another case to test. 2001-11-10 02:46:24 +00:00
brendan%mozilla.org 91397f1e55 For now (0.9.6), str_replace requires an independent replacement string (108832, r=shaver, sr=jband, a=asa). 2001-11-08 23:53:33 +00:00
pschwartau%netscape.com b0756acf45 Initial add. Regression test for bug 108440. 2001-11-07 23:20:48 +00:00
nboyd%atg.com e60c42afed Patch from Igor:
I suggest to move the code in ScriptableObject.get/put that deals with getter/setter
into separated methods so it would be easy to follow the code and the attached patch
does just that.
2001-11-07 14:15:48 +00:00
brendan%mozilla.org 63cb2c1077 Fix Function.call(this, 'alert(42)')() so the anonymous function finds its nearest scripted caller's principals (90546, sr=shaver&jband). 2001-11-07 06:34:04 +00:00
dbaron%fas.harvard.edu 8cd8d91750 Ensure that string literals are used as |const char*| rather than |char*|. r=jag sr=brendan b=107052 2001-11-07 06:24:10 +00:00
mkaply%us.ibm.com 5991fb004d #105476
r=os2team, sr=brendan@mozilla.org
Add ASM implementation of js_CompareAndSwap for OS/2 VACPP
2001-11-07 05:20:33 +00:00
dbaron%fas.harvard.edu bfb2f49916 Add assertions that users of nsDependentC?String meet the requirements of nsAFlatC?String. Add nsDependentSingleFragmentC?Substring for users that don't. Additional cleanup after bug 100214. b=104651 r=jag sr=scc 2001-11-07 04:12:20 +00:00
brendan%mozilla.org c220d0c707 Avoid recursive join/toString death (108440, r=shaver, sr=jband). 2001-11-07 00:15:44 +00:00
brendan%mozilla.org be20b21443 Move the oversized arena back-pointer to a well-aligned header extension lying just behind a->base (108013, sr=waterson&jband). 2001-11-07 00:11:22 +00:00
jband%netscape.com 0c81cb1768 better error message when zero passed where object or null expected. bug 108284. r=dbradley sr=shaver. Also, fix uninitilized counter var in debug only code rs=jband 2001-11-06 00:40:54 +00:00
rginda%netscape.com 452f1525a4 removing dead code, see mozilla/js2 2001-11-05 21:46:17 +00:00
rginda%netscape.com 0065b1bb33 removing dead code, see mozilla/js2 2001-11-05 21:38:18 +00:00
seawood%netscape.com be10c3b1a8 Backing out fix for remote mach-o builds as it left mach-o builds fragile.
Add TK_CFLAGS back to default CFLAGS/CXXFLAGS.
Bug #107696
2001-11-03 03:29:05 +00:00
rginda%netscape.com 2085b262f0 bug 108257, "source notes broken for functions compiled via JS_CompileUCFunctionForPrincipals", sr=brendan, r=shaver
no need to emit the function body after calling FunctionBody
2001-11-03 00:10:47 +00:00
peterv%netscape.com 3470de8c5b Add build option for the JS profiler on Mac. a=dbradley. Not part of the build. 2001-11-02 10:27:52 +00:00
pschwartau%netscape.com c97d13ddcf Improving readability. 2001-11-02 02:17:57 +00:00
pschwartau%netscape.com 491a9eb409 Initial add. Regression test for bug 107771. 2001-11-02 02:06:54 +00:00
dbradley%netscape.com 5cb0f9371f Bug 83426 - Remove DOM exception hack. r=jst, r=dbradley, sr=jband 2001-11-01 15:52:53 +00:00
jband%netscape.com 3bcdaf198c fixing warnings from recent landing and uncommenting test cases I did not mean to comment out for the checkin 2001-11-01 05:18:35 +00:00
brendan%mozilla.org 3c38914b93 Fix nul-termination assumption hidden in lastIndexOf, broken by dependent strings fix for bug 56940 (107771, r=jag, sr=waterson). 2001-11-01 03:19:54 +00:00
jband%netscape.com a2511b96a8 fix Mac bustage. I can't believe the Mac can't do this conversion without a cast! 2001-11-01 02:36:19 +00:00
jband%netscape.com 3ff792dd5d the HP compiler says that anonymous unions can't even have structs. So the union must be named. Fixing that bustage 2001-11-01 01:45:48 +00:00
jband%netscape.com c052cc3bf0 fix Mac bustage (I hope). I think these names conflicted with other names 2001-11-01 01:15:53 +00:00
seawood%netscape.com 8a2a775382 Since '-framework Carbon' causes binaries to require console access to run, do not link using that flag by default. Otherwise, remote builds & non-console tinderboxes will break. Mac OSX Mach-O only.
Bug #107696 r=mozbot
2001-11-01 00:54:48 +00:00
pete%alphanumerica.com b52992027b b=107823, r=ccarlen, sr=brendan
--pete
2001-11-01 00:11:15 +00:00
jband%netscape.com 2882268cda added files: mozilla/js/src/xpconnect/src/xpcvariant.cpp 2001-10-31 23:36:34 +00:00
jband%netscape.com 84bfc894a4 add support for nsIVariant and nsIPropertyBag. bug 44675 and bug 98209. sr=vidur r=dbradley 2001-10-31 23:35:07 +00:00
rginda%netscape.com 7491994718 bug 99601, don't install xpconnect debugger keyword handler if one is already there, r=jband, sr=brendan 2001-10-31 23:13:17 +00:00
brendan%mozilla.org 2caef4a183 Don't try to correct = to == if strict, do it only if downrev (106244, r=jband, sr=shaver). 2001-10-31 03:17:00 +00:00
pschwartau%netscape.com fb838280d6 Initial add. Regression test for bug 94257. 2001-10-31 02:32:38 +00:00
nboyd%atg.com 3067721c3c Fix bug with test case:
var testArray = new Array(6);
testArray[1+1]+=2;
2001-10-30 14:06:58 +00:00
nboyd%atg.com 787b93699a Hello Norris
The following test case case leads to a compilation error in Rhino. In this
script alert is an user defined
function in the global object and it shows the value of the specified
parameter in a popup window. Save the script as a html file and run it under
Netscape and IE. The output via their JS engines is that alert(1)
executes but the execution of line fails as blks variable is undefined. The
Fix bug:

Rhino engine fails at compilation time itself and cannot excute the script.
It doesn't like the syntax of line.


Steven


/// ****************  test case **************    ///
<script>
alert(1);
  blks[ 10 << 2 ] |= true;
  alert(2);
</script>


/// **********************  Error Message ************************** ////
evaluating script: null
java.lang.NullPointerException
  at org.mozilla.javascript.Interpreter.generateICode(Compiled Code)
  at org.mozilla.javascript.Interpreter.generateICode(Compiled Code)
  at org.mozilla.javascript.Interpreter.generateICode(Compiled Code)
  at org.mozilla.javascript.Interpreter.generateICode(Compiled Code)
  at org.mozilla.javascript.Interpreter.generateICode(Compiled Code)
  at org.mozilla.javascript.Interpreter.generateICodeFromTree(Compiled Code)
  at
org.mozilla.javascript.Interpreter.generateScriptICode(Interpreter.java)
  at org.mozilla.javascript.Interpreter.compile(Interpreter.java)
  at org.mozilla.javascript.Context.compile(Context.java)
  at org.mozilla.javascript.Context.compile(Context.java)
2001-10-30 13:55:26 +00:00
rginda%netscape.com db43fadc93 bug 99601, add filter support to js/jsd, r=jband sr=brendan
large addition to the jsd_xpc component allows arbitrary filtering of debug hooks by url pattern, line range, and global object.  also adds ability to begin instrumenting jsscripts at app startup.
2001-10-30 13:41:32 +00:00
nboyd%atg.com 0babafcaa0 Patch from Igor:
I must admit this is very subtitle, but still...

Here are the lines from
    public void defineProperty(String propertyName, Object delegateTo,
                               Method getter, Method setter, int attributes)


        GetterSlot slot = (GetterSlot)getSlotToSet(propertyName,
                                                   propertyName.hashCode(),
                                                   true);
        slot.delegateTo = delegateTo;
        slot.getter = getter;
        slot.setter = setter;
        slot.setterReturnsValue = setter != null && setter.getReturnType() != Void.TYPE;
        slot.value = null;
        slot.attributes = (short) attributes;
        slot.flags = (byte)flags;

Now suppose that after the new slot is added, another thread is accessing it. Then it would see not yet ready slot with all nasty consequences! For example,  SMP computer can re-arrange writes so the new value of slot.flags would be visible before slot.getter then another thread would generate null pointer exception.

race2_fix.diff fixes that by using the explicit Slot argument to addSlot instead of boolean flag so the new slot can be fully initialized and then inserted under synchronization to the table. I also call addSlot directly because it is supposed to be used with not-yet existed properties and split addSlot to addSlot and addSlotImpl so in case of table growth there is no need to re-enter already synchronized monitor.

This changes also allows to explicitly throw RuntimeException if defineProperty is called for the property that is already exists instead of either throwing cast exception in "GetterSlot slot = (GetterSlot)getSlotToSet(propertyName," or worth yet re-initializing already existed slot.

Regards, Igor
2001-10-30 13:07:00 +00:00
nboyd%atg.com 08247fcd49 Print either line or file name if either is present. 2001-10-30 12:59:30 +00:00
pschwartau%netscape.com 489809edc1 Adding reference to another Bugzilla bug this testcase covers. 2001-10-30 03:28:15 +00:00
brendan%mozilla.org 7000513580 Ensure atom strings are immutable -- duh! (107138, r=jag, sr=jband). 2001-10-30 02:33:41 +00:00
pschwartau%netscape.com cd0a6755c1 Initial add. Regression test for bug 107138. 2001-10-30 00:20:03 +00:00
brendan%mozilla.org 671178cbdb Consolidate property cache flush under JS_ClearScope (107265, r=shaver, sr=jband). 2001-10-29 19:30:03 +00:00
brendan%mozilla.org d27c4cb86f Followup to bug 56940's big patch, tighten GC-mark case analysis, assume atom strings are immutable. 2001-10-28 22:37:25 +00:00
brendan%mozilla.org 114a9d244c Ensure proper pointer alignment in oversized arena footers (105726, r/sr=jband,shaver). 2001-10-28 20:41:53 +00:00
brendan%mozilla.org 467cafd25f Avoid stack overflow in js_EmitTree on long left-associative operator chains (98901, r=jband, sr=shaver). 2001-10-27 18:38:16 +00:00
seawood%netscape.com 9b5ae05e33 Landing the rest of the mach-o OSX changes.
Bug #75653 r=cls sr=waterson
2001-10-27 07:38:18 +00:00
pschwartau%netscape.com 6a49244c08 Fixing a typo 2001-10-27 00:48:14 +00:00
rginda%netscape.com a38f6a4b18 check in jband's fix for command paths on win2k, whitespace nits. 2001-10-26 21:37:51 +00:00
mike+mozilla%meer.net 41da6c554a Initial checkin of build file for Darwin1.4.mk. It just includes Darwin1.3.mk. Because I happened to be fooling around with an OS X system. 2001-10-26 09:38:43 +00:00
alecf%netscape.com a6790acff4 other part of bug 106130, remove unicharutil dependency and linking (just requires updates) 2001-10-26 03:06:04 +00:00
brendan%mozilla.org 63754279fd epstein@tellme.com's patch implementing JS_ClearNewbornRoots (106790, r=brendan, sr=jband). 2001-10-26 02:38:10 +00:00
brendan%mozilla.org 862a59da87 khanson@netscape.com's fix for silent ValueIsLength failure (101488, r=rogerl, sr=me). 2001-10-26 02:35:01 +00:00
jst%netscape.com 05bb290330 Fixing bug 106823. Pass the length to nsAString::Assign() to make sure we don't loose embedded null characters in strings, and also to speed things up a bit. Also trunkate strings before 'voiding' them to make sure old string data is deleted from the string before it's reused. r=bzbarsky@mit.edu, rs=jband@netscape.com 2001-10-26 02:18:16 +00:00
dbradley%netscape.com 900bb81362 Bug 106130 - Remove dependancy of xpconnect on intl. r=alecf, sr=shaver, patch=jband 2001-10-25 12:07:23 +00:00
brendan%mozilla.org 894b19f8c3 Add mutable (growable or dependent, two subtypes) strings to solve O(n^2) and O(n^3) growth rates (56940, r=rogerl, sr=jband&shaver). 2001-10-25 00:26:38 +00:00
jaggernaut%netscape.com 1541469c6a Bug 53057: Fixing up users of implicit |CharT*| conversion operators for nsCString to use |.get()| instead, rr=dbaron, rs=scc 2001-10-24 09:43:59 +00:00
jst%netscape.com ec6e6aa5da Fixing bug 69468. Finally adding support for string nullness to XPConnect. r=jaggernaut@netscape.com, shaver@mozilla.org, sr=jband@netscape.com 2001-10-24 07:15:06 +00:00
pschwartau%netscape.com 9565961ff0 Adding two more cases to the test. 2001-10-24 02:01:59 +00:00
pschwartau%netscape.com 53e1fc0bb1 Improving comments. 2001-10-23 23:02:25 +00:00
pschwartau%netscape.com 80bbc8630d Initial add. Test for regexps with global flag set. 2001-10-23 22:29:01 +00:00
pschwartau%netscape.com a61d44caad More accurate comment. 2001-10-23 19:28:40 +00:00
pschwartau%netscape.com fa37601fdb Correcting an error in comments. 2001-10-23 19:12:42 +00:00
pschwartau%netscape.com 37ce28ddd4 Minor changes in style. 2001-10-23 17:39:31 +00:00
cls%seawood.org b41bf3571c Since the purpose of --enable-ultrasparc is to just flip on the ultrasparc-specific js compare & swap code, move the asflags/defines to turn it on back into js/src/Makefile.in rather than causing the entire project to be built with those flags. 2001-10-23 08:17:16 +00:00
pschwartau%netscape.com 4965e9aa2c Adding comments. 2001-10-22 23:59:20 +00:00
dougt%netscape.com 0a62d4e8d5 99163 - removing nsObserverService.h includes. Also fixing 106090, extra methods on nsObserverService. r=shaver@mozilla.org, sr=jband@netscape.com 2001-10-22 22:01:27 +00:00
alecf%netscape.com c8469b7ac5 bug 100214 - add libunicharutil_s to all unix projects that require it, r=cls 2001-10-22 20:44:02 +00:00
pschwartau%netscape.com e8e300d648 Improving readability. 2001-10-22 20:09:12 +00:00
pschwartau%netscape.com 53c5b4683a Initial add. Regression test for Bugzilla bug 105972. 2001-10-22 20:06:52 +00:00
jaggernaut%netscape.com 3e278e4913 Bug 105973: s/Observe/observe/ 2001-10-22 04:16:33 +00:00
dougt%netscape.com d18d7e2b17 nsIObserver and nsIObserverService API freeze. r=rpotts@netscape.com, alecf@netscape.com. bug 99163 2001-10-19 20:52:59 +00:00
brendan%mozilla.org ef987373e8 Avoid converting lock-free to lock-full scope from GC mark call-outs (105571, r=jst, sr=jband). 2001-10-19 03:02:41 +00:00
nboyd%atg.com b2eea2f3d4 Patch from Igor:
Unsynchronized ScriptableObject.getSlotToSet contains references/modifications
to the slots array which is no go under multithreading. The attached patch
replaces references to slots by references to its local copy and moves code
to allocate the initial array to synchronized addSlot.

The patch also replace throwing of RuntimeException in case of broken code by
if (Context.check && badCondition) Context.codeBug();

Regards, Igor
2001-10-18 18:16:28 +00:00
nboyd%atg.com eef3184d67 Apparently the "classic" compiler is not only deprecated in JDK 1.4, but it
also has a significant regression introduced in it.   The default compiler
not only works, but also is noticably faster.  Ant takes care of the
selection of the compiler automatically based on the JDK level, so the
following patch should make things better all around.
2001-10-17 12:59:48 +00:00
nboyd%atg.com 78ab3bb949 Remove deprecated class. 2001-10-17 12:59:18 +00:00
nboyd%atg.com 250051383e Remove deprecated FlattenedObject.
Patch from Igor:
The 2 attached patches allow to avoid wrapping of array indexes to Double object
when Interpreter knows that the index is an integer number. It speed up array
benchmark by 5-10%

array_access.diff adds to ScriptRuntime getStrIdElem and setStrIdElem to get/set
properties which known to be strings plus it modifies NativeArray to use these methods.

interpreter.diff contains the Interpreter modifications to call get/setElem for
integer or string properties when the property type is known for sure.
2001-10-17 12:59:02 +00:00
nboyd%atg.com 1bc0630719 Backslashes don't work. 2001-10-17 12:53:39 +00:00
dbradley%netscape.com 19f0e89f2b bug 103649 - Crash when rendering a page with hundreds of iframes - This reduces the number of calls to JS_ContextIterator from XPCJSRuntime::SyncXPCContextList. It is only the first step in addressing this bug. r=jband, sr=jst 2001-10-17 11:52:55 +00:00
brendan%mozilla.org 38b3c5bb4b Checking in scole@planetweb.com's patch to prefix str_escape with js_ (96084, r=rogerl, sr=brendan). 2001-10-17 08:16:53 +00:00
brendan%mozilla.org 43a911aeb6 Fixes for bug 80981 (``Need extended jump bytecode to avoid "script too large"
errors, etc.''):

We now ReportStatementTooLarge only if
- a jump offset overflows 32 bits, signed;
- there are 2**32 or more span dependencies in a script;
- a backpatch chain link is more than (2**30 - 1) bytecodes long;
- a source note's distance from the last note, or from script main entry
  point, is > 0x7fffff bytes.

Narrative of the patch, by file:

- js.c
  The js_SrcNoteName array of const char * is now a js_SrcNoteSpec array of
  "specifiers", structs that include a const char *name member.  Also, due to
  span-dependent jumps at the ends of basic blocks where the decompiler knows
  the basic block length, but not the jump format, we need an offset operand
  for SRC_COND, SRC_IF_ELSE, and SRC_WHILE (to tell the distance from the
  branch bytecode after the condition expression to the span-dependent jump).

- jsarena.[ch]
  JS arenas are used mainly for last-in-first-out allocation with _en masse_
  release to the malloc pool (or, optionally, to a private freelist).  But
  the code generator needs to allocate and grow (by doubling, to avoid O(n^2)
  growth) allocations that hold bytecode, source notes, and span-dependency
  records.  This exception to LIFO allocation works by claiming an entire
  arena from the pool and realloc'ing it, as soon as the allocation size
  reaches the pool's default arena size.  Call such an allocation a "large
  single allocation".

  This patch adds a new arena API, JS_ArenaFreeAllocation, which can be used
  to free a large single allocation.  If called with an allocation that's not
  a large single allocation, it will nevertheless attempt to retract the arena
  containing that allocation, if the allocation is last within its arena.
  Thus JS_ArenaFreeAllocation adds a non-LIFO "free" special case to match the
  non-LIFO "grow" special case already implemented under JS_ARENA_GROW for
  large single allocations.

  The code generator still benefits via this extension to arenas, over purely
  manual malloc/realloc/free, by virtue of _en masse_ free (JS_ARENA_RELEASE
  after code generation has completed, successfully or not).

  To avoid searching for the previous arena, in order to update its next
  member upon reallocation of the arena containing a large single allocation,
  the oversized arena has a back-pointer to that next member stored (but not
  as allocable space within the arena) in a (JSArena **) footer at its end.

- jscntxt.c
  I've observed for many scripts that the bytes of source notes and bytecode
  are of comparable lengths, but only now am I fixing the default arena size
  for cx->notePool to match the size for cx->codePool (1024 instead of 256).

- jsemit.c
  Span-dependent instructions in JS bytecode consist of the jump (JOF_JUMP)
  and switch (JOF_LOOKUPSWITCH, JOF_TABLESWITCH) format opcodes, subdivided
  into unconditional (gotos and gosubs), and conditional jumps or branches
  (which pop a value, test it, and jump depending on its value).  Most jumps
  have just one immediate operand, a signed offset from the jump opcode's pc
  to the target bytecode.  The lookup and table switch opcodes may contain
  many jump offsets.

  This patch adds "X" counterparts to the opcodes/formats (X is suffixed, btw,
  to prefer JSOP_ORX and thereby to avoid colliding on the JSOP_XOR name for
  the extended form of the JSOP_OR branch opcode).  The unextended or short
  formats have 16-bit signed immediate offset operands, the extended or long
  formats have 32-bit signed immediates.  The span-dependency problem consists
  of selecting as few long instructions as possible, or about as few -- since
  jumps can span other jumps, extending one jump may cause another to need to
  be extended.

  Most JS scripts are short, so need no extended jumps.  We optimize for this
  case by generating short jumps until we know a long jump is needed.  After
  that point, we keep generating short jumps, but each jump's 16-bit immediate
  offset operand is actually an unsigned index into cg->spanDeps, an array of
  JSSpanDep structs.  Each struct tells the top offset in the script of the
  opcode, the "before" offset of the jump (which will be the same as top for
  simplex jumps, but which will index further into the bytecode array for a
  non-initial jump offset in a lookup or table switch), the after "offset"
  adjusted during span-dependent instruction selection (initially the same
  value as the "before" offset), and the jump target (more below).

  Since we generate cg->spanDeps lazily, from within js_SetJumpOffset, we must
  ensure that all bytecode generated so far can be inspected to discover where
  the jump offset immediate operands lie within CG_CODE(cg).  But the bonus is
  that we generate span-dependency records sorted by their offsets, so we can
  binary-search when trying to find a JSSpanDep for a given bytecode offset,
  or the nearest JSSpanDep at or above a given pc.

  To avoid limiting scripts to 64K jumps, if the cg->spanDeps index overflows
  65534, we store SPANDEP_INDEX_HUGE in the jump's immediate operand.  This
  tells us that we need to binary-search for the cg->spanDeps entry by the
  jump opcode's bytecode offset (sd->before).

  Jump targets need to be maintained in a data structure that lets us look
  up an already-known target by its address (jumps may have a common target),
  and that also lets us update the addresses (script-relative, a.k.a. absolute
  offsets) of targets that come after a jump target (for when a jump below
  that target needs to be extended).  We use an AVL tree, implemented using
  recursion, but with some tricky optimizations to its height-balancing code
  (see http://www.enteract.com/~bradapp/ftp/src/libs/C++/AvlTrees.html).

  A final wrinkle: backpatch chains are linked by jump-to-jump offsets with
  positive sign, even though they link "backward" (i.e., toward lower bytecode
  address).  We don't want to waste space and search time in the AVL tree for
  such temporary backpatch deltas, so we use a single-bit wildcard scheme to
  tag true JSJumpTarget pointers and encode untagged, signed (positive) deltas
  in JSSpanDep.target pointers, depending on whether the JSSpanDep has a known
  target, or is still awaiting backpatching.

  Note that backpatch chains would present a problem for BuildSpanDepTable,
  which inspects bytecode to build cg->spanDeps on demand, when the first
  short jump offset overflows.  To solve this temporary problem, we emit a
  proxy bytecode (JSOP_BACKPATCH; JSOP_BACKPATCH_PUSH for jumps that push a
  result on the interpreter's stack, namely JSOP_GOSUB; or JSOP_BACKPATCH_POP
  for branch ops) whose nuses/ndefs counts help keep the stack balanced, but
  whose opcode format distinguishes its backpatch delta immediate operand from
  a normal jump offset.

  The cg->spanDeps array and JSJumpTarget structs are allocated from the
  cx->tempPool arena-pool.  This created a LIFO vs. non-LIFO conflict: there
  were two places under the TOK_SWITCH case in js_EmitTree that used tempPool
  to allocate and release a chunk of memory, during whose lifetime JSSpanDep
  and/or JSJumpTarget structs might also be allocated from tempPool -- the
  ensuing release would prove disastrous.  These bitmap and table temporaries
  are now allocated from the malloc heap.

- jsinterp.c
  Straightforward cloning and JUMP => JUMPX mutating of the jump and switch
  format bytecode cases.

- jsobj.c
  Silence warnings about %p used without (void *) casts.

- jsopcode.c
  Massive and scary decompiler whackage to cope with extended jumps, using
  source note offsets to help find jumps whose format (short or long) can't
  be discovered from properties of prior instructions in the script.

  One cute hack here: long || and && expressions are broken up to wrap before
  the 80th column, with the operator at the end of each non-terminal line.

- jsopcode.h, jsopcode.tbl
  The new extended jump opcodes, formats, and fundamental parameterization
  macros.  Also, more comments.

- jsparse.c
  Random and probably only aesthetic fix to avoid decorating a foo[i]++ or
  --foo[i] parse tree node with JSOP_SETCALL, wrongly (only foo(i)++ or
  --foo(i), or the other post- or prefix form operator, should have such an
  opcode decoration on its parse tree).

- jsscript.h
  Random macro naming sanity: use trailing _ rather than leading _ for macro
  local variables in order to avoid invading the standard C global namespace.
2001-10-17 03:16:48 +00:00
jaggernaut%netscape.com ce6e434d2a More REQUIRES clean-up. 2001-10-16 22:08:55 +00:00
pschwartau%netscape.com f28aa32398 Comment fix. 2001-10-16 19:22:47 +00:00
nboyd%atg.com af90c96f02 Test not valid in JDK 1.4. 2001-10-16 18:33:38 +00:00
pschwartau%netscape.com 0c21f002ec Skip new test that uses the gc() function of SpiderMonkey. 2001-10-16 18:14:19 +00:00
pschwartau%netscape.com d952a19514 Intial add. Regression test for Bugzilla bug 104584. 2001-10-16 17:46:26 +00:00
jband%netscape.com e6e171574e trivial warning fix. rs=jband 2001-10-16 05:48:25 +00:00
brendan%mozilla.org eb9671e246 Add SetAlphaBounds, TABLE_SIZE, and MIN_ALPHA APIs (103990, r=dbaron, sr=waterson). 2001-10-16 05:40:27 +00:00
dougt%netscape.com 4f3a44d63b API Freeze for nsIServiceManager r=shaver@mozilla.org, sr=rpotts@netscape.com bug 99147 2001-10-16 03:35:52 +00:00
brendan%mozilla.org 12d650dc85 Fix js_GC to mark max(#actuals, #formals) slots at fp->argv (104584, r=shaver, sr=jband). 2001-10-16 02:21:02 +00:00
bryner%netscape.com 7e89125660 Bug 102725 -- problems converting numbers to strings when using gcc -O2. r=bbaetz, sr=brendan. 2001-10-15 22:31:39 +00:00
nboyd%atg.com 9ccbb97cbb Fix 104493:
We have a tool that looks for a scary noop case of assigning an instance field
to itself. this usually comes from a constructor that assigns a argument to a
instance field with the same name and then later the argument changes name. we
ran our tool on all of our classes we have in our classpath here and found this
problem in your code.

rhino1_5R2/src/org/mozilla/javascript/regexp/NativeRegExp.java line 159 it has:
        this.flags = flags;

This seems to be a bad cut and paste from the CompilerState constructor on line
2155. or has some initialization that used to work been lost?
2001-10-13 12:06:16 +00:00
pschwartau%netscape.com a6a85c77d4 Initial add. Regression test for bug 104375. 2001-10-12 21:28:43 +00:00
jband%netscape.com e21b56807d not yet part of build. support tracking the iid in array of interfaces 2001-10-12 20:29:19 +00:00
pschwartau%netscape.com 9c84b7f6f0 Initial add. Regression test for bug 104077. 2001-10-10 20:50:27 +00:00
pschwartau%netscape.com b650df504b Minor change to make test exactly the same as the one reported in bug 102725. 2001-10-10 20:36:17 +00:00
brendan%mozilla.org 064c4cae19 Avoid O(n**2) growth rate of token buffer arena-based reallocation (103042, r=jband, sr=shaver). 2001-10-10 20:19:12 +00:00
rginda%netscape.com 6c53ec4ba6 bug 103804, "Venkman doesn't like stopping in timeouts", r=jband, sr=shaver
add callback to the enterNestedEventLoop method
2001-10-10 06:35:46 +00:00
pschwartau%netscape.com ee091c31af Initial add. Regression test for bug 102725. 2001-10-10 01:32:28 +00:00
jband%netscape.com 900a5bfba9 NOT PART OF BUILD. bug 44675. bug 98209. New files 2001-10-09 23:42:22 +00:00
pschwartau%netscape.com 2059c2f02a Skip this test for now. Currently uses the non-EMCA 'it' object of SpiderMonkey. 2001-10-09 23:28:21 +00:00
pschwartau%netscape.com d6986f9388 Initial add. Regression test for bug 99663. 2001-10-09 23:12:16 +00:00
rginda%netscape.com 28b0c9fa5b bug 103831, r=cls, sr=jband
remove java stubs
2001-10-09 21:43:15 +00:00
dbradley%netscape.com 6907d52b27 bug 102750 - Can't call JSIID.equals from web content. r=mstoltz, sr=jband 2001-10-09 18:54:37 +00:00
nboyd%atg.com 2eb21c32b3 Fix name of function in error message 2001-10-09 00:54:49 +00:00
jband%netscape.com 5992cc2572 fix bug 103259. Avoid crasher by correctly marking sharedscriptable object so that JSClasses don't get collected prematurely even when wrapper is 'stillborn' and not reflected into JS. r=dbradley sr=vidur. 2001-10-08 19:56:25 +00:00