OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 3754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3765 static Object* Runtime_DebugBreak(Arguments args) { | 3765 static Object* Runtime_DebugBreak(Arguments args) { |
3766 ASSERT(args.length() == 0); | 3766 ASSERT(args.length() == 0); |
3767 return Execution::DebugBreakHelper(); | 3767 return Execution::DebugBreakHelper(); |
3768 } | 3768 } |
3769 | 3769 |
3770 | 3770 |
3771 static Object* Runtime_StackGuard(Arguments args) { | 3771 static Object* Runtime_StackGuard(Arguments args) { |
3772 ASSERT(args.length() == 1); | 3772 ASSERT(args.length() == 1); |
3773 | 3773 |
3774 // First check if this is a real stack overflow. | 3774 // First check if this is a real stack overflow. |
3775 if (StackGuard::IsStackOverflow()) return Runtime_StackOverflow(args); | 3775 if (StackGuard::IsStackOverflow()) { |
| 3776 return Runtime_StackOverflow(args); |
| 3777 } |
3776 | 3778 |
3777 return Execution::HandleStackGuardInterrupt(); | 3779 return Execution::HandleStackGuardInterrupt(); |
3778 } | 3780 } |
3779 | 3781 |
3780 | 3782 |
3781 // NOTE: These PrintXXX functions are defined for all builds (not just | 3783 // NOTE: These PrintXXX functions are defined for all builds (not just |
3782 // DEBUG builds) because we may want to be able to trace function | 3784 // DEBUG builds) because we may want to be able to trace function |
3783 // calls in all modes. | 3785 // calls in all modes. |
3784 static void PrintString(String* str) { | 3786 static void PrintString(String* str) { |
3785 // not uncommon to have empty strings | 3787 // not uncommon to have empty strings |
(...skipping 2302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6088 } else { | 6090 } else { |
6089 // Handle last resort GC and make sure to allow future allocations | 6091 // Handle last resort GC and make sure to allow future allocations |
6090 // to grow the heap without causing GCs (if possible). | 6092 // to grow the heap without causing GCs (if possible). |
6091 Counters::gc_last_resort_from_js.Increment(); | 6093 Counters::gc_last_resort_from_js.Increment(); |
6092 Heap::CollectAllGarbage(); | 6094 Heap::CollectAllGarbage(); |
6093 } | 6095 } |
6094 } | 6096 } |
6095 | 6097 |
6096 | 6098 |
6097 } } // namespace v8::internal | 6099 } } // namespace v8::internal |
OLD | NEW |