v8/test/mjsunit/regress/regress-599717.js
Igor Sheludko 6ff3b3703e [builtins] Allow 2Gb TypedArrays on 64-bit architectures
... even with ptr-compr.

Although full uintptr-sized TypedArrays are not supported yet
we may already start using uint32-sized typed arrays as we no
longer rely on TypedArray length to be a Smi.

Bug: v8:4153
Change-Id: If179541ad4f02c4ec7de9d1f3836138fe526d8a5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1905847
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64897}
2019-11-11 21:42:56 +00:00

29 lines
748 B
JavaScript

// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --validate-asm --allow-natives-syntax
function __f_61(stdlib, foreign, buffer) {
"use asm";
var __v_14 = new stdlib.Float64Array(buffer);
function __f_74() {
var __v_35 = 6.0;
__v_14[2] = __v_35 + 1.0;
}
return {__f_74: __f_74};
}
var ok = false;
try {
var __v_12 = new ArrayBuffer(2147483648);
ok = true;
} catch (e) {
// Can happen if the allocation fails.
}
if (ok) {
var module = __f_61(this, null, __v_12);
// This fails AsmJS memory size validation because of kV8MaxWasmMemoryPages
// value.
assertFalse(%IsAsmWasmCode(__f_61));
}