22 Commits

Author SHA1 Message Date
brendan%mozilla.org
bed10de2c0 Fixed getter/setters, pave way for brutal sharing (15146, r=shaver@mozilla.org,rogerl@netscape.com)
git-svn-id: svn://10.0.0.236/trunk@52487 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 02:23:50 +00:00
rogerl%netscape.com
4e16b4e094 r=norris
Delayed functionDef from creating property until after the body parses
succesfully.


git-svn-id: svn://10.0.0.236/trunk@51176 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 21:07:45 +00:00
brendan%mozilla.org
f2330eb459 1. Fixed missing JS_LOCK_GC in JS_YieldRequest, commented other badness there.
2.  Cleaned up ugly JS_GC_Flag typedef name and put XXXbe comment in there for
    next time: someone seems to have patched around a deadlock that has since
    bit chouck@geocast.com.
3.  Fixed gcDisabled by moving it from cx to rt and updating it atomically.
4.  Fixed ECMA violation where for (var i, j in o) ... was permitted; only one
    variable is allowed.
(Item 4 was a bug on rogerl's list, since closed?  r=shaver@mozilla.org.)


git-svn-id: svn://10.0.0.236/trunk@50795 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 05:46:42 +00:00
dmose%mozilla.org
ec2434440d update license boilerplate to NPL-1.1 dual-licensed with the GPL. a=brendan, r=brendan.
git-svn-id: svn://10.0.0.236/trunk@49258 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-28 23:12:09 +00:00
brendan%mozilla.org
1041763b2e - 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).


git-svn-id: svn://10.0.0.236/trunk@48436 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-21 00:13:48 +00:00
rogerl%netscape.com
205d4652bd Backed out preventing multiple var decls in for..in stmts - it impacted
all for stmts instead, duh.


git-svn-id: svn://10.0.0.236/trunk@47850 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-16 22:12:29 +00:00
rogerl%netscape.com
77cf00d688 Disallowed multiple variable declaration in for (var X in...)
git-svn-id: svn://10.0.0.236/trunk@47166 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-13 21:07:34 +00:00
brendan%mozilla.org
69185ecae9 Expand tabs to spaces per Emacs modeline; other space cleanups.
git-svn-id: svn://10.0.0.236/trunk@46138 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-06 22:59:11 +00:00
mcafee%netscape.com
a954f31869 Fixing linux warning
git-svn-id: svn://10.0.0.236/trunk@39497 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-15 03:02:44 +00:00
rogerl%netscape.com
632556d9fd Bug #7197 (related) - capture and free char pointers going to error
reporter.
Bug #5875 - eval of named function within a function resulted in the
function not being visible at the start of the eval string.


git-svn-id: svn://10.0.0.236/trunk@33359 18797224-902f-48f8-a5cc-f745e15eee43
1999-06-01 23:17:19 +00:00
fur%netscape.com
dc0c8d45d1 Merge changes from SpiderMonkey140_BRANCH. Note: none of the
added files participate in the client build.


git-svn-id: svn://10.0.0.236/trunk@29432 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-27 15:18:57 +00:00
mccabe%netscape.com
a02a1efd96 Stable drop of JavaScript interpreter code from SpiderMonkey140_BRANCH
git-svn-id: svn://10.0.0.236/trunk@14116 18797224-902f-48f8-a5cc-f745e15eee43
1998-11-05 00:08:43 +00:00
fur%netscape.com
e655606d45 Checkpoint JS1.4 from JS_STABLE_10131998_BRANCH. Changes include:
+ merging of js/src and js/ref
 + elimination of most dependencies on NSPR
 + JS1.4 feature additions and accumulated bug fixes

More details are in last week's mozilla status report.


git-svn-id: svn://10.0.0.236/trunk@12797 18797224-902f-48f8-a5cc-f745e15eee43
1998-10-14 10:22:38 +00:00
brendan%netscape.com
68cdb7d0b0 Fix typos, int type mismatch, white-space, and layout style nits.
git-svn-id: svn://10.0.0.236/trunk@8438 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 08:23:34 +00:00
beard%netscape.com
3b05b85628 Version check breaks HTML dialogs.
git-svn-id: svn://10.0.0.236/trunk@7329 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-05 05:25:12 +00:00
mccabe%netscape.com
b32b6c20e8 Propagating numerous fixes from js/ref
and development branches, including but
not limited to:

- Preliminary exception handling per
ECMA proposal; try, multiple
catchblocks, and finally.  Catchblocks
are of the form catch (v) or
catch(v:<guard>), where guard is an
optional boolean expression that is
evaluated to determine whether the
exception is to be caught by that block.

- ECMA-proposed 'in' operator; "'foo' in
o" or "4 in o" asks if o has property
foo or element 4.

- Added a new set of defines in
jsconfig.h for js 1.4
features-in-progress.  (in, instanceof,
exception handling.)  Default build
version is now 1.4.  Fixed a few
conditional features that had become
broken.

- Progress towards porting to FreeBSD
and Alpha; casts of NaN and friends to
int are a little more localized.  Not
there yet...

- New config files to compile on more
OSes; various fixes to improve
portability.


git-svn-id: svn://10.0.0.236/trunk@6907 18797224-902f-48f8-a5cc-f745e15eee43
1998-07-31 00:07:22 +00:00
fur
aea62596b0 Propagation of numerous bug fixes from 4.06 (which have been reviewed
and tested in that release):

#114564: Fix JS_Enumerate to return an empty id array instead of null
#115395: Fix JS garbage collection
#115200: Security dialog no longer blows assertion
#123211: Make sure output of sort array function is -1, 0, or 1.
#116195: Fix ImportProperty(), cope with an existing local variable
         of the same name as the imported property
         Unbusticate JS_invoke() so that closures work again
#115384,#115395: Handle bugs in toSource that strike when
         getProperty is non-idempotent.  Fix crash during JavaScript
         garbage collection after enumerating object properties.

#??????: mjudge - Win16 files to make ptrdiff_t be 32 bits on Win16


git-svn-id: svn://10.0.0.236/trunk@3573 18797224-902f-48f8-a5cc-f745e15eee43
1998-06-09 23:04:48 +00:00
norris
b44d1646cf Fix bug 104191 "ECMA: multiple params w/ same name":
Decompiling "function f(a,b,a) { ... }" would only print two parameters.


git-svn-id: svn://10.0.0.236/trunk@3519 18797224-902f-48f8-a5cc-f745e15eee43
1998-06-08 23:41:54 +00:00
mccabe
6c9a40d28d Fixed error message associated with trying to use a keyword as an
identifier; it was only printing the first character of the
identifier, because it expected 8-bit chars, and was being called with
a 16-bit representation of the offending keyword.


git-svn-id: svn://10.0.0.236/trunk@880 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 23:52:40 +00:00
fur
2d2471a609 Eliminate non-ECMA warnings about lack of return value
git-svn-id: svn://10.0.0.236/trunk@605 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 17:56:47 +00:00
fur
6e3cdaec31 Initial checkin of JavaScript 1.3, migrated from JSFUN13_BRANCH in /m/src repository
git-svn-id: svn://10.0.0.236/trunk@578 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 00:31:11 +00:00
ltabb
8ed5afe62c Free the lizard
git-svn-id: svn://10.0.0.236/trunk@10 18797224-902f-48f8-a5cc-f745e15eee43
1998-03-28 02:44:41 +00:00