Commit 0ee34c83 authored by titzer@chromium.org's avatar titzer@chromium.org

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
parent 4539e9b9
......@@ -1246,7 +1246,8 @@ MaybeHandle<Code> Compiler::GetOptimizedCode(Handle<JSFunction> function,
PostponeInterruptsScope postpone(isolate);
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.
CompilationInfoWithZone nested(function);
nested.EnableDeoptimizationSupport();
......
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