Changeset 2309 for cobra/trunk/Source/Cobra.Lang/Native.cs
- Timestamp:
- 03/10/10 10:22:59 (2 years ago)
- Files:
-
- 1 modified
-
cobra/trunk/Source/Cobra.Lang/Native.cs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
cobra/trunk/Source/Cobra.Lang/Native.cs
r2294 r2309 775 775 static public int _maxStackFrames = 500; 776 776 static public int _numLastMaxStackFrames = 20; 777 static private bool _inStackOverflow = false; 777 778 778 779 static public void PushFrame(string declClassName, string methodName, string fileName, int lineNum, params object[] args) { 780 if (_inStackOverflow) return; 779 781 _detailedStack.Push(_curFrame = new CobraFrame(declClassName, methodName, fileName, lineNum, args)); 780 782 int max = _maxStackFrames; 781 783 if (max > 0 && _detailedStack.Count > max) { 784 _inStackOverflow = true; 782 785 int num = _numLastMaxStackFrames; 783 if (num < 2) 784 num = 2; 786 if (num < 2) num = 2; 785 787 Console.WriteLine("Cobra detected stack overflow:"); 786 788 Console.WriteLine(" Last {0} frames:", num);



