polyInliningBugs.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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. var __counter = 0;
  6. function test0() {
  7. __counter++;
  8. var obj0 = {};
  9. var obj1 = {};
  10. var func1 = function () {
  11. };
  12. var func2 = function () {
  13. };
  14. obj0.method1 = func1;
  15. obj1.method1 = func2;
  16. protoObj0 = Object.create(obj0);
  17. protoObj1 = Object.create(obj1);
  18. obj0 = protoObj1;
  19. var __loopvar3 = 0;
  20. for (; __loopvar3 < 3; __loopvar3++) {
  21. (function () {
  22. for (var v2518 = 0; v2518 < arguments.length; ++v2518) {
  23. var uniqobj5 = [
  24. protoObj0,
  25. obj0
  26. ];
  27. uniqobj5[__counter % uniqobj5.length].method1();
  28. }
  29. }(1));
  30. }
  31. }
  32. test0();
  33. test0();
  34. test0();
  35. WScript.Echo("PASSED\n");