| 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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 postpone_interrupts_nesting_ = 0; | 396 postpone_interrupts_nesting_ = 0; |
| 397 interrupt_flags_ = 0; | 397 interrupt_flags_ = 0; |
| 398 Heap::SetStackLimits(); | 398 Heap::SetStackLimits(); |
| 399 } | 399 } |
| 400 | 400 |
| 401 | 401 |
| 402 void StackGuard::ThreadLocal::Initialize() { | 402 void StackGuard::ThreadLocal::Initialize() { |
| 403 if (real_climit_ == kIllegalLimit) { | 403 if (real_climit_ == kIllegalLimit) { |
| 404 // Takes the address of the limit variable in order to find out where | 404 // Takes the address of the limit variable in order to find out where |
| 405 // the top of stack is right now. | 405 // the top of stack is right now. |
| 406 const uintptr_t kLimitSize = FLAG_stack_size * KB; |
| 406 uintptr_t limit = reinterpret_cast<uintptr_t>(&limit) - kLimitSize; | 407 uintptr_t limit = reinterpret_cast<uintptr_t>(&limit) - kLimitSize; |
| 407 ASSERT(reinterpret_cast<uintptr_t>(&limit) > kLimitSize); | 408 ASSERT(reinterpret_cast<uintptr_t>(&limit) > kLimitSize); |
| 408 real_jslimit_ = SimulatorStack::JsLimitFromCLimit(limit); | 409 real_jslimit_ = SimulatorStack::JsLimitFromCLimit(limit); |
| 409 jslimit_ = SimulatorStack::JsLimitFromCLimit(limit); | 410 jslimit_ = SimulatorStack::JsLimitFromCLimit(limit); |
| 410 real_climit_ = limit; | 411 real_climit_ = limit; |
| 411 climit_ = limit; | 412 climit_ = limit; |
| 412 Heap::SetStackLimits(); | 413 Heap::SetStackLimits(); |
| 413 } | 414 } |
| 414 nesting_ = 0; | 415 nesting_ = 0; |
| 415 postpone_interrupts_nesting_ = 0; | 416 postpone_interrupts_nesting_ = 0; |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 720 return Top::TerminateExecution(); | 721 return Top::TerminateExecution(); |
| 721 } | 722 } |
| 722 if (StackGuard::IsInterrupted()) { | 723 if (StackGuard::IsInterrupted()) { |
| 723 StackGuard::Continue(INTERRUPT); | 724 StackGuard::Continue(INTERRUPT); |
| 724 return Top::StackOverflow(); | 725 return Top::StackOverflow(); |
| 725 } | 726 } |
| 726 return Heap::undefined_value(); | 727 return Heap::undefined_value(); |
| 727 } | 728 } |
| 728 | 729 |
| 729 } } // namespace v8::internal | 730 } } // namespace v8::internal |
| OLD | NEW |