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
/
array-with-double-increment.js
blob
bec0dce592b90727978066fb982cc33b8fd700c5
1
function
foo
() {
2
var
array
= [];
3
4
for
(
var
i
=
0
;
i
<
1000
; ++
i
)
5
array
.
push
(
i
+
0.5
);
6
7
for
(
var
i
=
0
;
i
<
1000
; ++
i
) {
8
for
(
var
j
=
0
;
j
<
array
.
length
; ++
j
)
9
array
[
j
]++;
10
}
11
12
var
result
=
0
;
13
for
(
var
i
=
0
;
i
<
array
.
length
; ++
i
)
14
result
+=
array
[
i
];
15
16
return
result
;
17
}
18
19
var
result
=
foo
();
20
if
(
result
!=
1500000
)
21
throw
"Bad result: "
+
result
;
22
23