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
blame
|
history
|
raw
|
HEAD
Merge Chromium + Blink git repositories
[chromium-blink-merge.git]
/
third_party
/
WebKit
/
LayoutTests
/
fast
/
js
/
regress
/
script-tests
/
int-or-other-neg-then-get-by-val.js
blob
c606d3e8435edd43490394271369b78e33c9206e
1
var
p
= {
f
:
true
};
2
3
function
foo
(
b
,
d
) {
4
var
c
;
5
if
(
p
.
f
)
6
c
=
b
;
7
return
d
[-
c
];
8
}
9
10
var
result
=
0
;
11
var
array
= [
42
,
43
,
44
,
45
];
12
for
(
var
i
=
0
;
i
<
500000
; ++
i
)
13
result
+=
foo
(-((
i
%
3
) +
1
),
array
);
14
15
if
(
result
!=
21999999
)
16
throw
"Bad result: "
+
result
;
17