Paul O'Shannessy
c6e3f311c7
Bug 650931 - No API to determine if a JSObject is a RegExp. r=gal
2011-05-17 20:04:28 -07:00
Chris Leary
a7253cc393
Bug 654301: Better interned string API, take 2. (r=Waldo)
2011-05-17 12:15:12 -07:00
Brian Hackett
68b35100e1
Merge TM -> JM
2011-04-19 08:23:41 -07:00
Jason Orendorff
5e2c73b316
Add rudimentary support for Debug.prototype.hooks.debuggerHandler. Note: A new constant JSPROP_NATIVE_ACCESSOR is added in jsapi.h, so that js_InitClass can create proper accessor properties.
2011-04-18 17:42:07 -05:00
Jeff Walden
a8a0234d77
Bug 641655 - Add a js::GlobalObject subtype of JSObject. r=njn
2011-04-18 16:50:47 -04:00
Jeff Walden
77e6fd7646
Backed out changeset c8ba5bd72b0c, we have too many test harnesses and I forgot to run one. r=tree-decorator
2011-04-21 16:29:54 -04:00
Jeff Walden
f7e9104cd4
Bug 641655 - Add a js::GlobalObject subtype of JSObject. r=njn
2011-04-18 16:50:47 -04:00
Luke Wagner
6e9ef90124
Bug 651041 - add API to store private data to an external string (r=njn)
2011-04-20 18:34:49 -07:00
Brian Hackett
012e3b1119
Merge TM -> JM
2011-04-08 19:27:14 -07:00
Bill McCloskey
4a9bde3182
Bug 648647 - Eliminate JSObjectMap (r=jorendorff)
2011-04-08 14:21:08 -07:00
Brian Hackett
8b7888dd66
Merge TM -> JM
2011-04-01 19:57:28 -07:00
Colin Walters
2a0395d63b
Bug 648102 - Make shell REPL/snarf/run always take UTF-8 input; add JS_DecodeUTF8; add UTF-8 flag to JS_BufferIsCompilableUnit. r=gal
2011-04-16 14:11:10 -04:00
Steve Fink
e760bcc0f4
Bug 637393 - Add an option to count number of executions of each JSOp, broken down by "run mode" (method JIT/trace JIT/interpreter)
...
--HG--
extra : rebase_source : ba9a916197f8c2e449b3096f1c31fe2b154feef4
2011-05-10 11:26:39 -07:00
Luke Wagner
0d7bf8cc22
Bug 656462, part 4 - Simplify stack code, keep track of native calls, create new iterator over native/scripted callstack, make JS_SaveFrameChain fallible (r=waldo,mrbkap)
...
--HG--
extra : rebase_source : 756a640568464d11fe6bb00104a2fdb6f6d02d02
2011-05-13 08:56:26 -07:00
Paul Biggar
43b850291d
Bug 643548: Remove mozalloc_undef_macro_wrappers hack from JS engine. (r=luke,rs=brendan)
...
mozalloc_undef_macro_wrappers are brittle and have side-effects that are hard
to debug and fix. The alternative is the just stick an underscore on the end of
malloc, free, etc, which is a comparatively small burden.
2011-03-31 01:14:12 -07:00
Paul Biggar
72c7701093
Bug 634155: Account for NewCompartment's memory, and change allocation APIs (r=nnethercote)
...
This changes the allocation API, in the following way:
js_malloc -> {cx->,rt->,OffTheBooks::}malloc
js_calloc -> {cx->,rt->,OffTheBooks::}calloc
js_realloc -> {cx->,rt->,OffTheBooks::}realloc
js_free -> {cx->,rt->,Foreground::,UnwantedForeground::}free
js_new -> {cx->,rt->,OffTheBooks::}new_
js_new_array -> {cx->,rt->,OffTheBooks::}new_array
js_delete -> {cx->,rt->,Foreground::,UnwantedForeground::}delete_
This is to move as many allocations as possible through a JSContext (so that they may be aken into account by gcMallocBytes) and to move as many deallocations to the background as possible (except on error paths).
2011-03-31 01:13:49 -07:00
Dave Herman
324dbe8390
Bug 590973 - Reflect.parse(): expose to chrome as a toolkit component (r=gal)
2011-06-28 10:57:16 -07:00
Jeff Walden
1a51bb7cb1
Bug 645922 - Remove nsIJSON.encode/decode, because their functionality is subsumed by JSON.parse and JSON.stringify, and their idiosyncrasies are hindering code improvements. Also remove js_TryJSON and JS_TryJSON, which are no longer used after these changes and have no clear use cases. r=brendan, r=jst
2011-03-28 19:27:15 -07:00
Jeff Walden
0a61156473
Bug 665835 - Remove JSOPTION_ANONFUNFIX. r=cdleary
...
--HG--
rename : js/src/tests/js1_5/extensions/regress-376052.js => js/src/tests/ecma_5/misc/unnamed-function.js
2011-06-21 09:53:19 -07:00
Brian Hackett
d737bb3ddb
Merge TM -> JM
2011-03-22 18:07:31 -07:00
Jeff Walden
d3676c4409
Bug 649819 - Remove JS_BeginJSONParse/JS_ConsumeJSONText/JS_EndJSONParse now that these APIs are no longer used and the cleaner API is available and works. r=brendan
2011-03-21 11:42:14 -07:00
Gregor Wagner
99a0150f57
Bug 627200 - Background Finalization for Strings and Objects r=gal
2011-04-13 13:43:33 -07:00
Luke Wagner
64207228c7
Bug 602994 - Clean up eval, remove unneeded security checks, assert equivalence of principal lookup (r=waldo,mrbkap)
2011-04-08 10:52:51 -07:00
Chris Leary
2ef1aa6439
Bug 642274: Add loose equality to JSAPI. (r=Waldo)
...
--HG--
extra : rebase_source : 3001604e6e6bfc9c8e73aafc1498a71ae7ade9cd
2011-03-21 10:04:43 -07:00
Andreas Gal
707f928b25
Expose public APIs for converting doubles to signed/unsigned int per ECMA spec (bug 631132, r=bzbarsky).
2011-03-29 19:19:15 -07:00
Brian Hackett
d639ada378
Merge TM -> JM
2011-03-09 09:58:49 -08:00
Brian Hackett
666b5642e8
[INFER] Turn inference on by default, fold JS_DefinePropertyWithType into JS_DefineProperty, bug 619693.
2011-03-06 22:57:13 -08:00
Brian Hackett
41091b1bb6
[INFER] Fix OOM handling in type inference, convert inference to runtime option, bug 637674.
2011-03-03 14:07:48 -08:00
Brian Hackett
0a2cdd3c56
Merge TM -> JM
2011-02-25 18:21:43 +13:00
Jeff Walden
fc5075d1f7
Bug 608473 - |var eval = otherWindow.eval; eval(...)| should behave like indirectly calling that eval from a script in that other window. r=jorendorff
...
--HG--
extra : rebase_source : 9accca7e9a2b8304c2c823852cfd71b13c595afe
2011-03-02 20:56:37 -08:00
Andreas Gal
9a7cc712a8
When idle the GC holds on to unused chunks indefinitely (bug 631733, r=brendan, a=blocker). (relanding in a CLOSED TREE)
2011-02-19 22:59:49 -08:00
Jeff Walden
b80782b484
Bug 643532 - Implement JS_ParseJSON and JS_ParseJSONWithReviver, a first step toward moving away from a begin-consume-finish-based JSON parsing process. r=luke
2011-03-21 11:42:06 -07:00
Jeff Walden
1e41f95c6d
#jsapi observed the extent of orange in the TM tree and saw that OS X x86 opt was consistently and totally evil. So jwalden was sorry he had ever pushed changes for bug 631135. It broke his heart. And he said, “I will wipe this tree of every push back to 9105cd721d46. Yes, and I will revert the entire TM CLOSED TREE. I am sorry I ever pushed to it.” But 9105cd721d46 found favor with #jsapi.
2011-02-20 17:46:35 -08:00
Andreas Gal
faec8b99c2
When idle the GC holds on to unused chunks indefinitely (bug 631733, r=brendan, a=blocker).
2011-02-19 22:59:49 -08:00
Jeff Walden
7ce51759aa
Backed out changeset 4d86e63ff60d, diagnostic patch; back out 3da12edf735e, followup fix; back out bug 631135 completely, unexplained intermittent orange.
...
--HG--
extra : rebase_source : e2e56a78bc0eea0d6e005bc976c74b33d8c22281
2011-02-19 19:50:19 -08:00
Andreas Gal
532405b940
Remove ObjectOps trace hook (bug 639227, r=dvander).
2011-03-06 22:31:43 -08:00
Andreas Gal
831efbf9e8
Backout bug 639227 due to orange.
2011-03-06 21:37:13 -08:00
Andreas Gal
52c4d6513a
Remove ObjectOps trace hook (bug 639227, r=dvander).
2011-03-06 20:49:54 -08:00
Andreas Gal
f5b9aeb7d0
Remove obsolete JSMarkOp API (bug 638291, r=jorendorff).
2011-03-05 14:50:11 -08:00
Jeff Walden
e604ceddc7
Bug 631135 - Objects created by or on behalf of fast natives and property ops (getters or setters) are parented to the wrong proto and global. r=lw,jst,mrbkap,bz, a=jst
2011-02-08 17:20:06 -08:00
Chris Leary
a718b751ed
Merge tracemonkey to mozilla-central. (a=blockers)
2011-02-15 12:05:57 -08:00
Andreas Gal
408f957e8a
js_UnbrandAndClearSlots leaks, use JS_ClearScope and throw if compile-N-go scripts are run after JS_ClearScope (630072, r=brendan, a=blocker).
2011-02-13 20:55:33 -08:00
Andreas Gal
5d4e5b427f
js_UnbrandAndClearSlots leaks, use JS_ClearScope and throw if compile-N-go scripts are run after JS_ClearScope (630072, r=brendan).
2011-02-13 20:55:33 -08:00
Bill McCloskey
42e73fa7bc
Bug 631951 - Shrink methodjit memory usage by interpreting a few times before compiling (r=dvander)
2011-02-11 16:31:32 -08:00
Jim Blandy
de75b9fa19
Bug 537873: Add a 'strict' argument to C++ property setter functions. r=brendan
...
This changes the type of setters to JSStrictPropertyOp, which is just like
JSPropertyOp except that it takes a 'JSBool strict' argument. Most of the
patch is introducing distinct types and using the appropriate stubs.
The following are left for subsequent patches:
x Similar fixes to the browser outside SpiderMonkey.
x Actually *using* the newly available strictness information. This patch
should have no user-visible effect. I didn't want the interesting stuff
to get lost in this noise.
2011-02-09 11:31:40 -08:00
Johnny Stenback
6b87b64c44
Backed out changeset 3fb25cc2c040 due to orange.
2011-02-11 18:04:09 -08:00
Andreas Gal
cabd660fbb
Bug 630072. Fix issue with wrappers holding objects from old scopes alive. r=mrbkap@gmail.com, a=blocker
2011-02-11 16:36:48 -08:00
Blake Kaplan
ec5802cfe2
Fixing bug 623810. r=jst@mozilla.org, gal@uci.edu, a=blocker.
2011-02-11 16:17:25 -08:00
Mike Hommey
2ec52f1e18
Backed out changeset d4c0875dc41a -- tinderbox build bustage
2011-03-21 18:31:02 +01:00
Chris Leary
1ef870e8d1
Bug 642274: Add loose equality to JSAPI. (r=Waldo)
2011-03-21 10:04:43 -07:00
Luke Wagner
0db79e7ad5
Bug 640274 - rm {JS_,js_,}GetExternalStringGCType (r=brendan)
...
--HG--
extra : rebase_source : 1a2b1df8c7ed9cdbf0455e6e8c117382cb1fb2bb
2011-03-14 13:55:43 -07:00
Jeff Walden
2db290c32a
Bug 638312 - Add JS_IsBuiltinEvalFunction and JS_IsBuiltinFunctionConstructor APIs. r=gal
2011-03-02 19:57:44 -08:00
Brian Hackett
b5bb63ceba
[INFER] Decouple type sets computed by inference from analysis information, store in new TypeScript struct, bug 621301.
2010-12-28 14:53:50 -05:00
Brian Hackett
89bb1d08e8
Merge TM -> JM
2010-12-20 09:06:43 -08:00
Brian Hackett
baf09eaede
[INFER] Objects with same shape have same type, objects with same type have same prototype, bug 619271.
2010-12-18 20:44:51 -08:00
Jeff Walden
1ae34fd49a
Bug 676738 - Change the index argument to JS_SetElement from jsint to uint32. r=dmandelin
2011-08-04 19:39:13 -07:00
Jeff Walden
8f924181c5
Bug 676738 - Change the index argument to JS_GetElement from jsint to uint32. r=dmandelin
2011-08-04 19:39:13 -07:00
Jeff Walden
f53d559cbd
Bug 676738 - Change the index argument to JS_DeleteElement and JS_DeleteElement2 from jsint to uint32. r=dmandelin
...
--HG--
extra : rebase_source : 7ee32857d1bd9d85d34f25d3bba4a3bdee2511e1
2011-08-04 19:39:13 -07:00
Jeff Walden
af610c6a19
Bug 676738 - Change the index argument to JS_LookupElement from jsint to uint32. r=dmandelin
...
--HG--
extra : rebase_source : d96c6791e9e4c05ea8590f349bee17b34cb5d866
2011-08-04 19:39:13 -07:00
Jeff Walden
471f61bdd4
Bug 676738 - Change the index argument to JS_HasElement from jsint to uint32. r=dmandelin
...
--HG--
extra : rebase_source : 20e35753ef5af787d1755ab8c1b68d5b7a43cce1
2011-08-04 19:39:13 -07:00
Jeff Walden
893e6045a7
Bug 676738 - Change the index argument to JS_AlreadyHasOwnElement from jsint to uint32. r=dmandelin
...
--HG--
extra : rebase_source : bcf36100f148d7323034fd3a5ac675561788fb7d
2011-08-04 19:39:13 -07:00
Jeff Walden
49d1d5ab36
Bug 676738 - Change the index argument to JS_DefineElement from jsint to uint32. r=jst, r=dmandelin
...
--HG--
extra : rebase_source : d0e3be27e3f0cf022eea21805923c2f4736a36ca
2011-08-04 19:39:12 -07:00
Jeff Walden
257c90c2ca
Bug 576034 - Remove aliased properties APIs. r=jorendorff
...
--HG--
extra : rebase_source : 09c9947953d6ae6d2f359e1cfedde0ea09c338ab
2011-08-04 14:38:00 -07:00
Jim Blandy
32f475624f
Bug 672736: Implement the 'findReferences' shell function. r=jorendorff
...
findReferences(thing)
Walk the entire heap, looking for references to |thing|, and return a
"references object" describing what we found.
Each property of the references object describes one kind of reference. The
property's name is the label supplied to MarkObject, JS_CALL_TRACER, or what
have you, prefixed with "edge: " to avoid collisions with system properties
(like "toString" and "__proto__"). The property's value is an array of things
that refer to |thing| via that kind of reference. Ordinary references from
one object to another are named after the property name (with the "edge: "
prefix).
Garbage collection roots appear as references from 'null'. We use the name
given to the root (with the "edge: " prefix) as the name of the reference.
Note that the references object does record references from objects that are
only reachable via |thing| itself, not just the references reachable
themselves from roots that keep |thing| from being collected. (We could make
this distinction if it is useful.)
If any references are found by the conservative scanner, the references
object will have a property named "edge: machine stack"; the referrers will
be 'null', because they are roots.
js> var o = { x: { y: { z: {} } }}
js> findReferences(o.x.y.z)
({'edge: z':[{z:{}}], 'edge: machine stack':[null, null, null, null, null]})
js> o = { get x() { return 42 } }
({get x () {return 42;}})
js> findReferences(Object.getOwnPropertyDescriptor(o, 'x').get)
({'edge: shape; x getter':[{get x () {return 42;}}],
'edge: constructor':[{}],
'edge: machine stack':[null, null, null, null, null],
'edge: get':[{configurable:true,
enumerable:true,
get:#1=(function () {return 42;}),
set:(void 0)}]})
js> findReferences(Math.atan2)
({'edge: atan2':[Math], 'edge: machine stack':[null, null, null, null, null]})
js> findReferences(o)
({'edge: o':[{o:{get x () {return 42;}}}], 'edge: machine stack':[null, null, null, null, null]})
js>
2011-08-03 20:19:38 -07:00
Igor Bukanov
d05c6783df
bug 674480 - add memory reporter for the number of empty GC chunks. r=njn
2011-07-30 00:17:41 +02:00
Brian Hackett
accdca294b
Merge TM -> JM
2010-12-07 17:11:37 -08:00
Luke Wagner
2fc61cf52e
Bug 609440, part 3 - remove fallible public APIs, update mozilla (r=bent,jst,mrbkap,waldo,sdwilsh)
2010-12-03 00:24:17 -08:00
Andrew Drake
d2355b6bb9
Bug 617870, rest of bug 609141 - Cross-compartment calls for JSD, add JSScript* option for JS_EnterCrossCompartmentCall. r=jorendorff
...
--HG--
extra : rebase_source : bc60e91a6804470e28038cc62e60eca16710776c
2010-12-14 13:24:00 -08:00
Brian Hackett
002fd1a589
Merge TM -> JM
2010-11-30 09:04:25 -08:00
Igor Bukanov
933918e6f4
Bug 614578 - Removal of nsAutoGCRoot. r=mrbkap
2010-11-26 15:11:14 +01:00
Brian Hackett
abc31759f4
[INFER] Overhaul handling of prototypes in type inference, bug 557407.
2010-11-24 20:41:52 -05:00
Igor Bukanov
3717953163
Bug 612150 - Eliminating JS_GetFunctionName. r=mrbkap
2010-11-24 17:56:43 +01:00
Robert Sayre
2639d2cb2f
Merge mozilla-central to tracemonkey.
2010-11-24 14:00:42 -08:00
Jason Orendorff
b4b193de22
Bug 613068 - Add version argument to JS_ReadStructuredClone. r=bent.
2010-11-24 14:14:02 -06:00
Brian Hackett
ee3f068ff9
Merge TM -> JM
2010-11-18 21:09:24 -08:00
Blake Kaplan
6deeefba3d
bug 601803 - Support adopting a node cross-compartment. r=gal/jst
2010-11-15 17:21:25 -08:00
Blake Kaplan
bd44733edc
Backout due to bustage
2010-12-02 17:13:20 -08:00
Blake Kaplan
439ca83a7b
bug 601803 - Support adopting a node cross-compartment. r=gal/jst
2010-11-15 17:21:25 -08:00
Brian Hackett
e225da4233
Merge TM -> JM.
2010-11-12 09:02:43 -08:00
David Anderson
7487c14d37
Backed out changeset 8e119f847f97 (build busted)
2010-11-11 11:19:42 -08:00
Igor Bukanov
e32ba97023
bug 610198 - Replacing JS_GetStringBytes usage with JS_EncodeString. r=gal
2010-11-02 15:36:25 +01:00
David Mandelin
ac0db7fadd
Bug 610480 nit fix: use old-style comments in jsapi.h
2010-11-10 16:59:35 -08:00
David Mandelin
e5b3e6621e
Bug 610480: fix some MSVC warnings, r=jwalden
2010-11-10 16:46:33 -08:00
Brian Hackett
d0775091ec
Merge TM -> JM
2010-11-01 15:37:33 -07:00
Brian Hackett
696cff5132
[INFER] Javascript type inference, bug 557407.
2010-10-29 08:05:55 -07:00
Blake Kaplan
4cc16a6dd2
Bug 607174 - Add assertions to jsdbgapi.cpp and enter compartments where it isn't possible for the caller to do so. landing with r=gal, a=beta7+
2010-10-26 19:48:51 -07:00
Blake Kaplan
f4cc477379
Bug 607174 - Add assertions to jsdbgapi.cpp and enter compartments where it isn't possible for the caller to do so. landing with r=gal
...
--HG--
extra : rebase_source : f0e69380a0ef144e07af7d75b859712fe67bb753
2010-10-26 19:48:51 -07:00
David Mandelin
61c89f1888
Backout merge, a=backing out changeset tried for b7 blocker
2010-10-26 18:20:20 -07:00
David Mandelin
5aa436fc27
Backed out changeset 8dd996c91f40 -- it doesn't fix the problem, but does make it harder to analyze.
2010-10-26 18:14:25 -07:00
Robert Sayre
7ce5faeded
Merge mozilla-central to tracemonkey.
2010-10-26 14:16:43 -04:00
David Mandelin
a4768a8a4b
Bug 604756 first try: restrict ropes optimization to main-thread content JS, r=lw, a=b7-blocker
2010-10-25 17:28:18 -07:00
Andreas Gal
4ef624448b
Don't wrap StopIteration singleton, just translate it to the current global's StopIteration object and freeze StopIteration at birth (606573, r=mrbkap).
2010-10-23 16:24:32 -07:00
Bill McCloskey
58582215b9
Bug 580468 - Use loop profiling to decide whether to use TM or JM (second try) (r=dmandelin)
2010-10-21 09:36:39 -07:00
Bill McCloskey
507ea140a2
Backed out changeset 55597c32701d
2010-10-19 17:40:53 -07:00
Bill McCloskey
7583dc9166
Bug 580468 - Use loop profiling to decide whether to use TM or JM (r=dmandelin)
2010-10-19 16:23:05 -07:00
Dave Herman
7488e1af91
bug 594060, r=cdleary: Reflect.parse(): make source location information optional
2010-10-19 09:00:51 -07:00
Jason Orendorff
fd0c6b2d5c
Bug 604087 - Minor tweaks to JS_TransplantWrapper and JSAutoEnterCompartment. r=mrbkap
2010-10-13 17:26:40 -07:00
Jim Blandy
713b25831a
Bug 601168: Allow nsHTMLPluginObjElementSH::Call to pass through non-Object |this| values to the plugin. r=bz,gal
...
This introduces some new JSAPI C++ entry points, one of which allows
arbitrary jsvals to be passed as the |this| value to a call; this means we
avoid a JSVAL_TO_OBJECT call in the caller, and its corresponding
OBJECT_TO_JSVAL call in the callee.
2010-10-12 11:50:03 -07:00
Jeff Walden
4626f47ec6
Bug 514570 - 3 - Don't box |this| for strict mode functions. r=jorendorff
2010-10-12 11:50:03 -07:00
Jeff Walden
fcbd8eb10b
Bug 514570 - 1 - Convert primitive-this-of-type function flags into a single primitive-this flag, to pave way for strict mode unadulterated-this passing. r=jorendorff
2010-10-12 11:50:02 -07:00