Reviewers: vsevik,

Message:
Flags was added with live edit. Now, it isn't used.
There is one function - Debug::OnAfterCompile, where the flags used in the past: if (was_in_scope && (after_compile_flags & SEND_WHEN_DEBUGGING) == 0) return; "(after_compile_flags & SEND_WHEN_DEBUGGING) == 0" is not currently reachable.

Description:
Remove unused Debug::AfterCompileFlags flags.

Please review this at https://codereview.chromium.org/353823004/

SVN Base: git://github.com/v8/v8.git@master

Affected files (+4, -16 lines):
  M src/compiler.cc
  M src/debug.h
  M src/debug.cc
  M src/liveedit.cc


Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index d9fb4a9b0d0335045a42477c6378879061f555c4..84360752f2361792317873b8352c4cce56c9a3cf 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -858,7 +858,7 @@ static Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) {
     live_edit_tracker.RecordFunctionInfo(result, lit, info->zone());
   }

-  isolate->debug()->OnAfterCompile(script, Debug::NO_AFTER_COMPILE_FLAGS);
+  isolate->debug()->OnAfterCompile(script);

   return result;
 }
Index: src/debug.cc
diff --git a/src/debug.cc b/src/debug.cc
index cf5cf435d42f1c53b14fe5097dec4f12ac770e10..a6aa0625b0fd879aed8877d1c83006e19e4c0d7e 100644
--- a/src/debug.cc
+++ b/src/debug.cc
@@ -2647,8 +2647,7 @@ void Debug::OnBeforeCompile(Handle<Script> script) {


 // Handle debugger actions when a new script is compiled.
-void Debug::OnAfterCompile(Handle<Script> script,
-                           AfterCompileFlags after_compile_flags) {
+void Debug::OnAfterCompile(Handle<Script> script) {
   // Add the newly compiled script to the script cache.
   if (script_cache_ != NULL) script_cache_->Add(script);

@@ -2656,9 +2655,6 @@ void Debug::OnAfterCompile(Handle<Script> script,
   if (in_debug_scope() || ignore_events()) return;

   HandleScope scope(isolate_);
-  // Store whether in debugger before entering debugger.
-  bool was_in_scope = in_debug_scope();
-
   DebugScope debug_scope(this);
   if (debug_scope.failed()) return;

@@ -2690,8 +2686,6 @@ void Debug::OnAfterCompile(Handle<Script> script,
                          argv).is_null()) {
     return;
   }
-  // Bail out based on state or if there is no listener for this event
- if (was_in_scope && (after_compile_flags & SEND_WHEN_DEBUGGING) == 0) return;

   // Create the compile state object.
   Handle<Object> event_data;
Index: src/debug.h
diff --git a/src/debug.h b/src/debug.h
index b672940c0f9ef58738c3d2dfeb8bfc91267b9526..c389c0120f241aa73ae714f36738637a1d3b90bd 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -364,17 +364,11 @@ class PromiseOnStack {
 // DebugInfo.
 class Debug {
  public:
-  enum AfterCompileFlags {
-    NO_AFTER_COMPILE_FLAGS,
-    SEND_WHEN_DEBUGGING
-  };
-
   // Debug event triggers.
   void OnDebugBreak(Handle<Object> break_points_hit, bool auto_continue);
   void OnException(Handle<Object> exception, bool uncaught);
   void OnBeforeCompile(Handle<Script> script);
-  void OnAfterCompile(Handle<Script> script,
-                      AfterCompileFlags after_compile_flags);
+  void OnAfterCompile(Handle<Script> script);
   void OnScriptCollected(int id);

   // API facing.
Index: src/liveedit.cc
diff --git a/src/liveedit.cc b/src/liveedit.cc
index 05bd550b65ed4d61f9cd9c980bab58ef76ef917e..02f707ce84f327968c3a1a8071025958f4233220 100644
--- a/src/liveedit.cc
+++ b/src/liveedit.cc
@@ -1477,7 +1477,7 @@ Handle<Object> LiveEdit::ChangeScriptSource(Handle<Script> original_script,
     Handle<Script> old_script = CreateScriptCopy(original_script);
     old_script->set_name(String::cast(*old_script_name));
     old_script_object = old_script;
- isolate->debug()->OnAfterCompile(old_script, Debug::SEND_WHEN_DEBUGGING);
+    isolate->debug()->OnAfterCompile(old_script);
   } else {
     old_script_object = isolate->factory()->null_value();
   }


--
--
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