PageRenderTime 21ms CodeModel.GetById 15ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/js/src/jit-test/tests/basic/setCallGlobal.js

http://github.com/zpao/v8monkey
JavaScript | 14 lines | 14 code | 0 blank | 0 comment | 1 complexity | 498911e44189ba03c71c14327452df4d MD5 | raw file
 1var x = 1;
 2function f() {
 3  function g() { 
 4    var t=0;
 5    for (var i=0; i<3; i++)
 6      x = i;
 7  };
 8  g();
 9  eval("var x = 2");
10  g();
11  assertEq(x, 2);
12}
13f();
14assertEq(x, 2);