Commit Graph

69 Commits

Author SHA1 Message Date
Robert Sayre
12943580cf Merge m-c to tracemonkey. 2009-02-23 12:44:23 -05:00
Jason Orendorff
f6405f0cb3 Bug 479381 - js_FinalizeStringRT dies with multi-threaded app. r=igor. 2009-02-20 18:15:58 -06:00
Jim Blandy
ede7e6d142 Bug 391488: Eliminate PTRDIFF macro; delete jssttddef.h. r=jimb
Delete jsstddef.h, since its only remaining purpose is to make certain
Win16-specific definitions; we don't support Win16 any more.  In
particular, we can just subtract pointers now, so the PTRDIFF macro is
unnecessary noise.

Most places get stddef.h via jstypes.h or some other header, so we can
just delete #inclusions of jstddef.h.  The exception is jskwgen.h, so
there we explicitly include <stddef.h> instead.
2009-02-18 09:14:51 -08:00
Jason Orendorff
c9b0918474 Bug 477142 - _FAIL builtins need to be GC-safe. r=brendan.
--HG--
extra : rebase_source : 10515f7d1f5a85c1965c812f55d91d3d0f49a28e
2009-02-11 13:33:17 -06:00
Jason Orendorff
e4c1fb1cfd Bug 462027 - Bail off trace when reentering interpreter. r=gal. 2009-02-03 18:25:12 -06:00
Jason Orendorff
4e3f2cfd40 Revert to 07be1f190a3d. Revision 5f5c1cd63641 should not have been pushed. 2009-02-03 12:38:44 -06:00
Jason Orendorff
f6ffd1d380 [mq]: bug-462027-v9 2009-02-02 20:42:46 -06:00
Jason Orendorff
37f2985bdf Bug 476177 - TM: cx->stackPool must not be accessed on trace. r=brendan.
--HG--
extra : rebase_source : 746d61b54aa38cbe18fe31bce4efcbbad4629678
2009-01-30 17:40:05 -06:00
Blake Kaplan
a403a02f00 Bug 472787 - Eagerly set the return value. r=brendan 2009-01-09 18:32:04 -08:00
Brendan Eich
56658da21f Bug 465460 - TM: valueOf ignored on third iteration of loop (r=gal). 2008-12-16 19:03:42 -08:00
Jason Orendorff
413e752410 Bug 453564 - TM: Assertion failure: JSVAL_IS_NULL(vp[0]) || (!JSVAL_IS_PRIMITIVE(vp[0]) && OBJ_IS_ARRAY(cx, JSVAL_TO_OBJECT(vp[0]))). r=gal.
--HG--
extra : rebase_source : be08d1a4ca8a3765523b992a5d4e469e67ba8811
2008-12-09 11:43:32 -06:00
Jason Orendorff
b7fb9bc849 Bug 460865 - Read barrier for cx->fp. r=mrbkap, r=dmandelin.
--HG--
extra : rebase_source : 19963188b2f9f96336ce6ca28dbaefccf3a639b7
2008-12-09 10:38:32 -06:00
Brendan Eich
cb47c4cf08 Bug 456511 - (imacros) TM: Make conversion work on arbitrary JSObjects (r=gal). 2008-11-13 00:30:20 -08:00
Andreas Gal
074d900a57 Backed out changeset a40f2117bcc0 2008-11-12 17:39:48 -08:00
Brendan
0ca607d76b Add imacros to support conversion of arbitrary JSObjects (456511, r=gal). 2008-11-12 16:55:45 -08:00
Andreas Gal
c867e60dfc Merge. 2008-10-23 14:47:00 -07:00
Jason Orendorff
68a5dcca96 Bug 460157 - Yet more macros for defining builtins. r=brendan 2008-10-21 17:58:06 -05:00
Blake Kaplan
e36fb599bc Bug 460886 - Substring needs to validate its arguments. r=brendan
--HG--
extra : rebase_source : 24d0131da47e8fb30cb420330bdb92189436aea7
2008-10-21 15:21:23 -07:00
Robert Sayre
dfdc67476d Bug 460333. Implement toJSON for primitive wrapper classes. r=crowder 2008-10-17 14:57:34 -04:00
Jason Orendorff
e0b7bce037 Bug 459266 - TM: Allow CALLINFO macros to specify linkage. r=brendan. 2008-10-16 14:24:10 -05:00
Jason Orendorff
a27d101dab Bug 458735 - Improve internal API for traceable natives (r=brendan, nanojit r=edwsmith) 2008-10-08 17:08:33 -05:00
Brendan Eich
5b48852abb Patch from Mike Kaplinskiy <mike.kaplinskiy@gmail.com> implementing trim, trimLeft, and trimRight (305064, r=me). 2008-09-07 10:22:41 -07:00
Arpad Borsos
9b6f558fee Bug 398946 - Remove JS_STATIC_DLL_CALLBACK and JS_DLL_CALLBACK from the tree; r=(benjamin + bent.mozilla) 2008-09-07 00:21:43 +02:00
Jim Blandy
90bf6a2d1e Bug 97954: Give jsconfig.h a better name, and make room for the new js-config.h. r=bsmedberg
We'd like the SpiderMonkey configure script to generate a header file
named js-config.h to hold #definitions chosen at configure time that
affect the SpiderMonkey API, like JS_THREADSAFE.  However, that name
is very similar to that of an existing header file, jsconfig.h.  This
patch renames the existing header file, and updates all references to
it.

--HG--
rename : js/src/jsconfig.h => js/src/jsversion.h
2008-09-05 10:19:17 -07:00
Brendan Eich
48926ba363 Fix bool FASTCALL vs. Nanojit calling convention bug, also some non-bool whoppers caught in the process (453361, r=mrbkap). 2008-09-02 15:37:22 -07:00
Andreas Gal
33c4a8e742 Merge. 2008-08-29 17:35:34 -07:00
Andreas Gal
113ad8babe Add builtins for toLowerCase, toUpperCase and replace(str,str) (452885, r=mrbkap). 2008-08-29 17:35:00 -07:00
Blake Kaplan
ee86ee3cf1 Bug 452329 - Fix a bad assumption. r=brendan 2008-08-29 16:03:18 -07:00
Brendan Eich
fd148818e1 Add split built-in, also sort knownNatives for my own sanity (should sort builtins.tbl and jsbuiltins.cpp by function while at it, but too tired). 2008-08-21 04:13:07 -07:00
shaver@mozilla.org
5d3ad68bbe merge from mozilla-central 2008-08-20 08:17:17 -07:00
Blake Kaplan
5aa5360905 bug 450529 - pass pc to String.prototype.match so we can avoid unnecessary object creation when tracing. r=brendan 2008-08-15 09:29:03 -07:00
Blake Kaplan
8440f739f0 Avoid the malloc altogether if we're going to use a unit string. 2008-08-14 15:19:57 -07:00
Blake Kaplan
e0872c3629 bug 450641 - Add missing JS_free call. 2008-08-14 15:03:08 -07:00
Brendan Eich
967ec56341 - Add String match and three replace overloadings, and allow known native matching to continue in search of exact match (not best, and not abort on first mismatch).
- Add CallGetter built-in and use it for regexp class-getter-implemented prototype properties.
- Add BUILTIN5 support (this should be "it" ;-).
2008-08-12 18:52:28 -07:00
Brendan Eich
a56862bdff Make js_ConcatStrings JS_FASTCALL and use directly as a built-in; remove gcflag param from it and from js_NewString. 2008-08-11 11:03:54 -07:00
Brendan Eich
207e579fe9 Use true and false for js_EqualString return values now that its return type is bool. 2008-08-10 23:17:28 -07:00
Brendan Eich
2991c66416 - Avoid unnecessary FASTCALL builtin wrappers for existing js_* library-private or friend functions, which could be (and now are) fastcall (JS_FASTCALL). A couple of builtins avoid name collisions by using js_Fast instead of just js_ as their name prefix.
- Use GCF_DONT_BLOCK from fastcall builtins that call into the GC allocator (mostly; a few places need help still, or better: need to avoid allocation).
- Cope with C clients of jscntxt.h and its include files (these hacks should go away).
- Naming convention and function definition line-break style nit-picks.
2008-08-10 00:39:18 -07:00
shaver@mozilla.org
c4ca6755bf Builtin for String.prototype.concat (single int-arg version) 2008-08-09 22:15:21 -04:00
Robert Sayre
c8dd484645 Bug 449978 – TM: trace some more builtins for string-validate-input 2008-08-09 21:47:52 -04:00
Brendan Eich
eaf4254c15 Merge from mozilla-central. 2008-08-08 18:58:04 -07:00
Igor Bukanov
b16852c1cd bug 412296 - removal of minarg support for fast native 2008-08-08 18:02:50 +02:00
Blake Kaplan
af92a8acda bug 450871 - Null check the right variable. r=igor 2008-08-16 18:39:28 -07:00
shaver@mozilla.org
c274666457 Refactor js_GetUnitString to permit passing in a bare jschar, and use in js_str_fromCharCode. 2008-07-31 12:21:59 -07:00
shaver@mozilla.org
b1df95f721 Trace String.fromCharCode.
Handle failure signals of < 0 or NULL from traceable natives.
2008-07-30 15:19:25 -07:00
shaver@mozilla.org
a8b963d4a4 Trace String.prototype.substring for two-arg case.
* Export str_substring as js_str_substring.
* Add basic String_p_substring builtin (only handle end > begin, both in range).
* Add String_p_substring_1 builtin for the missing-end case.
* INS_CONST for named constants in traces.
* Support boxing of strings.
* Support CALLPROP with primitive this.
* Support traceable natives which require cx and this.
* Support fallible traceable natives.
* Fix JSOP_LENGTH to use i2f on result (need that everything-is-doubles T-shirt).
* Add strings test.
2008-07-29 07:32:18 -07:00
Benjamin Smedberg
3fcc924cd2 Return to building spidermonkey as C++, because we believe we found the cause of the perf regression elsewhere (non-code).
--HG--
rename : js/src/js.c => js/src/js.cpp
rename : js/src/jsapi.c => js/src/jsapi.cpp
rename : js/src/jsarena.c => js/src/jsarena.cpp
rename : js/src/jsarray.c => js/src/jsarray.cpp
rename : js/src/jsatom.c => js/src/jsatom.cpp
rename : js/src/jsbool.c => js/src/jsbool.cpp
rename : js/src/jscntxt.c => js/src/jscntxt.cpp
rename : js/src/jscpucfg.c => js/src/jscpucfg.cpp
rename : js/src/jsdate.c => js/src/jsdate.cpp
rename : js/src/jsdbgapi.c => js/src/jsdbgapi.cpp
rename : js/src/jsdhash.c => js/src/jsdhash.cpp
rename : js/src/jsdtoa.c => js/src/jsdtoa.cpp
rename : js/src/jsemit.c => js/src/jsemit.cpp
rename : js/src/jsexn.c => js/src/jsexn.cpp
rename : js/src/jsfile.c => js/src/jsfile.cpp
rename : js/src/jsfun.c => js/src/jsfun.cpp
rename : js/src/jsgc.c => js/src/jsgc.cpp
rename : js/src/jshash.c => js/src/jshash.cpp
rename : js/src/jsinterp.c => js/src/jsinterp.cpp
rename : js/src/jsinvoke.c => js/src/jsinvoke.cpp
rename : js/src/jsiter.c => js/src/jsiter.cpp
rename : js/src/jskwgen.c => js/src/jskwgen.cpp
rename : js/src/jslock.c => js/src/jslock.cpp
rename : js/src/jslog2.c => js/src/jslog2.cpp
rename : js/src/jslong.c => js/src/jslong.cpp
rename : js/src/jsmath.c => js/src/jsmath.cpp
rename : js/src/jsnum.c => js/src/jsnum.cpp
rename : js/src/jsobj.c => js/src/jsobj.cpp
rename : js/src/jsopcode.c => js/src/jsopcode.cpp
rename : js/src/jsparse.c => js/src/jsparse.cpp
rename : js/src/jsprf.c => js/src/jsprf.cpp
rename : js/src/jsregexp.c => js/src/jsregexp.cpp
rename : js/src/jsscan.c => js/src/jsscan.cpp
rename : js/src/jsscope.c => js/src/jsscope.cpp
rename : js/src/jsscript.c => js/src/jsscript.cpp
rename : js/src/jsstr.c => js/src/jsstr.cpp
rename : js/src/jsutil.c => js/src/jsutil.cpp
rename : js/src/jsxdrapi.c => js/src/jsxdrapi.cpp
rename : js/src/jsxml.c => js/src/jsxml.cpp
rename : js/src/prmjtime.c => js/src/prmjtime.cpp
2008-05-27 16:58:12 -04:00
Benjamin Smedberg
71997df754 Back out revision bd9c9cbf9ec8 (build spidermonkey as C++) for perftesting and profit.
--HG--
rename : js/src/js.cpp => js/src/js.c
rename : js/src/jsapi.cpp => js/src/jsapi.c
rename : js/src/jsarena.cpp => js/src/jsarena.c
rename : js/src/jsarray.cpp => js/src/jsarray.c
rename : js/src/jsatom.cpp => js/src/jsatom.c
rename : js/src/jsbool.cpp => js/src/jsbool.c
rename : js/src/jscntxt.cpp => js/src/jscntxt.c
rename : js/src/jscpucfg.cpp => js/src/jscpucfg.c
rename : js/src/jsdate.cpp => js/src/jsdate.c
rename : js/src/jsdbgapi.cpp => js/src/jsdbgapi.c
rename : js/src/jsdhash.cpp => js/src/jsdhash.c
rename : js/src/jsdtoa.cpp => js/src/jsdtoa.c
rename : js/src/jsemit.cpp => js/src/jsemit.c
rename : js/src/jsexn.cpp => js/src/jsexn.c
rename : js/src/jsfile.cpp => js/src/jsfile.c
rename : js/src/jsfun.cpp => js/src/jsfun.c
rename : js/src/jsgc.cpp => js/src/jsgc.c
rename : js/src/jshash.cpp => js/src/jshash.c
rename : js/src/jsinterp.cpp => js/src/jsinterp.c
rename : js/src/jsiter.cpp => js/src/jsiter.c
rename : js/src/jskwgen.cpp => js/src/jskwgen.c
rename : js/src/jslock.cpp => js/src/jslock.c
rename : js/src/jslog2.cpp => js/src/jslog2.c
rename : js/src/jslong.cpp => js/src/jslong.c
rename : js/src/jsmath.cpp => js/src/jsmath.c
rename : js/src/jsnum.cpp => js/src/jsnum.c
rename : js/src/jsobj.cpp => js/src/jsobj.c
rename : js/src/jsopcode.cpp => js/src/jsopcode.c
rename : js/src/jsparse.cpp => js/src/jsparse.c
rename : js/src/jsprf.cpp => js/src/jsprf.c
rename : js/src/jsregexp.cpp => js/src/jsregexp.c
rename : js/src/jsscan.cpp => js/src/jsscan.c
rename : js/src/jsscope.cpp => js/src/jsscope.c
rename : js/src/jsscript.cpp => js/src/jsscript.c
rename : js/src/jsstr.cpp => js/src/jsstr.c
rename : js/src/jsutil.cpp => js/src/jsutil.c
rename : js/src/jsxdrapi.cpp => js/src/jsxdrapi.c
rename : js/src/jsxml.cpp => js/src/jsxml.c
rename : js/src/prmjtime.cpp => js/src/prmjtime.c
2008-05-27 12:19:17 -04:00
Benjamin Smedberg
160d9d1766 Merge cvs-trunk-mirror to mozilla-central. Automated merge, no manual conflict resolution necessary.
--HG--
rename : js/src/jsapi.c => js/src/jsapi.cpp
rename : js/src/jsarray.c => js/src/jsarray.cpp
rename : js/src/jsdbgapi.c => js/src/jsdbgapi.cpp
rename : js/src/jsfun.c => js/src/jsfun.cpp
rename : js/src/jsinterp.c => js/src/jsinterp.cpp
rename : js/src/jslong.c => js/src/jslong.cpp
rename : js/src/jsobj.c => js/src/jsobj.cpp
rename : js/src/jsopcode.c => js/src/jsopcode.cpp
rename : js/src/jsparse.c => js/src/jsparse.cpp
rename : js/src/jsregexp.c => js/src/jsregexp.cpp
rename : js/src/jsscope.c => js/src/jsscope.cpp
rename : js/src/jsstr.c => js/src/jsstr.cpp
rename : js/src/prmjtime.c => js/src/prmjtime.cpp
2008-04-29 10:20:07 -04:00
Benjamin Smedberg
300dc2107c Merge cvs-trunk-mirror -> mozilla-central. There's a C++ bug in js/src/jsinterp.cpp that I am going to file upstream.
--HG--
rename : js/src/js.c => js/src/js.cpp
rename : js/src/jsapi.c => js/src/jsapi.cpp
rename : js/src/jscntxt.c => js/src/jscntxt.cpp
rename : js/src/jsdbgapi.c => js/src/jsdbgapi.cpp
rename : js/src/jsexn.c => js/src/jsexn.cpp
rename : js/src/jsfun.c => js/src/jsfun.cpp
rename : js/src/jsgc.c => js/src/jsgc.cpp
rename : js/src/jsinterp.c => js/src/jsinterp.cpp
rename : js/src/jsiter.c => js/src/jsiter.cpp
rename : js/src/jsobj.c => js/src/jsobj.cpp
rename : js/src/jsopcode.c => js/src/jsopcode.cpp
rename : js/src/jsregexp.c => js/src/jsregexp.cpp
rename : js/src/jsstr.c => js/src/jsstr.cpp
rename : js/src/jsxml.c => js/src/jsxml.cpp
2008-03-20 12:42:05 -04:00
benjamin@smedbergs.us
0a29c83b00 Merge cvs-trunk-mirror -> mozilla-central to pick up the 421274 backout especially
--HG--
rename : js/src/js.c => js/src/js.cpp
rename : js/src/jsapi.c => js/src/jsapi.cpp
rename : js/src/jscntxt.c => js/src/jscntxt.cpp
rename : js/src/jsdbgapi.c => js/src/jsdbgapi.cpp
rename : js/src/jsexn.c => js/src/jsexn.cpp
rename : js/src/jsfun.c => js/src/jsfun.cpp
rename : js/src/jsgc.c => js/src/jsgc.cpp
rename : js/src/jsinterp.c => js/src/jsinterp.cpp
rename : js/src/jsiter.c => js/src/jsiter.cpp
rename : js/src/jsobj.c => js/src/jsobj.cpp
rename : js/src/jsopcode.c => js/src/jsopcode.cpp
rename : js/src/jsstr.c => js/src/jsstr.cpp
rename : js/src/jsxml.c => js/src/jsxml.cpp
2008-03-13 15:26:42 -04:00