Reviewers: Kevin Millikin,

Description:
Add support for debugger statement to top-level compiler.


Please review this at http://codereview.chromium.org/366004

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
   M     src/compiler.cc
   M     src/fast-codegen.cc


Index: src/compiler.cc
===================================================================
--- src/compiler.cc     (revision 3217)
+++ src/compiler.cc     (working copy)
@@ -634,7 +634,7 @@


  void CodeGenSelector::VisitDebuggerStatement(DebuggerStatement* stmt) {
-  BAILOUT("DebuggerStatement");
+  // Debugger statement is supported.
  }


Index: src/fast-codegen.cc
===================================================================
--- src/fast-codegen.cc (revision 3217)
+++ src/fast-codegen.cc (working copy)
@@ -401,7 +401,12 @@


  void FastCodeGenerator::VisitDebuggerStatement(DebuggerStatement* stmt) {
-  UNREACHABLE();
+  Comment cmnt(masm_, "[ DebuggerStatement");
+  SetStatementPosition(stmt);
+#ifdef ENABLE_DEBUGGER_SUPPORT
+  __ CallRuntime(Runtime::kDebugBreak, 0);
+  // Ignore the return value.
+#endif
  }





--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to