95 Commits

Author SHA1 Message Date
igor.bukanov%gmail.com
982c96df91 Bug 348810: Removal of a broken optimization in array_sort that was supposed to shrink the temporary array when there are holes in the array. VM games are off for now. r=mrbkap
git-svn-id: svn://10.0.0.236/trunk@207622 18797224-902f-48f8-a5cc-f745e15eee43
2006-08-16 19:39:38 +00:00
igor.bukanov%gmail.com
9d6ab15e7d Bug 322135: Optimizing large index access for array elements to prevent out-of-memory when calling Array functions for huge sparse arrays. r=mrbkap sr=brendan
git-svn-id: svn://10.0.0.236/trunk@207213 18797224-902f-48f8-a5cc-f745e15eee43
2006-08-12 08:41:54 +00:00
dbaron%dbaron.org
7bb7b45abd Backing out Igor's checkin for bug 322135 to fix orange.
git-svn-id: svn://10.0.0.236/trunk@206948 18797224-902f-48f8-a5cc-f745e15eee43
2006-08-08 23:52:08 +00:00
igor.bukanov%gmail.com
87cc572a63 Bug 322135: Optimizing large index access for array elements to prevent out-of-memory when calling Array functions for huge sparse arrays. r=mrbkap sr=brendan
git-svn-id: svn://10.0.0.236/trunk@206932 18797224-902f-48f8-a5cc-f745e15eee43
2006-08-08 20:25:30 +00:00
igor.bukanov%gmail.com
b5b023697b Bug 345967: ensure proper id rooting in array_unshift. r=mrbkap,sr=brendan
git-svn-id: svn://10.0.0.236/trunk@203767 18797224-902f-48f8-a5cc-f745e15eee43
2006-07-26 21:32:56 +00:00
igor.bukanov%gmail.com
8f9ab70f07 Bug 322135: the length setter for array tries to detect a sparse array and enumerate over properties to remove elements beyond the array length. r=mrbkap,sr=brendan
git-svn-id: svn://10.0.0.236/trunk@201432 18797224-902f-48f8-a5cc-f745e15eee43
2006-07-01 19:58:44 +00:00
igor.bukanov%gmail.com
5ad881810f Bug 343228: Fixing array_sort to always free the temporary array. r=mrbkap
git-svn-id: svn://10.0.0.236/trunk@201431 18797224-902f-48f8-a5cc-f745e15eee43
2006-07-01 19:52:32 +00:00
igor.bukanov%gmail.com
d5de15367c Bug 341956: Reorder id allocation to avoid delays with their access. r=mrbkap,sr=brendan
git-svn-id: svn://10.0.0.236/trunk@201428 18797224-902f-48f8-a5cc-f745e15eee43
2006-07-01 19:29:34 +00:00
brendan%mozilla.org
daace8aae1 White space police state attack.
git-svn-id: svn://10.0.0.236/trunk@200371 18797224-902f-48f8-a5cc-f745e15eee43
2006-06-19 23:38:02 +00:00
mrbkap%gmail.com
c03fb6d48f Add some sanity checks. bug 336410, r=igor
git-svn-id: svn://10.0.0.236/trunk@199942 18797224-902f-48f8-a5cc-f745e15eee43
2006-06-15 03:26:24 +00:00
mrbkap%gmail.com
905783ac6f Expand the checks to more cases. bug 336601, r+a181=brendan a=dveditz
git-svn-id: svn://10.0.0.236/trunk@196064 18797224-902f-48f8-a5cc-f745e15eee43
2006-05-05 23:18:13 +00:00
mrbkap%gmail.com
90fc029669 Create a safe version of js_ComputeThis that does access checks up the scope chain and bails if there's a failure. Use js_SafeComputeThis in places where its needed. bug 319263, r+a181=brendan
git-svn-id: svn://10.0.0.236/trunk@195953 18797224-902f-48f8-a5cc-f745e15eee43
2006-05-04 06:46:47 +00:00
brendan%mozilla.org
a2bd551b57 Fixed another JSVERSION_1_2 removal botch that broke splice (325951 regression, but see 326466 for the report).
git-svn-id: svn://10.0.0.236/trunk@195617 18797224-902f-48f8-a5cc-f745e15eee43
2006-04-28 00:20:44 +00:00
brendan%mozilla.org
dc577b6522 Prep patch for iterators and generators (326466, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@195494 18797224-902f-48f8-a5cc-f745e15eee43
2006-04-27 00:39:43 +00:00
brendan%mozilla.org
aedfa6257b Major simplification to jsconfig.h, dropping support for all ancient bug config and almost all pre-ECMA-Edition-3 feature config (325951, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@195469 18797224-902f-48f8-a5cc-f745e15eee43
2006-04-26 21:33:01 +00:00
brendan%mozilla.org
d5fb083e40 Second half of fix for 304376 (r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@194732 18797224-902f-48f8-a5cc-f745e15eee43
2006-04-19 23:36:16 +00:00
igor%mir2.org
e47c93f9d1 Bug 330951: Patch from Pawel Chmielowski to fix a regression that I introduced in bug 311515.
git-svn-id: svn://10.0.0.236/trunk@192598 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-18 23:36:04 +00:00
igor%mir2.org
92a71cf335 Bug 330812: In array_sort clear only those elements of temporary vector that
would be included in the rooted set. It provides better performance for huge
mostly spare arrays. r=mrbkap


git-svn-id: svn://10.0.0.236/trunk@192564 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-17 22:09:46 +00:00
igor%mir2.org
145fa0f08f Bug 311515: Fixing misspellings in comments from the previous commit.
git-svn-id: svn://10.0.0.236/trunk@192468 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-16 08:04:28 +00:00
igor%mir2.org
cef29f7794 Bug 311515: array_sort sorts undefined value and holes via counting them as according to the Ecma standard holes are bigger then undefined values which are bigger then anything else. This allows to simplify sort_compare and shrink jsarray.c code while making sorting of spare arrays faster. r=mrbkap
git-svn-id: svn://10.0.0.236/trunk@192443 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-15 20:49:09 +00:00
igor%mir2.org
4de9edf6d3 Bug 328556: Proper accounting for growth in array_join_sub when reallocating
chars array. r=mrbkap


git-svn-id: svn://10.0.0.236/trunk@191313 18797224-902f-48f8-a5cc-f745e15eee43
2006-02-27 17:32:22 +00:00
mrbkap%gmail.com
c3a1c3b902 Clean up a bracing nitpick.
git-svn-id: svn://10.0.0.236/trunk@191207 18797224-902f-48f8-a5cc-f745e15eee43
2006-02-24 22:12:32 +00:00
brendan%mozilla.org
925666fde8 Fix typo in enum tag.
git-svn-id: svn://10.0.0.236/trunk@187313 18797224-902f-48f8-a5cc-f745e15eee43
2006-01-11 05:18:30 +00:00
brendan%mozilla.org
834e997e9f Fix uninitialized variable use in an assertion (311583, r=igor).
git-svn-id: svn://10.0.0.236/trunk@185772 18797224-902f-48f8-a5cc-f745e15eee43
2005-12-07 22:42:06 +00:00
igor%mir2.org
957a3cea91 Fix for bug 311583:
Not uneval(array) uses elision, not undefined, to represent array holes.
r=brendan


git-svn-id: svn://10.0.0.236/trunk@185000 18797224-902f-48f8-a5cc-f745e15eee43
2005-11-20 01:12:58 +00:00
igor%mir2.org
d3ea2b8636 Fix for bug 312138:
js_HeapSort terminates as soon as sort function indicates so. r=brendan


git-svn-id: svn://10.0.0.236/trunk@184755 18797224-902f-48f8-a5cc-f745e15eee43
2005-11-16 10:02:57 +00:00
mrbkap%gmail.com
c60f27b3b2 bug 315509: array_unshift doesn't deal with holes in the array correctly. Patch from moz_bug_r_a4@yahoo.com. r=mrbkap
git-svn-id: svn://10.0.0.236/trunk@184315 18797224-902f-48f8-a5cc-f745e15eee43
2005-11-08 20:58:28 +00:00
brendan%mozilla.org
7ec4f2879d Use explicit local roots in native methods (313763, r/sr=igor/shaver).
git-svn-id: svn://10.0.0.236/trunk@183301 18797224-902f-48f8-a5cc-f745e15eee43
2005-11-01 01:13:36 +00:00
brendan%mozilla.org
51cd768e5c Consolidate and check fun->object access (313685, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@182955 18797224-902f-48f8-a5cc-f745e15eee43
2005-10-25 08:00:30 +00:00
brendan%mozilla.org
256e50f2af Use local roots effectively (312278, r=igor).
git-svn-id: svn://10.0.0.236/trunk@182604 18797224-902f-48f8-a5cc-f745e15eee43
2005-10-20 18:58:24 +00:00
igor%mir2.org
1bdf5786e1 Fixing bug 312069:
My previous patch to avoid memory allocation for pivot in HeapSort did not deal properly with checking for overflow. So here is a proper version.


git-svn-id: svn://10.0.0.236/trunk@182072 18797224-902f-48f8-a5cc-f745e15eee43
2005-10-12 07:39:45 +00:00
mrbkap%gmail.com
0ca4fc8104 bug 311792: Make sure that temporary values are protected from GC. Patch from Igor Bukanov <igor.bukanov@gmail.com>. r=mrbkap/brendan
git-svn-id: svn://10.0.0.236/trunk@181943 18797224-902f-48f8-a5cc-f745e15eee43
2005-10-10 23:33:16 +00:00
brendan%mozilla.org
d30c3db22a Fix 310425 (r=mrbkap) and check in Igor's fix for 311497 (r=me).
git-svn-id: svn://10.0.0.236/trunk@181834 18797224-902f-48f8-a5cc-f745e15eee43
2005-10-09 06:09:21 +00:00
brendan%mozilla.org
317f495094 Patch by Igor and me (mostly Igor in substance) to fix corner cases, optimize hole cases (310425, r/sr=mrbkap/shaver).
git-svn-id: svn://10.0.0.236/trunk@181423 18797224-902f-48f8-a5cc-f745e15eee43
2005-10-02 06:27:07 +00:00
brendan%mozilla.org
2991621a2e Fix failure to root temporary result under Array.prototype.sort (306788, r/sr=mrbkap/shaver).
git-svn-id: svn://10.0.0.236/trunk@179547 18797224-902f-48f8-a5cc-f745e15eee43
2005-09-02 17:49:05 +00:00
brendan%mozilla.org
767175fb91 Generic static method automation to simplify things for callers of generic prototype methods (304828, r=mrbkap, sr=shaver).
git-svn-id: svn://10.0.0.236/trunk@179281 18797224-902f-48f8-a5cc-f745e15eee43
2005-08-30 04:28:45 +00:00
brendan%mozilla.org
e4787dc4af Patch to bug 305002 written by Hans-Andreas Engel <Hans-A.Engel@unibas.ch>.
git-svn-id: svn://10.0.0.236/trunk@178215 18797224-902f-48f8-a5cc-f745e15eee43
2005-08-19 01:48:48 +00:00
mrbkap%gmail.com
27b88bc15b bug 300858: Make sure to update all_strings so that we don't try to treat a JSVAL_HOLE as a JSString in sort_compare_strings. Instead, arrays composed of strings and holes should go through sort_compare. r+a=brendan
git-svn-id: svn://10.0.0.236/trunk@176308 18797224-902f-48f8-a5cc-f745e15eee43
2005-07-20 04:06:51 +00:00
mrbkap%gmail.com
f2634245c8 bug 301204: Array.prototype.reverse is broken. Also fix a bug in Array.prototype.slice, when begin > end. r=shaver a=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@176209 18797224-902f-48f8-a5cc-f745e15eee43
2005-07-18 18:44:22 +00:00
mrbkap%gmail.com
dbe140bc8c bug 299738: Fix jsarray.c to not fill holes in arrays. r=brendan a=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@175997 18797224-902f-48f8-a5cc-f745e15eee43
2005-07-13 16:38:46 +00:00
mrbkap%gmail.com
1eb8993931 bug 299644: Array.prototype.concat() plugs holes in the existing array.
r+a=brendan


git-svn-id: svn://10.0.0.236/trunk@175642 18797224-902f-48f8-a5cc-f745e15eee43
2005-07-05 21:25:12 +00:00
brendan%mozilla.org
4200bff7c3 Followup fix for 255555 (r=mrbkap, a=me).
git-svn-id: svn://10.0.0.236/trunk@174306 18797224-902f-48f8-a5cc-f745e15eee43
2005-06-08 18:08:53 +00:00
mrbkap%gmail.com
3b98800073 bug 255555: undefined and missing values are passed to Array.sort()'s comparison function. r+a=brendan
git-svn-id: svn://10.0.0.236/trunk@174297 18797224-902f-48f8-a5cc-f745e15eee43
2005-06-08 16:38:38 +00:00
shaver%mozilla.org
841a28ad2d Bug 290252: array extras: add lastIndexOf, add fromIndex to indexOf, fix
behaviour of operations on an empty array, shine shoes.
            r+a=brendan.


git-svn-id: svn://10.0.0.236/trunk@173029 18797224-902f-48f8-a5cc-f745e15eee43
2005-05-04 02:43:13 +00:00
shaver%mozilla.org
cb7a38af39 Bug 290592: Add |forEach|, |indexOf|, |filter|, |map|, |some| and |every| to
Array.prototype, for greater Lispy righteousness.  r+a=brendan.


git-svn-id: svn://10.0.0.236/trunk@172375 18797224-902f-48f8-a5cc-f745e15eee43
2005-04-17 18:31:59 +00:00
brendan%mozilla.org
87063fcd7b Patch from Erik Fabert <jerfa@yahoo.com> to fix splice/concat/slice number-of-formals 'length' property values (274035, r=me).
git-svn-id: svn://10.0.0.236/trunk@167764 18797224-902f-48f8-a5cc-f745e15eee43
2005-01-15 04:34:39 +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
3b56ceb6d1 Implement Deutsch-Schorr-Waite, plus related GC metering improvements, to avoid stack overflow crashes when marking very deep object lists (203278, r=igor@fastmail.fm and Igor wrote the tail-recursion elimination code).
git-svn-id: svn://10.0.0.236/trunk@166357 18797224-902f-48f8-a5cc-f745e15eee43
2004-12-06 23:17:19 +00:00
brendan%mozilla.org
5c0dd96c0f Root the temporary vector used by array_sort via fp->vars (272336, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@165943 18797224-902f-48f8-a5cc-f745e15eee43
2004-11-30 17:52:29 +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