missingItemFastPathCheck.js 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. //Bug : 512851
  6. var GiantPrintArray = [];
  7. var func1 = function(){
  8. GiantPrintArray.push(g);
  9. }
  10. var g = 1;
  11. func1();
  12. g = ((- (-2 - 2147483648)) << 0);
  13. func1();
  14. WScript.Echo(GiantPrintArray);
  15. ////////////////////////////////////////////////////////////////////////////////////// Test0//////////////////////////////////////////////////////////////////
  16. //Bug: 543466
  17. //-maxinterpretcount:1 -bgjit-
  18. var eqObj5;
  19. var IntArr0 = new Array();
  20. eqObj5 = -2147483647;
  21. IntArr0[4] = 1;
  22. test0();
  23. ++eqObj5;
  24. test0();
  25. function test0() {
  26. IntArr0.push(eqObj5);
  27. return IntArr0[IntArr0.length];
  28. }
  29. WScript.Echo("PASSED test0");
  30. ////////////////////////////////////////////////////////////////////////////////////// Test1//////////////////////////////////////////////////////////////////
  31. //Bug: 537537
  32. var GiantPrintArray = [];
  33. function test1(){
  34. var v386361 = -2147483646;
  35. {
  36. const v386361 = 1;
  37. GiantPrintArray.push(v386361);
  38. }
  39. GiantPrintArray.push(v386361);
  40. };
  41. test1();
  42. test1();
  43. WScript.Echo("PASSED test1");
  44. ////////////////////////////////////////////////////////////////////////////////////// Test2//////////////////////////////////////////////////////////////////
  45. function test2(arg1) {
  46. WScript.Echo(arg1.push(-2147483646));
  47. }
  48. var arr3 = new Array(1);
  49. test2(arr3);
  50. test2(arr3);
  51. ////////////////////////////////////////////////////////////////////////////////////// Test3 //////////////////////////////////////////////////////////////////
  52. //Bug: 576717
  53. var GiantPrintArray = [];
  54. var missingItemFunc = function () {
  55. function v2629() {
  56. }
  57. GiantPrintArray.push(-2147483646);
  58. v2629();
  59. };
  60. for (i=0;i<1;i++) {
  61. missingItemFunc();
  62. missingItemFunc();
  63. }
  64. WScript.Echo("PASSED Test3");