bailout5.js 642 B

123456789101112131415161718192021222324
  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. var g = false;
  6. function test(i)
  7. {
  8. var a = i + 1;
  9. var b = a;
  10. // Bail out point: test dead store of copy prop'd values
  11. if (g)
  12. {
  13. return b;
  14. }
  15. return 1;
  16. }
  17. WScript.Echo(test(10));
  18. g = true;
  19. WScript.Echo(test(10));