Index: test/mjsunit/apply.js |
diff --git a/test/mjsunit/apply.js b/test/mjsunit/apply.js |
index 413ee937c6638cc7d30e2bf75e755a3a89a27d2a..abbc9a11b4a81147d7388922e2c39014a5bb74cd 100644 |
--- a/test/mjsunit/apply.js |
+++ b/test/mjsunit/apply.js |
@@ -25,6 +25,8 @@ |
// (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 f0() { |
return this; |
} |
@@ -114,7 +116,8 @@ function al() { |
for (var j = 1; j < 0x40000000; j <<= 1) { |
try { |
- var a = new Array(j); |
+ var a = %NormalizeElements([]); |
+ a.length = j; |
a[j - 1] = 42; |
assertEquals(42 + j, al.apply(345, a)); |
} catch (e) { |
@@ -122,7 +125,8 @@ for (var j = 1; j < 0x40000000; j <<= 1) { |
for (; j < 0x40000000; j <<= 1) { |
var caught = false; |
try { |
- a = new Array(j); |
+ a = %NormalizeElements([]); |
+ a.length = j; |
a[j - 1] = 42; |
al.apply(345, a); |
assertUnreachable("Apply of array with length " + a.length + |