FuncBody.bug227901.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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(){
  6. var obj0 = {};
  7. var arrObj0 = {};
  8. var func0 = function(){
  9. eval("");
  10. }
  11. var func1 = function(){
  12. var obj4 = {nd0: {nd0: {lf0: {prop0: -46, prop1: 3, prop2: -2147483648, length: -6.02625054824609E+18 , method0: func0}}}};
  13. d ^=obj4.nd0.nd0.lf0.method0();
  14. obj4.nd0.nd0.lf0 = 1;
  15. this.prop1 |=obj4.nd0.nd0.lf0.method0.call(obj0 );
  16. }
  17. Object.prototype.method0 = func1;
  18. var d = 1;
  19. arrObj0.method0();
  20. };
  21. var testOutcome = false;
  22. try
  23. {
  24. // generate profile
  25. test0();
  26. test0();
  27. test0();
  28. // run JITted code
  29. runningJITtedCode = true;
  30. test0();
  31. test0();
  32. test0();
  33. }
  34. catch(e)
  35. {
  36. WScript.Echo("Caught expected exception. Type of exception: " + e);
  37. if (e == "Error: Out of stack space") {
  38. testOutcome = true;
  39. }
  40. }
  41. if (testOutcome) {
  42. WScript.Echo("Passed");
  43. }
  44. else {
  45. WScript.Echo("Failed");
  46. }