NotOperator.js 732 B

12345678910111213141516171819202122
  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(stdlib) {
  6. "use asm";
  7. var m1 = stdlib.Math.fround;
  8. //Not operator testing
  9. function f1(){
  10. var x = m1(1.5);
  11. var y = 1;
  12. y = ~~~x
  13. return y|0
  14. }
  15. return f1;
  16. }
  17. var global = {Math:Math};
  18. var asmModule = AsmModule(global);
  19. WScript.Echo(asmModule());
  20. WScript.Echo(asmModule());