repo.or.cz
/
chromium-blink-merge.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Merge Chromium + Blink git repositories
[chromium-blink-merge.git]
/
third_party
/
WebKit
/
LayoutTests
/
fast
/
js
/
regress
/
script-tests
/
int-or-other-mul-then-get-by-val.js
blob
87ab8f7f346cf0c61a6de24ede27fce32d1d6f6d
1
var p = {f:true};
2
3
function foo(a, b, d) {
4
var c;
5
if (p.f)
6
c = b;
7
return d[a * c];
8
}
9
10
var result = 0;
11
var array = [42, 43, 44];
12
for (var i = 0; i < 400000; ++i)
13
result += foo(i % 2, i % 3, array);
14
15
if (result != 16999999)
16
throw "Bad result: " + result;
17