Commit Graph

3022 Commits

Author SHA1 Message Date
waldemar%netscape.com
87b8587c69 Fixed comment
git-svn-id: svn://10.0.0.236/trunk@85933 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-01 03:42:25 +00:00
waldemar%netscape.com
6449b48219 Added make-and-compile-grammar cache
git-svn-id: svn://10.0.0.236/trunk@85932 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-01 03:41:54 +00:00
waldemar%netscape.com
02679117ff Added hash-table-=
git-svn-id: svn://10.0.0.236/trunk@85931 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-01 03:41:18 +00:00
waldemar%netscape.com
bc3f6fe763 Added the id type
git-svn-id: svn://10.0.0.236/trunk@85930 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-01 03:40:56 +00:00
waldemar%netscape.com
7dfe7c6fc4 Removed namespace inheritance.
Begun implementing semantics.


git-svn-id: svn://10.0.0.236/trunk@85929 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-01 03:39:26 +00:00
rogerl%netscape.com
cd77ddf59d Removed unused parameter.
git-svn-id: svn://10.0.0.236/trunk@85918 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-01 01:06:53 +00:00
rogerl%netscape.com
33c966518e Changed Cast to take a JSValue containing a type instead of type directly.
Added LoadType to help support that. Also added LoadNull.


git-svn-id: svn://10.0.0.236/trunk@85917 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-01 00:59:21 +00:00
mkaply%us.ibm.com
28ff7a5167 Putting it back until I figure out the bustage
git-svn-id: svn://10.0.0.236/trunk@85909 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-01 00:03:12 +00:00
mkaply%us.ibm.com
fc3730319c OS/2 only
r=dbaron
Add static to OS/2 JS_STATIC_CALLBACK so I don't break the build like I did yesterday


git-svn-id: svn://10.0.0.236/trunk@85902 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-31 23:40:42 +00:00
mkaply%us.ibm.com
33096635e1 #59855
r=mccabe, sr=brendan
Proper building of fdlibm standalone


git-svn-id: svn://10.0.0.236/trunk@85898 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-31 23:26:00 +00:00
mkaply%us.ibm.com
36d7476c0f #59855
r=mccabe, sr=brendan
OS/2 needs fdlibm copysign


git-svn-id: svn://10.0.0.236/trunk@85895 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-31 23:24:27 +00:00
mkaply%us.ibm.com
cde5530610 #59855
r=mccabe, sr=brendan
Fix Javascript to get Endianness from jstypes.h


git-svn-id: svn://10.0.0.236/trunk@85894 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-31 23:23:42 +00:00
mkaply%us.ibm.com
6b8f3aa5a1 #59855
r=mccabe, sr=brendan
Fix Javascript to get Endianness from jstypes.h - start with a Makefile change and let it cycle once


git-svn-id: svn://10.0.0.236/trunk@85873 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-31 21:07:16 +00:00
matthias%sorted.org
910d37834b introduced "sync" helper function for converting a Javascript function
into a Java-style synchronized method


git-svn-id: svn://10.0.0.236/trunk@85831 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-31 13:05:21 +00:00
matthias%sorted.org
c113577e8a added support for implementing Java-style synchronized methods in Javascript
git-svn-id: svn://10.0.0.236/trunk@85830 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-31 13:02:42 +00:00
dveditz%netscape.com
79219dcf9f enable win32 XPC_TOOLS_SUPPORT environment var to turn on js profiler hooks. r=mcafee,sr=jband
git-svn-id: svn://10.0.0.236/trunk@85810 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-31 03:26:31 +00:00
jband%netscape.com
c4d3afea71 NOT PART OF THE BUILD - simple observer test to demonstrate use of weak references
git-svn-id: svn://10.0.0.236/trunk@85803 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-31 02:32:39 +00:00
brendan%mozilla.org
960e43639c Throw EvalError for indirect eval calls iff strict+werror (38512, r=rogerl, sr=shaver).
git-svn-id: svn://10.0.0.236/trunk@85796 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-31 01:12:15 +00:00
matthias%sorted.org
5a3da87e1d added support for incremental/prefix matching of regular
expressions. The method "prefix" on a RegExp behaves exactly the same
as the "exec" method except it returns "undefined" if the match failed
because there was an insufficient number of characters in the
input. E.g.
/^foo/.prefix("foo")	=> ["foo"] (just like exec)
/^foo/.prefix("fox")	=> null (just like exec)
/^foo/.prefix("fo")	=> undefined (whereas exec returns null)


git-svn-id: svn://10.0.0.236/trunk@85760 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-30 16:38:21 +00:00
dbaron%fas.harvard.edu
844a7882f7 Attempt to fix build bustage from mkaply's checkin. r=kin
git-svn-id: svn://10.0.0.236/trunk@85759 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-30 16:31:43 +00:00
mkaply%us.ibm.com
ceb8b2cef8 #62003
r=mccabe, sr=brendan
Fixing up some Javascript CALLBACKs


git-svn-id: svn://10.0.0.236/trunk@85758 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-30 15:53:38 +00:00
mkaply%us.ibm.com
2ca45a2991 #62003
r=mccabe, sr=brendan
Fixing up some Javascript CALLBACKs


git-svn-id: svn://10.0.0.236/trunk@85757 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-30 15:43:35 +00:00
nboyd%atg.com
c4a246e8db Fix bug:
Subject:
             [Rhino] Question
        Date:
             Tue, 30 Jan 2001 20:18:21 +0900
       From:
             "get21" <get21@secsm.org>
 Organization:
             Another Netscape Collabra Server User
 Newsgroups:
             netscape.public.mozilla.jseng




I found something unusual to me when I hacking the Rhino source code.

In tagify method of NativeString Class,

When it adds tag to its string(this.string), it does not use quotation
marks.

For example, the result of tagify("A HREF", "A", value) in
jsFunction_link(String value) is

<A HREF=Some Value>Original String Value</A>

Not,

<A HREF="Some Value">Original String Value</A>

This question might sound silly, but I'm curious why.

Thanks in advance,

Nam

--
email : get21@secsm.org
home : http://get21.secsm.org
phone : 011-9092-1802


git-svn-id: svn://10.0.0.236/trunk@85752 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-30 13:47:19 +00:00
brendan%mozilla.org
c9caa129f3 Better branch callback failure message.
git-svn-id: svn://10.0.0.236/trunk@85677 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-29 20:32:57 +00:00
brendan%mozilla.org
cfe27a306d Make branch callback optional, parameterize its limit, and give a warning when it fails.
git-svn-id: svn://10.0.0.236/trunk@85676 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-29 20:27:30 +00:00
brendan%mozilla.org
88999be56e Fixes for bug 33390 (r=mccabe, sr=shaver)
- Optimize compile (parse+emit) operation to generate code for each top-level
  statement or function in turn, recycling JSParseNodes as we go for greatly
  reduced "long linear script" footprint.
- Fix O(n**2) growth problems in bytecode and srcnote generation.
- Add js_ParseTokenStream entry point to compiler, for tree-generation without
  code-generation.  Move JSOP_EVAL instruction selection from code-generator to
  parser, to match other such specializations and enable js_ParseTokenStream.
- Fix js_CompileTokenStream (and get it right in new js_ParseTokenStream) to
  respect JSOPTION_VAROBJFIX.
- Clean up bracing, multi-line conditions, and overlong lines.


git-svn-id: svn://10.0.0.236/trunk@85619 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-27 08:00:45 +00:00
rogerl%netscape.com
336b3f3b1f Fixes for bugs #66234 (57572, 57631, 61266, 61766) sr=brendan, r=mccabe,
r=rginda,r=rogerl. Also 60925, 60926 by virtue of being subsumed by above.


git-svn-id: svn://10.0.0.236/trunk@85596 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-27 00:31:32 +00:00
jeff.dyer%compilercompany.com
50228758c5 First cut a xml code generation.
git-svn-id: svn://10.0.0.236/trunk@85591 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-26 23:55:32 +00:00
jeff.dyer%compilercompany.com
ac8bd7812e Unneeded file
git-svn-id: svn://10.0.0.236/trunk@85588 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-26 23:46:06 +00:00
jband%netscape.com
a90787454e fix jump in leaks caused by previous checkin by commenting out the offending code that roots Object.prototype
git-svn-id: svn://10.0.0.236/trunk@85565 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-26 08:02:23 +00:00
waldemar%netscape.com
069b231dc0 Added .() operator
git-svn-id: svn://10.0.0.236/trunk@85564 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-26 07:33:32 +00:00
jband%netscape.com
0169a67b12 backing out the unreviewed change to the loader for bug 63027 that I checked in with the other xpconnect changes by mistake.
git-svn-id: svn://10.0.0.236/trunk@85548 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-26 02:35:22 +00:00
jband%netscape.com
d15f323b49 add xpidl support for DOMString to fix bug 65762. r=jst sr=brendan
git-svn-id: svn://10.0.0.236/trunk@85546 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-26 02:32:18 +00:00
jband%netscape.com
a930e22667 This is mostly to fix bug 64111 - XPConnect vs. Object.prototype.toSource woes.
Some other small fixes are included. Here is the list...

- Make nsIJSID::id [noscript] because xpconnect automatically builds a nsIJSID
wrapper around nsid values. However, xpconnect does not maintain a table of
those wrappers. So, given the same id twice it will make two nsIJSID wrappers.
This means that property walking could get foo.id.id.id... and not detect that
the different objects represent the same id. nsIJSID already exposes 'number'
so that JS can get the stringified value of the nsid. The nsid struct returned
by 'id' is useful for C++, but only causes problems for JS.

- Fix the nsIXPCScriptable 'IGNORE' handler for GetAttributes to not fail
silently.

- Add 'Components' to global objects as a non-enumerable property for backwards
compatibility and to avoid additional work in property enumeration (esp. in
win.toSource!)

- Expose toSource on wrapped native JSObjects. This just returns an empty object
string: '{}'. It can be overridden by an interface method if present.

- Expose toString on wrapped native JSObjects. It can be overridden by an
interface method if present. Previously we only did this as part of the
Convert op. Now someWrapper.toString will return a callable function.

- Extend the toString behaviour to also print the address of the wrapper in
DEBUG builds only: e.g. "xpconnect wrapped nsIFoo @ 0x12345678". mccabe
convinced me this would be useful. Release build behaviour is unchanged - we
worried that exposing addresses might contribute to possible security exploits.

- Have wrapped native JSObjects use Object.prototype as their proto rather than
have a null proto. Originally this was going to allow delegation to
Object.prototype.toSource, but even without that, this seems like a good thing.
This is implemented by getting Object.prototype from the global object each
time we create a wrapper to allow for spify JS dynamic craziness.

- Use 16bit values in wrappednative property descriptors to save space. It was
only possible to use 16 bits of the pointer-sized ints in the structs anyway.

- Do a security check at enumeration time and only expose those properties that
the caller can actually 'Get'. This fixes the toSource security exception
problem.

- Add a big comment about the problem of reporting uncaught exceptions.

- Fix crashing bug for case where object has no enumerable properties and
xpconnect failed to fill in the zero count.

- Fix NewInstanceJSObject to dig in and find the 'ultimate' parent when
parenting new wrapper JSObject. The old scheme was ending up with hugely
long parent chains in some cases.

r=jst, sr=brendan


git-svn-id: svn://10.0.0.236/trunk@85545 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-26 02:25:09 +00:00
jband%netscape.com
dd4fb834f5 WHITESPACE ONLY CHANGE. Detabbing this stuff cuz it bothers me (tabbing didn't match 'Mode' line's tab-width)
git-svn-id: svn://10.0.0.236/trunk@85540 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-26 01:53:22 +00:00
brendan%mozilla.org
1c7d4471fa Fixes for bug 61898 (which has morphed), r=rogerl, sr=jband.
- Optimize integer ++ and -- to avoid double-to-int, which is quite costly for
  some compilers (ftol on Windows with MSVC).
- Optimized arguments[i] and arguments.length references to use bytecodes that
  avoid creating an arguments object for the current frame.  This entailed
  simplifying the compiler to avoid flagging functions and scripts that set
  arguments, since we have code in jsfun.c to catch such sets at runtime.
- The code generator now eliminates useless expression statements, giving a
  strict warning about them.
- Rationalized jsemit.c's LookupArgOrVar to have well-defined results in *pn.
  Eliminate bytecode specializations for argument and local variable gets and
  sets from jsparse.c -- these precede jsemit.c's LookupArgOrVar and frustrate
  it, by setting pn_slot non-negative too early.
- Code generation errors set report->filename and report->lineno, rather than
  hacking "{0}, line {1}: " into the localized message.
- Bogus JSFRAME_VAROBJBUG removed, JSOPTION_VAROBJFIX is sufficient.
- Spruce up jsinterp.c macros to use JS_BEGIN/END_MACRO brackets if possible.
- Avoid calling JS_PropertyStub.  The call is too costly compared to a branch
  in the caller.


git-svn-id: svn://10.0.0.236/trunk@85537 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-26 00:59:50 +00:00
rogerl%netscape.com
de77d1777b Fixes to support ICodeModule operand type (via name in global object) and
TRUE/FALSE/NULL/CLASS instructions.


git-svn-id: svn://10.0.0.236/trunk@85531 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-25 23:34:33 +00:00
nboyd%atg.com
2c47d04823 ECMA mandates a ToPrimitive on Date constructor arguments that we didn't have.
git-svn-id: svn://10.0.0.236/trunk@85503 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-25 19:56:54 +00:00
matthias%sorted.org
cd482d19f9 cleaned up indentation. no code changes.
git-svn-id: svn://10.0.0.236/trunk@85498 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-25 18:46:38 +00:00
sspitzer%netscape.com
7305affabb back out brendan (Career Limiting Move) to fix blocker bug #66545.
a=leaf


git-svn-id: svn://10.0.0.236/trunk@85497 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-25 18:06:57 +00:00
brendan%mozilla.org
c1463a8801 Fixes for bug 61898 (which has morphed), r=rogerl, sr=jband.
- Optimize integer ++ and -- to avoid double-to-int, which is quite costly for
  some compilers (ftol on Windows with MSVC).
- Optimized arguments[i] and arguments.length references to use bytecodes that
  avoid creating an arguments object for the current frame.  This entailed
  simplifying the compiler to avoid flagging functions and scripts that set
  arguments, since we have code in jsfun.c to catch such sets at runtime.
- The code generator now eliminates useless expression statements, giving a
  strict warning about them.
- Rationalized jsemit.c's LookupArgOrVar to have well-defined results in *pn.
- Code generation errors set report->filename and report->lineno, rather than
  hacking "{0}, line {1}: " into the localized message.
- Bogus JSFRAME_VAROBJBUG removed, JSOPTION_VAROBJFIX is sufficient.
- Spruce up jsinterp.c macros to use JS_BEGIN/END_MACRO brackets if possible.
- Avoid calling JS_PropertyStub.  The call is too costly compared to a branch
  in the caller.


git-svn-id: svn://10.0.0.236/trunk@85488 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-25 09:22:19 +00:00
nboyd%atg.com
19342b2207 Move Invoker out as a top-level class so that it doesn't get javadoc'd
with FunctionObject (it must be public).


git-svn-id: svn://10.0.0.236/trunk@85436 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-24 15:49:21 +00:00
nboyd%atg.com
6aee3280f9 Alternative fix for problem in the following email:
Subject:
        minor Rhino bug
   Date:
        Tue, 23 Jan 2001 13:14:51 -0800
   From:
        dave russo <d-russo@ti.com>
     To:
        nboyd@atg.com
    CC:
        d-russo@ti.com




Norris,

While using the new Rhino debugger (from the latest tip) I started to get "No
Context associated with current Thread" exceptions when expanding host objects
in the "Context:" debugger window.

In looking at the code, I discovered that NativeObject.toString seems to assume
that Context.getContext() may return null.  In fact, getContext() always returns
a non-null context or throws an exception.

I changed NativeObject.toString to never throw an exception (see below) and this
eliminated the problem I was seeing (of course).

It would be nice to incorporate this in a future Rhino tip or, if this change is
inappropriate, any guidance would be appreciated.  Thanks in advance.

I changed NativeObject.toString to:

    public String toString() {
        try {
            Context cx = Context.getContext();
            return jsFunction_toString(cx, this, null, null);
        }
        catch (Exception e) {
            return "[object " + getClassName() + "]";
        }
    }

from:

   public String toString() {
        Context cx = Context.getContext();
        if (cx != null)
            return jsFunction_toString(cx, this, null, null);
        else
            return "[object " + getClassName() + "]";
    }


git-svn-id: svn://10.0.0.236/trunk@85431 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-24 15:16:37 +00:00
beard%netscape.com
f0878fb57e [not part of build] Added UTCUtils to reflect new dependencies in JS engine.
git-svn-id: svn://10.0.0.236/trunk@85371 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-23 19:54:49 +00:00
nboyd%atg.com
2de6839f87 Subject:
Re: Small usage simplification for Rhino
       Date:
            Tue, 23 Jan 2001 16:01:42 +0100
      From:
            Igor Bukanov <igor@icesoft.no>
        To:
            Norris Boyd <nboyd@atg.com>
 References:
            1 , 2 , 3 , 4




Norris Boyd wrote:

> Thanks. I've patched in your changes and checked it into CVS.

I also looked at other places with similar pattern of few lines of
common code to construct error messages. The following was occurred too
often not to avoid temptations to move it to a separated function:

NativeGlobal.constructError(
Context.getContext(), "TypeError",
ScriptRuntime.getMessage1("msg.default.value", arg),
this)

It can be replaced by
NativeGlobal.typeError1("msg.default.value", arg, this)

There are other similar usages but they are not to frequent to bother
with code reduction because even the above replacement saves just 200
bytes in uncompressed jars (it is expensive to introduce new methods in
Java).

In any case, if you think it makes any sense, patches are attached. They
are made via
diff -cbB javascript.orig javascript > patch_context
diff -bB javascript.orig javascript > patch_std
from org/mozilla directory.

Regards, Igor


git-svn-id: svn://10.0.0.236/trunk@85369 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-23 19:35:35 +00:00
nboyd%atg.com
8384e4657c Fix problem:
Subject:
        Recent rhino broke security support
   Date:
        Tue, 23 Jan 2001 08:07:45 -0500
   From:
        "Kurt Westerfeld" <kurt@managedobjects.com>
     To:
        "Norris Boyd" <nboyd@atg.com>


Norris.....I like the changes made to FunctionObject to do method invocation
much faster.  Very slick.

Problem tho: this mechanism does not veer into the security support plugin
on context for defining a class.  This is crucial do creating event adapter
code later in applet environments.

I'm going to look into this, but perhaps you could probably make the changes
faster than I.

Unfortunately for us, we found this problem yesterday at a customer site.
:-(  Shame on us.

________________________________________________________________________
  Kurt Westerfeld
  Senior Software Architect
  Managed Objects
  mailto:kwester@ManagedObjects.com
  703.770.7225
  http://www.ManagedObjects.com

  Managed Objects: manage technology > rule business


git-svn-id: svn://10.0.0.236/trunk@85367 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-23 17:48:41 +00:00
nboyd%atg.com
c6eb5da664 Fix formatting
git-svn-id: svn://10.0.0.236/trunk@85360 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-23 14:24:39 +00:00
rogerl%netscape.com
c51683be3f More fixes for #64285 - i had mis-merged from SpiderMonkey.
git-svn-id: svn://10.0.0.236/trunk@85313 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-22 22:30:37 +00:00
nboyd%atg.com
67c42da429 Subject:
Re: Small usage simplification for Rhino
       Date:
            Mon, 22 Jan 2001 20:32:12 +0100
      From:
            Igor Bukanov <igor@icesoft.no>
        To:
            Norris Boyd <nboyd@atg.com>
 References:
            1 , 2




Norris Boyd wrote:

> Sounds like a good change to reduce codesize. I'll take the patches for the
> changes.
>
> Thanks,
> Norris

I made this patch, the files in the attachment were produced via:
diff -bB javascript.orig javascript -c > patch_context
and
diff -bB javascript.orig javascript > patch_std

run from org/mozilla directory.

This patch reduces uncopressed Rhino jar by 3K.

>
> Igor Bukanov wrote:
>
>
>> Hi, Noris!
>>
>> To shorten/cleanup usage of getMessage and reportRuntimeError methods
>> from org/mozilla/javascript/Context.java I suggest to add few utility
>> methods like
>>
>>      static String getMessage0(String messageId) {
>>          return getMessage(messageId, null);
>>      }
>>
>>      static String getMessage1(String messageId, Object arg1) {
>>          Object[] arguments = {arg1};
>>          return getMessage(messageId, arguments);
>>      }
>>
>>      static String getMessage2(String messageId, Object arg1, Object arg2) {
>>          Object[] arguments = {arg1, arg2};
>>          return getMessage(messageId, arguments);
>>      }
>>
>>      static String getMessage3
>>          (String messageId, Object arg1, Object arg2, Object arg3) {
>>          Object[] arguments = {arg1, arg2, arg3};
>>          return getMessage(messageId, arguments);
>>      }
>>
>> and
>>
>>      static EvaluatorException reportRuntimeError0(String messageId) {
>>          return reportRuntimeError(getMessage0(messageId));
>>      }
>>
>>      static EvaluatorException reportRuntimeError1
>>          (String messageId, Object arg1)
>>      {
>>          return reportRuntimeError(getMessage1(messageId, arg1));
>>      }
>>
>>      static EvaluatorException reportRuntimeError2
>>          (String messageId, Object arg1, Object arg2)
>>      {
>>          return reportRuntimeError(getMessage2(messageId, arg1, arg2));
>>      }
>>
>>      static EvaluatorException reportRuntimeError3
>>          (String messageId, Object arg1, Object arg2, Object arg3)
>>      {
>>          return reportRuntimeError(getMessage3(messageId, arg1, arg2,
>> arg3));
>>      }
>>
>> This allows to write, for example, instead of
>>
>>               Object[] args = { Integer.toString(base) };
>>               throw Context.reportRuntimeError(getMessage
>>                                                ("msg.bad.radix", args));
>> simply
>>               throw Context.reportRuntimeError1(
>>                   "msg.bad.radix", Integer.toString(base));
>>
>> which is not only easy to read but also generates less code.
>>
>> I attach my patch to Context.java to implement this plus a patch to
>> ScriptRuntime.java that utilizes the additions. The patches are in
>> standard and context versions.
>>
>> If you think that this make sense to incorporate, I can send a patch
>> that utilizes this everywhere.
>>
>>   ------------------------------------------------------------------------
>>                                  Name: patch.context.Context.java
>>    patch.context.Context.java    Type: Plain Text (text/plain)
>>                              Encoding: base64
>>
>>                              Name: patch.std.Context.java
>>    patch.std.Context.java    Type: Plain Text (text/plain)
>>                          Encoding: base64
>>
>>                                        Name: patch.context.ScriptRuntime.java
>>    patch.context.ScriptRuntime.java    Type: Plain Text (text/plain)
>>                                    Encoding: base64
>>
>>                                    Name: patch.std.ScriptRuntime.java
>>    patch.std.ScriptRuntime.java    Type: Plain Text (text/plain)
>>                                Encoding: base64
>>
>>               Name: all.zip
>>    all.zip    Type: Zip Compressed Data (application/x-zip-compressed)
>>           Encoding: base64


git-svn-id: svn://10.0.0.236/trunk@85289 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-22 20:28:34 +00:00
brendan%mozilla.org
60ae4af073 Followup to last checkin, comment change only, r=mccabe.
git-svn-id: svn://10.0.0.236/trunk@85201 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-20 02:02:48 +00:00