| Index: test/mjsunit/regress/regress-319722-TypedArrays.js
|
| diff --git a/test/mjsunit/array-non-smi-length.js b/test/mjsunit/regress/regress-319722-TypedArrays.js
|
| similarity index 80%
|
| copy from test/mjsunit/array-non-smi-length.js
|
| copy to test/mjsunit/regress/regress-319722-TypedArrays.js
|
| index 23a25ee797bd68690ad2a7ce26a9135e23b486e2..0445e2d2cf0dd4a5494b42daa50381d905c73e07 100644
|
| --- a/test/mjsunit/array-non-smi-length.js
|
| +++ b/test/mjsunit/regress/regress-319722-TypedArrays.js
|
| @@ -1,3 +1,4 @@
|
| +
|
| // Copyright 2013 the V8 project authors. All rights reserved.
|
| // Redistribution and use in source and binary forms, with or without
|
| // modification, are permitted provided that the following conditions are
|
| @@ -25,22 +26,20 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -// Flags: --allow-natives-syntax
|
| -
|
| -function TestNonSmiArrayLength() {
|
| - function f(a) {
|
| - return a.length+1;
|
| - }
|
| -
|
| - var a = [];
|
| - a.length = 0xFFFF;
|
| - assertSame(0x10000, f(a));
|
| - assertSame(0x10000, f(a));
|
| -
|
| - %OptimizeFunctionOnNextCall(f);
|
| - a.length = 0xFFFFFFFF;
|
| - assertSame(0x100000000, f(a));
|
| +// Flags: --nostress-opt --allow-natives-syntax
|
| +var maxSize = %MaxSmi() + 1;
|
| +function TestArray(constr) {
|
| + assertThrows(function() {
|
| + new constr(maxSize);
|
| + }, RangeError);
|
| }
|
|
|
| -TestNonSmiArrayLength();
|
| -
|
| +TestArray(Uint8Array);
|
| +TestArray(Int8Array);
|
| +TestArray(Uint16Array);
|
| +TestArray(Int16Array);
|
| +TestArray(Uint32Array);
|
| +TestArray(Int32Array);
|
| +TestArray(Float32Array);
|
| +TestArray(Float64Array);
|
| +TestArray(Uint8ClampedArray);
|
|
|