1035 Commits

Author SHA1 Message Date
rogerl%netscape.com
fe3d1f0753 The lastIndex property is defined to be an integer which we're allowed to
keep as 32 bits, so the tests for 33 bits were too demanding.


git-svn-id: svn://10.0.0.236/trunk@42219 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-04 22:27:31 +00:00
rogerl%netscape.com
831a14fdaf Missing '\' before \n. Trailing '|' in expected output was not correct.
git-svn-id: svn://10.0.0.236/trunk@42218 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-04 22:26:07 +00:00
rogerl%netscape.com
4c5f8c91da Was using 'g' flag instead of 'm' and wasn't really testing the multiline
functionality (assuming I interpreted the intent correctly).


git-svn-id: svn://10.0.0.236/trunk@42217 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-04 22:24:57 +00:00
rogerl%netscape.com
90cd3cd063 Added Linux/sparc component
git-svn-id: svn://10.0.0.236/trunk@42197 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-04 20:46:58 +00:00
norris%netscape.com
e0486b8b6a Fix bug 11077 "ScriptableObject.defineFunctionProperties() uses invalid signature check."
The check was actually okay, but the error message didn't state the error correctly.


git-svn-id: svn://10.0.0.236/trunk@42166 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-04 19:37:51 +00:00
norris%netscape.com
e1c36e7f50 * Take advantage of the new semantics of Context.enter & exit to save codesize.
* Accept patch from Andrew Wason <aw@softcom.com>:

Subject:
        Re: partial interface problem
   Date:
        Wed, 04 Aug 1999 13:04:37 -0400
   From:
        Andrew Wason <aw@softcom.com>
     To:
        norris@netscape.com
    CC:
        Howard Lin <howard@softcom.com>




>I'm having a problem implementing a Java interface in JS where I don't
>implement all the methods, and one of the methods I don't define returns
>non-void.

I have a patch for this.  I generate bytecode in
JavaAdapter.generateReturnResult to check the return type on the stack from
JavaAdapter.callMethod.  If it is Undefined, return null.

I'm not positive this is the right way to fix this - maybe it should be
fixed closer to the source (e.g. prevent callMethod from returning
Undefined to begin with)

Andrew

--
Andrew Wason
SoftCom, Inc.
aw@softcom.com


git-svn-id: svn://10.0.0.236/trunk@42148 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-04 17:43:18 +00:00
norris%netscape.com
f33a289889 Accept patch (with modifications) from Andrew Wason <aw@softcom.com>:
Subject:
        default JavaAdapter patch
   Date:
        Tue, 20 Jul 1999 15:35:01 -0400
   From:
        Andrew Wason <aw@softcom.com>
     To:
        norris@netscape.com
    CC:
        mccabe@netscape.com, rogerl@netscape.com




Attached is a patch to the patch I sent a while ago for the JavaAdapter stuff.

If a SecurityManager is installed, attempting to access the
"org.mozilla.javascript.JavaAdapter" system property can throw a
SecurityException.  This should not prevent the default JavaAdapter
implementation from being used.

Andrew
--
Andrew Wason
SoftCom, Inc.
aw@softcom.com


git-svn-id: svn://10.0.0.236/trunk@42146 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-04 16:56:18 +00:00
jband%netscape.com
11316e2c3b adding modifications to support enumeration of interfaces from Robert Ginda <rginda@ix.netcom.com>. Also extending nsIXPCScriptable to support a set of flags - the only one implemented now allows for indicating that the objects static properties shouyld not be enumerated
git-svn-id: svn://10.0.0.236/trunk@42118 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-04 06:22:27 +00:00
mccabe%netscape.com
85b0673c2b Added missing ImporterTopLevel.java and ListenerCollection.java files to the source list.
Thanks to Andrew Wason <aw@softcom.com> for noticing this problem.


git-svn-id: svn://10.0.0.236/trunk@42090 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-04 02:50:47 +00:00
rogerl%netscape.com
f74e4a5fc6 Updated internal name of exec function to match new naming rules.
git-svn-id: svn://10.0.0.236/trunk@42044 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-03 22:41:57 +00:00
mccabe%netscape.com
d751032e4b - Added OS_TARGET-switched definition of CLASSPATHSEP, to support building under Windows NT with GNU make. Thanks to Andew Wason <aw@softcom.com> for this fix.
- Removed outdated references to JSDEBUG_JAR.


git-svn-id: svn://10.0.0.236/trunk@42034 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-03 22:15:02 +00:00
norris%netscape.com
d7970d2406 Adding patch (with slight modifications for javadoc) from Andrew Wason <aw@softcom.com>:
Subject:
        Rhino reflection patch
   Date:
        Wed, 28 Jul 1999 18:14:52 -0400
   From:
        Andrew Wason <aw@softcom.com>
     To:
        norris@netscape.com
    CC:
        mccabe@netscape.com, rogerl@netscape.com, Howard Lin <howard@softcom.com>




When JavaAdapter generates an adapter class, it does not take into account
the types of method parameters when wrapping the generated methods arguments.

This means that if a non-public class implements a public interface the
non-public class type will be wrapped instead of the declared public
interface - and methods cannot be invoked via the wrapper.

I have attached sample code (reflect-demo.zip) which shows this.  The
JavaScript caller.js generates an adapter implementing the CallerInterface
interface.  CallerInterface has a method (doSomething) which takes an
argument of type pkg.Interface.  pkg.Target is a non-public class that
implements pkg.Interface.  If an instance of pkg.Target is passed to the
CallerInterface adapter doSomething method, an Error is thrown because
pkg.Target.doSomething is called (instead of pkg.Interface.doSomething) and
pkg.Target is not public.

I have attached a patch to Context.java, ScriptRuntime.java and
JavaAdapter.java.  I overloaded toObject in Context and ScriptRuntime to
take a 3rd argument which is the declared type of the object being
wrapped.  This is passed to NativeJavaObject.wrap so that it generates the
correct wrapper. I changed JavaAdapter.generateOverride to generate
bytecode calling Context.toObject passing the declared Class type of the
argument.

Context.java also includes my previously submitted patch for dealing with
SecurityExceptions and the JavaAdapter property (because this patch has not
been checked into CVS yet).

Andrew

--
Andrew Wason
SoftCom, Inc.
aw@softcom.com



   reflect-patch.txt

                Name:
                      reflect-patch.txt
                 Type:
                      Plain Text (text/plain)




   reflect-demo.zip

                   Name:
                         reflect-demo.zip
                    Type:
                         Zip Compressed Data (application/x-zip-compressed)
                Encoding:
                         base64


git-svn-id: svn://10.0.0.236/trunk@42025 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-03 21:24:39 +00:00
norris%netscape.com
97d3d62d46 Remove unused clone() method.
git-svn-id: svn://10.0.0.236/trunk@42004 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-03 20:40:25 +00:00
rogerl%netscape.com
f11f9ed504 Fixed test cases for non-global regexp. case - the result array should be
exactly the same as that returned by simply 'exec'ing the regexp against
the input string.


git-svn-id: svn://10.0.0.236/trunk@41909 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-03 00:51:23 +00:00
mccabe%netscape.com
41dabd483b Further fix to properly include classes from the org.mozilla.classfile package in the generated .jar file.
Thanks to Andrew Wason <aw@softcom.com> for his continued work on the Rhino make system.


git-svn-id: svn://10.0.0.236/trunk@41898 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-03 00:25:30 +00:00
mccabe%netscape.com
acd7046b06 Add the classes defined in org/mozilla/classfile to js.jar.
git-svn-id: svn://10.0.0.236/trunk@41806 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-02 09:01:19 +00:00
jband%netscape.com
626574bd3c fix for bug 10998 pointed out by rginda@ix.netcom.com. This was really just a refcounting bug
git-svn-id: svn://10.0.0.236/trunk@41728 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-31 18:53:40 +00:00
briano%netscape.com
40fcdcda46 OpenVMS-specific addition to force a POSIX build of jscpucfg.
git-svn-id: svn://10.0.0.236/trunk@41652 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-31 00:38:25 +00:00
jband%netscape.com
b9048d178d 1) fix the xpconnect factories to not use static objects.
2) add a test that acts as a sample for doing oberloaded methods on xpconnect wraped natives.
3) add a NOT_IMPLEMENTED method to wrapped native for getting the prototype JS object.
4) Set the global object of the JSContext as the wrapped native JSObject's parent when creating this JSObject. This makes JS code compiled against the wrapper actuall work!
5) fix the refcounting on factories in the tests/components module


git-svn-id: svn://10.0.0.236/trunk@41648 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-31 00:26:35 +00:00
jband%netscape.com
3d2fbbfb1c copy in most of the better error reporter from js.c
git-svn-id: svn://10.0.0.236/trunk@41646 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-31 00:19:50 +00:00
briano%netscape.com
2087356d68 Trivial elimination of some pointless macros as discussed in bug 8568. Approved by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@41509 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-29 01:18:12 +00:00
brendan%mozilla.org
e0f64c2c6e Fix warnings reported at http://tinderbox.mozilla.org/SeaMonkey/warnings.html, mostly unsigned/signed bothers.
git-svn-id: svn://10.0.0.236/trunk@41445 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-28 06:48:44 +00:00
briano%netscape.com
684f6b2907 Cleaned it up and changed the name of libreg.{a,so} to libmozreg.{a,so} to fix the conflict reported in bug 8568.
git-svn-id: svn://10.0.0.236/trunk@41354 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-27 23:27:44 +00:00
waldemar%netscape.com
fbd0c2defc Updated for recent semantic engine changes. Changed the meaning of (?= to match Perl.
git-svn-id: svn://10.0.0.236/trunk@41196 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-27 01:05:59 +00:00
waldemar%netscape.com
a4f0c9a69e Updated for recent semantic engine changes
git-svn-id: svn://10.0.0.236/trunk@41195 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-27 01:05:27 +00:00
waldemar%netscape.com
ec765d7d20 Implemented partial order for operator precedences. Removed global array functions and reformatted 'length' and 'empty' functions.
git-svn-id: svn://10.0.0.236/trunk@41194 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-27 01:03:19 +00:00
waldemar%netscape.com
ecdb80d8ef Implemented partial order for operator precedences. Removed global array functions and reformatted 'length' and 'empty' functions. Made lexer-actions into global function calls.
git-svn-id: svn://10.0.0.236/trunk@41193 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-27 01:02:21 +00:00
waldemar%netscape.com
8043665f0e Made lexer-actions into global function calls
git-svn-id: svn://10.0.0.236/trunk@41192 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-27 01:00:05 +00:00
waldemar%netscape.com
c326c80d5d Added partial order library
git-svn-id: svn://10.0.0.236/trunk@41191 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-27 00:58:44 +00:00
waldemar%netscape.com
c60aaadd1e Replaced :unit by :empty-10
git-svn-id: svn://10.0.0.236/trunk@41190 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-27 00:58:01 +00:00
waldemar%netscape.com
1ee91d2685 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@41188 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-27 00:57:03 +00:00
mccabe%netscape.com
7bcedd9143 Fix code to invoke Wrapper interfaces using INVOKEINTERFACE rather than INVOKEVIRTUAL.
Thanks go to Andrew Wason <aw@softcom.com> for finding this problem and providing the patch:



If we implement a Java interface in JavaScript, and a method in that interface returns a Java object, we get a java.lang.IncompatibleClassChangeError: org/mozilla/javascript/Wrapper  exception.

We have attached a sample JavaScript file which duplicates the error.

The problem is JavaAdapter is generating an INVOKEVIRTUAL bytecode to call Wrapper.unwrap, but Wrapper is an interface and so INVOKEINTERFACE should be used instead.  As a result of this change, the IFEQ bytecode generated needs to jump more bytes.  We have attached a patch that fixes the problem.

Andrew
--
Andrew Wason
SoftCom, Inc.
aw@softcom.com


git-svn-id: svn://10.0.0.236/trunk@41131 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-26 10:45:38 +00:00
mccabe%netscape.com
a62784c47f Added NPL.
git-svn-id: svn://10.0.0.236/trunk@41130 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-26 10:41:46 +00:00
mccabe%netscape.com
19ce806d00 Comment fixes.
- normalized initial MPL comment to match the format of others in the tree, including an initial -*- Mode line.

- removed RCS $log$, etc. comments.  We use CVS, and they just make spurious changes...


git-svn-id: svn://10.0.0.236/trunk@41129 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-26 10:40:53 +00:00
brendan%mozilla.org
5f949724de Eliminate warning about unsigned/signed == comparison.
git-svn-id: svn://10.0.0.236/trunk@40868 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-23 08:25:03 +00:00
brendan%mozilla.org
e226872154 Add new flag to js_DecompileValueGenerator calls.
git-svn-id: svn://10.0.0.236/trunk@40867 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-23 08:23:13 +00:00
brendan%mozilla.org
2d15291e31 Bugs, bugs bugs:
- js_DecompileValueGenerator had rusted due to bytecode/source-note changes,
  or maybe parts of it never worked right.  Anyway, it now does not induce a
  crashing underflow in the decompiler.  As part of this fix, it now takes a
  checkStack flag telling whether to look for the jsval v argument on the JS
  stack.  The calls from ImportProperty, js_SetProperty, and js_DeleteProperty
  pass in v a jsval for the property id, which should not be sought after on
  the stack (it might happen to be there due to o['p'] = 2, but we want to
  decompile o["p"], not "p").
- js_DecompileValueGenerator would load a generating pc even if the value v
  did not match the pc's corresponding stack item!  Oops.  This lead to less
  than idea diagnostics.
- js_DecompileValueGenerator was also not mapping JSOP_TRAP to the real op at
  a sufficiently early and univeral point in its control flow.
- Fix PopOff to assert and check for stack underflow in the decompiler, and
  beef up PushOff too (it asserted, but did not check).
- js_ReportIsNotFunction now avoids JS_InternString by indexing directly into
  cx->runtime->atomState.typeAtoms with the result of JS_TypeOfValue.
- Removed unnecessary local GC root reserved by non-zero trailing member of
  obj_eval's JSFunctionSpec initializer.


git-svn-id: svn://10.0.0.236/trunk@40864 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-23 08:01:54 +00:00
mccabe%netscape.com
fb30e5c33e Fix warnings flagged by the auto-warnings page http://tinderbox.mozilla.org/SeaMonkey/warnings.html . Thanks slamm.
git-svn-id: svn://10.0.0.236/trunk@40656 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-22 10:37:35 +00:00
mccabe%netscape.com
7ce68a6276 Changes to support building on Alpha NT.
Patches courtesy bob meader <bob@guiduck.com> who seems to be working fast and furious on this port.


git-svn-id: svn://10.0.0.236/trunk@40594 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-22 03:58:51 +00:00
cbegle%netscape.com
75be2b3294 fixed a versioning problem with the tests. these should succeed now.
these files files have no impact on the mozilla build.


git-svn-id: svn://10.0.0.236/trunk@40457 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-21 19:20:02 +00:00
cbegle%netscape.com
99d5f81807 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@40447 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-21 18:02:34 +00:00
cbegle%netscape.com
cfa114a227 update shared functions file.
this is not part of the mozilla client build, and has no effect on its
bustedness.


git-svn-id: svn://10.0.0.236/trunk@40292 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-20 18:00:13 +00:00
cbegle%netscape.com
ea666e9d1c adding file for running tests in the driver.
git-svn-id: svn://10.0.0.236/trunk@40291 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-20 17:49:01 +00:00
Jerry.Kirk%Nexwarecorp.com
e96ba2e301 Defined DASH_R for Neutrino
git-svn-id: svn://10.0.0.236/trunk@40152 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-19 21:18:19 +00:00
jband%netscape.com
7f18567e29 enabling xpconnect for Linux ARM because we now have xptcall code for Linux ARM from Stefan Hanske <sh990154@mail.uni-greifswald.de>
git-svn-id: svn://10.0.0.236/trunk@40067 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-19 02:59:21 +00:00
cbegle%netscape.com
bffa97aadc the js1.2 tests really need the version(120) called.
fix regression test for #7703.

This is not part of the mozilla build and has no effect on its bustedness.


git-svn-id: svn://10.0.0.236/trunk@39761 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-16 21:47:51 +00:00
jband%netscape.com
51cdc7ff95 adding forward declaration test
git-svn-id: svn://10.0.0.236/trunk@39745 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-16 20:38:16 +00:00
jband%netscape.com
ad651528f4 added files: mozilla/js/src/xpconnect/idl/xpctest2.idl
git-svn-id: svn://10.0.0.236/trunk@39744 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-16 20:35:58 +00:00
jband%netscape.com
ce39a4b59f adding new file for forward declaration test
git-svn-id: svn://10.0.0.236/trunk@39742 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-16 20:33:36 +00:00
jband%netscape.com
f098c00afd an inout of interface pointer test that illustrates that bug 9914 is not a bug
git-svn-id: svn://10.0.0.236/trunk@39651 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-16 04:29:49 +00:00