Revision: 21252
Author:   [email protected]
Date:     Mon May 12 07:43:47 2014 UTC
Log:      Revert interrupt handling code changed in r21208.

[email protected]

Review URL: https://codereview.chromium.org/277233004
http://code.google.com/p/v8/source/detail?r=21252

Modified:
 /branches/bleeding_edge/src/execution.cc
 /branches/bleeding_edge/src/execution.h

=======================================
--- /branches/bleeding_edge/src/execution.cc    Fri May  9 09:13:12 2014 UTC
+++ /branches/bleeding_edge/src/execution.cc    Mon May 12 07:43:47 2014 UTC
@@ -386,18 +386,6 @@
     reset_limits(access);
   }
 }
-
-
-bool StackGuard::CheckAndClearInterrupt(InterruptFlag flag,
-                                        const ExecutionAccess& lock) {
-  int flagbit = 1 << flag;
-  bool result = (thread_local_.interrupt_flags_ & flagbit);
-  thread_local_.interrupt_flags_ &= ~flagbit;
-  if (!should_postpone_interrupts(lock) && !has_pending_interrupts(lock)) {
-    reset_limits(lock);
-  }
-  return result;
-}


 char* StackGuard::ArchiveStackGuard(char* to) {
@@ -732,37 +720,44 @@


 Object* StackGuard::HandleInterrupts() {
-  ExecutionAccess access(isolate_);
-  if (should_postpone_interrupts(access)) {
-    return isolate_->heap()->undefined_value();
+  { ExecutionAccess access(isolate_);
+    if (should_postpone_interrupts(access)) {
+      return isolate_->heap()->undefined_value();
+    }
   }

-  if (CheckAndClearInterrupt(API_INTERRUPT, access)) {
+  if (CheckApiInterrupt()) {
+    ClearApiInterrupt();
     isolate_->InvokeApiInterruptCallback();
   }

-  if (CheckAndClearInterrupt(GC_REQUEST, access)) {
+  if (CheckGC()) {
     isolate_->heap()->CollectAllGarbage(Heap::kNoGCFlags, "GC interrupt");
+    ClearGC();
   }

   if (CheckDebugBreak() || CheckDebugCommand()) {
     Execution::DebugBreakHelper(isolate_);
   }

-  if (CheckAndClearInterrupt(TERMINATE_EXECUTION, access)) {
+  if (CheckTerminateExecution()) {
+    ClearTerminateExecution();
     return isolate_->TerminateExecution();
   }

-  if (CheckAndClearInterrupt(FULL_DEOPT, access)) {
+  if (CheckFullDeopt()) {
+    ClearFullDeopt();
     Deoptimizer::DeoptimizeAll(isolate_);
   }

-  if (CheckAndClearInterrupt(DEOPT_MARKED_ALLOCATION_SITES, access)) {
+  if (CheckDeoptMarkedAllocationSites()) {
+    ClearDeoptMarkedAllocationSites();
     isolate_->heap()->DeoptMarkedAllocationSites();
   }

-  if (CheckAndClearInterrupt(INSTALL_CODE, access)) {
+  if (CheckInstallCode()) {
     ASSERT(isolate_->concurrent_recompilation_enabled());
+    ClearInstallCode();
     isolate_->optimizing_compiler_thread()->InstallOptimizedFunctions();
   }

=======================================
--- /branches/bleeding_edge/src/execution.h     Fri May  9 09:13:12 2014 UTC
+++ /branches/bleeding_edge/src/execution.h     Mon May 12 07:43:47 2014 UTC
@@ -210,7 +210,6 @@
   bool CheckInterrupt(int flagbit);
   void RequestInterrupt(int flagbit);
   void ClearInterrupt(int flagbit);
- bool CheckAndClearInterrupt(InterruptFlag flag, const ExecutionAccess& lock);

   void InvokeApiInterruptCallback();

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to