nativearray_gen5.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. //Switches: -maxinterpretcount:6
  6. //Baseline Switches: -nonative
  7. //Arch: X86
  8. var shouldBailout = true;
  9. function test0(){
  10. var obj1 = {};
  11. var arrObj0 = {};
  12. var func0 = function(argArr0,argArr1,argFunc2){
  13. ary.pop();
  14. for(var __loopvar4 = 0; __loopvar4 < 3 && obj1.prop2 < (ary[(((argArr1[((shouldBailout ? (argArr1[1] = "x") : undefined ), 1)] >= 0 ? argArr1[((shouldBailout ? (argArr1[1] = "x") : undefined ), 1)] : 0)) & 0XF)]); __loopvar4++, 1) {
  15. }
  16. }
  17. var func1 = function(argFunc3,argMath4,argObj5){
  18. func0(1, ary, 1);
  19. }
  20. var func2 = function(){
  21. var __loopvar4 = 0;
  22. do {
  23. __loopvar4++;
  24. } while((func1.call(arrObj0 , 1, func0(1, 1, 1), 1)) && __loopvar4 < 3)
  25. }
  26. var ary = new Array(10);
  27. if(func2.call(arrObj0 )) {
  28. 1 }
  29. };
  30. // generate profile
  31. test0();
  32. test0();
  33. test0();
  34. test0();
  35. test0();
  36. test0();
  37. // run JITted code
  38. runningJITtedCode = true;
  39. test0();
  40. test0();
  41. test0();
  42. test0();
  43. test0();
  44. test0();
  45. // run code with bailouts enabled
  46. shouldBailout = true;
  47. test0();
  48. WScript.Echo('pass');