Commit Graph

3446 Commits

Author SHA1 Message Date
pschwartau%netscape.com
d13898379b Minor corrections to code and whitespace. 2001-03-27 07:53:14 +00:00
pschwartau%netscape.com
a3239107a6 Minor fixes to code and whitespace. 2001-03-27 07:43:17 +00:00
pschwartau%netscape.com
5297fc374c Minor corrections to code and style - 2001-03-27 07:16:36 +00:00
shaver%mozilla.org
1426b1e1b4 correct cast to fix build bustage 2001-03-27 06:44:00 +00:00
waterson%netscape.com
08720a72b7 Fix windows bustage. 2001-03-27 06:39:05 +00:00
waterson%netscape.com
3e355a7cf3 Bug 73540. Make sure [JS|PL]DHashTable clear live entries while finalizing. Remove induction variable from [JS|PL]_DHashEnumerate() along the way. r=brendan, sr=shaver 2001-03-27 06:24:25 +00:00
shaver%mozilla.org
ed22e0a7d8 50602: Add support in XPConnect for sharing of refcounted string BufferHandles,
in both directions.
72552: Remedy overzealous CHECK_REQUEST placement in jsapi.c, to produce a
       minimal-but-complete set of engine entry points that require a Request
       for safe execution.
r=brendan, sr=jband, assist=scc,pinkerton
2001-03-27 06:04:44 +00:00
pschwartau%netscape.com
c728cf55e2 Initial add. Testcase for the internal [[Class]] property of Objects. 2001-03-27 05:50:08 +00:00
pschwartau%netscape.com
1260fc471b Initial add. Utility functions for testing Objects. 2001-03-27 05:48:48 +00:00
shaver%mozilla.org
e4dd2dcd91 63027: Adding evalInSandbox to JS component loader script-context, to permit
JS components to execute script code with restricted privileges and
       controlled access to their (privileged) environment. r=brendan,
       sr=jband.
2001-03-27 05:35:52 +00:00
mkaply%us.ibm.com
5f5b489750 #73191
r=beard, sr=brendan
Remove CRT_CALL - change to PR_CALLBACK or JS_DLL_CALLBACK appropriately
2001-03-26 23:21:53 +00:00
pschwartau%netscape.com
d01c71b92c In some shells, carriage returns are "\n"; in others, "\r\n". Look for either possibility - 2001-03-26 22:00:53 +00:00
disttsc%bart.nl
f595ed19f3 Clean up REQUIRES lines. r=cls 2001-03-25 22:59:27 +00:00
dmose%netscape.com
a143fa5a57 Fix MOZ_TRACK_MODULE_DEPS bustage with --enable-xpctools (bug 72120). Only touches unix build-system. r=cls@seawood.org 2001-03-24 06:14:28 +00:00
brendan%mozilla.org
e174e2e0fe Fix old 1.4-era bogus code for setting JSPD_ARGUMENT or JSPD_VARIABLE given a heavyweight activation (68825, r=shaver, sr=jband). 2001-03-24 00:31:43 +00:00
nboyd%atg.com
53f72f3639 Fix bug 72921. 2001-03-22 21:56:12 +00:00
jband%netscape.com
44bbed25cc [Not part of mozilla build]. Fix for bug pointed out by Celso Aguiar <caguiar@Adobe.COM>. 2001-03-22 20:11:26 +00:00
brendan%mozilla.org
b0da40da16 - [jsemit.c] Fix horrid stupid bugs generating JSOP_ARGCNT and JSOP_ARGSUB,
where any occurrence of arguments.length or arguments[0], e.g., would be
  "optimized" to use those bytecodes.  This is just wrong if the occurrence
  is an operand of delete, ++, --, or the left-hand-side of an assignment
  operator!

- [jsfun.c, jsinterp.c]  args_getProperty etc. must use JS_GetInstancePrivate,
  not JS_GetPrivate, as the arguments object is exposed, and can be made a
  prototype of other objects that do not have private data, or private data
  that's a JSStackFrame*.  Same goes for fun_getProperty, js_GetArgument, etc.

- [jsfun.c, jsobj.c, jsstr.c]  No need to specialize fun_delProperty and
  str_delProperty to help convince users and ECMA conformance tests that
  fun.length and str.length are direct properties of instances, instead of
  being delegated to Function.prototype.length and String.prototype.length.
  This special case is done universally in js_DeleteProperty for all SHARED
  and PERMANENT proto-properties.

- [jshash.c]  Sneaking this followup-fix for bug 69271 in: use JS_HASH_BITS
  rather than hardcoded 32.

- [jsobj.c, jsscope.[ch]]  Fix misnamed js_HashValue (it takes a jsid, so it
  is now js_HashId).

- [jsscript.c] script_compile needs to call JS_InstanceOf, to ensure that obj
  is a Script object.
2001-03-22 02:52:42 +00:00
mkaply%us.ibm.com
b5d1baa259 #72563
r=javier, a=jband
Change some PR_CALLBACK to JS_DLL_CALLBACK and vice versa and remove IBM cruft
2001-03-21 01:35:39 +00:00
brendan%mozilla.org
d97301d838 Add JS_MapGCRoots for complete enumeration of GC roots (72465, r/sr={shaver,jband}). 2001-03-21 01:33:39 +00:00
shaver%mozilla.org
40f315f196 67797: add Components.isSuccessCode (r=jag, sr=jband) 2001-03-19 21:34:05 +00:00
brendan%mozilla.org
6138a388e4 Fix JS_ArenaRealloc to cope with alignment shift from realloc (72034, r=shaver, sr=jband, a=asa). 2001-03-16 08:06:08 +00:00
brendan%mozilla.org
206a6316cd Fix bug 69271, r=waterson, sr=shaver:
- Don't ape java.lang.String's bogo-sampling hash function for "long" (>=16
  char) strings.
- Theory and practice comment in jsdhash.h helps analyze when to use double
  hashing (most of the time) vs. when to use chaining.
- Subroutine ChangeTable from JS_DHashTableOperate so it can be called from
  JS_DHashTableEnumerate, if the latter finds that enough entries have been
  removed to be worth a shrink or compress cycle.
2001-03-14 07:42:32 +00:00
mkaply%us.ibm.com
7293463cd8 OS/2 TB break
Need calling convention
2001-03-14 05:28:27 +00:00
disttsc%bart.nl
caf305d989 Fix MOZ_TRACK_MODULE_DEPS builds (like senna) bustage, adding "necko" to REQUIRES, r=cls 2001-03-14 03:46:23 +00:00
beard%netscape.com
752a3f6947 fix Mac build bustage. 2001-03-14 03:24:20 +00:00
rginda%netscape.com
f5faf87633 fix for mac bustage, I think 2001-03-14 03:12:07 +00:00
Peter.VanderBeken%pandora.be
41ef1026fe part 3 of bug 48972 check in: mac changes. r=brendan, sr=shaver 2001-03-14 02:43:32 +00:00
rginda%netscape.com
d2be3bc932 part 2 of bug 48972 check in. peterv to check in mac changes. r=brendan, sr=shaver 2001-03-14 02:41:55 +00:00
rginda%netscape.com
92e3bfdeb7 part one of checkin for bug 48974, idl additions. sr=shaver, r= brendan 2001-03-14 02:39:23 +00:00
dprice%netscape.com
edb387e49c 71057 sr=waterson new order files. NOT PART OF THE REGULAR BUILD 2001-03-13 10:47:37 +00:00
pschwartau%netscape.com
1a4a8aa95b Fixing minor error in one path; and fixing whitespace. 2001-03-13 02:28:04 +00:00
pschwartau%netscape.com
e30e5c11cb Put js1_5/Regress/regress-68498-003.js on Rhino skip list. Rhino does not support indirect eval. 2001-03-13 02:10:47 +00:00
pschwartau%netscape.com
242d2dfad3 Rhino doesn't implement toSource(). Adding js1_5\Regress\regress-44009.js to skip list - 2001-03-13 02:02:32 +00:00
pschwartau%netscape.com
3b2b7aedcd Initial add. This is Norris' testcase from bug 56883. 2001-03-13 01:23:34 +00:00
pschwartau%netscape.com
6756cd1e2c Rhino doesn't allow indirect calls to eval; adding such tests to the Rhino skip list - 2001-03-12 21:09:14 +00:00
shaver%mozilla.org
fcf7cd0d9f 67699: all your nsIClassInfo is belong to us
- teach nsGenericFactory about nsIClassInfo, and nsIClassInfo.idl to the
  builds
- add a heaping serving of macro love for classes that want to support it
- convert many modules to use nsGenericModule the new way
- handful of warning and modeline fixes
- nsSample and some XPConnect test classes now have nsIClassInfo support for
  testing
2001-03-12 20:43:02 +00:00
nboyd%atg.com
5f7badd05f Print name of function in toString 2001-03-12 19:05:36 +00:00
nboyd%atg.com
77fee58f07 Infinity/Math.min(0,-0) should produce -Infinity 2001-03-12 16:53:02 +00:00
nboyd%atg.com
dfacb25c9f Close thread hazard hole. 2001-03-12 14:55:47 +00:00
pschwartau%netscape.com
c5f6fdb14f Initial add of WINNT5.0.mk file (bug 71543). Copied from WINNT4.0.mk. 2001-03-11 04:59:23 +00:00
brendan%mozilla.org
b1bad82b83 Fix js_LookupProperty to resolve iff the resolved-in object owns its own scope (jband private bug, r=jband, sr=shaver). 2001-03-11 02:35:10 +00:00
nboyd%atg.com
f1901fba16 More changes from Igor. 2001-03-10 11:51:15 +00:00
nboyd%atg.com
4e07e9b5bf Add method to set security support after creation. 2001-03-10 11:50:50 +00:00
mkaply%us.ibm.com
cea152bf84 WIN95 build breakage vis hwaara
Since Win95 can't recursively invoke NMAKE, need fdlibm in DIRS statement
2001-03-10 00:43:00 +00:00
rogerl%netscape.com
05b771613b Fix #58031. sr=brendan. Crash in Array.prototype.toLocaleString() 2001-03-10 00:20:42 +00:00
rogerl%netscape.com
e0a0360d95 Fix #57187. sr=brendan,r=shaver. Reorder lines to avoid warning. 2001-03-10 00:17:37 +00:00
rogerl%netscape.com
b63c641dab Fix bug #56868. sr=brendan,r=mccabe. Error object [[Class]] property. 2001-03-10 00:16:32 +00:00
pschwartau%netscape.com
b44b477470 Updated JS_GetImplementationVersion() to date of latest JS release (67111, r=rginda, sr=jband). 2001-03-09 07:36:48 +00:00
mkaply%us.ibm.com
9556809498 #59855
r=pchwartau, sr=brendan
Just add an _IS_LITTLE_ENDIAN for XP_OS2 for now. Eventually, we need to figure
out how to get jstypes.h included in here, since it already has a LITTLE_ENDIAN define.
2001-03-09 04:07:15 +00:00
mkaply%us.ibm.com
a313c85544 #59855
r=pchwartau, sr=brendan
Rework makefile.win and js.mak for the eventual ability to include jstypes.h in fdlibm.h
Not turned on yet because I can't get it working right on Linux
2001-03-09 04:05:44 +00:00
mkaply%us.ibm.com
816366c8e4 #59855
r=pchwartau, sr=brendan
Get JS standalong building with Makefile.ref on Win32
2001-03-09 04:02:36 +00:00
shaver%mozilla.org
24ccdbda1f 71107: make inner-peeking properly set HEAVYWEIGHT for all outer functions (r=jband,sr=brendan) 2001-03-07 03:14:25 +00:00
pschwartau%netscape.com
3806f206fa Initial add. Regression test for bug 71107. 2001-03-07 01:30:15 +00:00
matthias%sorted.org
712e352a43 replicated SpiderMonkey fix for bug 67773 2001-03-06 13:57:01 +00:00
brendan%mozilla.org
a14dfbe234 I'm a Linux loser, warnings don't affect me. 2001-03-06 02:45:35 +00:00
brendan%mozilla.org
dfe2d8965b Death to tabs\! 2001-03-06 02:05:03 +00:00
brendan%mozilla.org
69ab37f337 bugs 31003 and (mostly) 68045, r=rogerl, sr=shaver&hyatt
- Fix bug where script jssrcnote vector terminator was not XDRed.
- Ensure that memory is cleared by serializing zero padding bytes as needed
  under JS_XDRBytes and JS_XDRString.
- Fix JS_XDRValue to handle undefined and null JS types properly (bug 31003).
  Also make it cast from jsint to uint32 and back carefully, so as to work
  with negative numbers even on targets where jsval is a signed 64 bit type.
- Add JS_XDRScript public API.
- Optimize the per-JSXDRState class registry so it uses a JSDHashTable upon
  searching for a class-id by name in an overpopulated (for linear search)
  registry table.
- Clean up API nits such as JS_XDRNewBase => JS_XDRInitBase, with parameter
  list rotation to put cx last (JS_XDRInitBase is an infallible init helper,
  not an error-reporting, cx-comes-first, API entry point).
- Fix some XXX comments, unneeded masks, other nits.
- Make sure all JS XDR API functions start with JS_XDR.
2001-03-06 01:56:30 +00:00
beard%netscape.com
78cb105183 Bug #70883, leaks in LiveConnect. sr/r=brendan 2001-03-05 15:41:12 +00:00
matthias%sorted.org
8d348ad77e * made shell.Global a subclass of ImporterTopLevel
* fixed ImporterTopLevel constructor - it now calls
cx.initStandardObjects before defining any functions. The old
constructor is still around for backwards compatibility.
2001-03-05 08:46:10 +00:00
beard%netscape.com
88aa0bfd2c fix for bug #69210, r/sr=brendan 2001-03-04 21:26:19 +00:00
beard%netscape.com
5f32ec9e35 bug #70240, sr=beard, r=brendan 2001-03-04 21:20:31 +00:00
beard%netscape.com
bb7384e98f [not part of build] fix memory leak of full_classpath. 2001-03-04 19:23:51 +00:00
beard%netscape.com
99009db752 [not part of build] use correct calling conventions when OJI is #defined. 2001-03-03 19:30:17 +00:00
beard%netscape.com
7fa29ffe23 Automatically load "xpcshell.js" if available. sr=jband 2001-03-03 01:01:20 +00:00
jband%netscape.com
81c1f91f67 [not part of build] adding placeholders for new files 2001-03-02 05:25:04 +00:00
rogerl%netscape.com
e93b9c7b20 Fix #61751. sr=brendan,r=mang. #define changes to fix floating point bug
in JavaScript on NetBSD/arm32.
2001-03-02 00:20:11 +00:00
rogerl%netscape.com
0f3fdaea1e Fix bug #67773. sr=brendan, r=rginda. Fixes doubly nested quantifiers in
reg.exps when deeper sub-expression has to backup without failing. Some
other clean-up changes, too.
2001-03-02 00:17:48 +00:00
nboyd%atg.com
534fc4e412 More changes from Igor. 2001-03-01 19:28:37 +00:00
matthias%sorted.org
ebbd7aaa6c fixed two instances where prefix match would return undefined instead of null 2001-03-01 16:52:23 +00:00
matthias%sorted.org
6413b694ba getInstance now uses ScriptableObject.getProperty instead of
Scriptable.get. This way Global can (again) be used in prototype
chain.
2001-03-01 13:33:55 +00:00
pschwartau%netscape.com
687b187d0b Correcting an error in the testcase - 2001-03-01 01:06:48 +00:00
brendan%mozilla.org
60a74f6168 Fix JS_ARENA_GROW_CAST so it doesn't round up both size and incr, which overestimates and wastes space (44009, r=shaver, sr=jband). 2001-02-28 00:27:10 +00:00
brendan%mozilla.org
e5648f61de Fix 'import *;' (70308, r=shaver, sr=jband). 2001-02-28 00:17:19 +00:00
dprice%netscape.com
199c935b04 # 65845 sr=waterson, new order files will greatly reduce the number of link warnings. 2001-02-27 04:38:19 +00:00
pschwartau%netscape.com
32ca03bbbc Initial add. Regression test for bug 44009. 2001-02-27 03:41:13 +00:00
nboyd%atg.com
a91023590b Commit new scheme for builtin objects, courtesy of
Igor Bukanov <igor@icesoft.no>. This new scheme is
faster and consumes less memory.
2001-02-26 16:16:46 +00:00
nboyd%atg.com
3f5e828b80 Change ClassOutput to take a top-level boolean parameter. 2001-02-26 15:32:15 +00:00
nboyd%atg.com
b02120e058 Add top-level boolean parameter so ClassOutput implementors can determine
which class to load to execute a script.
2001-02-26 15:28:17 +00:00
pschwartau%netscape.com
d3de39854b Added Stephen Ostermiller's pattern-match from bug 69989 to this test - 2001-02-24 03:23:27 +00:00
brendan%mozilla.org
55d5713602 Don't deprecate __proto__, there ain't no forward-compatible alternative (68401, r=timeless, sr=shaver). 2001-02-24 03:07:58 +00:00
brendan%mozilla.org
ee954accd5 - Shaver hacked this fix with advice from me, and I carried it to check-in. We now avoid a heavyweight outer function when the inner one is defined at top-level or in an expression (is not a JSOP_CLOSURE, IOW), and it doesn't refer to any non-local names. See bug 65308 for details on the win. (r=rogerl, sr=brendan)
- Fix scope chain for nested functions at top-level (JSOP_DEFFUN), in a part of another statement (JSOP_CLOSURE), and unnamed in an expression (JSOP_ANONFUNOBJ) to match ECMA-262 13.2.  My bad: fp->varobj was used up till now, instead of fp->scopeChain; we still *bind* the name of a statement-level (top or not) nested function in fp->varobj.  This fixes bug 69559.  (r=rogerl, sr=jband)
- Add an Intern command to the shell, for GC vs. intern'ed atom testing.
2001-02-24 03:00:56 +00:00
pschwartau%netscape.com
484642e6df Initial add. Regression test for bug 69607. 2001-02-23 07:35:47 +00:00
nboyd%atg.com
446ea9e8da Real fix for last problem. 2001-02-22 14:45:10 +00:00
disttsc%bart.nl
a6f2f5861a Mass REQUIRES update to synch up with string lib and xul changes in an attempt to fix senna bustage. r=jst, sr=cls 2001-02-22 09:35:51 +00:00
brendan%mozilla.org
147be84ecc Fix duplicate parsenode recycle in constant-folded if/else or ?: (69607, r=shaver, sr=jband). 2001-02-22 07:30:57 +00:00
brendan%mozilla.org
3d3ee5cbd3 Remove unused code (sr=jband, r=mozbot). 2001-02-21 10:49:35 +00:00
nboyd%atg.com
25a2852250 Subject:
Rhino Context.setTargetClassFileName() null pointer exception
        Date:
             Tue, 20 Feb 2001 15:28:20 -0800
       From:
             "Ryan Manwiller" <rdm@europa.com>
 Organization:
             Another Netscape Collabra Server User
 Newsgroups:
             netscape.public.mozilla.jseng




I'm setting the file name to compile to a file. However, on subsequent
compiles, I don't want to compile to a file, so I tried
setTargetClassFileName(null). This causes a NullPpinterException in
OptClassNameHelper.setTargetClassFileName(OptClassNameHelper.java:76)

It seems that Context.setTargetClassFileName() should check for null.

Thanks
2001-02-21 02:08:05 +00:00
pschwartau%netscape.com
f9086bf830 Minor whitespace deletion - 2001-02-21 00:58:41 +00:00
pschwartau%netscape.com
5331662996 Minor change to comment - 2001-02-21 00:39:46 +00:00
pschwartau%netscape.com
538ea61c08 Improving error message - 2001-02-21 00:27:13 +00:00
jband%netscape.com
a96a22f464 Avoid use of dead JSContext in dtor. bug 69463. Thanks to Waleri Todorov <waleri@gti.bg> for pointing out this bug. r=shaver sr=brendan 2001-02-21 00:01:30 +00:00
pschwartau%netscape.com
f070a37023 Revising error in test. See bug 69441, where this was pointed out - 2001-02-20 22:11:44 +00:00
jband%netscape.com
d242dcca69 bug 66610 - add xpconnect support for DOMStrings. r=jst sr=brendan 2001-02-20 08:09:19 +00:00
brendan%mozilla.org
bcb7e8d5fd Don't flush cached properties one-by-one if GC'ing, because the GC flushes the whole thing (68735, r=jst, sr=jband). 2001-02-20 05:01:14 +00:00
brendan%mozilla.org
5f946f1796 Fix constant folder to recycle moved node, not whole tree, when simplifying 'true ? foo() : bar()' into 'foo()' (69345, r=shaver, sr=jband). 2001-02-20 01:25:39 +00:00
brendan%mozilla.org
da9be4b8bb Fix related eval and setTimeout regressions caused by bug 68498's patch (69165&69175, r=jband, sr=shaver). 2001-02-19 00:31:20 +00:00
shaver%mozilla.org
9d74dff12a Fold constants correctly when emitting as we compile (TCF_COMPILING).
(#69304, r=jband, sr=brendan)
2001-02-18 20:58:08 +00:00
pschwartau%netscape.com
ed3d3552d7 Regression test for bug 68498. Derived from Brendan's attachment to the bug - 2001-02-18 03:31:17 +00:00
jband%netscape.com
51e076e20b rest of the fix for bug 68971 - can't share a kungfoodeathgrip. sr=brendan r=shaver 2001-02-16 02:21:22 +00:00
brendan%mozilla.org
b8a3d1e3ef Don't crash on a newborn object (68971, r=jband, sr=shaver). 2001-02-16 02:09:42 +00:00
brendan%mozilla.org
e0c2c3974f The rest of the fix for bug 68498, see the extensive comments in that bug (r=jband, sr=shaver). 2001-02-16 02:04:12 +00:00
brendan%mozilla.org
fd8a6ea21b Restore the much-loved, albeit non-ECMA, function caller property (65683, r=rogerl, sr=jband). 2001-02-14 22:33:26 +00:00
brendan%mozilla.org
cefe9bfa0d Don't assert about leaked atoms, do DEBUG fprints instead (68765, r=timeless, sr=jband). 2001-02-14 22:25:30 +00:00
brendan%mozilla.org
8aa6c94c12 Crash fix (first part, two more files to come) for old-style obj.eval in a function (68498, r=bryner, sr=jband). 2001-02-14 09:11:09 +00:00
dprice%netscape.com
997fb091c7 65845 first cut of the order files 2001-02-13 02:48:02 +00:00
brendan%mozilla.org
5fcc8a1adc - Keep interned string atoms around across zero-context episodes on a runtime,
until JS_DestroyRuntime is called (68450, r=rginda, sr=jband).
- NUL-terminate tagbuf in tagify, for the HTML helpers such as string.big()
  (66648, r=timeless, sr=jband).
2001-02-13 00:57:10 +00:00
beard%netscape.com
7f321c0039 fix for bug #63466, r=mstoltz, sr=brendan, a=leaf 2001-02-12 07:47:28 +00:00
nboyd%atg.com
82bd85bfce Fix for problem:
Subject:
             Rhino Exception Handling: Inconsistency btw Old/New Versions of 1.5
        Date:
             Mon, 05 Feb 2001 06:07:07 -0800
       From:
             Timothy Bergeron <bergeron@resumerabbit.com>
 Organization:
             Another Netscape Collabra Server User
 Newsgroups:
             netscape.public.mozilla.jseng




I've been using Rhino for about a year with almost no problems. However,
I downloaded the latest Rhino tip (rhino15R2pre) and discovered a
significant difference in exception handling.

I rely heavily on JavaScript code like the following:

try {
   var em  = new ExceptionMaker();
   em.npe();  // method throws a java.lang.NullPointerException
   //em.ae();  // method throws a Packages.AutomationException
}
catch (e if (e instanceof java.lang.NullPointerException)) {
   java.lang.System.out.println("Caught a NullPointerException");
   e.printStackTrace();
}
catch (e if (e instanceof Packages.AutomationException)) {
   java.lang.System.out.println("Caught an AutomationException");
}
catch (e) {
   java.lang.System.out.println("Caught an unexpected exception: "+e);
}
finally {
   java.lang.System.out.println("Finally!");
}

Previous Rhino versions worked as expected. The exception thrown from
within the host object would be caught and the appropriate actions could
be taken.

With the most recent tip, the thrown exceptions simply are not caught
within the JavaScript. They propagate back to the Java function invoking
the (in my case) Context.evaluateReader() method.

Running the above JS fragement with the older tip displayed the
following stack trace (when the NullPointerException was caught):

Rhino Version: JavaScript-Java 1.5 release 1 2000 03 15
Caught a NullPointerException
java.lang.NullPointerException
        at java.lang.Throwable.<init>(Throwable.java:84)
        at java.lang.Exception.<init>(Exception.java:35)
        at java.lang.RuntimeException.<init>(RuntimeException.java:39)
        at
java.lang.NullPointerException.<init>(NullPointerException.java:45)
        at ExceptionMaker.jsFunction_npe(ExceptionMaker.java:13)
        at java.lang.reflect.Method.invoke(Native Method)
        at
org.mozilla.javascript.FunctionObject.call(FunctionObject.java:497)
        at
org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1205)
        at org.mozilla.javascript.gen.c1.call(exception.js:3)
        at org.mozilla.javascript.gen.c1.exec(exception.js)
        at
org.mozilla.javascript.Context.evaluateReader(Context.java:739)
        at js.main(js.java:14)
Finally!

When run with the latest tip, the output is:

Rhino Version: JavaScript-Java 1.5 release 1 2000 03
15                                          Finally!
Exception in thread "main" java.lang.NullPointerException
        at java.lang.Throwable.<init>(Throwable.java:84)
        at java.lang.Exception.<init>(Exception.java:35)
        at java.lang.RuntimeException.<init>(RuntimeException.java:39)
        at
java.lang.NullPointerException.<init>(NullPointerException.java:45)
        at ExceptionMaker.jsFunction_npe(ExceptionMaker.java:13)
        at inv2.invoke()
        at
org.mozilla.javascript.FunctionObject.doInvoke(FunctionObject.java:843)
        at
org.mozilla.javascript.FunctionObject.call(FunctionObject.java:486)
        at
org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1199)
        at org.mozilla.javascript.gen.c1.call(Unknown Source)
        at org.mozilla.javascript.gen.c1.exec(Unknown Source)
        at
org.mozilla.javascript.Context.evaluateReader(Context.java:778)
        at js.main(js.java:14)

Curiously, both Rhino versions seem to be returning the same string from
Context.getImplementionVerison();

Anyway, the results from the two runs are clearly different: In the
first case, the exception is thown, the correct catch block is invoked
(hence the stace trace), and the finally block is invoked. In the second
case, the exception is thrown, the finally block is invoked, and the
exception is handled by the calling Java method rather than being
handled by the JavaScript code.

After some research, it appears this change was introducted by a
modification to FunctionObject.call()  (See
http://bugzilla.mozilla.org/show_bug.cgi?id=64788) which used to have:

       try {
            Object result = (method != null)
                            ? method.invoke(thisObj, invokeArgs)
                            : ctor.newInstance(invokeArgs);
            return hasVoidReturn ? Undefined.instance : result;
        }

but now has:

            Object result = method == null ?
ctor.newInstance(invokeArgs)
                                           : doInvoke(thisObj,
invokeArgs);

If I comment out the new code and replace it with the old, the expected
exception handling returns. Is this just an oversight or the new
expected behavior? Are there any negative side effects (other then the
speed decrease in method invocation) if I use the latest tip but use the
old method invocation procedure in FunctionObject.call() rather than the
new?
2001-02-08 18:56:58 +00:00
pschwartau%netscape.com
106efc7817 Exported functionality common to RegExp tests to new file js/tests/ecma_3/RegExp/shell.js 2001-02-08 04:04:48 +00:00
pschwartau%netscape.com
5cc9cfb919 Exported functionality common to RegExp testing to new file js/tests/ecma_3/RegExp/shell.js 2001-02-08 04:03:02 +00:00
pschwartau%netscape.com
766e838c4f Initial add. Contains functionality common to RegExp testing 2001-02-08 03:58:58 +00:00
pschwartau%netscape.com
f65b30a051 Whitespace cleanup 2001-02-08 01:32:58 +00:00
pschwartau%netscape.com
ad6952fe99 *** empty log message *** 2001-02-08 01:30:15 +00:00
pschwartau%netscape.com
a4c1795cc3 More minor adjustments - 2001-02-08 01:18:55 +00:00
pschwartau%netscape.com
e3608c31cf Minor adjustments - 2001-02-08 01:05:23 +00:00
pschwartau%netscape.com
39d6604a1c Initial add. Regression test for bug 67773 2001-02-07 23:19:12 +00:00
waldemar%netscape.com
8f98bed0e7 Added more semantics 2001-02-07 05:08:44 +00:00
waldemar%netscape.com
d341117db6 Added read-eval-print loop 2001-02-07 05:08:09 +00:00
waldemar%netscape.com
ae3e51a0c2 Updated to correspond to js2 site 2001-02-07 05:07:37 +00:00
waldemar%netscape.com
d0363e3b99 Added :semantic-comment and :vector-construct. 2001-02-07 05:07:05 +00:00
waldemar%netscape.com
42217499f5 Added vector comprehensions. Changed compiler to emit globals of functional type into the lisp function rather than value slots of symbols; this simplifies debugging. 2001-02-07 05:06:22 +00:00
waldemar%netscape.com
ffce7baf94 Added vector comprehensions and extra mode parameter for %section, %subsection, and %text. 2001-02-07 05:05:39 +00:00
brendan%mozilla.org
e23a1be36f Fix for bug 44009 (r=rogerl, sr=shaver)
- Remove bogus JS_ASSERT(!outermost) from the code that deals with a "#n="
  type string being returned from js_EnterSharpObject, where the hash entry
  is not yet sharp (because we haven't seen the object twice during depth
  first search).  This case trivially arises for the outermost object in,
  e.g., 'o={}; o.foo=o; uneval(o)'.
- Avoid parenthesizing #n={...} object initializers for uneval, as they are
  not ambiguous (whereas {foo:1}, e.g., is ambiguous because it could be a
  block statement containing a labeled expression statement, or it could be
  an object initializer).
- Death to tabs!
2001-02-06 23:19:44 +00:00
pschwartau%netscape.com
4cd5b867fb Made this testcase acknowledge that indirect eval is LEGAL; see bug 38512. 2001-02-06 07:57:17 +00:00
pschwartau%netscape.com
8e1d1ab4d9 Made this testcase acknowledge that indirect eval is LEGAL; see bug 38512. 2001-02-06 07:33:28 +00:00
pschwartau%netscape.com
8ab3095a6c Made this testase acknowledge that indirect eval is LEGAL; see bug 38512. 2001-02-06 06:52:59 +00:00
pschwartau%netscape.com
8097b07638 Deleting this testcase. It expected indirect eval to throw an exception. Wrong - this is legal: see bug 38512. 2001-02-06 06:06:18 +00:00
brendan%mozilla.org
b28624e231 Fix compile-statements-as-we-go to work with warn-about-missing-final-return (66928, r=jband, sr=shaver). 2001-02-06 01:23:29 +00:00
pschwartau%netscape.com
44623057a1 Deleting this testcase, which expected this.eval() to throw an exception. On the contrary: indirect eval is LEGAL; see Bugzilla bug 38512. 2001-02-05 18:27:36 +00:00
pschwartau%netscape.com
d84d79d43e Changed comma expresions in this testcase from trivial to non-trivial. Explanation is in the introduction. 2001-02-05 04:58:39 +00:00
jband%netscape.com
ab1f2436af fix bug 67557 - bad use of NS_LITERAL_STRING to initialize static const PRUnichar* literals. r=jag sr=brendan 2001-02-04 06:47:44 +00:00
cls%seawood.org
02d1ad6807 Fix fdlibm/mozjs dependency problem by making sure that fdlibm is always built before mozjs. 2001-02-04 06:27:59 +00:00
brendan%mozilla.org
eabd8c6171 Include function total size in JS profiler output (67467, r=hyatt, sr=jband). 2001-02-02 20:52:06 +00:00
nboyd%atg.com
e5473d8fda Subject:
Re: [Rhino in Java] compiling .js to class file gives "bad local" error
        Date:
             Wed, 31 Jan 2001 09:41:45 +0100
       From:
             "Sylvia E. Schleutermann" <ses@h-m-s.com>
 Organization:
             .hms Health Management Systems
 Newsgroups:
             netscape.public.mozilla.jseng
  References:
             1 , 2




I have found out some more. Looking really quickly over the JVM specs, I
found that
indeed the astore-command requires that the variables index be below 128.
However,
the book also said that if more index space is needed, a "wide" command can
be used to
be able to address up to 65xxx variables.
Question: is there a possibility to integrate this "wide"-command into the
class compiler?
Some option, that can be set?  Or am I on the wrong tracks?

Please help, since I want to avoid spreading the script over many classes to
avoid the
size limitation. Cheers, Sylvia


Sylvia E. Schleutermann <ses@h-m-s.com> wrote in message
news:956sv9$9g53@secnews.netscape.com...
> I have found out that it is definitely the number of variables.
> I removed all variables and then the script compiled into class files
> with one base class and inner classes for each function in the script.
>
> What is the limitation exactly, i.e. does anyone know how many (global)
> variables
> I can use? Or is there some other kind of work around?
>
> Cheers, Sylvia
>
>
> Sylvia E. Schleutermann <ses@h-m-s.com> wrote in message
> news:956qtv$6kh3@secnews.netscape.com...
> > Hello,
> > when compiling a *.js file to class file, I get a "bad local" runtime
> > exception.
> > Stepping through the source, the following happens in reverse order:
> >
> > Codegen.xstore (75, 58, 209)
> >     -> in the switch - default case, there is a comparison
> >         for local (=209), which is compared to Byte.MAX_VALUE (=127).
> >         When greater, the above exception is thrown.
> >
> > Codegen.astore (209)
> >     -> calls Codegen.xstore (ByteCode.ASTORE_0, ByteCode.ASTORE, 209)
> >
> > Codegen.generatePrologue (<context>, <tree>, true, -1) // -1 is
> > directParameterCount
> >     -> sets itsZeroArgArray = getNewWordLocal(); // here, the 209 is
> > produced
> >     -> calls astore (itsZeroArgArray)
> >
> > From what I can read from the source code, the 209 seems to be a counter
> for
> > "locals", perhaps
> > local variables?? The function that is being compiled does initialize
many
> > variables - would it help
> > to move the initialize code out of the function into separate code
blocks?
> >
> > The function looks like this
> >
> > function rule_Disclaimer()
> > {
> >     try { VAR1 = <init code 1>;} catch (exception) { VAR1 = <default
init
> > code 1>; }
> >     try { VAR2 = <init code 2>;} catch (exception) { VAR2 = <default
init
> > code 2>;}
> >         ... (about 58 such variables)
> >
> >     var cond = true;
> >
> >     < rest of code>
> > }
> >
> > When I compile the script for interpreted mode, all works well. The
> > variables VAR1 to VAR58 are to be global
> > variables (global to the whole script).
> >
> > I appreciate any help! Thanks, Sylvia
> >
> >
>
>
2001-02-02 15:20:03 +00:00
mkaply%us.ibm.com
a36df8834a OS/2 TB breakage
Need cast to pass C++ function
2001-02-02 13:54:03 +00:00
jband%netscape.com
bd58ec8cea the rest of the fix for bug 66950 to add nsISupportsWeakReference support of xpconnect wrapped JSObjects. r=rogerl sr=brendan 2001-02-02 10:01:56 +00:00
jband%netscape.com
e7fcc8fd7f the rest of the fix for bug 67258 to avoid empry Components.results and the similar pattern in nsJSIID. r=dmose sr=brendan 2001-02-02 08:57:47 +00:00
jband%netscape.com
8ccfada88a backing out two changed inadvertantly committed! 2001-02-02 08:52:22 +00:00
jband%netscape.com
1d263ae630 part of the fix for bug 67258 to avoid empry Components.results. r=dmose sr=brendan xpccomponents.cpp 2001-02-02 08:48:28 +00:00
jband%netscape.com
39d156eef0 part of the fix to bug 66950. Add support for cheaply tracking the lifetime of arbitrary JSObject by extending the GC callback mechanism to notify after marking is done but before sweeping, and by providing an api function that can be called at that point to determine if any given gcthing is about to be finalized. r=rogerl sr=brendan 2001-02-02 08:44:24 +00:00
rogerl%netscape.com
cb289ae2e2 Fixed case, sorry 2001-02-02 01:08:06 +00:00
rogerl%netscape.com
5276f5b818 Added ICodeEmitter 2001-02-02 01:06:30 +00:00
rogerl%netscape.com
7ea0f3cbba Added icodeEmitter to VC++ build 2001-02-02 01:05:38 +00:00
rogerl%netscape.com
61579b22f3 Re-structuring some ICG details. 2001-02-02 01:04:22 +00:00
mkaply%us.ibm.com
63b9a9f4be OS/2 TB break
Need JS_STATIC_DLL_CALLBACK
2001-02-01 18:39:38 +00:00
disttsc%bart.nl
91a08f8c82 Fix senna bustage, add REQUIRES line. r=mkaply 2001-02-01 18:07:08 +00:00
sspitzer%netscape.com
e21ba186fe fix for #67205. get --enable-xpctools to work again.
it will build the JS profiler.  r=leaf,bryner, sr=cls
2001-02-01 15:36:59 +00:00
waldemar%netscape.com
76e61d873f Fixed comment 2001-02-01 03:42:25 +00:00
waldemar%netscape.com
f2ae41c491 Added make-and-compile-grammar cache 2001-02-01 03:41:54 +00:00
waldemar%netscape.com
0bcf6402f0 Added hash-table-= 2001-02-01 03:41:18 +00:00
waldemar%netscape.com
76d55e8bc2 Added the id type 2001-02-01 03:40:56 +00:00
waldemar%netscape.com
a53b1af653 Removed namespace inheritance. Begun implementing semantics. 2001-02-01 03:39:26 +00:00
rogerl%netscape.com
23fda0a73e Removed unused parameter. 2001-02-01 01:06:53 +00:00
rogerl%netscape.com
f13e0741a0 Changed Cast to take a JSValue containing a type instead of type directly.
Added LoadType to help support that. Also added LoadNull.
2001-02-01 00:59:21 +00:00
mkaply%us.ibm.com
77c253f1d3 Putting it back until I figure out the bustage 2001-02-01 00:03:12 +00:00
mkaply%us.ibm.com
1c00ee937b OS/2 only
r=dbaron
Add static to OS/2 JS_STATIC_CALLBACK so I don't break the build like I did yesterday
2001-01-31 23:40:42 +00:00
mkaply%us.ibm.com
2ae966c468 #59855
r=mccabe, sr=brendan
Proper building of fdlibm standalone
2001-01-31 23:26:00 +00:00
mkaply%us.ibm.com
71b9af79d7 #59855
r=mccabe, sr=brendan
OS/2 needs fdlibm copysign
2001-01-31 23:24:27 +00:00
mkaply%us.ibm.com
b8c9156ead #59855
r=mccabe, sr=brendan
Fix Javascript to get Endianness from jstypes.h
2001-01-31 23:23:42 +00:00
mkaply%us.ibm.com
ab94da8892 #59855
r=mccabe, sr=brendan
Fix Javascript to get Endianness from jstypes.h - start with a Makefile change and let it cycle once
2001-01-31 21:07:16 +00:00
matthias%sorted.org
f39acf5399 introduced "sync" helper function for converting a Javascript function
into a Java-style synchronized method
2001-01-31 13:05:21 +00:00
matthias%sorted.org
e5ae12e585 added support for implementing Java-style synchronized methods in Javascript 2001-01-31 13:02:42 +00:00
dveditz%netscape.com
d08f7df315 enable win32 XPC_TOOLS_SUPPORT environment var to turn on js profiler hooks. r=mcafee,sr=jband 2001-01-31 03:26:31 +00:00
jband%netscape.com
3ad4de6403 NOT PART OF THE BUILD - simple observer test to demonstrate use of weak references 2001-01-31 02:32:39 +00:00
brendan%mozilla.org
d0385b286a Throw EvalError for indirect eval calls iff strict+werror (38512, r=rogerl, sr=shaver). 2001-01-31 01:12:15 +00:00
matthias%sorted.org
4aee7d25d7 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)
2001-01-30 16:38:21 +00:00
dbaron%fas.harvard.edu
7563888641 Attempt to fix build bustage from mkaply's checkin. r=kin 2001-01-30 16:31:43 +00:00
mkaply%us.ibm.com
81fac91d51 #62003
r=mccabe, sr=brendan
Fixing up some Javascript CALLBACKs
2001-01-30 15:53:38 +00:00
mkaply%us.ibm.com
7792e217c6 #62003
r=mccabe, sr=brendan
Fixing up some Javascript CALLBACKs
2001-01-30 15:43:35 +00:00
nboyd%atg.com
42056e97d4 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
2001-01-30 13:47:19 +00:00
brendan%mozilla.org
1cae579899 Better branch callback failure message. 2001-01-29 20:32:57 +00:00
brendan%mozilla.org
56fdf600c3 Make branch callback optional, parameterize its limit, and give a warning when it fails. 2001-01-29 20:27:30 +00:00
brendan%mozilla.org
bb40b036ad 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.
2001-01-27 08:00:45 +00:00
rogerl%netscape.com
8b06bc1a3a 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.
2001-01-27 00:31:32 +00:00
jeff.dyer%compilercompany.com
66539fc886 First cut a xml code generation. 2001-01-26 23:55:32 +00:00
jeff.dyer%compilercompany.com
6b02950cc2 Unneeded file 2001-01-26 23:46:06 +00:00
jband%netscape.com
616b6cca1a fix jump in leaks caused by previous checkin by commenting out the offending code that roots Object.prototype 2001-01-26 08:02:23 +00:00
waldemar%netscape.com
588e4ffbf6 Added .() operator 2001-01-26 07:33:32 +00:00
jband%netscape.com
61a7d5b1fd backing out the unreviewed change to the loader for bug 63027 that I checked in with the other xpconnect changes by mistake. 2001-01-26 02:35:22 +00:00
jband%netscape.com
ea496b8199 add xpidl support for DOMString to fix bug 65762. r=jst sr=brendan 2001-01-26 02:32:18 +00:00
jband%netscape.com
abc6bd8a0b 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
2001-01-26 02:25:09 +00:00
jband%netscape.com
5bc0005e33 WHITESPACE ONLY CHANGE. Detabbing this stuff cuz it bothers me (tabbing didn't match 'Mode' line's tab-width) 2001-01-26 01:53:22 +00:00
brendan%mozilla.org
d3c870640c 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.
2001-01-26 00:59:50 +00:00
rogerl%netscape.com
9250f428f3 Fixes to support ICodeModule operand type (via name in global object) and
TRUE/FALSE/NULL/CLASS instructions.
2001-01-25 23:34:33 +00:00
nboyd%atg.com
362492aef1 ECMA mandates a ToPrimitive on Date constructor arguments that we didn't have. 2001-01-25 19:56:54 +00:00
matthias%sorted.org
f989805f9a cleaned up indentation. no code changes. 2001-01-25 18:46:38 +00:00
sspitzer%netscape.com
cf94df1c3e back out brendan (Career Limiting Move) to fix blocker bug #66545.
a=leaf
2001-01-25 18:06:57 +00:00
brendan%mozilla.org
363c8fd51c 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.
2001-01-25 09:22:19 +00:00
nboyd%atg.com
665f459571 Move Invoker out as a top-level class so that it doesn't get javadoc'd
with FunctionObject (it must be public).
2001-01-24 15:49:21 +00:00
nboyd%atg.com
6ddf348d98 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() + "]";
    }
2001-01-24 15:16:37 +00:00
beard%netscape.com
99bfc80f2d [not part of build] Added UTCUtils to reflect new dependencies in JS engine. 2001-01-23 19:54:49 +00:00
nboyd%atg.com
389c4e220e 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
2001-01-23 19:35:35 +00:00
nboyd%atg.com
1a357f5fda 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
2001-01-23 17:48:41 +00:00
nboyd%atg.com
8ed55e98dd Fix formatting 2001-01-23 14:24:39 +00:00
rogerl%netscape.com
3d250fdec1 More fixes for #64285 - i had mis-merged from SpiderMonkey. 2001-01-22 22:30:37 +00:00
nboyd%atg.com
e737c6d867 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
2001-01-22 20:28:34 +00:00
brendan%mozilla.org
ab05798b67 Followup to last checkin, comment change only, r=mccabe. 2001-01-20 02:02:48 +00:00
brendan%mozilla.org
499dcb0009 2nd attempt: Fix API botch where 'var x=0' vs. 'x=0' could put x in a different object (65553, r=mccabe, sr=jband). 2001-01-20 01:41:55 +00:00
rogerl%netscape.com
14a70a0c8c Added <function> at top level and example thereof. 2001-01-20 00:44:51 +00:00
rogerl%netscape.com
1a5e400f3e Fixed gcc warnings. Added .xml test case. 2001-01-20 00:02:56 +00:00
rogerl%netscape.com
8d21e78e1d Fixes and enhancements to get class references, constructors and scripts
working from .xml input.
2001-01-19 23:56:37 +00:00
rogerl%netscape.com
aeca31a7bd Merged Monkey bits, fix for bug #57631, /()/ was parsed incorrectly. 2001-01-18 23:39:00 +00:00
rogerl%netscape.com
bbcf08a5c3 Merged changes from Monkey - see bug #64285. 2001-01-18 22:49:11 +00:00
kin%netscape.com
31dc7d8cfc Temporary fix for Bug #65828: mozilla installer.exe fails with "-229 script error"
Backing out Brendan's previous checkin for bug #65553 (jsapi.c, jsdbgapi.c, jsemit.c, jsinterp.c, jsinterp.h, jsobj.c, and jsscript.c), so we can get smoke tests going.

r=attinasi@netscape.com (sheriff)
2001-01-18 22:10:12 +00:00
brendan%mozilla.org
e6b898515c Fix API botch where 'var x=0' vs. 'x=0' could put x in a different object (65553, r=mccabe, sr=jband). 2001-01-18 03:00:31 +00:00
nboyd%atg.com
08a188c69b Subject:
[Fwd: My Mistake in ScriptRuntime method]]]
   Date:
        Tue, 16 Jan 2001 15:48:26 +0100
   From:
        Igor Bukanov <igor@icesoft.no>
     To:
        Norris Boyd <nboyd@atg.com>




Hi, Norris!

With my previous patch to fix in
org/mozilla/javascript/ScriptRuntime.java Integer.MIN_VALUE as index
problem I also added a bug to the unrelated code: I tried to minimize
object creation and unfortunately that untested "optimization" slippet
into my patch as well.

I replaced the lines 290, 291 in toNumber(String s) method from

String sub = s.substring(start, end+1);
if (sub.equals("Infinity"))

to

if (s.regionMatches(start, "Infinity", 0, 8))

But that should be
if (start + 7 == end && s.regionMatches(start, "Infinity", 0, 8))

Sory for troubles, Igor





290c290
<             if (s.regionMatches(start, "Infinity", 0, 8))
---
>             if (start + 7 == end && s.regionMatches(start, "Infinity", 0, 8))
2001-01-16 20:20:36 +00:00
nboyd%atg.com
b3d6830b8b Expand tutorial. 2001-01-16 15:24:23 +00:00
nboyd%atg.com
4d54695ee1 Fix 64788 Make method invocation 10x faster with following code.... 2001-01-14 01:19:58 +00:00
beard%netscape.com
0ef1cd4d6e Keeping up with current Rhino sources. Removed Frame.java, Added DebugFrame.java, DebuggableEngineImpl.java. 2001-01-12 20:42:17 +00:00
beard%netscape.com
b47343d272 fixed no-prototype function warning. 2001-01-12 20:32:19 +00:00
nboyd%atg.com
bbae607060 Update comment; operator is part of ECMA. 2001-01-12 16:30:04 +00:00
nboyd%atg.com
1e13a69fde Add removeThreadLocal method. 2001-01-12 16:29:26 +00:00
nboyd%atg.com
8ca97fa895 Fix infinite loop in example. 2001-01-12 16:28:36 +00:00
waldemar%netscape.com
87ce1a1e6a Separated statements into statements, diretives, and definitions 2001-01-12 07:33:19 +00:00
brendan%mozilla.org
241d647c16 Fix ABW impurities under JS_ClearScope on an unmutated obj (64958, r=shaver, sr=jband). 2001-01-11 23:55:30 +00:00
rogerl%netscape.com
d13899b06c New (incomplete but functional) implementation of operator overriding. 2001-01-11 00:03:05 +00:00
waldemar%netscape.com
d7f7cfe179 Simplified use-name-patterns 2001-01-10 02:50:13 +00:00
nboyd%atg.com
b8ac59c406 Subject:
Re: Debugger problem
        Date:
             Mon, 08 Jan 2001 14:16:30 -0800
       From:
             Christopher Oliver <coliver@mminternet.com>
 Organization:
             Primary Interface LLC
         To:
             Kurt Westerfeld <kurt@ManagedObjects.com>
         CC:
             Norris Boyd <nboyd@atg.com>
  References:
             1 , 2 , 3




Kurt, Norris,

Yes, with the change to the shell this should be possible.  The problem before
was that if you loaded the same file with different relative path names, two
different windows in the debugger were created because everything (windows,
breakpoints, etc) is keyed off the source name.

The attached file contains the fix (and includes the workaround for
Desktop.getSelectedFrame).

There are still some bugs in transferring focus between the windows in the
Desktop.  I haven't had time to track down the problem or a solution.

Chris

Kurt Westerfeld wrote:

> I would point out that "Source Name" of a script isn't necessarily a
> filename.  In our system, scripts are run remotely from a script library
> that has no file system backing.  Canonicalizing the file names is really
> unnecessary.
>
> Can't you just modify JSDebugger to not care what the name of the file is?
> If access to the original script is unavailable except through the file
> system, I'd be surprised.
>
> ----- Original Message -----
> From: Christopher Oliver <coliver@mminternet.com>
> To: Kurt Westerfeld <kurt@ManagedObjects.com>
> Cc: Norris Boyd <nboyd@atg.com>
> Sent: Sunday, January 07, 2001 2:23 AM
> Subject: Re: Debugger problem
>
> > Hi Kurt,
> >
> > I rather would say that it is a problem with the processFile method in the
> > shell's Main class.  If you change the current working directory or the
> value
> > of the System property "user.dir" after compiling a script, relative path
> names
> > can become ambiguous.  Norris, would it be ok to modify the shell to
> > "canonicalize" the names of files it compiles?  That way the source name
> that
> > shows up in the stack and in DebuggableScript will always be unique.  For
> > example:
> >
> > public static void processFile(Context cx, Scriptable scope,
> >                                    String filename)
> >     {
> >             Reader in = null;
> >             try {
> >                 in = new PushbackReader(new FileReader(filename));
> >                 int c = in.read();
> >                 // Support the executable script #! syntax:  If
> >                 // the first line begins with a '#', treat the whole
> >                 // line as a comment.
> >                 if (c == '#') {
> >                     while ((c = in.read()) != -1) {
> >                         if (c == '\n' || c == '\r')
> >                             break;
> >                     }
> >                     ((PushbackReader) in).unread(c);
> >                 } else {
> >                     // No '#' line, just reopen the file and forget it
> >                     // ever happened.  OPT closing and reopening
> >                     // undoubtedly carries some cost.  Is this faster
> >                     // or slower than leaving the PushbackReader
> >                     // around?
> >                     in.close();
> >                     in = new FileReader(filename);
> >                 }
> >                 filename = new java.io.File(filename).getCanonicalPath();
> > <<<====== Add this
> >             }
> >             catch (FileNotFoundException ex) {
> >                 Context.reportError(ToolErrorReporter.getMessage(
> >                     "msg.couldnt.open",
> >                     filename));
> >                 exitCode = EXITCODE_FILE_NOT_FOUND;
> >                 return;
> >             } catch (IOException ioe) {
> >                 globalState.getErr().println(ioe.toString());
> >             }
> >
> >             // Here we evalute the entire contents of the file as
> >             // a script. Text is printed only if the print() function
> >             // is called.
> >             evaluateReader(cx, scope, in, filename, 1);
> >     }
> >
> >
> > Attached is *my* latest version of the debugger code.  Norris, have you
> made
> > any progress on cvs commit priveledges?  The attached version fixes a
> number of
> > GUI bugs:
> >
> > 1) If you undocked the Variables window and popped up the Context
> combo-box and
> > then closed the window with the system menu, the Context pop-up was not
> cleaned
> > up properly.
> > 2) The first time you minimize a file window it appeared to dissappear
> when you
> > tried to restore it.  This was due to the fact that I forgot to "pack" its
> > contents and as a result its requested size was 0x0.
> >
> > I also added a menu item to toggle whether to break on exceptions and one
> which
> > allows you to open (and compile) a JavaScript file without actually
> executing
> > it.
> >
> > I have also attached a Word document with some basic documentation for the
> > Debugger.
> >
> > Note that this version also includes all the changes to support debugging
> > scripts in the AWT dispatch thread.
> >
> > Chris
> >
> > Kurt Westerfeld wrote:
> >
> > > Hello.  I ran into a null pointer exception in JSDebugger tonight, and I
> > > thought I'd drop you a note.
> > >
> > > The problem line is 2336, where a breakpoint is hit.  To simulate, load
> the
> > > debugger using the command line syntax on a file that has not been
> resolved
> > > to cannonical path.
> > >
> > > Example,
> > >
> > >      jshell -debug -f \myfile.fs
> > >
> > > At any rate, the "handleCompilationDone" routine takes \myfile.fs and
> turns
> > > it into a canonical path.  If you hit a breakpoint in this file and say
> > > "go", when the breakpoint hits the file is not found, because the same
> > > canonical path resolution is not done.  The resolution seems dubious,
> since
> > > it is only done in the compilation done callback, but I don't know the
> best
> > > way to suggest a fix since it seems that code had some purpose.
> > >
> > > Anyway, thought you'd wanna know.
> > >
> > > ________________________________________________________________________
> > >   Kurt Westerfeld
> > >   Senior Software Architect
> > >   Managed Objects
> > >   mailto:kwester@ManagedObjects.com
> > >   703.770.7225
> > >   http://www.ManagedObjects.com
> > >
> > >   Managed Objects: manage technology > rule business
> >



   JSDebugger.java

                    Name:
                          JSDebugger.java
                    Type:
                          Java Class File (java/*)
                 Encoding:
                          base64
2001-01-09 14:10:40 +00:00
nboyd%atg.com
864bb13d47 Missed checkin of new file. 2001-01-09 13:39:22 +00:00
nboyd%atg.com
cbf2c6d0b4 Clean up debug APIs.
* Make use of DebuggableEngine interface to keep Context API smaller
* Change org.mozilla.javascript.debug.Frame to DebugFrame to avoid
  confusion with java.awt.Frame
2001-01-08 21:41:25 +00:00
nboyd%atg.com
05afc92b5d Fix for 1.1 compatibility. 2001-01-08 14:34:21 +00:00
nboyd%atg.com
db930451b8 Fix classloader problem from last checkin. 2001-01-08 02:13:28 +00:00
nboyd%atg.com
1de208b764 Canonicalize file names to help debugger. 2001-01-08 02:12:52 +00:00
nboyd%atg.com
59adb03eb5 Latest changes from Chris Oliver. 2001-01-08 01:43:28 +00:00
nboyd%atg.com
cb3ce5e5aa Revert to old object identity for equality per ECMA. 2001-01-08 01:03:23 +00:00
nboyd%atg.com
0298ab90eb For == use .equals after unwrapping. 2001-01-05 20:00:47 +00:00
nboyd%atg.com
07b81a65d3 Fix bug 64397. 2001-01-05 19:15:59 +00:00
nboyd%atg.com
0e1266c7d4 Email thread describing change:
Subject:
             Re: Rhino bug - Wrapper ??
        Date:
             Fri, 05 Jan 2001 03:46:11 +0530
       From:
             Mukund Balasubramanian <mukund@cs.stanford.edu>
 Organization:
             Another Netscape Collabra Server User
 Newsgroups:
             netscape.public.mozilla.jseng
  References:
             1 , 2 , 3 , 4 , 5 , 6




That works too,
    Should I assume that this would be a part of the next tip ? I agree with the
part about
overloading code too.

    Anyways, thanks a load for your help and just tell me if I could be of any
help in any other
respects of the rhino project.

ThanX,

Mukund Balasubaramanian

Norris Boyd wrote:

> Actually, I was considering removing the unwrapping code from
NativeJavaConstructor. I was
> suprised that it was there. The code dates from before we implemented proper
method and
> constructor overloading in Rhino. It's the overloading code that should have
the responsibility
> for unwrapping.
>
> Does this patch work for you:
>
> Index: NativeJavaObject.java
> ===================================================================
> RCS file:
/cvsroot/mozilla/js/rhino/org/mozilla/javascript/NativeJavaObject.java
> ,v
> retrieving revision 1.29
> diff -u -r1.29 NativeJavaObject.java
> --- NativeJavaObject.java       2000/11/13 22:10:32     1.29
> +++ NativeJavaObject.java       2001/01/04 21:33:55
> @@ -673,6 +673,12 @@
>
>                  return Result;
>              }
> +            else if (value instanceof Wrapper) {
> +                value = ((Wrapper)value).unwrap();
> +                if (type.isInstance(value))
> +                    return value;
> +                reportConversionError(value, type);
> +            }
>              else {
>                  reportConversionError(value, type);
>              }
>
> This handles the case where the object is both a Scriptable and a Wrapper.
>
> --N
>
> Mukund Balasubramanian wrote:
>
> > Yes they do implement Scriptable.
> >     From my preliminary inspection of the code, findFunction seems to be
preceediong the
> > coerceType call and I presume findFunction call is going to fail if the
arguments are
> > wrapped (bad types mismatching signature).
> >     The constructor case DOES go through an explicit unwrapping stage as
shown by the cut
> > and paste code. My question is whether the same preamble in NativeJavaMethod
is a valid bug
> > fix.
> >
> > ThanX,
> >
> > Mukund Balasubramanian
> >
> > Norris Boyd wrote:
> >
> > > Do your objects that implement Wrapper also implement Scriptable? From
simple inspection
> > > of the code I'd think that both the constructor and method cases would go
through
> > > NativeJavaMethod.coerceType, which should unwrap. However, Scriptable
objects are picked
> > > off and handled before any unwrapping is considered.
> > >
> > > --N
> > >
> > > Mukund Balasubramanian wrote:
> > >
> > > > Yup,
> > > >     Here it is - Line numbers 173-178 are cut and paste from
> > > > NativeJavaConstructor.java inside NativeJavaMethod.java
> > > >
> > > > /*** Call in NativeJavaMethod.java
> > > >     public Object call(Context cx, Scriptable scope, Scriptable thisObj,
> > > >                        Object[] args)
> > > >         throws JavaScriptException
> > > >     {
> > > >         // Eliminate useless args[0] and unwrap if required
> > > >         for (int i = 0; i < args.length; i++) {
> > > >             if (args[i] instanceof Wrapper) {
> > > >                 args[i] = ((Wrapper)args[i]).unwrap();
> > > >             }
> > > >         }
> > > >
> > > >   // Find a method that matches the types given.
> > > >         if (methods.length == 0) {
> > > > ****/
> > > >
> > > > Is this correct ? I presume it is because of the fact that the
constructor
> > > > does this.
> > > >
> > > > Any luck with my other question regarding generalizing the WrapHandler
to all
> > > > objects (including those returned by scriptable) and not only those
returned
> > > > through nativeJava***
> > > >
> > > > ThanX,
> > > >
> > > > Mukund Balasubramanian
> > > >
> > > > Norris Boyd wrote:
> > > >
> > > > > Could you post your proposed patch?
> > > > >
> > > > > Thanks,
> > > > > Norris
> > > > >
> > > > > Mukund Balasubramanian wrote:
> > > > >
> > > > > > Hi all,
> > > > > >     I am trying to play around with writing a custom WrapHandler for
my
> > > > > > Java objects in Rhino. I found WrapHandler very useful.
> > > > > >     Now I am stuck at a point where, even though my wrappers
implement
> > > > > > "Wrapper", they get unwrapped only on calles to Constructors using
> > > > > > Liveconnect. Normal methods dont seem to be doing any unwrapping.
> > > > > > Managed to build rhino with a bug fix (cut and paste code from
> > > > > > NativeJavaConstructor to NativeJavamethod), and it works.
> > > > > >     Just wanted to verify if it is a known bug (while I wait for
> > > > > > bugzilla to mail me a passwd).
> > > > > >
> > > > > > BTW, also found something interesting, WrapHandler gets called only
when
> > > > > > the object is returned from NativeJava***, not ANY Object. Is that
the
> > > > > > way it is supposed to work ??
> > > > > >
> > > > > > ThanX for any help,
> > > > > >
> > > > > > Mukund Balasubramanian
2001-01-05 01:17:51 +00:00
brendan%mozilla.org
39ed395c58 Speed up js_qsort_r a bit (64065, r=mccabe, sr=jband). 2001-01-04 10:13:18 +00:00
mccabe%netscape.com
ce1033908e Oops. Removing unneeded 'System.err.println("foo")'. 2001-01-04 00:03:00 +00:00
mccabe%netscape.com
9f3e15aaf5 Fix to 64149.
Propagate lexer fixes from Monkey to accept (and warn) about 008 as well as just 08.
2001-01-03 23:36:33 +00:00
nboyd%atg.com
2e691de2e6 Get rid of BSF file in Rhino code. Just rely upon building BSF ourselves for now. 2001-01-03 20:54:37 +00:00
bryner%uiuc.edu
69e9b90bc6 Removing dead .toc files. Not part of build. a=sfraser. 2001-01-03 01:32:06 +00:00
rogerl%netscape.com
2c115aa7b4 Fix for VC++ compile. 2001-01-02 19:49:16 +00:00
pschwartau%netscape.com
bc3b1264b8 Correcting bug that cropped up when system clock was set to GMT Standard Time 2001-01-01 02:40:28 +00:00
beard%netscape.com
4ca46948df another pass over LexUtils::cmp_nocase(). 2000-12-30 08:08:12 +00:00
beard%netscape.com
41d32a622f fix unsigned/signed comparison warnings 2000-12-30 07:55:01 +00:00
beard%netscape.com
2d8bdb7992 Use GC-safe vector of JSFunction* to hold getters/setters. 2000-12-30 07:46:18 +00:00
beard%netscape.com
661e422910 no need to copy JSString values into String values. 2000-12-30 07:06:03 +00:00
rogerl%netscape.com
61eb9f446d Fixed bit-rot in exception handling, removed unused locals. 2000-12-30 01:13:06 +00:00
rogerl%netscape.com
6676b0784f re-ordered members wrt init sequence. 2000-12-30 01:08:31 +00:00
mccabe%netscape.com
a8ec7cd47b Add emacs makefile modeline.
Not part of the Mozilla build.
2000-12-29 23:23:52 +00:00
rogerl%netscape.com
f27ea7e548 Fix for #60164, more failure testing during exception processing.
r=mccabe, a=brendan
2000-12-29 22:19:09 +00:00
pschwartau%netscape.com
5abaf0cf2b Initial add - 2000-12-29 02:46:32 +00:00
pschwartau%netscape.com
4d301707dd Adjusting hard-coded Pacific timezone date testcases to work in any tester's timezone - 2000-12-26 20:02:04 +00:00
pschwartau%netscape.com
0398d7bee8 Adding functionality to adjust hard-coded date tests (written for Pacific timezone) for the tester's own timezone 2000-12-26 19:55:05 +00:00
pschwartau%netscape.com
bfb589f60d Modifiying one line that was failing in GMT+ timezones (i.e. east of Greenwich) 2000-12-26 19:34:07 +00:00
waldemar%netscape.com
3e8e4d48fc Revamped the syntax for calling superconstructors and tightened up the syntax for the super operator 2000-12-22 02:02:14 +00:00
mccabe%netscape.com
b8e8f4bb95 Fix courtesy jband to quiet unused variable warning.
Move 'dlsoffset' to the block where it's used, inside #ifdef XP_MAC.

r=mccabe
2000-12-21 04:32:13 +00:00
waldemar%netscape.com
f11df45168 Simplified postfix-expressions and use-exclude-include 2000-12-21 00:04:52 +00:00
brendan%mozilla.org
7b1d57a4dc Don't fatten a flyweight lock unnecessarily in JS_SetPrototype; misc. cleanups (63097, r=mccabe, sr=jband). 2000-12-20 22:36:01 +00:00
nboyd%atg.com
e86e0fd5b5 Nope, 8 was right. 2000-12-20 13:31:59 +00:00
waldemar%netscape.com
664c11c819 Changed 'operator' from a keyword to an attribute. 2000-12-19 01:57:13 +00:00
waldemar%netscape.com
666b8c7b81 Removed 'operator' non-reserved word 2000-12-19 01:56:36 +00:00
nboyd%atg.com
4674ece3c9 Off by one error fixed. 2000-12-18 19:32:00 +00:00
nboyd%atg.com
cdc056a04a Add ContextListener to API classes. 2000-12-18 19:30:26 +00:00
beard%netscape.com
048ef40a40 added newest source files, to use the icode assembler. (Pro6 update) 2000-12-16 07:01:50 +00:00
beard%netscape.com
da3f96b69c added newest source files, to use the icode assembler. 2000-12-16 07:01:22 +00:00
beard%netscape.com
23425c7dea use string8::difference_type rather than uint for difference between iterators, cast uint32 to int32 to remove warnings. 2000-12-16 06:57:58 +00:00
beard%netscape.com
50f3452e77 fixed return value warning by moving return statement. 2000-12-16 06:56:37 +00:00
beard%netscape.com
27888b7f72 warnings, explicit use of JSValue constructor. 2000-12-16 06:54:40 +00:00
waldemar%netscape.com
157324e348 Converted to CodeWarrior 6 and fixed errors 2000-12-16 01:14:55 +00:00
waldemar%netscape.com
a86b8ebf19 Fixed C++ errors 2000-12-16 01:14:36 +00:00
jeff.dyer%compilercompany.com
80b7ec4f9f Revised readme and removed CommandLine parser (for now). 2000-12-16 00:50:25 +00:00
jeff.dyer%compilercompany.com
9f31ccbf60 Removing Util.java. 2000-12-16 00:43:05 +00:00
jeff.dyer%compilercompany.com
144aa7a24d Removed dependency on sun.tools packages. 2000-12-16 00:42:16 +00:00
rogerl%netscape.com
c858f0c335 Added 'length' to Array objects as a getter property - and fixed up stuff
that this depended on. Fixed parameter names for xml classes and added
'loadxml' global function.
2000-12-15 01:38:40 +00:00
beard%netscape.com
e16204d82f Converted to an application for testing. 2000-12-15 01:26:06 +00:00
beard%netscape.com
364b0b1752 JDK 1.1 compatibility. Should flesh out the CommandLine class to do what sun.tools.util.CommandLine does. 2000-12-15 01:09:58 +00:00
beard%netscape.com
d140c9c45f JDK 1.1 compatibility. 2000-12-15 01:06:50 +00:00
beard%netscape.com
9517cfdbab build system for Mac using CW Pro 6. 2000-12-15 01:05:32 +00:00
beard%netscape.com
a03e258f94 Removing obsolete furballs. 2000-12-15 00:04:31 +00:00
beard%netscape.com
b565b9d3f9 Removing obsolete furball. 2000-12-15 00:01:26 +00:00
nboyd%atg.com
87a029eeb9 Fix bug:
Subject:
             [Rhino] Script compiler bug?
        Date:
             Tue, 12 Dec 2000 22:08:23 GMT
       From:
             dave russo <d-russo@ti.com>
 Organization:
             Deja.com
 Newsgroups:
             netscape.public.mozilla.jseng




The following script does not seem to compile properly (using Rhino
1.5R1):

test.js:
var test = {};
test.foo = function () { print('foo')}
test.bar = function () { print('bar')}

After compiling test.js ("java org.mozilla.javascript.tools.jsc.Main
test.js"):

js> loadClass('test')
js> test.foo()
bar
js> load('test.js')
js> test.foo()
foo

Note that changing test.js to read:

var test = {};
test.foo = function foo() { print('foo')}
test.bar = function bar() { print('bar')}

Works around the problem.  Is there a problem with anonymous functions?


Sent via Deja.com
http://www.deja.com/
2000-12-13 15:17:24 +00:00
nboyd%atg.com
2504e1cfd0 Missed call to "in" needing parameter change. 2000-12-13 14:47:27 +00:00
nboyd%atg.com
c87949e3b4 Support single-letter bean properties. 2000-12-12 20:29:06 +00:00
nboyd%atg.com
70ff180f2f Fix test case failures with RegExp constructor (new tests) 2000-12-12 15:19:36 +00:00
nboyd%atg.com
4f6ace3554 Fix ArrayIndexOutOfBoundsException on "new RegExp()" 2000-12-12 14:51:55 +00:00
nboyd%atg.com
5e0b2ebaed Fix 62559, 58479 2000-12-12 14:35:38 +00:00
nboyd%atg.com
619fce4329 fix javadoc 2000-12-12 01:48:53 +00:00
pschwartau%netscape.com
508c2cdc93 Skip ecma_3/Date/15.9.5.7.js Rhino does Date.toLocaleTimeString() differently than SpiderMonkey 2000-12-12 00:13:24 +00:00
nboyd%atg.com
073df548cd Fix bug where "a = new Array[3]" would produce an IndexOutOfBoundsException 2000-12-10 18:33:52 +00:00
mccabe%netscape.com
68e18aa4b9 Fix to 62309. Change JS_AddRoot to JS_AddNamedRoot in Liveconnect to aid leak diagnoses.
r=beard
sr=brendan
2000-12-09 01:35:46 +00:00
rogerl%netscape.com
d11b23802a Sweeping set of changes to implement closures. Also re-targetted entire
front-end to Cobol and back-end now generates pdp11 assembly code in
spanish.
2000-12-08 23:55:39 +00:00
mccabe%netscape.com
7656e0fc52 More licenses and modelines.
Not part of the Mozilla build.
2000-12-08 10:19:59 +00:00
mccabe%netscape.com
2c218914aa Add informative comment.
Not part of the Mozilla build.
2000-12-08 10:01:35 +00:00
mccabe%netscape.com
f97fe01b08 Whoops, wrong license. 2000-12-08 10:00:20 +00:00
mccabe%netscape.com
e295112197 Add -p flags to several Makefile mkdir commands, to allow parallel gmakes. Still not sure how to make js/src/liveconnect/classes/*.java happy with parallel. gmakes...
Also add some #modelines to makefiles, and some more NPL licenses.

None of these files are part of the Mozilla build.
2000-12-08 09:56:47 +00:00
mccabe%netscape.com
7ebb6b839c Update to last fix of js.c. Multiple versions of functions #ifdef'ed to take different numbers of arguments (in C) are a pain. Use #ifdef-safe JS_GET_CLASS, instead.
Not part of the Mozilla build.
2000-12-08 06:30:57 +00:00
mccabe%netscape.com
841f9da3de Fix to Windows build problem with the js reference build; replace non-API macro OBJ_GET_CLASS with API-kosher JS_GetClass. (OBJ_GET_CLASS used js_GetSlotWhileLocked, pulled from the set of exported symbols with the recent thread optimization checkin.)
Not part of the Mozilla build.  (Yes, it's a closed tree!)

r=brendan
2000-12-08 02:35:17 +00:00
cls%seawood.org
51b7673641 Adding caps to REQUIRES. Bug #62069 r=burning tinderbox: senna 2000-12-07 22:46:13 +00:00
mccabe%netscape.com
ef122d5552 Fix to 58120 - Rhino's Date.prototype.setYear wasn't converting from internal UTC time to local time before working with the date, resulting in new dates that were off by the current timezone offset. Adding a LocalTime call fixes it.
Thanks to David Flanagan <david@oreilly.com> for catching this.
2000-12-07 09:21:45 +00:00
jband%netscape.com
a046f19ac6 now that the bustage is cleanedup (sorry), I'm fixing the whitespace of that hasty checkin 2000-12-07 09:06:55 +00:00
jband%netscape.com
27072b9f5b fix build bustage on some platforms from MI ambiguity 2000-12-07 08:33:50 +00:00
jband%netscape.com
5874e12cb0 fix bug 62069 and bug 68538 by using nsISecurityCheckedComponent to allow unfettered access from JavaScript to Components.interfaces and the safer methods on nsXPCException. r=brendan r=mstoltz sr=hyatt 2000-12-07 08:14:27 +00:00
mccabe%netscape.com
63a3cc2ac2 Add emacs makefile modeline to many makefiles, add npl license to others.
(Comment changes only.)
2000-12-07 02:44:27 +00:00
pschwartau%netscape.com
91b6d231cc Initial add; regression test for Bugzilla bug 57043 2000-12-06 20:52:59 +00:00
jeff.dyer%compilercompany.com
271600c65f Corrupt. Removing. 2000-12-06 19:01:21 +00:00
jeff.dyer%compilercompany.com
609cdf48ec Removing, corrupt. 2000-12-06 18:59:39 +00:00