repo.or.cz
/
qtwebkit.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Update ReadMe.md
[qtwebkit.git]
/
JSTests
/
microbenchmarks
/
eval-compute.js
blob
86c4c1c77b538ef9cad082274c576fcfc34b40a8
1
function foo(string) {
2
var x = 42;
3
var result = eval(string);
4
for (var i = 0; i < 100000; ++i)
5
result++;
6
return result;
7
}
8
9
noInline(foo);
10
11
for (var i = 0; i < 200; ++i) {
12
var result = foo("x + " + i);
13
if (result != 42 + i + 100000)
14
throw "Error: bad result: " + result;
15
}
16