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

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

http://github.com/zpao/v8monkey
JavaScript | 11 lines | 11 code | 0 blank | 0 comment | 2 complexity | f5b64d822fe4eb2898d880c7b7af4498 MD5 | raw file
 1function testInterpreterReentry7() {
 2    var arr = [0, 1, 2, 3, 4];
 3    arr.__defineSetter__("4", function(x) { this._4 = x; });
 4    for (var i = 0; i < 5; i++)
 5        arr[i] = "grue";
 6    var tmp = arr._4;
 7    for (var p in arr)
 8        arr[p] = "bleen";
 9    return tmp + " " + arr._4;
10}
11assertEq(testInterpreterReentry7(), "grue bleen");