Commit 870ef6bd authored by sgjesse@chromium.org's avatar sgjesse@chromium.org

Remove the flag --debug-info

This flag has not bees set to false for years, and even when building without debugging support the position information is required for stack traces.

R=ager@chromium.org

BUG=none
TEST=none

Review URL: http://codereview.chromium.org//7046078

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8252 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 2481f0fc
...@@ -770,7 +770,7 @@ void LCodeGen::RecordSafepointWithRegistersAndDoubles( ...@@ -770,7 +770,7 @@ void LCodeGen::RecordSafepointWithRegistersAndDoubles(
void LCodeGen::RecordPosition(int position) { void LCodeGen::RecordPosition(int position) {
if (!FLAG_debug_info || position == RelocInfo::kNoPosition) return; if (position == RelocInfo::kNoPosition) return;
masm()->positions_recorder()->RecordPosition(position); masm()->positions_recorder()->RecordPosition(position);
} }
......
...@@ -199,7 +199,6 @@ DEFINE_bool(opt, true, "use adaptive optimizations") ...@@ -199,7 +199,6 @@ DEFINE_bool(opt, true, "use adaptive optimizations")
DEFINE_bool(opt_eagerly, false, "be more eager when adaptively optimizing") DEFINE_bool(opt_eagerly, false, "be more eager when adaptively optimizing")
DEFINE_bool(always_opt, false, "always try to optimize functions") DEFINE_bool(always_opt, false, "always try to optimize functions")
DEFINE_bool(prepare_always_opt, false, "prepare for turning on always opt") DEFINE_bool(prepare_always_opt, false, "prepare for turning on always opt")
DEFINE_bool(debug_info, true, "add debug information to compiled functions")
DEFINE_bool(deopt, true, "support deoptimization") DEFINE_bool(deopt, true, "support deoptimization")
DEFINE_bool(trace_deopt, false, "trace deoptimization") DEFINE_bool(trace_deopt, false, "trace deoptimization")
......
...@@ -572,88 +572,78 @@ void FullCodeGenerator::VisitDeclarations( ...@@ -572,88 +572,78 @@ void FullCodeGenerator::VisitDeclarations(
void FullCodeGenerator::SetFunctionPosition(FunctionLiteral* fun) { void FullCodeGenerator::SetFunctionPosition(FunctionLiteral* fun) {
if (FLAG_debug_info) { CodeGenerator::RecordPositions(masm_, fun->start_position());
CodeGenerator::RecordPositions(masm_, fun->start_position());
}
} }
void FullCodeGenerator::SetReturnPosition(FunctionLiteral* fun) { void FullCodeGenerator::SetReturnPosition(FunctionLiteral* fun) {
if (FLAG_debug_info) { CodeGenerator::RecordPositions(masm_, fun->end_position() - 1);
CodeGenerator::RecordPositions(masm_, fun->end_position() - 1);
}
} }
void FullCodeGenerator::SetStatementPosition(Statement* stmt) { void FullCodeGenerator::SetStatementPosition(Statement* stmt) {
if (FLAG_debug_info) {
#ifdef ENABLE_DEBUGGER_SUPPORT #ifdef ENABLE_DEBUGGER_SUPPORT
if (!isolate()->debugger()->IsDebuggerActive()) { if (!isolate()->debugger()->IsDebuggerActive()) {
CodeGenerator::RecordPositions(masm_, stmt->statement_pos()); CodeGenerator::RecordPositions(masm_, stmt->statement_pos());
} else { } else {
// Check if the statement will be breakable without adding a debug break // Check if the statement will be breakable without adding a debug break
// slot. // slot.
BreakableStatementChecker checker; BreakableStatementChecker checker;
checker.Check(stmt); checker.Check(stmt);
// Record the statement position right here if the statement is not // Record the statement position right here if the statement is not
// breakable. For breakable statements the actual recording of the // breakable. For breakable statements the actual recording of the
// position will be postponed to the breakable code (typically an IC). // position will be postponed to the breakable code (typically an IC).
bool position_recorded = CodeGenerator::RecordPositions( bool position_recorded = CodeGenerator::RecordPositions(
masm_, stmt->statement_pos(), !checker.is_breakable()); masm_, stmt->statement_pos(), !checker.is_breakable());
// If the position recording did record a new position generate a debug // If the position recording did record a new position generate a debug
// break slot to make the statement breakable. // break slot to make the statement breakable.
if (position_recorded) { if (position_recorded) {
Debug::GenerateSlot(masm_); Debug::GenerateSlot(masm_);
}
} }
}
#else #else
CodeGenerator::RecordPositions(masm_, stmt->statement_pos()); CodeGenerator::RecordPositions(masm_, stmt->statement_pos());
#endif #endif
}
} }
void FullCodeGenerator::SetExpressionPosition(Expression* expr, int pos) { void FullCodeGenerator::SetExpressionPosition(Expression* expr, int pos) {
if (FLAG_debug_info) {
#ifdef ENABLE_DEBUGGER_SUPPORT #ifdef ENABLE_DEBUGGER_SUPPORT
if (!isolate()->debugger()->IsDebuggerActive()) { if (!isolate()->debugger()->IsDebuggerActive()) {
CodeGenerator::RecordPositions(masm_, pos); CodeGenerator::RecordPositions(masm_, pos);
} else { } else {
// Check if the expression will be breakable without adding a debug break // Check if the expression will be breakable without adding a debug break
// slot. // slot.
BreakableStatementChecker checker; BreakableStatementChecker checker;
checker.Check(expr); checker.Check(expr);
// Record a statement position right here if the expression is not // Record a statement position right here if the expression is not
// breakable. For breakable expressions the actual recording of the // breakable. For breakable expressions the actual recording of the
// position will be postponed to the breakable code (typically an IC). // position will be postponed to the breakable code (typically an IC).
// NOTE this will record a statement position for something which might // NOTE this will record a statement position for something which might
// not be a statement. As stepping in the debugger will only stop at // not be a statement. As stepping in the debugger will only stop at
// statement positions this is used for e.g. the condition expression of // statement positions this is used for e.g. the condition expression of
// a do while loop. // a do while loop.
bool position_recorded = CodeGenerator::RecordPositions( bool position_recorded = CodeGenerator::RecordPositions(
masm_, pos, !checker.is_breakable()); masm_, pos, !checker.is_breakable());
// If the position recording did record a new position generate a debug // If the position recording did record a new position generate a debug
// break slot to make the statement breakable. // break slot to make the statement breakable.
if (position_recorded) { if (position_recorded) {
Debug::GenerateSlot(masm_); Debug::GenerateSlot(masm_);
}
} }
}
#else #else
CodeGenerator::RecordPositions(masm_, pos); CodeGenerator::RecordPositions(masm_, pos);
#endif #endif
}
} }
void FullCodeGenerator::SetStatementPosition(int pos) { void FullCodeGenerator::SetStatementPosition(int pos) {
if (FLAG_debug_info) { CodeGenerator::RecordPositions(masm_, pos);
CodeGenerator::RecordPositions(masm_, pos);
}
} }
void FullCodeGenerator::SetSourcePosition(int pos) { void FullCodeGenerator::SetSourcePosition(int pos) {
if (FLAG_debug_info && pos != RelocInfo::kNoPosition) { if (pos != RelocInfo::kNoPosition) {
masm_->positions_recorder()->RecordPosition(pos); masm_->positions_recorder()->RecordPosition(pos);
} }
} }
......
...@@ -693,7 +693,7 @@ void LCodeGen::RecordSafepointWithRegisters(LPointerMap* pointers, ...@@ -693,7 +693,7 @@ void LCodeGen::RecordSafepointWithRegisters(LPointerMap* pointers,
void LCodeGen::RecordPosition(int position) { void LCodeGen::RecordPosition(int position) {
if (!FLAG_debug_info || position == RelocInfo::kNoPosition) return; if (position == RelocInfo::kNoPosition) return;
masm()->positions_recorder()->RecordPosition(position); masm()->positions_recorder()->RecordPosition(position);
} }
......
...@@ -692,7 +692,7 @@ void LCodeGen::RecordSafepointWithRegisters(LPointerMap* pointers, ...@@ -692,7 +692,7 @@ void LCodeGen::RecordSafepointWithRegisters(LPointerMap* pointers,
void LCodeGen::RecordPosition(int position) { void LCodeGen::RecordPosition(int position) {
if (!FLAG_debug_info || position == RelocInfo::kNoPosition) return; if (position == RelocInfo::kNoPosition) return;
masm()->positions_recorder()->RecordPosition(position); masm()->positions_recorder()->RecordPosition(position);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment