38 Commits

Author SHA1 Message Date
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
db9ee285d0 bug 110903, patch=brendan, sr=shaver, r=me
Call new script hook for scripts created via xdr.


git-svn-id: svn://10.0.0.236/trunk@108541 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-20 02:47:41 +00:00
brendan%mozilla.org
2163e55b8e Add mutable (growable or dependent, two subtypes) strings to solve O(n^2) and O(n^3) growth rates (56940, r=rogerl, sr=jband&shaver).
git-svn-id: svn://10.0.0.236/trunk@106213 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-25 00:26:38 +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
brendan%mozilla.org
f031c3036a Shrink principals struct back to where it was last week -- but it could go further (93043, r=shaver, sr=jst).
git-svn-id: svn://10.0.0.236/trunk@100615 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-09 01:15:57 +00:00
brendan%mozilla.org
f5bc62edea FASTLOAD_20010703_BRANCH landing, r=dbaron, sr=shaver.
git-svn-id: svn://10.0.0.236/trunk@100030 18797224-902f-48f8-a5cc-f745e15eee43
2001-07-31 19:05:34 +00:00
rginda%netscape.com
6cb853ad8b create a dummy stack frame before calling out to the new-script-hook. The dummy frame prevents the script from being affected by any GC the hook may trigger. See bug 77636. author=shaver, r=me, sr=brendan
git-svn-id: svn://10.0.0.236/trunk@95736 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-22 23:57:37 +00:00
brendan%mozilla.org
f6b51cdcaf - [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.


git-svn-id: svn://10.0.0.236/trunk@90066 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-22 02:52:42 +00:00
brendan%mozilla.org
22cc58b856 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.


git-svn-id: svn://10.0.0.236/trunk@88604 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-06 01:56:30 +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
50b1d4d1f6 Fix leak on IS_BIG_ENDIAN malloc failure early return (r=mccabe,sr=jband).
git-svn-id: svn://10.0.0.236/trunk@83307 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-06 06:53:33 +00:00
jband%netscape.com
a9d947a466 fix bug 59588. Since js_MarkAtom is called *so* often but is usually short-circuited, we add a macro to get the shortcircuit flag in the 3 callers and avoid most of the calls. r=mccabe sr=brendan
git-svn-id: svn://10.0.0.236/trunk@83304 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-06 06:03:30 +00:00
brendan%mozilla.org
c4ea797337 Fix C++ portability and AIX compilation problem due to last C++ porting attempt (48976, r=jdunn@netscape.com).
git-svn-id: svn://10.0.0.236/trunk@78593 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-09 05:53:00 +00:00
brendan%mozilla.org
e85122f78b Clean up JSObjectOps layering violations by adding mark and clear ops; JSClass gets a corresponding mark op so classes with unregistered roots in private data can mark them. The JS API gets a new JS_MarkGCThing entry point for JSObjectOps.mark implementors. Prerequisite check-in for bug 49816 and others (r=shaver).
git-svn-id: svn://10.0.0.236/trunk@77238 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-26 02:30:22 +00:00
brendan%mozilla.org
ee6d41f982 Re-constipate JSClass.name.
git-svn-id: svn://10.0.0.236/trunk@76709 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-19 19:17:32 +00:00
jband%netscape.com
2dab0327a4 fix the warnings that went along with the last bustage fix - in case one of the compilers needs it. brendan can fix as he likes in the morning
git-svn-id: svn://10.0.0.236/trunk@76704 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-19 10:36:45 +00:00
brendan%mozilla.org
3802be8867 Support lazy initialization of standard classes and their associated global functions/properties (46703, r=jband,rogerl).
git-svn-id: svn://10.0.0.236/trunk@76699 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-19 08:37:07 +00:00
brendan%mozilla.org
e754398f43 Eliminate name-hiding and consequent compiler warning (r=shaver@mozilla.org).
git-svn-id: svn://10.0.0.236/trunk@63945 18797224-902f-48f8-a5cc-f745e15eee43
2000-03-24 00:20:02 +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
shaver%netscape.com
3676f93091 - report function name, if any, when warning about mismatched return
- change catchguard syntax to avoid ECMA conflict
- light XDR cleanup


git-svn-id: svn://10.0.0.236/trunk@54364 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-24 03:36:25 +00:00
rogerl%netscape.com
50e9fca03a Backing out changes to script.exec scope access. r=norris
git-svn-id: svn://10.0.0.236/trunk@53562 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-15 22:54:06 +00:00
brendan%mozilla.org
5d2eac8479 XULDOMJS_19991106_BRANCH landing (15146, 18025, r=shaver@mozilla.org)
git-svn-id: svn://10.0.0.236/trunk@53326 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-12 06:03:40 +00:00
mccabe%netscape.com
b31e8409ff Fix most remaining warnings in js/src. Patch courtesy slamm.
r=mccabe.


git-svn-id: svn://10.0.0.236/trunk@53245 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-11 21:52:35 +00:00
rogerl%netscape.com
853e43bd31 r=norris
Opinion was that Script.exec() should execute in global scope, not caller.


git-svn-id: svn://10.0.0.236/trunk@52276 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 22:25:25 +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
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
shaver
2bbfb94096 first arg to Script.prototype.exec is scopeobj, not second-with-ignored-first
git-svn-id: svn://10.0.0.236/trunk@3561 18797224-902f-48f8-a5cc-f745e15eee43
1998-06-09 21:10:45 +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