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

1190 Коммитов

Автор SHA1 Сообщение Дата
kipp%netscape.com 29c7fcb9b4 new 1999-09-25 20:11:47 +00:00
kipp%netscape.com a04392a6c0 Init all variables, not just some of them 1999-09-25 20:07:20 +00:00
beard%netscape.com 9675752f93 Fixed looking up 'length' property in Function objects: needed to look up prototype chain for zero arguments. Cleaned up some more, always storing Boolean.TRUE in local hash tables, rather than the method, methodKey or methodName. 1999-09-25 09:24:23 +00:00
beard%netscape.com 620e43cd95 Added ClassSignature, a key for caching generated adapter classes. Now passing superName, rather than superClass to constructor generation methods. 1999-09-25 08:11:24 +00:00
beard%netscape.com 38ef2b2d81 Fixed generateSuper when override has void return type. 1999-09-25 01:37:32 +00:00
norris%netscape.com e6517361c6 Shorten name to make Mac developers happy. 1999-09-24 21:05:41 +00:00
norris%netscape.com d51c86ce41 Patches from Kurt Westerfeld for JavaScript property access to JavaBeans.
Subject:
        Re: [Fwd: [Bug 13658] Changed - Rhino: null pointer exception on class with duplicate field/method]
   Date:
        Mon, 13 Sep 1999 20:57:32 -0400
   From:
        "Kurt Westerfeld" <kurt@westerfeld.com>
     To:
        "Norris Boyd" <norris@netscape.com>




I do have a patch for this, but it is intermixed with some other changes
that I have implemented for the get/set on Java instances (per my LC3
proposal).  The bug requires changes that are a little involved actually;
basically it seems that when getting the default value for a "field and
methods" (which combines the same-named entities), the prototype of the
parent scope is deref-ed, and the parent scope is null.  Hence, the scope
must be passed into the the cloned field and method values.

Also, the NativeJavaClass implementation passed "false" for isStatic on the
constructor of the FieldAndMethods Hashtable, which results in classes
having instance methods.  Bad.  I haven't filed a bug on that yet.
Additionally, I fixed a couple other NullPointerException nigglies thrown in
when exceptions are propagated in the same area.  Finally, when getting the
default value for the field, it is helpful to convert a Scriptable to string
when that is requested (as when typing in the console).

I am attaching the changed files.  The LC3++ code can be removed if you
want, which I can do for you but it will take a little longer.  What is your
preference?

-----Original Message-----
From: Norris Boyd <norris@netscape.com>
To: Kurt Westerfeld <kurt@westerfeld.com>
Date: Monday, September 13, 1999 4:54 PM
Subject: [Fwd: [Bug 13658] Changed - Rhino: null pointer exception on class
with duplicate field/method]


>Kurt,
>
>Is this the bug that your patch fixes?
>
>Thanks,
>Norris
>
1999-09-24 20:41:43 +00:00
norris%netscape.com f69a840b1e Remove '.js' from SECTION. 1999-09-24 20:16:55 +00:00
norris%netscape.com 250df9809f Propagate files from old netscape code. 1999-09-24 20:05:59 +00:00
norris%netscape.com ec0d89055e Implement the "cast" of java class objects so that js objects in java adapters can
use 'this' for the implemented java interface.
1999-09-24 18:20:08 +00:00
beard%netscape.com b0a911e500 Added "generateSuper" which generates a method called "super$method()" which when called calls "super.method()." This is provided to support full sub-classing of Java classes from JavaScript. 1999-09-24 18:17:05 +00:00
beard%netscape.com 5185946b51 added a prototype field, so that a wrapped JavaAdapter can preserve the delegate object's original prototype chain. 1999-09-24 16:52:23 +00:00
beard%netscape.com 24a3e9d1a9 setAdapterProto: now splices in wrapper's prototype, rather than replacing object's original prototype chain. seems to work fine. 1999-09-24 16:51:25 +00:00
mscott%netscape.com 0c4f5eb9c9 fix build bustage for dp. 1999-09-24 02:52:46 +00:00
dp%netscape.com 0642f2e13a Fixing jsloader not to hold reference to component manager. (shaver)
Some initialization of members and checking at desctruction. (dp)
1999-09-24 01:37:44 +00:00
rogerl%netscape.com 167a47ffdb New error for wacky array lengths, ECMA 3 1999-09-23 23:19:00 +00:00
cbegle%netscape.com fc84d5f9c3 update script to report an error if no tests passed. 1999-09-23 23:00:38 +00:00
cbegle%netscape.com 9476968b49 just changing the section name so it doesn't break norris's script. 1999-09-23 22:59:20 +00:00
norris%netscape.com faa7950d23 Fix some Array tests in the ecma suite. 1999-09-23 20:37:56 +00:00
norris%netscape.com a6ed48495a change FAILED color to red 1999-09-23 17:26:22 +00:00
norris%netscape.com 91b5e29282 Add test driver for rhino. 1999-09-23 17:24:14 +00:00
rogerl%netscape.com 71eb1ee9d3 Can't assume object in reportConversionError is scriptable, so call more
generic java.object.toString instead.
1999-09-22 22:06:14 +00:00
norris%netscape.com f8b25c9abd Allow a java.lang.String to be converted to a primitive string in getDefaultValue 1999-09-22 16:30:49 +00:00
norris%netscape.com 9a0f128be4 Fix "wapper". 1999-09-22 16:25:21 +00:00
beard%netscape.com d080c25c1d JavaAdapter no longer uses FlattenedObject, since the prototype is simply the LiveConnect wrapper. 1999-09-22 08:22:53 +00:00
beard%netscape.com 1b108bb46a JavaAdapter no longer uses FlattenedObject, since the prototype is simply the LiveConnect wrapper. Simplified callMethod to only call Context.enter() if methodId property is defined in Scriptable object. 1999-09-22 08:22:47 +00:00
brendan%mozilla.org d70aa0ef6b - Enable JS_HAS_NEW_OBJ_METHODS (Object.prototype.hasOwnProperty, isPrototypeOf
and propertyIsEnumerable) for JS1.5.
- Optimize obj_propertyIsEnumerable to avoid extra lookup code bloat, requiring
  fix to js_GetAttributes (unset out param on successful early retunr) that it
  exposed.
- Use more righteous else-if style in shaver's jsarray.c change.
1999-09-22 05:54:44 +00:00
shaver%netscape.com c254a808f0 new Array("string") should be ["string"], not silent failure (14545, r=brendan) 1999-09-22 04:36:28 +00:00
beard%netscape.com 0bb5087bad renamed "name" parameter "adapterName", removed explicit StringBuffer in favor of "adapter" + serial++ for clarity. 1999-09-22 03:54:00 +00:00
shaver%netscape.com b42e435cb0 add componentType to nsIModule::RegisterSelf 1999-09-22 03:18:27 +00:00
beard%netscape.com ee2e476427 changed createAdapterClass() to only generate methods for properties defined in the wrapped object itself, not for properties defined in prototypes. This makes sense, as the prototype for the wrapped object becomes the LiveConnect wrapper, thus prototype properties become inaccessible anyway. 1999-09-22 01:32:05 +00:00
shaver%netscape.com 826cb30406 having evicted default.js from components/, we reclaim our *.js birthright 1999-09-21 22:10:03 +00:00
brendan%mozilla.org 8e655a2992 JS_VERSION 140 lacked JS_HAS_NUMBER_FORMATS #define. 1999-09-21 21:33:38 +00:00
shaver%netscape.com 1a3efafe34 turn on JS loader on Windows 1999-09-21 20:08:38 +00:00
shaver%netscape.com 4a5a6fe48f fixed Windows makefile goop and fixed __stdcall issue 1999-09-21 19:42:09 +00:00
rogerl%netscape.com d6ea115852 ECMA errors as exceptions changes - conformance to latest spec for
hierarchy and names etc. Added attempt to make the base exceptions be
instanceof equal across contexts.
1999-09-21 18:58:51 +00:00
shaver%netscape.com aacd538f0b Errors-as-Exceptions and catchguards, because people want/need them 1999-09-21 18:48:43 +00:00
brade%netscape.com efff4a9f90 not currently part of the build (a=leaf); add libraries for xpcom and js so optimized will link 1999-09-21 15:55:56 +00:00
brade%netscape.com 97aaae768d First Checked In. 1999-09-21 14:55:39 +00:00
shaver%netscape.com b472e3d9ce define some key names locally until we export them properly from xpcom 1999-09-21 14:54:39 +00:00
shaver%netscape.com 32d3521175 remove unused file and add initial windows build foo 1999-09-21 14:43:45 +00:00
shaver%netscape.com fae1a32ebc add include of nsIModule.h -- why was this working before? 1999-09-21 14:38:50 +00:00
shaver%netscape.com 320f129e1c fix =/== idiocy, abort if we fail to get runtime and better diagnostics 1999-09-21 14:36:40 +00:00
waterson%netscape.com c3182c1f1c Add some curly braces so that the rest of the world can run. 1999-09-21 04:20:17 +00:00
shaver%netscape.com ae64fff204 build JS component loader by default 1999-09-21 01:09:33 +00:00
shaver%netscape.com a15321335a fix typo before I inflict it on the world 1999-09-21 01:08:21 +00:00
brendan%mozilla.org 94a86fe442 - Bumped default compile-time JS version from 1.4 to 1.5.
- Add JS1.5 getter/setter support in all its glory:

  * getter function SN() {return ++x} at top-level or as a closure binds an SN
    property getter than returns the incremented value of x.  Likewise for
    setter function SN(y) {return y = x}.

  * getters and setters may be defined in an object literal:
      o = {p getter:function() {return ++this.x},
           p setter:function(y){return this.x = y},
           x:42};

  * getter= and setter= operators (compound tokens) may be used to bind getter
    and setter properties dynamically:
      o = new Object;
      o.p getter= function() {return ++this.x};
      o.p setter= function(y){return this.x = y};
      o.x = 42;

    Waldemar is concerned that this form will collide semantically with JS2, so
    I am not committing to keeping it in JS1.5.  I'd like to check my code in
    ASAP so shaver can use it, and I'd also like to see this form get used (or
    not) during Mozilla betas.  Caveat emptor, and if you find this "dynamic"
    or "imperative" form necessary and hard to substitute, please let me know.
    If this proves important to users, then I think JS1.5 should keep it.

- Cleaned up property flags (in a binary-incompatible fashion -- who cares?) by
  eliminating JSPROP_ASSIGNHACK and JSPROP_TINYIDHACK.

- Added JS_DONT_PRETTY_PRINT flag to be ORed with the indent argument to the
  several JS_Decompile*() API calls.  This avoids any newlines or identation in
  the decompiled string.
 
- Improved and extended (for getter/setter non-reservation) scanner lookahead
  by using a circular (power-of-2 sized) token buffer.

- Fix ECMA Edition 3 deviation where function f(){function g(){}} bound f.g by
  mistake (it should arrange to make a closure named g in activations of f, but
  it should not bind a property of function f).
1999-09-21 00:13:48 +00:00
rogerl%netscape.com 2d8fcffd6b (Bug #13416)
Turned off 'super' keyword - was letting through some cut'n'pasted java
code quietly and blowing big chunks out of the codegen/interpreter later.
Anybody know why 'super' had an interesting value here? - there was no
support for it on any path that I could see.
1999-09-20 22:21:24 +00:00
norris%netscape.com 1cd4a572c8 Changes necessary to generate adapter classes to files with associated optimizer package. 1999-09-20 21:16:45 +00:00
jband%netscape.com 6cdf4e5e24 fix for bug 13426 - can now do 'new Components.classes.foo()' to create a new instance of a wrapped native 1999-09-20 20:59:38 +00:00