irviewer.js 912 B

123456789101112131415161718192021222324252627282930313233
  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 foo() {
  6. return 1;
  7. }
  8. function blah(a,b) {
  9. return (a+b)*2+42;
  10. }
  11. // parseIR
  12. WScript.Echo("--- parseIR ---");
  13. var x = parseIR("function bar() {return 42;}"); // <<< CALL parseIR
  14. // functionList
  15. WScript.Echo("--- functionList ---");
  16. var fnlist = functionList(); // <<< CALL functionList
  17. // rejitFunction
  18. WScript.Echo("--- rejitFunction ---");
  19. var fn, fnSrcInfo, fnId;
  20. fn = fnlist[0];
  21. fnSrcInfo = fn.utf8SrcInfoPtr;
  22. fnId = fn.funcId;
  23. rejitFunction(fnSrcInfo, fnId); // <<< CALL rejitFunction