2 "This test checks that implicit reentry to global code through a getter does not clobber the calling register file."
6 function testGlobalCode(test
) {
7 document
.write("<script>"+test
+"<"+"/script>");
10 get getterTest(){ testGlobalCode("var a, b, c, d; testVar = 'PASS';"); },
11 set setterTest(_
){ testGlobalCode("var e, f, g, h; testVar = 'PASS';"); },
12 toString: function() { testGlobalCode("var i, j, k, l; testVar = 'PASS';"); return ''; },
13 valueOf: function() { testGlobalCode("var m, n, o, p; testVar = 'PASS';"); return 0; },
14 toStringTest: function() { "" + this; },
15 valueOfTest: function() { 0 * this; }
18 shouldBe("testObject.getterTest; testVar;", '"PASS"');
20 shouldBe("testObject.setterTest = 1; testVar;", '"PASS"');
22 shouldBe("testObject.toStringTest(); testVar;", '"PASS"');
24 shouldBe("testObject.valueOfTest(); testVar;", '"PASS"');