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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 | 191 |
192 | 192 |
193 StackGuard::StackGuard() { | 193 StackGuard::StackGuard() { |
194 // NOTE: Overall the StackGuard code assumes that the stack grows towards | 194 // NOTE: Overall the StackGuard code assumes that the stack grows towards |
195 // lower addresses. | 195 // lower addresses. |
196 ExecutionAccess access; | 196 ExecutionAccess access; |
197 if (thread_local_.nesting_++ == 0) { | 197 if (thread_local_.nesting_++ == 0) { |
198 // Initial StackGuard is being set. We will set the stack limits based on | 198 // Initial StackGuard is being set. We will set the stack limits based on |
199 // the current stack pointer allowing the stack to grow kLimitSize from | 199 // the current stack pointer allowing the stack to grow kLimitSize from |
200 // here. | 200 // here. |
201 | 201 |
202 // Ensure that either the stack limits are unset (kIllegalLimit) or that | 202 // Ensure that either the stack limits are unset (kIllegalLimit) or that |
203 // they indicate a pending interruption. The interrupt limit will be | 203 // they indicate a pending interruption. The interrupt limit will be |
204 // temporarily reset through the code below and reestablished if the | 204 // temporarily reset through the code below and reestablished if the |
205 // interrupt flags indicate that an interrupt is pending. | 205 // interrupt flags indicate that an interrupt is pending. |
206 ASSERT(thread_local_.jslimit_ == kIllegalLimit || | 206 ASSERT(thread_local_.jslimit_ == kIllegalLimit || |
207 (thread_local_.jslimit_ == kInterruptLimit && | 207 (thread_local_.jslimit_ == kInterruptLimit && |
208 thread_local_.interrupt_flags_ != 0)); | 208 thread_local_.interrupt_flags_ != 0)); |
209 ASSERT(thread_local_.climit_ == kIllegalLimit || | 209 ASSERT(thread_local_.climit_ == kIllegalLimit || |
210 (thread_local_.climit_ == kInterruptLimit && | 210 (thread_local_.climit_ == kInterruptLimit && |
211 thread_local_.interrupt_flags_ != 0)); | 211 thread_local_.interrupt_flags_ != 0)); |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 // All allocation spaces other than NEW_SPACE have the same effect. | 595 // All allocation spaces other than NEW_SPACE have the same effect. |
596 Heap::CollectGarbage(0, OLD_DATA_SPACE); | 596 Heap::CollectGarbage(0, OLD_DATA_SPACE); |
597 return v8::Undefined(); | 597 return v8::Undefined(); |
598 } | 598 } |
599 | 599 |
600 | 600 |
601 static GCExtension kGCExtension; | 601 static GCExtension kGCExtension; |
602 v8::DeclareExtension kGCExtensionDeclaration(&kGCExtension); | 602 v8::DeclareExtension kGCExtensionDeclaration(&kGCExtension); |
603 | 603 |
604 } } // namespace v8::internal | 604 } } // namespace v8::internal |
OLD | NEW |