summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bug928423.js
blob: 171e5455763310963f2e51abc539b36ff86f93bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function f(o, p) {
    try {} catch(e) {};
    return o[p];
}
function test() {
    var o = {foo: 1, bar: 2, foobar: 3};

    for (var i = 0; i < 30; i++) {
	assertEq(f(o, "foo1".substr(0, 3)), 1);
	assertEq(f(o, "bar1".substr(0, 3)), 2);
	assertEq(f(o, "foobar1".substr(0, 6)), 3);
    }
}
test();