| Index: test/mjsunit/regress/external-and-normal-array-polymorphim.js
|
| diff --git a/test/mjsunit/copy-on-write-assert.js b/test/mjsunit/regress/external-and-normal-array-polymorphim.js
|
| similarity index 81%
|
| copy from test/mjsunit/copy-on-write-assert.js
|
| copy to test/mjsunit/regress/external-and-normal-array-polymorphim.js
|
| index 0e78c77befe4c4794446923c0bcf45df27c6fbac..59fada413c6f4c0e489b13d746a768d5cdac3d9e 100644
|
| --- a/test/mjsunit/copy-on-write-assert.js
|
| +++ b/test/mjsunit/regress/external-and-normal-array-polymorphim.js
|
| @@ -25,18 +25,26 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -function createLargeCOWArray() {
|
| - var s = "[0";
|
| - // The constant below depends on the max object size in new space.
|
| - for (var i = 0; i < (128 << 10); i++) {
|
| - s += ",0";
|
| +// Flags: --compiled_keyed_stores --compiled_transitions
|
| +
|
| +function store_generator(compare) {
|
| + return function(a,i,v) {
|
| + a[i] = v;
|
| + assertEquals(compare, a[i]);
|
| + assertEquals(compare, a[i]);
|
| }
|
| - s += "]";
|
| - return eval(s);
|
| }
|
|
|
| -var large_cow_array = createLargeCOWArray();
|
| +f = store_generator(5);
|
| +a = [0,0,0];
|
| +f(a,0,5);
|
| +a = [0,0,0];
|
| +f(a,1,5);
|
| +a = [0,0,0];
|
| +f(a,2,5);
|
|
|
| -// Force copy. Because the array is large it will test the slow array
|
| -// cloning in large object space.
|
| -large_cow_array[17] = 42;
|
| +f = store_generator(5.5);
|
| +a = new Float32Array(5);
|
| +f(a,0,5.5);
|
| +f(a,1,5.5);
|
| +f(a,2,5.5);
|
|
|