3933 Commits

Author SHA1 Message Date
nboyd%atg.com
503987f4fb 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


git-svn-id: svn://10.0.0.236/trunk@108807 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-22 15:48:21 +00:00
brendan%mozilla.org
4e8a45eab4 Thanks to scole@planetweb.com (Steven Cole) for fixing date_format to respect PRMJ_FormatTime's return value (102159, r=beard, sr=brendan).
git-svn-id: svn://10.0.0.236/trunk@108753 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-21 23:53:54 +00:00
brendan%mozilla.org
1adc3b3656 Don't eagerly allocate fatlock freelist chunks; don't preallocate so much, and use a smaller global lock hashtable (109218, r=shaver/sr=jband).
git-svn-id: svn://10.0.0.236/trunk@108743 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-21 23:28:52 +00:00
pschwartau%netscape.com
a4c56ba812 Removing two tests from the skip list because they have been removed from the repository.
git-svn-id: svn://10.0.0.236/trunk@108736 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-21 22:16:19 +00:00
pschwartau%netscape.com
bc58cb1179 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.


git-svn-id: svn://10.0.0.236/trunk@108734 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-21 21:59:31 +00:00
pschwartau%netscape.com
e27ea5dbad Skipping another test with a large switch() statement
git-svn-id: svn://10.0.0.236/trunk@108722 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-21 21:34:25 +00:00
pschwartau%netscape.com
3341a1e9ef Initial add. Regression test for bug 80981.
git-svn-id: svn://10.0.0.236/trunk@108720 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-21 21:17:31 +00:00
nboyd%atg.com
80ec4cef5c 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>


git-svn-id: svn://10.0.0.236/trunk@108706 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-21 17:12:57 +00:00
seawood%netscape.com
889469fd27 Rename 'install' build phase to 'libs'.
Bug #56601 r=pavlov


git-svn-id: svn://10.0.0.236/trunk@108684 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-21 09:49:41 +00:00
brendan%mozilla.org
5655c0ae34 Thanks to scole@planetweb.com, no more un-ECMA error for /* in a /**/ comment (110286, r=khanson, sr=brendan).
git-svn-id: svn://10.0.0.236/trunk@108642 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-20 23:35:45 +00:00
brendan%mozilla.org
fa065f1652 Better fix than 0.9.6 minimal fix for NUL-termination assumption in replace (108832, r=shaver, sr=jband).
git-svn-id: svn://10.0.0.236/trunk@108625 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-20 21:26:33 +00:00
brendan%mozilla.org
989357e2ad Don't warn or 'correct' = to == in a condition unless the right operand has greater precedence than == (106244, r=shaver, sr=jband).
git-svn-id: svn://10.0.0.236/trunk@108556 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-20 05:20:57 +00:00
rginda%netscape.com
db9ee285d0 bug 110903, patch=brendan, sr=shaver, r=me
Call new script hook for scripts created via xdr.


git-svn-id: svn://10.0.0.236/trunk@108541 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-20 02:47:41 +00:00
brendan%mozilla.org
93edeeffb3 Don't ass-u-me fp->argv => fp->fun (109635, sr=shaver/jband).
git-svn-id: svn://10.0.0.236/trunk@108539 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-20 02:37:01 +00:00
timeless%mac.com
7b921259da 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


git-svn-id: svn://10.0.0.236/trunk@108471 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-19 06:45:00 +00:00
pschwartau%netscape.com
53f933a408 Initial add. Regression test for bug 110286.
git-svn-id: svn://10.0.0.236/trunk@108345 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-17 03:20:45 +00:00
brendan%mozilla.org
056cf28a63 Remove __call__ and add a callback used to check f.caller access for any function object f (109113, r=jst, sr=jband).
git-svn-id: svn://10.0.0.236/trunk@108257 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-16 02:56:49 +00:00
alecf%netscape.com
0c847ee212 win32 REQUIRES cleanup
git-svn-id: svn://10.0.0.236/trunk@108139 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-15 03:49:13 +00:00
seawood%netscape.com
54111460c9 Build libmozjs during the install phase.
Bug #104307 sr=jband


git-svn-id: svn://10.0.0.236/trunk@108015 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-14 04:52:55 +00:00
bzbarsky%mit.edu
068756d821 Use NS_LITERAL_STRING instead of NS_ConvertASCIItoUCS2 where possible
(i.e. where the string is a literal).  Bug 104159, r=jag, sr=alecf


git-svn-id: svn://10.0.0.236/trunk@107987 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-14 01:33:42 +00:00
pschwartau%netscape.com
f0a1c21adf Adding another case to test.
git-svn-id: svn://10.0.0.236/trunk@107966 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-13 19:46:27 +00:00
brendan%mozilla.org
589201c307 Avoid ClaimScope (lock-free to -full transition) in JS_GetClass and js_FinalizeObject called from the GC (109183, r=shaver, sr=jband).
git-svn-id: svn://10.0.0.236/trunk@107900 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-11 21:25:13 +00:00
jband%netscape.com
37eba2b798 not part of build. Now that null DOM strings are correctly supported we can fix the test case
git-svn-id: svn://10.0.0.236/trunk@107854 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-10 22:35:26 +00:00
pschwartau%netscape.com
388f6c3fbb Fixing a typo.
git-svn-id: svn://10.0.0.236/trunk@107813 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-10 02:47:52 +00:00
pschwartau%netscape.com
df7a557ec3 Adding another case to test.
git-svn-id: svn://10.0.0.236/trunk@107812 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-10 02:46:24 +00:00
brendan%mozilla.org
57a2bb6907 For now (0.9.6), str_replace requires an independent replacement string (108832, r=shaver, sr=jband, a=asa).
git-svn-id: svn://10.0.0.236/trunk@107705 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 23:53:33 +00:00
pschwartau%netscape.com
47b893d895 Initial add. Regression test for bug 108440.
git-svn-id: svn://10.0.0.236/trunk@107626 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 23:20:48 +00:00
nboyd%atg.com
9e9cb2fc7c 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.


git-svn-id: svn://10.0.0.236/trunk@107603 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 14:15:48 +00:00
brendan%mozilla.org
4566fb535b Fix Function.call(this, 'alert(42)')() so the anonymous function finds its nearest scripted caller's principals (90546, sr=shaver&jband).
git-svn-id: svn://10.0.0.236/trunk@107586 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 06:34:04 +00:00
dbaron%fas.harvard.edu
13b5500ba3 Ensure that string literals are used as |const char*| rather than |char*|. r=jag sr=brendan b=107052
git-svn-id: svn://10.0.0.236/trunk@107583 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 06:24:10 +00:00
mkaply%us.ibm.com
7bdb802715 #105476
r=os2team, sr=brendan@mozilla.org
Add ASM implementation of js_CompareAndSwap for OS/2 VACPP


git-svn-id: svn://10.0.0.236/trunk@107572 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 05:20:33 +00:00
dbaron%fas.harvard.edu
52bea38360 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
git-svn-id: svn://10.0.0.236/trunk@107556 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 04:12:20 +00:00
brendan%mozilla.org
c1526a5251 Avoid recursive join/toString death (108440, r=shaver, sr=jband).
git-svn-id: svn://10.0.0.236/trunk@107522 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 00:15:44 +00:00
brendan%mozilla.org
d97c123a81 Move the oversized arena back-pointer to a well-aligned header extension lying just behind a->base (108013, sr=waterson&jband).
git-svn-id: svn://10.0.0.236/trunk@107517 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 00:11:22 +00:00
jband%netscape.com
9501633b32 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
git-svn-id: svn://10.0.0.236/trunk@107364 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 00:40:54 +00:00
rginda%netscape.com
e94dc5a898 removing dead code, see mozilla/js2
git-svn-id: svn://10.0.0.236/trunk@107357 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 21:46:17 +00:00
rginda%netscape.com
b217ed22ea removing dead code, see mozilla/js2
git-svn-id: svn://10.0.0.236/trunk@107355 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 21:38:18 +00:00
seawood%netscape.com
76780820f4 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


git-svn-id: svn://10.0.0.236/trunk@107199 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 03:29:05 +00:00
rginda%netscape.com
db72e1cb29 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


git-svn-id: svn://10.0.0.236/trunk@107131 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:10:47 +00:00
peterv%netscape.com
625023cc1d Add build option for the JS profiler on Mac. a=dbradley. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@107098 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 10:27:52 +00:00
pschwartau%netscape.com
8bb6615f5a Improving readability.
git-svn-id: svn://10.0.0.236/trunk@107042 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 02:17:57 +00:00
pschwartau%netscape.com
2e2a0c6b28 Initial add. Regression test for bug 107771.
git-svn-id: svn://10.0.0.236/trunk@107040 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 02:06:54 +00:00
dbradley%netscape.com
636bf8b5b0 Bug 83426 - Remove DOM exception hack. r=jst, r=dbradley, sr=jband
git-svn-id: svn://10.0.0.236/trunk@106972 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 15:52:53 +00:00
jband%netscape.com
3b3d9f5aaf fixing warnings from recent landing and uncommenting test cases I did not mean to comment out for the checkin
git-svn-id: svn://10.0.0.236/trunk@106926 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 05:18:35 +00:00
brendan%mozilla.org
bd7ff6eb3b Fix nul-termination assumption hidden in lastIndexOf, broken by dependent strings fix for bug 56940 (107771, r=jag, sr=waterson).
git-svn-id: svn://10.0.0.236/trunk@106916 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 03:19:54 +00:00
jband%netscape.com
958b4e78e0 fix Mac bustage. I can't believe the Mac can't do this conversion without a cast!
git-svn-id: svn://10.0.0.236/trunk@106914 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 02:36:19 +00:00
jband%netscape.com
1c7f2a930e the HP compiler says that anonymous unions can't even have structs. So the union must be named. Fixing that bustage
git-svn-id: svn://10.0.0.236/trunk@106909 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 01:45:48 +00:00
jband%netscape.com
4246348236 fix Mac bustage (I hope). I think these names conflicted with other names
git-svn-id: svn://10.0.0.236/trunk@106908 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 01:15:53 +00:00
seawood%netscape.com
acaf3004b5 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


git-svn-id: svn://10.0.0.236/trunk@106904 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 00:54:48 +00:00
pete%alphanumerica.com
3c4492f3e0 b=107823, r=ccarlen, sr=brendan
--pete


git-svn-id: svn://10.0.0.236/trunk@106886 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 00:11:15 +00:00