Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: src/compiler.cc

Issue 18198003: Abort optimization when debugger is turned on. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/debug.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 isolate, Logger::TimerEventScope::v8_recompile_synchronous); 1051 isolate, Logger::TimerEventScope::v8_recompile_synchronous);
1052 // If crankshaft succeeded, install the optimized code else install 1052 // If crankshaft succeeded, install the optimized code else install
1053 // the unoptimized code. 1053 // the unoptimized code.
1054 OptimizingCompiler::Status status = optimizing_compiler->last_status(); 1054 OptimizingCompiler::Status status = optimizing_compiler->last_status();
1055 if (info->HasAbortedDueToDependencyChange()) { 1055 if (info->HasAbortedDueToDependencyChange()) {
1056 info->set_bailout_reason("bailed out due to dependent map"); 1056 info->set_bailout_reason("bailed out due to dependent map");
1057 status = optimizing_compiler->AbortOptimization(); 1057 status = optimizing_compiler->AbortOptimization();
1058 } else if (status != OptimizingCompiler::SUCCEEDED) { 1058 } else if (status != OptimizingCompiler::SUCCEEDED) {
1059 info->set_bailout_reason("failed/bailed out last time"); 1059 info->set_bailout_reason("failed/bailed out last time");
1060 status = optimizing_compiler->AbortOptimization(); 1060 status = optimizing_compiler->AbortOptimization();
1061 } else if (isolate->debugger()->IsDebuggerActive()) {
1062 info->set_bailout_reason("debugger is active");
1063 status = optimizing_compiler->AbortOptimization();
1061 } else { 1064 } else {
1062 status = optimizing_compiler->GenerateAndInstallCode(); 1065 status = optimizing_compiler->GenerateAndInstallCode();
1063 ASSERT(status == OptimizingCompiler::SUCCEEDED || 1066 ASSERT(status == OptimizingCompiler::SUCCEEDED ||
1064 status == OptimizingCompiler::BAILED_OUT); 1067 status == OptimizingCompiler::BAILED_OUT);
1065 } 1068 }
1066 1069
1067 InstallCodeCommon(*info); 1070 InstallCodeCommon(*info);
1068 if (status == OptimizingCompiler::SUCCEEDED) { 1071 if (status == OptimizingCompiler::SUCCEEDED) {
1069 Handle<Code> code = info->code(); 1072 Handle<Code> code = info->code();
1070 ASSERT(info->shared_info()->scope_info() != ScopeInfo::Empty(isolate)); 1073 ASSERT(info->shared_info()->scope_info() != ScopeInfo::Empty(isolate));
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 1245
1243 1246
1244 bool CompilationPhase::ShouldProduceTraceOutput() const { 1247 bool CompilationPhase::ShouldProduceTraceOutput() const {
1245 // Produce trace output if flag is set so that the first letter of the 1248 // Produce trace output if flag is set so that the first letter of the
1246 // phase name matches the command line parameter FLAG_trace_phase. 1249 // phase name matches the command line parameter FLAG_trace_phase.
1247 return (FLAG_trace_hydrogen && 1250 return (FLAG_trace_hydrogen &&
1248 OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); 1251 OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL);
1249 } 1252 }
1250 1253
1251 } } // namespace v8::internal 1254 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698