From: fschneider@chromium.org Date: Wed, 4 Nov 2009 19:04:29 +0000 (+0000) Subject: Add support for debugger statement to top-level compiler. X-Git-Tag: upstream/4.7.83~23006 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=877db0f5390a9685bf45ee8546d09d3b73b0d31c;p=platform%2Fupstream%2Fv8.git Add support for debugger statement to top-level compiler. Review URL: http://codereview.chromium.org/366004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3220 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/compiler.cc b/src/compiler.cc index 32ce6f5d2..8a0acfeb3 100644 --- a/src/compiler.cc +++ b/src/compiler.cc @@ -742,7 +742,7 @@ void CodeGenSelector::VisitTryFinallyStatement(TryFinallyStatement* stmt) { void CodeGenSelector::VisitDebuggerStatement(DebuggerStatement* stmt) { - BAILOUT("DebuggerStatement"); + // Debugger statement is supported. } diff --git a/src/fast-codegen.cc b/src/fast-codegen.cc index ed83dca91..ad76b10ca 100644 --- a/src/fast-codegen.cc +++ b/src/fast-codegen.cc @@ -369,7 +369,12 @@ void FastCodeGenerator::VisitTryFinallyStatement(TryFinallyStatement* stmt) { void FastCodeGenerator::VisitDebuggerStatement(DebuggerStatement* stmt) { - UNREACHABLE(); +#ifdef ENABLE_DEBUGGER_SUPPORT + Comment cmnt(masm_, "[ DebuggerStatement"); + SetStatementPosition(stmt); + __ CallRuntime(Runtime::kDebugBreak, 0); + // Ignore the return value. +#endif }