test127.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 func4 = function(){
  13. }
  14. obj0.method1 = func1;
  15. obj1.method1 = func4;
  16. protoObj0 = Object.create(obj0);
  17. protoObj1 = Object.create(obj1);
  18. // loopbreakblock5.ecs
  19. function v464() {
  20. var v465 = 0;
  21. var __loopvar1000 = 0;
  22. while(1) {
  23. if (__loopvar1000 > 3) break;
  24. __loopvar1000++;
  25. if(v465++ > 2) {
  26. var uniqobj0 = [protoObj1, protoObj0];
  27. uniqobj0[__counter%uniqobj0.length].method1();
  28. throw "loopbreakblock5.ecs";
  29. }
  30. }
  31. }
  32. try {
  33. v464();
  34. } catch(e) {};
  35. };
  36. // generate profile
  37. test0();
  38. // Run Simple JIT
  39. test0();
  40. // run JITted code
  41. runningJITtedCode = true;
  42. test0();
  43. WScript.Echo("PASSED\n");