Fix OptimizeFunctionOnNextCall fix.

R=yangguo@chromium.org
BUG=

Review URL: https://codereview.chromium.org/538003002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23698 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
titzer@chromium.org 2014-09-04 14:07:17 +00:00
parent 4539e9b936
commit 0ee34c8354

View File

@ -1246,7 +1246,8 @@ MaybeHandle<Code> Compiler::GetOptimizedCode(Handle<JSFunction> function,
PostponeInterruptsScope postpone(isolate); PostponeInterruptsScope postpone(isolate);
Handle<SharedFunctionInfo> shared = info->shared_info(); Handle<SharedFunctionInfo> shared = info->shared_info();
if (ScopeInfo::Empty(isolate) == shared->scope_info()) { if (shared->code()->kind() != Code::FUNCTION ||
ScopeInfo::Empty(isolate) == shared->scope_info()) {
// The function was never compiled. Compile it unoptimized first. // The function was never compiled. Compile it unoptimized first.
CompilationInfoWithZone nested(function); CompilationInfoWithZone nested(function);
nested.EnableDeoptimizationSupport(); nested.EnableDeoptimizationSupport();