2 "This tests that the DFG JIT's optimizations for byte arrays work as expected."
5 function doPut(array
, index
, value
) {
9 function doGet(array
, index
) {
13 canvas
= document
.createElement("canvas");
14 context
= canvas
.getContext("2d");
15 imageData
= context
.createImageData(10,10);
16 data
= imageData
.data
;
18 shouldBe("data.length", "400");
20 for (var i
= 0; i
< 1000; ++i
) {
21 doPut(data
, i
% 100, i
- 100);
28 expectedValue
= i
- 100;
29 shouldBe("doGet(data, " + (i
% 100) + ")", "" + expectedValue
);
32 var successfullyParsed
= true;