50 Commits

Author SHA1 Message Date
brendan%mozilla.org
a9f1e5c102 Toggle JSOPTION_COMPILE_N_GO around compilation in JS_EvaluateUCInStackFrame (280086, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@168454 18797224-902f-48f8-a5cc-f745e15eee43
2005-01-28 18:14:05 +00:00
brendan%mozilla.org
3677e7a705 Propagate a flag induced by JSOPTION_XML into script and context version fields, for proper run- and compile-time consistency (275742, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@167006 18797224-902f-48f8-a5cc-f745e15eee43
2004-12-24 00:03:59 +00:00
brendan%mozilla.org
036b7c131b E4X, configured off, code-complete.
git-svn-id: svn://10.0.0.236/trunk@165420 18797224-902f-48f8-a5cc-f745e15eee43
2004-11-17 07:43:01 +00:00
brendan%mozilla.org
e1d64a36be Initial E4X check-in, configured off (246441, rs=shaver).
git-svn-id: svn://10.0.0.236/trunk@163236 18797224-902f-48f8-a5cc-f745e15eee43
2004-10-05 10:19:07 +00:00
brendan%mozilla.org
25a4d6d341 - Improve global variable performance from 3x slower to 1.2x slower than
locals (169559, r=shaver).
- Also fix longstanding bug where global regexps in precompiled scripts were
  wrongly shared among threads/contexts (165201, r=shaver).
- Also fix strict-aliasing gcc warning causes (206599, r=bryner).


git-svn-id: svn://10.0.0.236/trunk@154749 18797224-902f-48f8-a5cc-f745e15eee43
2004-04-13 01:25:17 +00:00
gerv%gerv.net
123c4a9492 Bug 205418 - Relicense Spidermonkey (js/src) to MPL/LGPL/GPL. Patch by gerv; r,a=brendan.
git-svn-id: svn://10.0.0.236/trunk@149331 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 00:11:16 +00:00
brendan%mozilla.org
1208f020d1 Use eval's object principals if possible, ditto for other eval-like methods (223041, r=caillon, sr=shaver).
git-svn-id: svn://10.0.0.236/trunk@148699 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 01:04:50 +00:00
brendan%mozilla.org
3d1e0a6938 Fix JS_SetTrap to cope with existing trap at same PC, overwriting its handler and closure (213841, r=self).
git-svn-id: svn://10.0.0.236/trunk@145471 18797224-902f-48f8-a5cc-f745e15eee43
2003-08-01 23:16:04 +00:00
brendan%mozilla.org
2532d3d12a Big dynamic footprint win via script filename caching, plus line number fix for strict/const diags (see http://bugzilla.mozilla.org/attachment.cgi?id=127130&action=view for detailed checkin comments; 208030, r/rs=shaver, r=rginda on the jsd change, r=jst on the dom change).
git-svn-id: svn://10.0.0.236/trunk@145239 18797224-902f-48f8-a5cc-f745e15eee43
2003-07-26 22:37:11 +00:00
brendan%mozilla.org
d282bac114 Give JSScope a proper flags member, without increasing its size (part of 196097, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@139287 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-11 20:30:55 +00:00
timeless%mac.com
69ae314807 Bug 106386 rid source of misspellings
r=db48x sr=blake a=asa


git-svn-id: svn://10.0.0.236/trunk@116832 18797224-902f-48f8-a5cc-f745e15eee43
2002-03-19 04:30:17 +00:00
rginda%netscape.com
fe7a5ec2b5 bug 129519, "JS_GetPropertyDesc gives up too easily", r=jband, sr=shaver, a=bren
dan
Make JS_GetPropertyDesc degrade gracefully instead of fail outright when we run
into a problem fetching the property value.


git-svn-id: svn://10.0.0.236/trunk@116675 18797224-902f-48f8-a5cc-f745e15eee43
2002-03-16 01:56:19 +00:00
brendan%mozilla.org
66979b2420 No strict warnings without the strict option, and other js1.5/mozilla1.0 tidying (129972, r=shaver, sr=jband, a=asa).
git-svn-id: svn://10.0.0.236/trunk@116505 18797224-902f-48f8-a5cc-f745e15eee43
2002-03-14 00:14:48 +00:00
brendan%mozilla.org
8ca8b078fd Avoid MSVC bogo-warning.
git-svn-id: svn://10.0.0.236/trunk@116242 18797224-902f-48f8-a5cc-f745e15eee43
2002-03-09 00:56:29 +00:00
brendan%mozilla.org
58df9f1560 Fix longstanding bug where watchpoints didn't work with JSPROP_SETTER (127243, r=rginda, sr=shaver, a=dbaron).
git-svn-id: svn://10.0.0.236/trunk@116216 18797224-902f-48f8-a5cc-f745e15eee43
2002-03-08 22:46:58 +00:00
rginda%netscape.com
344465fc39 bug 128057, r=brendan, sr=shaver, a=asa
check for JS_GetPropertyDesc failure in JS_GetPropertyDescArray


git-svn-id: svn://10.0.0.236/trunk@115980 18797224-902f-48f8-a5cc-f745e15eee43
2002-03-06 22:15:39 +00:00
rginda%netscape.com
af78329b48 part of bug 109652, "Venkman needs to profile"
sr=brendan, r=peterv, a=shaver
add JS_Now to the jsapi, and JS_GetScriptVersion to jsdbgapi


git-svn-id: svn://10.0.0.236/trunk@115414 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-27 09:17:21 +00:00
brendan%mozilla.org
f780c9a84e Major footprint/perf win: share property state using a tree whose root represents empty scopes, and whose non-root nodes represent scopes with properties added in order from the root to that node; to use double hashing to map these tree-paths for per-scope property lookup; and avoid locking where possible through immutability and mostly-benign&rare race tolerance (62164, r=shaver, sr=jband).
git-svn-id: svn://10.0.0.236/trunk@115266 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-23 03:49:27 +00:00
rginda%netscape.com
3902d6df27 bug 124474, "JS_IsNativeFrame should return !fp->script"
also includes typo fix from bug 124474
sr=shaver, r=jband


git-svn-id: svn://10.0.0.236/trunk@114495 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-14 07:52:02 +00:00
brendan%mozilla.org
f0455a28be Hack special frame flags into fp when compiling under JS_Evaluate*InStackFrame, so useless expressions don't get optimized away (92087, r=rginda, sr=jband).
git-svn-id: svn://10.0.0.236/trunk@114268 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-12 07:44:48 +00:00
brendan%mozilla.org
726006598c Fix for bug 99663 (for loop resolves properties of the object being enumerated
with JSRESOLVE_ASSIGNING, wrongly), plus a few miscellaneous bugfixes.

- Combine the JSStackFrame members constructing, special, overrides, and
  reserved into a uint32 flags member.

- Separate JOF_ASSIGNING from the JOF_SET bytecode format flag, and impute
  JSRESOLVE_ASSIGNING from the presence of JOF_ASSIGNING among the current
  opcode's format flags.  To handle the for-in loop opcodes, which do more
  than simply assign -- in particular, they do property lookups whose resolve
  hook outcalls should not be flagged with JSRESOLVE_ASSIGNING -- a new frame
  flag, JSFRAME_ASSIGNING, has been added.

- Fix interpreter version selection to respect JS_SetVersion, whose effect on
  cx->version is "sticky".

- Fix js_DecompileValueGenerator to deal with JSOP_ENUMELEM -- it never had,
  as this testcase shows (it crashes without this patch):

    version(120);
    eval("function fe(s) { for (it[s] in this); }");
    try { fe('rdonly'); } catch (e) { print(e); }


git-svn-id: svn://10.0.0.236/trunk@104525 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-03 06:39:30 +00:00
gerv%gerv.net
ae1d5501a1 Oops.
git-svn-id: svn://10.0.0.236/trunk@103236 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 00:02:59 +00:00
scc%mozilla.org
2281a4d137 bug #98089: ripped new license
git-svn-id: svn://10.0.0.236/trunk@103230 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 22:39:41 +00:00
jband%netscape.com
e5d45072c3 fix bug 78428 by making sure to use the lesser of the freeslot or nslots value when marking slots. This is necessary because objects can now be in an initial state where the freeslots is a larger number than the nslots - and the actual number of slots in the array. sr=brendan r=beard a=drivers
git-svn-id: svn://10.0.0.236/trunk@96380 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-05 00:47:56 +00:00
rginda%netscape.com
7b58a7f6ff fix for 77081, r=rogerl, sr=brendan.
git-svn-id: svn://10.0.0.236/trunk@93969 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-04 21:48:48 +00:00
brendan%mozilla.org
152a38ce62 Fix old 1.4-era bogus code for setting JSPD_ARGUMENT or JSPD_VARIABLE given a heavyweight activation (68825, r=shaver, sr=jband).
git-svn-id: svn://10.0.0.236/trunk@90301 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-24 00:31:43 +00:00
brendan%mozilla.org
38f5a7159a Include function total size in JS profiler output (67467, r=hyatt, sr=jband).
git-svn-id: svn://10.0.0.236/trunk@86108 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-02 20:52:06 +00:00
brendan%mozilla.org
e92f541879 2nd attempt: Fix API botch where 'var x=0' vs. 'x=0' could put x in a different object (65553, r=mccabe, sr=jband).
git-svn-id: svn://10.0.0.236/trunk@85199 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-20 01:41:55 +00:00
kin%netscape.com
b027ec74ff 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)


git-svn-id: svn://10.0.0.236/trunk@85091 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-18 22:10:12 +00:00
brendan%mozilla.org
a8e8c0ed81 Fix API botch where 'var x=0' vs. 'x=0' could put x in a different object (65553, r=mccabe, sr=jband).
git-svn-id: svn://10.0.0.236/trunk@85067 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-18 03:00:31 +00:00
brendan%mozilla.org
850d9d969b JSPROP_SHARED implies no slot to entrain garbage (bug 61482, r=mccabe, sr=jband).
git-svn-id: svn://10.0.0.236/trunk@83276 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-05 21:47:23 +00:00
brendan%mozilla.org
d2bc829802 Cleanups from tlundeen@webcrossing.com, plus fun->call=>native renaming.
git-svn-id: svn://10.0.0.236/trunk@69736 18797224-902f-48f8-a5cc-f745e15eee43
2000-05-15 03:54:50 +00:00
norris%netscape.com
f70a94e258 Fix
28390, 28866, 34364
r=brendan@mozilla.org
35701
r=jst@netscape.com


git-svn-id: svn://10.0.0.236/trunk@65940 18797224-902f-48f8-a5cc-f745e15eee43
2000-04-14 03:14:53 +00:00
brendan%mozilla.org
43d1d6a141 - Eliminate ancient, bogus proxying of function object for its call objects (23346, r=jband@netscape.com).
- Tabs expanded as much as I could stand, without taking too much cvsblame.


git-svn-id: svn://10.0.0.236/trunk@59716 18797224-902f-48f8-a5cc-f745e15eee43
2000-02-04 02:01:49 +00:00
mccabe%netscape.com
7113e5b3ae Changes to allow Spider Monkey to be compiled under C++.
Courtesy Bill Gibbons <bill@gibbons.org>

His comments:

Here are the changes to JSRef to make it compile either as C or C++. Mostly the changes are to add missing casts (since C++ doesn't have implict conversion from void* to other pointer types nor implicit casts from ints to enumerations) plus a few random things like the use of "private" as a variable name.

There are a few other minor bug fixes; in particular:

  * A long statement with and'ed conditions is reformatted to make it easier to remove other builtin objects (e.g. Date).

  * A #if was added to jsscript.c for the JS_HAS_SCRIPT_OBJECT off case.

  * In jsmath a #ifdef was changed to #if.

My notes also mention...

  * jsobj.c should include jsopcode.h

  * jsfun.c - doesn't link if JS_HAS_ARGS_OBJECT is off

  * jsarray.c - a reference to js_ValueToSource should be conditional on JS_HAS_TOSOURCE

r=mccabe


git-svn-id: svn://10.0.0.236/trunk@59455 18797224-902f-48f8-a5cc-f745e15eee43
2000-02-02 01:10:31 +00:00
brendan%mozilla.org
b7a83ca82c JS1.5 fixes (17290, 21618, plus shaver's 22243 fix, r=shaver@mozilla.org).
git-svn-id: svn://10.0.0.236/trunk@58086 18797224-902f-48f8-a5cc-f745e15eee43
2000-01-18 11:06:05 +00:00
brendan%mozilla.org
51687cf23b Fix obscure eval bug and ECMA conformance issue (20256, r=rginda@netscape.com).
git-svn-id: svn://10.0.0.236/trunk@54865 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-01 04:30:04 +00:00
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
fur%netscape.com
50f46042f0 Removed unused variable declaration to eliminate warning
git-svn-id: svn://10.0.0.236/trunk@52042 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 02:48:32 +00:00
brendan%mozilla.org
b3a1017637 - Chouck's changes to grow a JSIdArray if necessary in JS_Enumerate, with my
code review and fixes (r=chouck@geocast.com).  He needs this cuz he has no
  knowledge of exact number of properties before new-style enumerating them.
- Patch up jsdbgapi.c a bit -- it needs to use OBJ_GET_ATTRIBUTES and new APIs
  to do a better job describing properties to a debugger.
- Add JSMSG_CANT_DESCRIBE_PROPS for bogus non-native error case in jsdbgapi.c.
- Fix "Inappropriate" => "invalid" in JSMSG_BAD_ARRAY_LENGTH message.


git-svn-id: svn://10.0.0.236/trunk@51734 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 19:24:03 +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
b80a05e8e8 - Fix for..in bug where ECMA 12.6.3 steps 5 and 6 are reversed: the effect was
to define an unbound global variable used to enumerate an empty object, when
  the standard says no variable should be defined.
- Clean up minor nits, make comment style match prevailing, tighten up for..in
  element-indexing special case comments.
- Fix js_Invoke to take CONSTRUCT and INTERNAL flags arg instead of a construct
  boolean arg and the JSStackFrame internalCall mis-located boolean non-arg.
  Use these flags correctly in all calls (previous version failed to set the
  bogus frame.internalCall around js_Invoke calls from jsfun.c and jsstr.c).


git-svn-id: svn://10.0.0.236/trunk@39473 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-15 02:24:23 +00:00
fur%netscape.com
40e974ccab Merge from SpiderMonkey140_BRANCH:
Incorporated changes from JS_STABLE_DROP_04261999 to JS_STABLE_DROP_06221999


git-svn-id: svn://10.0.0.236/trunk@36563 18797224-902f-48f8-a5cc-f745e15eee43
1999-06-23 14:18:56 +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
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
mccabe
84e1fd30b8 Added a few (JSOp) casts to appease Macintosh compiler workings.
Enums are types!


git-svn-id: svn://10.0.0.236/trunk@3150 18797224-902f-48f8-a5cc-f745e15eee43
1998-06-04 00:22:55 +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