PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/js/src/jit-test/tests/jaeger/globalOptimize-3.js

http://github.com/zpao/v8monkey
JavaScript | 18 lines | 16 code | 2 blank | 0 comment | 0 complexity | 84e7d51afd49c40f54450d441b3d64b2 MD5 | raw file
 1
 2y = 30;
 3function bar() {
 4  assertEq(y, 30);
 5  Object.defineProperty(this, 'y', {writable:false});
 6  y = 10;
 7  assertEq(y, 30);
 8}
 9bar();
10
11x = 30;
12function foo() {
13  assertEq(x, 30);
14  Object.freeze(this);
15  x = 10;
16  assertEq(x, 30);
17}
18foo();