box_inlineeFrameInLoopBody.js 823 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. var runningJITtedCode = false;
  6. function test0() {
  7. var func0 = function () {
  8. function v1() {
  9. function v2() {
  10. return v2;
  11. }
  12. if (runningJITtedCode) {
  13. return v2();
  14. }
  15. }
  16. var v3 = v1();
  17. };
  18. for (var __loopvar0 = 4 - 6;;) {
  19. if (__loopvar0 === 4) {
  20. break;
  21. }
  22. __loopvar0 += 2;
  23. func0();
  24. }
  25. }
  26. test0();
  27. runningJITtedCode = true;
  28. test0();
  29. WScript.Echo("passed");