| Index: src/compiler.cc
|
| diff --git a/src/compiler.cc b/src/compiler.cc
|
| index 9d942c6846d203fa59ff6a8ff86f9fbcc84b0787..5f12138c16a29ba2b0375cc7b08b9633b05108be 100644
|
| --- a/src/compiler.cc
|
| +++ b/src/compiler.cc
|
| @@ -168,7 +168,6 @@ CompilationInfo::CompilationInfo(ParseInfo* parse_info, const char* debug_name,
|
| prologue_offset_(Code::kPrologueOffsetNotSet),
|
| track_positions_(FLAG_hydrogen_track_positions ||
|
| isolate->cpu_profiler()->is_profiling()),
|
| - opt_count_(has_shared_info() ? shared_info()->opt_count() : 0),
|
| parameter_count_(0),
|
| optimization_id_(-1),
|
| osr_expr_stack_height_(0),
|
| @@ -378,7 +377,7 @@ OptimizedCompileJob::Status OptimizedCompileJob::CreateGraph() {
|
| // Limit the number of times we try to optimize functions.
|
| const int kMaxOptCount =
|
| FLAG_deopt_every_n_times == 0 ? FLAG_max_opt_count : 1000;
|
| - if (info()->opt_count() > kMaxOptCount) {
|
| + if (info()->shared_info()->opt_count() > kMaxOptCount) {
|
| return AbortOptimization(kOptimizedTooManyTimes);
|
| }
|
|
|
|
|