bug712503_fixedAccessors.js 809 B

123456789101112131415161718192021222324252627282930
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. // -mic:2 -off:simplejit -force:rejit
  6. function leaf() {
  7. }
  8. var obj0 = {};
  9. obj0 = leaf();
  10. function test0() {
  11. var count = 0;
  12. var litObj0 = { prop1: 0 };
  13. function func1() {
  14. litObj0.prop0 = 1;
  15. };
  16. Object.defineProperty(litObj0, 'prop0', {
  17. set: function () {
  18. count++;
  19. WScript.Echo(count);
  20. }
  21. });
  22. func1();
  23. func1();
  24. }
  25. test0();
  26. test0();