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

Side by Side Diff: src/compiler.cc

Issue 538003002: Fix OptimizeFunctionOnNextCall fix. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | no next file » | 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after
1239 } 1239 }
1240 1240
1241 SmartPointer<CompilationInfo> info(new CompilationInfoWithZone(function)); 1241 SmartPointer<CompilationInfo> info(new CompilationInfoWithZone(function));
1242 Isolate* isolate = info->isolate(); 1242 Isolate* isolate = info->isolate();
1243 DCHECK(AllowCompilation::IsAllowed(isolate)); 1243 DCHECK(AllowCompilation::IsAllowed(isolate));
1244 VMState<COMPILER> state(isolate); 1244 VMState<COMPILER> state(isolate);
1245 DCHECK(!isolate->has_pending_exception()); 1245 DCHECK(!isolate->has_pending_exception());
1246 PostponeInterruptsScope postpone(isolate); 1246 PostponeInterruptsScope postpone(isolate);
1247 1247
1248 Handle<SharedFunctionInfo> shared = info->shared_info(); 1248 Handle<SharedFunctionInfo> shared = info->shared_info();
1249 if (ScopeInfo::Empty(isolate) == shared->scope_info()) { 1249 if (shared->code()->kind() != Code::FUNCTION ||
1250 ScopeInfo::Empty(isolate) == shared->scope_info()) {
1250 // The function was never compiled. Compile it unoptimized first. 1251 // The function was never compiled. Compile it unoptimized first.
1251 CompilationInfoWithZone nested(function); 1252 CompilationInfoWithZone nested(function);
1252 nested.EnableDeoptimizationSupport(); 1253 nested.EnableDeoptimizationSupport();
1253 if (!GetUnoptimizedCodeCommon(&nested).ToHandle(&current_code)) { 1254 if (!GetUnoptimizedCodeCommon(&nested).ToHandle(&current_code)) {
1254 return MaybeHandle<Code>(); 1255 return MaybeHandle<Code>();
1255 } 1256 }
1256 } 1257 }
1257 int compiled_size = shared->end_position() - shared->start_position(); 1258 int compiled_size = shared->end_position() - shared->start_position();
1258 isolate->counters()->total_compile_size()->Increment(compiled_size); 1259 isolate->counters()->total_compile_size()->Increment(compiled_size);
1259 current_code->set_profiler_ticks(0); 1260 current_code->set_profiler_ticks(0);
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1386 AllowHandleDereference allow_deref; 1387 AllowHandleDereference allow_deref;
1387 bool tracing_on = info()->IsStub() 1388 bool tracing_on = info()->IsStub()
1388 ? FLAG_trace_hydrogen_stubs 1389 ? FLAG_trace_hydrogen_stubs
1389 : (FLAG_trace_hydrogen && 1390 : (FLAG_trace_hydrogen &&
1390 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); 1391 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter));
1391 return (tracing_on && 1392 return (tracing_on &&
1392 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); 1393 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL);
1393 } 1394 }
1394 1395
1395 } } // namespace v8::internal 1396 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698