inlineSameFunc.js 668 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. // -maxInterpertCount:1 -off:SimpleJit
  6. function f(x)
  7. {
  8. if (x < 0) {
  9. throw Error("abc");
  10. } else {
  11. f(x-1);
  12. }
  13. }
  14. try
  15. {
  16. f(1);
  17. } catch (ex)
  18. {
  19. var stackAfterTrimDirectoryName = ex.stack.replace(/\(.*\\/g, "(");
  20. WScript.Echo(stackAfterTrimDirectoryName);
  21. }