bug318.js 836 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. function FAILED()
  6. {
  7. WScript.Echo("FAILED");
  8. throw(1);
  9. }
  10. function test0(){
  11. var arrObj0 = {};
  12. if((2 % 2)) {
  13. }
  14. else {
  15. b =(2 & 2);
  16. }
  17. arrObj0.length =b;
  18. if (arrObj0.length != 2)
  19. FAILED();
  20. };
  21. // generate profile
  22. test0();
  23. test0();
  24. test0();
  25. // run JITted code
  26. runningJITtedCode = true;
  27. test0();
  28. test0();
  29. test0();
  30. // run code with bailouts enabled
  31. shouldBailout = true;
  32. test0();
  33. WScript.Echo("Passed");