Put a slow assert under the enable_slow_asserts flag.

Otherwise really large functions take too long to compile
in debug mode.
Review URL: http://codereview.chromium.org/9212040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10480 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 2284996c
......@@ -370,12 +370,14 @@ void FullCodeGenerator::PrepareForBailoutForId(unsigned id, State state) {
StateField::encode(state) | PcField::encode(masm_->pc_offset());
BailoutEntry entry = { id, pc_and_state };
#ifdef DEBUG
// Assert that we don't have multiple bailout entries for the same node.
for (int i = 0; i < bailout_entries_.length(); i++) {
if (bailout_entries_.at(i).id == entry.id) {
AstPrinter printer;
PrintF("%s", printer.PrintProgram(info_->function()));
UNREACHABLE();
if (FLAG_enable_slow_asserts) {
// Assert that we don't have multiple bailout entries for the same node.
for (int i = 0; i < bailout_entries_.length(); i++) {
if (bailout_entries_.at(i).id == entry.id) {
AstPrinter printer;
PrintF("%s", printer.PrintProgram(info_->function()));
UNREACHABLE();
}
}
}
#endif // DEBUG
......
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