FieldHoist_MaxInterpret.js 852 B

12345678910111213141516171819202122232425262728293031
  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 test0(o) {
  6. for(var a = 0; a < 2; ++a)
  7. (+o).toSource;
  8. };
  9. test0({});
  10. test0({});
  11. function test1() {
  12. var o = { p: 0 };
  13. var sum = 0;
  14. for(var i = 0; i < 1; ++i) {
  15. o.p |= 0;
  16. for(var j = 0; j < 1; ++j) {
  17. o.p = 0;
  18. if(o.p)
  19. ++sum;
  20. for(var k = 0; k < 1; ++k)
  21. sum += o.p;
  22. }
  23. }
  24. return sum;
  25. };
  26. test1();
  27. test1();
  28. WScript.Echo("pass");