bug12239366.js 681 B

12345678910111213141516171819202122232425
  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 asmModule() {
  6. "use asm";
  7. let a = [1];
  8. for (let i = 0; i < 2; i++) { // JIT
  9. a[0] = 1;
  10. if (i > 0) {
  11. a[0] = {}; // the array type changed, bailout!!
  12. }
  13. }
  14. function f(v) {
  15. v = v | 0;
  16. return v | 0;
  17. }
  18. return f;
  19. }
  20. asmModule(1);
  21. print("PASSED");