]>
Commit | Line | Data |
---|---|---|
81345200 A |
1 | function foo(o) { |
2 | return o[0]; | |
3 | } | |
4 | ||
5 | noInline(foo); | |
6 | ||
7 | function test(a, x) { | |
8 | var intArray = new Int32Array(1); | |
9 | intArray[0] = a; | |
10 | var floatArray = new Float32Array(intArray.buffer); | |
11 | var element = foo(floatArray); | |
12 | var result = element + 1; | |
13 | if (("" + result) != ("" + x)) | |
14 | throw "Error: bad result for " + a + ": " + result + ", but expected: " + x + "; loaded " + element + " from the array"; | |
15 | } | |
16 | ||
17 | for (var i = 0; i < 100000; ++i) | |
18 | test(0, 1); | |
19 | ||
20 | test(0xFFFF0000, 0/0); |