| 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 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 return Handle<String>::cast(result); | 516 return Handle<String>::cast(result); |
| 517 } | 517 } |
| 518 | 518 |
| 519 | 519 |
| 520 static Object* RuntimePreempt() { | 520 static Object* RuntimePreempt() { |
| 521 // Clear the preempt request flag. | 521 // Clear the preempt request flag. |
| 522 StackGuard::Continue(PREEMPT); | 522 StackGuard::Continue(PREEMPT); |
| 523 | 523 |
| 524 ContextSwitcher::PreemptionReceived(); | 524 ContextSwitcher::PreemptionReceived(); |
| 525 | 525 |
| 526 { | 526 if (Debug::InDebugger()) { |
| 527 // If currently in the debugger don't do any actual preemption but record |
| 528 // that preemption occoured while in the debugger. |
| 529 Debug::PreemptionWhileInDebugger(); |
| 530 } else { |
| 531 // Perform preemption. |
| 527 v8::Unlocker unlocker; | 532 v8::Unlocker unlocker; |
| 528 Thread::YieldCPU(); | 533 Thread::YieldCPU(); |
| 529 } | 534 } |
| 530 | 535 |
| 531 return Heap::undefined_value(); | 536 return Heap::undefined_value(); |
| 532 } | 537 } |
| 533 | 538 |
| 534 | 539 |
| 535 Object* Execution::DebugBreakHelper() { | 540 Object* Execution::DebugBreakHelper() { |
| 536 // Just continue if breaks are disabled. | 541 // Just continue if breaks are disabled. |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 // All allocation spaces other than NEW_SPACE have the same effect. | 600 // All allocation spaces other than NEW_SPACE have the same effect. |
| 596 Heap::CollectGarbage(0, OLD_DATA_SPACE); | 601 Heap::CollectGarbage(0, OLD_DATA_SPACE); |
| 597 return v8::Undefined(); | 602 return v8::Undefined(); |
| 598 } | 603 } |
| 599 | 604 |
| 600 | 605 |
| 601 static GCExtension kGCExtension; | 606 static GCExtension kGCExtension; |
| 602 v8::DeclareExtension kGCExtensionDeclaration(&kGCExtension); | 607 v8::DeclareExtension kGCExtensionDeclaration(&kGCExtension); |
| 603 | 608 |
| 604 } } // namespace v8::internal | 609 } } // namespace v8::internal |
| OLD | NEW |