summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bug944080.js
blob: 3f6889ce0b9adb4280746beed01c6ab81d105374 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

function intLength (a, l) {
    var res = 0;
    for (var i = 0; i < l; i++)
	res += a.length;
}
intLength([0,1,2,3,4,5,6,7,8,9], 10)
intLength(new Uint8Array(10), 10)
function test() {
    var a = "abc".split("");
    var res = 0;
    for (var i=0; i<20; i++)
	res += a.length;
    return res;
}
Object.prototype.length = function(){};
assertEq(test(), 60);