array_opts.js 888 B

1234567891011121314151617181920212223
  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. // This test case tests how array hoisting optimizations work in the presence of implicit call
  6. // b < FloatArr0 has an implicit call of 'valueof' in this scenario
  7. function test17() {
  8. var FloatArr0 = [];
  9. var VarArr0 = [];
  10. var b = VarArr0;
  11. for (var __loopvar1 = 0; b < FloatArr0;) {
  12. for (var v319132 = 0; v319132; v319132++) {
  13. FloatArr0[1];
  14. }
  15. while (v319133) {
  16. FloatArr0[1];
  17. }
  18. }
  19. }
  20. test17();
  21. test17();
  22. WScript.Echo("PASSED");