blob: a9aa5674e174538c5a829266d1d49b603a7ab073 [file] [log] [blame]
"use strict"
function opaqueGetByValKnownArray(value)
{
let array = [];
return array[value];
}
noInline(opaqueGetByValKnownArray);
// Warm up without out-of-bounds access.
for (let i = 0; i < 1e3; ++i) {
if (opaqueGetByValKnownArray(0) !== undefined)
throw "Failed opaqueGetByValKnownArray(0)";
}
// Then access out of bounds.
for (let i = 0; i < 1e3; ++i) {
if (opaqueGetByValKnownArray(-1) !== undefined)
throw "Failed opaqueGetByValKnownArray(-1)";
}